./PaxHeaders.8028/yadifa-2.1.6-58260000644000077100007710000000013212654663026014425 xustar000000000000000030 mtime=1454597654.002344534 30 atime=1454597650.404344534 30 ctime=1454597654.002344534 yadifa-2.1.6-5826/0000775000077100007710000000000012654663026014153 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/PaxHeaders.8028/TODO0000644000077100007710000000012412610121331015012 xustar000000000000000027 mtime=1444979417.160777 27 atime=1454597464.081344 30 ctime=1454597650.510344534 yadifa-2.1.6-5826/TODO0000664000077100007710000000000012610121331014605 0ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/PaxHeaders.8028/Makefile.am0000644000077100007710000000012412650131756016376 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.827344 30 ctime=1454597650.436344534 yadifa-2.1.6-5826/Makefile.am0000664000077100007710000000435112650131756016206 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ ACLOCAL_AMFLAGS = -I m4 dist_noinst_DATA = VERSION SUBDIRS = lib/dnscore lib/dnsdb lib/dnszone sbin/yadifad etc doc var if HAS_TOOLS SUBDIRS += lib/dnslg SUBDIRS += bin/yadifa endif release: for m in $(SUBDIRS); do $(MAKE) -C $$m release;done profile: for m in $(SUBDIRS); do $(MAKE) -C $$m profile;done debug: for m in $(SUBDIRS); do $(MAKE) -C $$m debug;done yadifa-2.1.6-5826/PaxHeaders.8028/ChangeLog0000644000077100007710000000012412610121331016074 xustar000000000000000027 mtime=1444979417.160777 27 atime=1454597463.909344 30 ctime=1454597650.496344534 yadifa-2.1.6-5826/ChangeLog0000664000077100007710000000001312610121331015673 0ustar00yadifayadifa00000000000000see README yadifa-2.1.6-5826/PaxHeaders.8028/AUTHORS0000644000077100007710000000012412602224676015413 xustar000000000000000027 mtime=1443441086.055718 27 atime=1454597463.908344 30 ctime=1454597650.489344534 yadifa-2.1.6-5826/AUTHORS0000664000077100007710000000013512602224676015217 0ustar00yadifayadifa00000000000000Gery Van Emelen Eric Diaz Fernandez yadifa-2.1.6-5826/PaxHeaders.8028/Makefile.in0000644000077100007710000000013212654662555016420 xustar000000000000000030 mtime=1454597485.897344534 30 atime=1454597485.897344534 30 ctime=1454597650.482344534 yadifa-2.1.6-5826/Makefile.in0000664000077100007710000007224312654662555016236 0ustar00yadifayadifa00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@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@ @HAS_TOOLS_TRUE@am__append_1 = lib/dnslg bin/yadifa subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/eurid.m4 $(top_srcdir)/m4/yadifa.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(dist_noinst_DATA) $(am__DIST_COMMON) 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 = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-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 \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dist_noinst_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = lib/dnscore lib/dnsdb lib/dnszone sbin/yadifad etc doc \ var lib/dnslg bin/yadifa am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ COPYING ChangeLog INSTALL NEWS README TODO compile \ config.guess config.sub install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print VPATH = @srcdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCOPTIMISATIONFLAGS = @CCOPTIMISATIONFLAGS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAS_ACL_SUPPORT = @HAS_ACL_SUPPORT@ HAS_BFD_DEBUG_SUPPORT = @HAS_BFD_DEBUG_SUPPORT@ HAS_BIG_ENDIAN = @HAS_BIG_ENDIAN@ HAS_CC_ADDRESS_SANITIZER_CHECK = @HAS_CC_ADDRESS_SANITIZER_CHECK@ HAS_CC_ANSI = @HAS_CC_ANSI@ HAS_CC_ANSI_ALIAS = @HAS_CC_ANSI_ALIAS@ HAS_CC_CATCH_UNDEFINED_BEHAVIOR = @HAS_CC_CATCH_UNDEFINED_BEHAVIOR@ HAS_CC_DWARF2 = @HAS_CC_DWARF2@ HAS_CC_DWARF3 = @HAS_CC_DWARF3@ HAS_CC_DWARF4 = @HAS_CC_DWARF4@ HAS_CC_EXCEPTIONS = @HAS_CC_EXCEPTIONS@ HAS_CC_G = @HAS_CC_G@ HAS_CC_G3 = @HAS_CC_G3@ HAS_CC_M32 = @HAS_CC_M32@ HAS_CC_M64 = @HAS_CC_M64@ HAS_CC_MISSING_FIELD_INITIALIZERS = @HAS_CC_MISSING_FIELD_INITIALIZERS@ HAS_CC_NO_IDENT = @HAS_CC_NO_IDENT@ HAS_CC_NO_OMIT_FRAME_POINTER = @HAS_CC_NO_OMIT_FRAME_POINTER@ HAS_CC_PEDANTIC = @HAS_CC_PEDANTIC@ HAS_CC_RDYNAMIC = @HAS_CC_RDYNAMIC@ HAS_CC_SANITIZE_ADDRESS = @HAS_CC_SANITIZE_ADDRESS@ HAS_CC_STACK_PROTECTOR = @HAS_CC_STACK_PROTECTOR@ HAS_CC_STD_C99 = @HAS_CC_STD_C99@ HAS_CC_STD_GNU99 = @HAS_CC_STD_GNU99@ HAS_CC_TUNE_NATIVE = @HAS_CC_TUNE_NATIVE@ HAS_CC_WALL = @HAS_CC_WALL@ HAS_CC_XC99 = @HAS_CC_XC99@ HAS_CTRL = @HAS_CTRL@ HAS_CTRL_DYNAMIC_PROVISIONING = @HAS_CTRL_DYNAMIC_PROVISIONING@ HAS_DYNUPDATE_SUPPORT = @HAS_DYNUPDATE_SUPPORT@ HAS_FULL_ASCII7 = @HAS_FULL_ASCII7@ HAS_LITTLE_ENDIAN = @HAS_LITTLE_ENDIAN@ HAS_LOGDIR = @HAS_LOGDIR@ HAS_LOG_PID_ALWAYS_ON = @HAS_LOG_PID_ALWAYS_ON@ HAS_LOG_THREAD_ID_ALWAYS_ON = @HAS_LOG_THREAD_ID_ALWAYS_ON@ HAS_MALLOC_DEBUG_SUPPORT = @HAS_MALLOC_DEBUG_SUPPORT@ HAS_MASTER_SUPPORT = @HAS_MASTER_SUPPORT@ HAS_MESSAGES_SUPPORT = @HAS_MESSAGES_SUPPORT@ HAS_MUTEX_DEBUG_SUPPORT = @HAS_MUTEX_DEBUG_SUPPORT@ HAS_NON_AA_AXFR_SUPPORT = @HAS_NON_AA_AXFR_SUPPORT@ HAS_NSID_SUPPORT = @HAS_NSID_SUPPORT@ HAS_RRL_SUPPORT = @HAS_RRL_SUPPORT@ HAS_RRSIG_MANAGEMENT_SUPPORT = @HAS_RRSIG_MANAGEMENT_SUPPORT@ HAS_TOOLS = @HAS_TOOLS@ HAS_TSIG_SUPPORT = @HAS_TSIG_SUPPORT@ HAS_ZALLOC_DEBUG_SUPPORT = @HAS_ZALLOC_DEBUG_SUPPORT@ HAS_ZALLOC_STATISTICS_SUPPORT = @HAS_ZALLOC_STATISTICS_SUPPORT@ HAS_ZALLOC_SUPPORT = @HAS_ZALLOC_SUPPORT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IS_BSD_FAMILY = @IS_BSD_FAMILY@ IS_DARWIN_OS = @IS_DARWIN_OS@ IS_LINUX_FAMILY = @IS_LINUX_FAMILY@ IS_SOLARIS_FAMILY = @IS_SOLARIS_FAMILY@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ 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@ logdir = @logdir@ 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@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 dist_noinst_DATA = VERSION SUBDIRS = lib/dnscore lib/dnsdb lib/dnszone sbin/yadifad etc doc var \ $(am__append_1) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu 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: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 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: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # 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. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ 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; \ ($(am__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" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ 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 || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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 "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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 \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -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__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(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 \ && cd "$$am__cwd" \ || exit 1 $(am__post_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: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { 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 $(DATA) 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: 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: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz 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-am uninstall \ uninstall-am .PRECIOUS: Makefile release: for m in $(SUBDIRS); do $(MAKE) -C $$m release;done profile: for m in $(SUBDIRS); do $(MAKE) -C $$m profile;done debug: for m in $(SUBDIRS); do $(MAKE) -C $$m debug;done # 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: yadifa-2.1.6-5826/PaxHeaders.8028/INSTALL0000644000077100007710000000012412602224676015374 xustar000000000000000027 mtime=1443441086.055718 27 atime=1454597464.101344 30 ctime=1454597650.499344534 yadifa-2.1.6-5826/INSTALL0000664000077100007710000004151712602224676015211 0ustar00yadifayadifa00000000000000Quick installation ****************** You will need the most up-to-date aclocal, autoheader, automake, autoconf, make and a C compiler installed (clang, icc or gcc >= 4.6) By default gcc is used but you can specify your compiler adding CC=x in ./configure. ie: ./configure CC=clang openssl has to be build with shared Note that gcc < 4.6 will be build with -O0 and > 4.6 with -O3 ./configure make sudo make install cd /usr/local sudo mkdir -p var/run var/log var/zones/keys var/zones/masters var/zones/slaves var/zones/xfr Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `--with-openssl=DIR' Use the openssl from directory DIR (where DIR is the PREFIX of openssl) `--enable-tiny-footprint' This will change the behaviour of the memory allocation of the database. It will take the smallest increase in memory required to fulfill an allocation instead of getting a bunch at once. Disabled by default. `--enable-messages' Will use recvmsg/sendmsg instead of recvfrom/sendto. This is only useful if * any interface the server listens from has aliased IPs. (ie: eth0 & eth0:1) AND * the server is configured to listen to 0.0.0.0 (it's its default) Having aliased addresses on interfaces can also be handled without using messages but enumerating the listen addresses in yadifad.conf instead. ie: listen 192.0.2.1, 192.0.2.2 `--enable-lto' Will use the Link Time Optimisations of gcc (or ipo for ICC) The gain of speed is very marginal so it is not recommended `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. yadifa-2.1.6-5826/PaxHeaders.8028/compile0000644000077100007710000000013212473710127015712 xustar000000000000000030 mtime=1424986199.162058409 30 atime=1424986199.162058409 30 ctime=1454597650.514344534 yadifa-2.1.6-5826/compile0000755000077100007710000001624512473710127015531 0ustar00yadifayadifa00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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, 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/PaxHeaders.8028/configure0000644000077100007710000000013212654662557016261 xustar000000000000000030 mtime=1454597487.055344534 30 atime=1454597486.603344534 30 ctime=1454597650.441344534 yadifa-2.1.6-5826/configure0000775000077100007710000217023012654662557016077 0ustar00yadifayadifa00000000000000#! /bin/sh # From configure.ac Revision: 5826 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for yadifa 2.1.6-5826. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and info@yadifa.eu $0: about your system, including any error possibly output $0: before this message. Then install a modern shell, or $0: manually run the script under such a shell if you do $0: have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='yadifa' PACKAGE_TARNAME='yadifa' PACKAGE_VERSION='2.1.6-5826' PACKAGE_STRING='yadifa 2.1.6-5826' PACKAGE_BUGREPORT='info@yadifa.eu' PACKAGE_URL='' enable_option_checking=no # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS HAS_LTO_SUPPORT_FALSE HAS_LTO_SUPPORT_TRUE HAS_RRCACHE_ENABLED_FALSE HAS_RRCACHE_ENABLED_TRUE HAS_RDTSC_FALSE HAS_RDTSC_TRUE HAS_TCL_FALSE HAS_TCL_TRUE HAS_DROPALL_SUPPORT_FALSE HAS_DROPALL_SUPPORT_TRUE HAS_MIRROR_SUPPORT_FALSE HAS_MIRROR_SUPPORT_TRUE HAS_NSEC_SUPPORT_FALSE HAS_NSEC_SUPPORT_TRUE HAS_NSEC3_SUPPORT_FALSE HAS_NSEC3_SUPPORT_TRUE HAS_DNSSEC_SUPPORT_FALSE HAS_DNSSEC_SUPPORT_TRUE HAS_SOCKADDR_IN6_SIN6_LEN_FALSE HAS_SOCKADDR_IN6_SIN6_LEN_TRUE HAS_SOCKADDR_IN_SIN_LEN_FALSE HAS_SOCKADDR_IN_SIN_LEN_TRUE HAS_SOCKADDR_SA_LEN_FALSE HAS_SOCKADDR_SA_LEN_TRUE logdir HAS_LOGDIR HAS_LOGDIR_FALSE HAS_LOGDIR_TRUE HAS_NON_AA_AXFR_SUPPORT HAS_NON_AA_AXFR_SUPPORT_FALSE HAS_NON_AA_AXFR_SUPPORT_TRUE HAS_FULL_ASCII7 HAS_FULL_ASCII7_FALSE HAS_FULL_ASCII7_TRUE HAS_LOG_PID_ALWAYS_ON HAS_LOG_PID_ALWAYS_ON_FALSE HAS_LOG_PID_ALWAYS_ON_TRUE HAS_LOG_THREAD_ID_ALWAYS_ON HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE HAS_MUTEX_DEBUG_SUPPORT HAS_MUTEX_DEBUG_SUPPORT_FALSE HAS_MUTEX_DEBUG_SUPPORT_TRUE HAS_BFD_DEBUG_SUPPORT HAS_BFD_DEBUG_SUPPORT_FALSE HAS_BFD_DEBUG_SUPPORT_TRUE HAS_MALLOC_DEBUG_SUPPORT HAS_MALLOC_DEBUG_SUPPORT_FALSE HAS_MALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_DEBUG_SUPPORT HAS_ZALLOC_DEBUG_SUPPORT_FALSE HAS_ZALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_STATISTICS_SUPPORT HAS_ZALLOC_STATISTICS_SUPPORT_FALSE HAS_ZALLOC_STATISTICS_SUPPORT_TRUE HAS_ZALLOC_SUPPORT HAS_ZALLOC_SUPPORT_FALSE HAS_ZALLOC_SUPPORT_TRUE HAS_RRSIG_MANAGEMENT_SUPPORT HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE HAS_DYNUPDATE_SUPPORT HAS_DYNUPDATE_SUPPORT_FALSE HAS_DYNUPDATE_SUPPORT_TRUE HAS_TSIG_SUPPORT HAS_TSIG_SUPPORT_FALSE HAS_TSIG_SUPPORT_TRUE HAS_ACL_SUPPORT HAS_ACL_SUPPORT_FALSE HAS_ACL_SUPPORT_TRUE HAS_NSID_SUPPORT HAS_NSID_SUPPORT_FALSE HAS_NSID_SUPPORT_TRUE HAS_CTRL HAS_MASTER_SUPPORT HAS_MASTER_SUPPORT_FALSE HAS_MASTER_SUPPORT_TRUE HAS_MESSAGES_SUPPORT HAS_MESSAGES_SUPPORT_FALSE HAS_MESSAGES_SUPPORT_TRUE HAS_RRL_SUPPORT HAS_RRL_SUPPORT_FALSE HAS_RRL_SUPPORT_TRUE HAS_CTRL_DYNAMIC_PROVISIONING HAS_CTRL_DYNAMIC_PROVISIONING_FALSE HAS_CTRL_DYNAMIC_PROVISIONING_TRUE HAS_CTRL_FALSE HAS_CTRL_TRUE HAS_BIG_ENDIAN HAS_LITTLE_ENDIAN HAS_BIG_ENDIAN_FALSE HAS_BIG_ENDIAN_TRUE HAS_LITTLE_ENDIAN_FALSE HAS_LITTLE_ENDIAN_TRUE HAS_MEMALIGN_ISSUES_FALSE HAS_MEMALIGN_ISSUES_TRUE HAS_CC_RDYNAMIC HAS_CC_RDYNAMIC_FALSE HAS_CC_RDYNAMIC_TRUE HAS_CC_CATCH_UNDEFINED_BEHAVIOR HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE HAS_CC_ADDRESS_SANITIZER_CHECK HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE HAS_CC_NO_OMIT_FRAME_POINTER HAS_CC_NO_OMIT_FRAME_POINTER_FALSE HAS_CC_NO_OMIT_FRAME_POINTER_TRUE HAS_CC_SANITIZE_ADDRESS HAS_CC_SANITIZE_ADDRESS_FALSE HAS_CC_SANITIZE_ADDRESS_TRUE HAS_CC_MISSING_FIELD_INITIALIZERS HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE HAS_CC_EXCEPTIONS HAS_CC_EXCEPTIONS_FALSE HAS_CC_EXCEPTIONS_TRUE HAS_CC_STACK_PROTECTOR HAS_CC_STACK_PROTECTOR_FALSE HAS_CC_STACK_PROTECTOR_TRUE HAS_CC_DWARF4 HAS_CC_DWARF4_FALSE HAS_CC_DWARF4_TRUE HAS_CC_DWARF3 HAS_CC_DWARF3_FALSE HAS_CC_DWARF3_TRUE HAS_CC_DWARF2 HAS_CC_DWARF2_FALSE HAS_CC_DWARF2_TRUE HAS_CC_G3 HAS_CC_G3_FALSE HAS_CC_G3_TRUE HAS_CC_G HAS_CC_G_FALSE HAS_CC_G_TRUE HAS_CC_WALL HAS_CC_WALL_FALSE HAS_CC_WALL_TRUE HAS_CC_M64 HAS_CC_M64_FALSE HAS_CC_M64_TRUE HAS_CC_M32 HAS_CC_M32_FALSE HAS_CC_M32_TRUE HAS_CC_XC99 HAS_CC_XC99_FALSE HAS_CC_XC99_TRUE HAS_CC_STD_C99 HAS_CC_STD_C99_FALSE HAS_CC_STD_C99_TRUE HAS_CC_STD_GNU99 HAS_CC_STD_GNU99_FALSE HAS_CC_STD_GNU99_TRUE HAS_CC_PEDANTIC HAS_CC_PEDANTIC_FALSE HAS_CC_PEDANTIC_TRUE HAS_CC_ANSI_ALIAS HAS_CC_ANSI_ALIAS_FALSE HAS_CC_ANSI_ALIAS_TRUE HAS_CC_ANSI HAS_CC_ANSI_FALSE HAS_CC_ANSI_TRUE HAS_CC_NO_IDENT HAS_CC_NO_IDENT_FALSE HAS_CC_NO_IDENT_TRUE HAS_CC_TUNE_NATIVE HAS_CC_TUNE_NATIVE_FALSE HAS_CC_TUNE_NATIVE_TRUE CCOPTIMISATIONFLAGS USES_UNKNOWN_FALSE USES_UNKNOWN_TRUE USES_SUNC_FALSE USES_SUNC_TRUE USES_CLANG_FALSE USES_CLANG_TRUE USES_GCC_FALSE USES_GCC_TRUE USES_ICC_FALSE USES_ICC_TRUE FORCE64BITS_FALSE FORCE64BITS_TRUE FORCE32BITS_FALSE FORCE32BITS_TRUE HAS_CPU_AMDINTEL_FALSE HAS_CPU_AMDINTEL_TRUE HAS_CPU_NIAGARA_FALSE HAS_CPU_NIAGARA_TRUE IS_SOLARIS_FAMILY IS_SOLARIS_FAMILY_FALSE IS_SOLARIS_FAMILY_TRUE IS_LINUX_FAMILY IS_LINUX_FAMILY_FALSE IS_LINUX_FAMILY_TRUE IS_BSD_FAMILY IS_BSD_FAMILY_FALSE IS_BSD_FAMILY_TRUE IS_DARWIN_OS IS_DARWIN_OS_FALSE IS_DARWIN_OS_TRUE CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL HAS_TOOLS HAS_TOOLS_FALSE HAS_TOOLS_TRUE subdirs AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules with_tools enable_shared enable_static with_pic enable_fast_install with_aix_soname enable_dependency_tracking with_gnu_ld with_sysroot enable_libtool_lock enable_largefile enable_force32bits enable_force64bits enable_ctrl_dynamic_provisioning enable_rrl enable_messages enable_master enable_ctrl enable_nsid enable_acl enable_tsig enable_dynupdate enable_rrsig_management enable_zalloc enable_zalloc_statistics enable_zalloc_debug enable_malloc_debug enable_bfd_debug enable_mutex_debug enable_log_thread_id enable_log_pid enable_full_ascii7 enable_non_aa_axfr_support with_logdir enable_lto ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP' ac_subdirs_all='lib/dnscore lib/dnsdb lib/dnszone lib/dnslg sbin/yadifad bin/yadifa' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures yadifa 2.1.6-5826 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/yadifa] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of yadifa 2.1.6-5826:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-shared[=PKGS] build shared libraries [default=no] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --enable-force32bits Forces a 32 bits binary compilation --enable-force64bits Forces a 64 bits binary compilation --enable-ctrl-dynamic-provisioning Enable dynamic provisioning --disable-rrl Disable DNS Response Rate Limiter --enable-messages Enable use messages instead of send (needed if you use more than one IP aliased on the same network interface) --disable-master Disable DNS master --enable-ctrl Enable remote control --disable-nsid Disable NSID support --disable-acl Disable ACL support --disable-tsig Disable TSIG support --disable-dynupdate Disable dynamic update support --disable-rrsig-management Disable RRSIG verification and generation for zones --disable-zalloc Disable zalloc memory system --enable-zalloc-statistics Enable zalloc statistics support --enable-zalloc-debug Enable zalloc debug support --enable-malloc-debug Enable malloc debug support --enable-bfd-debug Enable bfd debug support --enable-mutex-debug Enable mutex debug support --enable-log-thread-id Enable write the thread id in each line of log --enable-log-pid Enable write the pid in each line of log --enable-full-ascii7 Enable YADIFA will now accept ASCII7 characters in DNS names (not recommended) --enable-non-aa-axfr-support Enable Allows AXFR answer from master without AA bit set (Microsoft DNS) --enable-lto Enable LTO support, requires gold linker Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --without-tools build "build the DNS tools" --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-logdir build sets the directory where to put the log files Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF yadifa configure 2.1.6-5826 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ----------------------------- ## ## Report this to info@yadifa.eu ## ## ----------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by yadifa $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo echo echo "YADIFA BUNDLE START" echo "-------------------" echo echo cpu_intel_compatible=1 icc_enabled=0 ac_os_workaround_done=0 # requires_tcl=0 requires_ssl=0 requires_dnscore=0 requires_dnsdb=0 requires_dnszone=0 requires_dnslg=0 requires_dnstcl=0 ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='yadifa' VERSION='2.1.6-5826' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 $as_echo_n "checking how to create a pax tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_pax-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' am__tar_="$_am_tar --format=posix -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x pax -w "$$tardir"' am__tar_='pax -L -x pax -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H pax -L' am__tar_='find "$tardir" -print | cpio -o -H pax -L' am__untar='cpio -i -H pax -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_pax}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_pax+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_pax=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 $as_echo "$am_cv_prog_tar_pax" >&6; } # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers config.h" subdirs="$subdirs lib/dnscore lib/dnsdb lib/dnszone" # # AC_HAS_WITHOUT tools # if true; then HAS_TOOLS_TRUE= HAS_TOOLS_FALSE='#' else HAS_TOOLS_TRUE='#' HAS_TOOLS_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if tools has to be build" >&5 $as_echo_n "checking if tools has to be build... " >&6; } # ARG WITH # Check whether --with-tools was given. if test "${with_tools+set}" = set; then : withval=$with_tools; fi # MSG RESULT case "y$with_tools" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_TOOLS 1 _ACEOF # CONDITIONAL Y if true; then HAS_TOOLS_TRUE= HAS_TOOLS_FALSE='#' else HAS_TOOLS_TRUE='#' HAS_TOOLS_FALSE= fi with_tools=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES subdirs="$subdirs lib/dnslg" # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_TOOLS 0 _ACEOF # CONDITIONAL N if false; then HAS_TOOLS_TRUE= HAS_TOOLS_FALSE='#' else HAS_TOOLS_TRUE='#' HAS_TOOLS_FALSE= fi with_tools=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_WITHOUT tools DONE subdirs="$subdirs sbin/yadifad" # # AC_HAS_WITHOUT tools # if true; then HAS_TOOLS_TRUE= HAS_TOOLS_FALSE='#' else HAS_TOOLS_TRUE='#' HAS_TOOLS_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if tools has to be build" >&5 $as_echo_n "checking if tools has to be build... " >&6; } # ARG WITH # Check whether --with-tools was given. if test "${with_tools+set}" = set; then : withval=$with_tools; fi # MSG RESULT case "y$with_tools" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_TOOLS 1 _ACEOF # CONDITIONAL Y if true; then HAS_TOOLS_TRUE= HAS_TOOLS_FALSE='#' else HAS_TOOLS_TRUE='#' HAS_TOOLS_FALSE= fi with_tools=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES subdirs="$subdirs bin/yadifa" # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_TOOLS 0 _ACEOF # CONDITIONAL N if false; then HAS_TOOLS_TRUE= HAS_TOOLS_FALSE='#' else HAS_TOOLS_TRUE='#' HAS_TOOLS_FALSE= fi with_tools=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_WITHOUT tools DONE case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=no fi enable_dlopen=no enable_win32_dll=no # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: case "$(uname -s)" in Darwin) alias libtoolize="glibtoolize" which libtool > /dev/null 2>&1 if [ $? -ne 0 ] then which glibtool > /dev/null 2>&1 if [ $? -eq 0 ] then alias libtool="glibtool" fi fi echo 'brol' | sed 's/brol/truc/' > /dev/null 2>&1 if [ $? -ne 0 ] then alias sed="gsed" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin workaround" >&5 $as_echo "Darwin workaround" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: nothing to do" >&5 $as_echo "nothing to do" >&6; } ;; esac ac_config_files="$ac_config_files Makefile etc/Makefile doc/Makefile var/Makefile" # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi if [ $ac_os_workaround_done -eq 0 ] then ac_os_workaround_done=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of OS this is" >&5 $as_echo_n "checking what kind of OS this is... " >&6; } is_darwin_os=0 is_bsd_family=0 is_solaris_family=0 is_linux_family=0 case "$(uname -s)" in Darwin) is_darwin_os=1 is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OSX" >&5 $as_echo "OSX" >&6; } ;; FreeBSD) is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: BSD" >&5 $as_echo "BSD" >&6; } ;; Linux) is_linux_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 $as_echo "Linux" >&6; } ;; SunOS) is_solaris_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SunOS" >&5 $as_echo "SunOS" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: not specifically supported" >&5 $as_echo "not specifically supported" >&6; } ;; esac if [ "$is_darwin_os" = "" ] then echo "OS detection failed to give relevant results" exit 1; fi if [ $is_darwin_os -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 1 _ACEOF if true; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 0 _ACEOF if false; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi fi if [ $is_bsd_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 1 _ACEOF if true; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 0 _ACEOF if false; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi fi if [ $is_linux_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 1 _ACEOF if true; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 0 _ACEOF if false; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi fi if [ $is_solaris_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 1 _ACEOF if true; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 0 _ACEOF if false; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi fi fi cat >>confdefs.h <<_ACEOF #define DEFAULT_ASSUMED_CPU_COUNT 2 _ACEOF cpu_intel_compatible=1 if false; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi if false; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for the CPU options" >&5 $as_echo_n "checking checking for the CPU options... " >&6; } CPU_UNKNOWN=1 CFLAGS3264= case "$(uname -i 2>/dev/null)" in SUNW,SPARC-Enterprise-T1000) cat >>confdefs.h <<_ACEOF #define HAS_CPU_NIAGARA 1 _ACEOF if true; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: UtrasparcT1" >&5 $as_echo "UtrasparcT1" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=0 ;; *) ;; esac case "$(uname -m)" in x86_64) cat >>confdefs.h <<_ACEOF #define HAS_CPU_AMDINTEL 1 _ACEOF if true; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: AMD/Intel" >&5 $as_echo "AMD/Intel" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=1 ;; *) ;; esac case "${CPU_UNKNOWN}" in 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: generic" >&5 $as_echo "generic" >&6; } ;; 0) ;; esac if [ "$is_solaris_family" = "" ] then echo "OS must be detected first" exit 1 fi if [ $is_solaris_family -eq 1 ] then echo "Solaris ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if either force 32 or 64 bits is enabled" >&5 $as_echo_n "checking if either force 32 or 64 bits is enabled... " >&6; } if [ ! "$enable_force32bits" = "yes" ] then if [ ! "$enable_force64bits" = "yes" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forcing 64 bits" >&5 $as_echo "no, forcing 64 bits" >&6; } enable_force64bits="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else echo "Not Solaris ..." fi echo "Force ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 32 bits is enabled" >&5 $as_echo_n "checking if force 32 bits is enabled... " >&6; } if false; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi # Check whether --enable-force32bits was given. if test "${enable_force32bits+set}" = set; then : enableval=$enable_force32bits; enable_force32bits=yes else enable_force32bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force32bits" >&5 $as_echo "$enable_force32bits" >&6; } case "$enable_force32bits" in yes) CFLAGS3264=-m32 if test $enable_force32bits = yes; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 64 bits is enabled" >&5 $as_echo_n "checking if force 64 bits is enabled... " >&6; } if false; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi # Check whether --enable-force64bits was given. if test "${enable_force64bits+set}" = set; then : enableval=$enable_force64bits; enable_force64bits=yes else enable_force64bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force64bits" >&5 $as_echo "$enable_force64bits" >&6; } case "$enable_force64bits" in yes) CFLAGS3264=-m64 if test $enable_force64bits = yes; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi if [ "$enable_force32" = "yes" ] then echo "cannot do both --enable-force32bits and --enable-force64bits at the same time" exit 1 fi ;; *) ;; esac cat /etc/redhat-version > /dev/null 2>&1 if [ $? -eq 0 ] then is_redhat_family=1 else is_redhat_family=0 fi CFLAGS= VERSION_OPT=--version $CC --version > /dev/null 2>&1 if [ $? -ne 0 ] then $CC -V > /dev/null 2>&1 if [ $? -ne 0 ] then CCVER='0.0' CCNAME='unknown' VERSION_OPT='' else VERSION_OPT='-V' fi fi if [ ! "$VERSION_OPT" = "" ] then CCVER=$($CC $VERSION_OPT 2>&1|head -1|sed 's/[^0-9.]*\([0-9.]*\).*/\1/') if [ "$CCVER" = "" ] then CCVER='0.0' fi CCNAME=$($CC $VERSION_OPT 2>&1|head -1|sed -e 's/.*clang.*/clang/' -e 's/.*gcc.*/gcc/' -e 's/.*icc.*/icc/' -e 's/.*Sun C.*/Sun C/'|tr A-Z a-z) if [ "$CCNAME" = "" ] then CCNAME='unknown' fi else CCVER='0.0' CCNAME='unknown' fi # version opt CCMAJOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $1}') CCMINOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $2}') if [ "$CCMAJOR" = "" ] then CCMAJOR=0 fi if [ "$CCMINOR" = "" ] then CCMINOR=0 fi if [ "$CCNAME" = "gcc" ] then CCOPTIMISATIONFLAGS=-O3 if [ $CCMAJOR -lt 4 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC < 4.0 has optimisations issues with YADIFA." sleep 1 elif [ $CCMAJOR -eq 4 ] then if [ $CCMINOR -lt 6 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC before 4.6 have optimisation issues with YADIFA." sleep 1 elif [ $CCMINOR -eq 6 ] then CCOPTIMISATIONFLAGS=-O2 else # hopefully after 4.6 the issue is fixed ... CCOPTIMISATIONFLAGS=-O3 fi fi if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if true; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "icc" ] then echo "ICC" CCOPTIMISATIONFLAGS=-O3 if true; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi AR=xiar elif [ "$CCNAME" = "clang" ] then echo "CLANG" CCOPTIMISATIONFLAGS=-O3 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if true; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "Sun C" ] then echo "Sun C" CCOPTIMISATIONFLAGS=-xO5 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if true; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi else echo "unsupported compiler" CCNAME=$CC CCOPTIMISATIONFLAGS=-O2 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if true; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi fi # # We've been told RedHat does not like -O3 at all, so ... # if [ $is_redhat_family -ne 0 ] then if [ "$CCOPTIMISATIONFLAGS " eq "-O3" ] then CCOPTIMISATIONFLAGS=-O2 fi fi echo "detected compiler is $CCNAME $CCMAJOR $CCMINOR" CCOPTIMISATIONFLAGS=$CCOPTIMISATIONFLAGS if [ $cpu_intel_compatible -eq 0 ] then if [ $icc_enabled -ne 0 ] then echo "ERROR: cannot enable ICC with CPU other than x86 or amd64" exit 1 fi fi # # AC_COMPILER_SUPPORTS -mtune=native # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mtune=native" >&5 $as_echo_n "checking if compiler supports -mtune=native... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-TUNE_NATIVE.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -mtune=native test-gcc-TUNE_NATIVE.c -o test-gcc-TUNE_NATIVE > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-TUNE_NATIVE* # # AC_COMPILER_SUPPORTS -fno-ident # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-ident" >&5 $as_echo_n "checking if compiler supports -fno-ident... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_IDENT.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-ident test-gcc-NO_IDENT.c -o test-gcc-NO_IDENT > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_IDENT* # # AC_COMPILER_SUPPORTS -ansi # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi" >&5 $as_echo_n "checking if compiler supports -ansi... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi test-gcc-ANSI.c -o test-gcc-ANSI > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI* # # AC_COMPILER_SUPPORTS -ansi-alias # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi-alias" >&5 $as_echo_n "checking if compiler supports -ansi-alias... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI_ALIAS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi-alias test-gcc-ANSI_ALIAS.c -o test-gcc-ANSI_ALIAS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI_ALIAS* # # AC_COMPILER_SUPPORTS -pedantic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -pedantic" >&5 $as_echo_n "checking if compiler supports -pedantic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-PEDANTIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -pedantic test-gcc-PEDANTIC.c -o test-gcc-PEDANTIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-PEDANTIC* # # AC_COMPILER_SUPPORTS -std=gnu99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=gnu99" >&5 $as_echo_n "checking if compiler supports -std=gnu99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_GNU99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=gnu99 test-gcc-STD_GNU99.c -o test-gcc-STD_GNU99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_GNU99* # # AC_COMPILER_SUPPORTS -std=c99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=c99" >&5 $as_echo_n "checking if compiler supports -std=c99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_C99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=c99 test-gcc-STD_C99.c -o test-gcc-STD_C99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_C99* # # AC_COMPILER_SUPPORTS -xc99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -xc99" >&5 $as_echo_n "checking if compiler supports -xc99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-XC99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -xc99 test-gcc-XC99.c -o test-gcc-XC99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-XC99* # # AC_COMPILER_SUPPORTS -m32 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m32" >&5 $as_echo_n "checking if compiler supports -m32... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M32.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m32 test-gcc-M32.c -o test-gcc-M32 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M32* # # AC_COMPILER_SUPPORTS -m64 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m64" >&5 $as_echo_n "checking if compiler supports -m64... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M64.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m64 test-gcc-M64.c -o test-gcc-M64 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M64* # # AC_COMPILER_SUPPORTS -Wall # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Wall" >&5 $as_echo_n "checking if compiler supports -Wall... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-WALL.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Wall test-gcc-WALL.c -o test-gcc-WALL > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-WALL* # # AC_COMPILER_SUPPORTS -g # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g" >&5 $as_echo_n "checking if compiler supports -g... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g test-gcc-G.c -o test-gcc-G > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G* # # AC_COMPILER_SUPPORTS -g3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g3" >&5 $as_echo_n "checking if compiler supports -g3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g3 test-gcc-G3.c -o test-gcc-G3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G3* # # AC_COMPILER_SUPPORTS -gdwarf-2 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-2" >&5 $as_echo_n "checking if compiler supports -gdwarf-2... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF2.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-2 test-gcc-DWARF2.c -o test-gcc-DWARF2 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF2* # # AC_COMPILER_SUPPORTS -gdwarf-3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-3" >&5 $as_echo_n "checking if compiler supports -gdwarf-3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-3 test-gcc-DWARF3.c -o test-gcc-DWARF3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF3* # # AC_COMPILER_SUPPORTS -gdwarf-4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-4" >&5 $as_echo_n "checking if compiler supports -gdwarf-4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF4.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-4 test-gcc-DWARF4.c -o test-gcc-DWARF4 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF4* # # AC_COMPILER_SUPPORTS -fstack-protector --param=ssp-buffer-size=4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fstack-protector --param=ssp-buffer-size=4" >&5 $as_echo_n "checking if compiler supports -fstack-protector --param=ssp-buffer-size=4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STACK_PROTECTOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fstack-protector --param=ssp-buffer-size=4 test-gcc-STACK_PROTECTOR.c -o test-gcc-STACK_PROTECTOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STACK_PROTECTOR* # # AC_COMPILER_SUPPORTS -fexceptions # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fexceptions" >&5 $as_echo_n "checking if compiler supports -fexceptions... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-EXCEPTIONS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fexceptions test-gcc-EXCEPTIONS.c -o test-gcc-EXCEPTIONS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-EXCEPTIONS* # # AC_COMPILER_SUPPORTS -Werror=missing-field-initializers # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=missing-field-initializers" >&5 $as_echo_n "checking if compiler supports -Werror=missing-field-initializers... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-MISSING_FIELD_INITIALIZERS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Werror=missing-field-initializers test-gcc-MISSING_FIELD_INITIALIZERS.c -o test-gcc-MISSING_FIELD_INITIALIZERS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-MISSING_FIELD_INITIALIZERS* # # AC_COMPILER_SUPPORTS -fsanitize=address # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fsanitize=address" >&5 $as_echo_n "checking if compiler supports -fsanitize=address... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-SANITIZE_ADDRESS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fsanitize=address test-gcc-SANITIZE_ADDRESS.c -o test-gcc-SANITIZE_ADDRESS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-SANITIZE_ADDRESS* # # AC_COMPILER_SUPPORTS -fno-omit-frame-pointer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-omit-frame-pointer" >&5 $as_echo_n "checking if compiler supports -fno-omit-frame-pointer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_OMIT_FRAME_POINTER.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-omit-frame-pointer test-gcc-NO_OMIT_FRAME_POINTER.c -o test-gcc-NO_OMIT_FRAME_POINTER > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_OMIT_FRAME_POINTER* # # AC_COMPILER_SUPPORTS -faddress-sanitizer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -faddress-sanitizer" >&5 $as_echo_n "checking if compiler supports -faddress-sanitizer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ADDRESS_SANITIZER_CHECK.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -faddress-sanitizer test-gcc-ADDRESS_SANITIZER_CHECK.c -o test-gcc-ADDRESS_SANITIZER_CHECK > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ADDRESS_SANITIZER_CHECK* # # AC_COMPILER_SUPPORTS -fcatch_undefined_behavior # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fcatch_undefined_behavior" >&5 $as_echo_n "checking if compiler supports -fcatch_undefined_behavior... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-CATCH_UNDEFINED_BEHAVIOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fcatch_undefined_behavior test-gcc-CATCH_UNDEFINED_BEHAVIOR.c -o test-gcc-CATCH_UNDEFINED_BEHAVIOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-CATCH_UNDEFINED_BEHAVIOR* # # AC_COMPILER_SUPPORTS -rdynamic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -rdynamic" >&5 $as_echo_n "checking if compiler supports -rdynamic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-RDYNAMIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -rdynamic test-gcc-RDYNAMIC.c -o test-gcc-RDYNAMIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-RDYNAMIC* { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking if memory accesses must be size-aligned" >&5 $as_echo_n "checking checking if memory accesses must be size-aligned... " >&6; } if false; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat > memalign_issues_test.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc, char** argv) { char* p = (char*)malloc(8); p++; int* intp= (int*)p; *intp=1; return 0; } _ACEOF ${CC} ${CFLAGS} memalign_issues_test.c -o memalign_issues_test > /dev/null 2>&1 has_memalign_issues=0 ./memalign_issues_test > /dev/null 2>&1 if [ $? -ne 0 ]; then has_memalign_issues=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f memalign_issues_test memalign_issues_test.c if test $has_memalign_issues; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MEMALIGN_ISSUES $has_memalign_issues _ACEOF # # AC_ENDIANNESS # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking endianness: " >&5 $as_echo_n "checking endianness: ... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-endian.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_STDIO_H #include #endif #if defined __FreeBSD__ #if HAVE_SYS_ENDIAN_H #include #endif #elif defined __APPLE__ #if HAVE_MACHINE_ENDIAN_H #include #endif #elif defined __sun #if HAVE_SYS_BYTEORDER_H #include #endif #else #if HAVE_ENDIAN_H #include #endif #if HAVE_BYTESWAP_H #include #endif #endif static int magic = 0x00525545; int main(int argc,char** argv) { (void)argc; (void)argv; int pp = -1; int c = -1; #if defined _BIG_ENDIAN pp = 2; #elif defined _LITTLE_ENDIAN pp = 1; #endif #ifdef __BYTE_ORDER #if __BYTE_ORDER == __LITTLE_ENDIAN pp = 1; #elif __BYTE_ORDER == __BIG_ENDIAN pp = 2; #endif // printf("__BYTE_ORDER=%x\n", __BYTE_ORDER); #endif #ifdef _BYTE_ORDER #if _BYTE_ORDER == _LITTLE_ENDIAN pp = 1; #elif _BYTE_ORDER == _BIG_ENDIAN pp = 2; #endif printf("_BYTE_ORDER=%x\n", _BYTE_ORDER); #endif #ifdef BYTE_ORDER #if BYTE_ORDER == LITTLE_ENDIAN pp = 1; #elif BYTE_ORDER == BIG_ENDIAN pp = 2; #endif // printf("BYTE_ORDER=%x\n", BYTE_ORDER); #endif # #ifdef WORDS_BIGENDIAN // printf("WORDS_BIGENDIAN=%x\n", WORDS_BIGENDIAN); if(pp == 1) // could be -1 or 2 { pp = -2; } else { pp = 2; } #endif char *p = (char*)&magic; if(*p == '\0') { c = 2; } else if(*p == 'E') { c = 1; } if((pp < 0) || (c < 0)) { printf("*** WARNING *** preprocessor says %i, real test says %i *** WARNING ***\n", pp, c); } if(c == pp) { return c; } else { return -1; } } _ACEOF $CC test-gcc-endian.c -o test-gcc-endian > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"failed to compile test\"" >&5 $as_echo "\"failed to compile test\"" >&6; } exit 1 fi ./test-gcc-endian if [ $? -eq 1 ] then if true; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if false; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: little" >&5 $as_echo "little" >&6; } else if false; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if true; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: big" >&5 $as_echo "big" >&6; } fi rm -f test-gcc-endian.c* test-gcc-endian for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done for ac_header in stdio.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDIO_H 1 _ACEOF fi done for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRING_H 1 _ACEOF fi done for ac_header in endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default" if test "x$ac_cv_header_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ENDIAN_H 1 _ACEOF fi done for ac_header in syslog.h do : ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYSLOG_H 1 _ACEOF fi done for ac_header in fcntl.h do : ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FCNTL_H 1 _ACEOF fi done for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF fi done for ac_header in linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in byteswap.h do : ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" if test "x$ac_cv_header_byteswap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BYTESWAP_H 1 _ACEOF fi done for ac_header in machine/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "machine/endian.h" "ac_cv_header_machine_endian_h" "$ac_includes_default" if test "x$ac_cv_header_machine_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACHINE_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/time.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIME_H 1 _ACEOF fi done for ac_header in sys/stat.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_stat_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_STAT_H 1 _ACEOF fi done for ac_header in sys/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" if test "x$ac_cv_header_sys_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/byteorder.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/byteorder.h" "ac_cv_header_sys_byteorder_h" "$ac_includes_default" if test "x$ac_cv_header_sys_byteorder_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_BYTEORDER_H 1 _ACEOF fi done for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done for ac_header in netinet/in.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET_IN_H 1 _ACEOF fi done for ac_header in netinet6/in6.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet6/in6.h" "ac_cv_header_netinet6_in6_h" "$ac_includes_default" if test "x$ac_cv_header_netinet6_in6_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET6_IN6_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_spin_init" >&5 $as_echo_n "checking checking for pthread_spin_init... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_spinlock_t lock; pthread_spin_init(&lock, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SPINLOCK 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_setname_np" >&5 $as_echo_n "checking checking for pthread_setname_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __USE_GNU #include int main () { pthread_setname_np(pthread_self(), "myname"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SETNAME_NP 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # # AC_HAS_ENABLE ctrl_dynamic_provisioning # if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL_DYNAMIC_PROVISIONING has been enabled" >&5 $as_echo_n "checking if CTRL_DYNAMIC_PROVISIONING has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl_dynamic_provisioning was given. if test "${enable_ctrl_dynamic_provisioning+set}" = set; then : enableval=$enable_ctrl_dynamic_provisioning; fi # CASE case "y$enable_ctrl_dynamic_provisioning" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl_dynamic_provisioning DONE # # AC_HAS_DISABLE rrl # if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRL_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrl was given. if test "${enable_rrl+set}" = set; then : enableval=$enable_rrl; fi # MSG RESULT # CASE case "y$enable_rrl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrl DONE # # AC_HAS_ENABLE messages # if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MESSAGES_SUPPORT has been enabled" >&5 $as_echo_n "checking if MESSAGES_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-messages was given. if test "${enable_messages+set}" = set; then : enableval=$enable_messages; fi # CASE case "y$enable_messages" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE messages DONE # # AC_HAS_DISABLE master # if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MASTER_SUPPORT has been disabled" >&5 $as_echo_n "checking if MASTER_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-master was given. if test "${enable_master+set}" = set; then : enableval=$enable_master; fi # MSG RESULT # CASE case "y$enable_master" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_dynupdate='no' enable_rrsig_management='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE master DONE # # AC_HAS_ENABLE ctrl # if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL has been enabled" >&5 $as_echo_n "checking if CTRL has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl was given. if test "${enable_ctrl+set}" = set; then : enableval=$enable_ctrl; fi # CASE case "y$enable_ctrl" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl DONE # # AC_HAS_DISABLE nsid # if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NSID_SUPPORT has been disabled" >&5 $as_echo_n "checking if NSID_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-nsid was given. if test "${enable_nsid+set}" = set; then : enableval=$enable_nsid; fi # MSG RESULT # CASE case "y$enable_nsid" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE nsid DONE # # AC_HAS_DISABLE acl # if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ACL_SUPPORT has been disabled" >&5 $as_echo_n "checking if ACL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-acl was given. if test "${enable_acl+set}" = set; then : enableval=$enable_acl; fi # MSG RESULT # CASE case "y$enable_acl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_tsig='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE acl DONE # # AC_HAS_DISABLE tsig # if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if TSIG_SUPPORT has been disabled" >&5 $as_echo_n "checking if TSIG_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-tsig was given. if test "${enable_tsig+set}" = set; then : enableval=$enable_tsig; fi # MSG RESULT # CASE case "y$enable_tsig" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE tsig DONE # # AC_HAS_DISABLE dynupdate # if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if DYNUPDATE_SUPPORT has been disabled" >&5 $as_echo_n "checking if DYNUPDATE_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-dynupdate was given. if test "${enable_dynupdate+set}" = set; then : enableval=$enable_dynupdate; fi # MSG RESULT # CASE case "y$enable_dynupdate" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE dynupdate DONE # # AC_HAS_DISABLE rrsig_management # if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRSIG_MANAGEMENT_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRSIG_MANAGEMENT_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrsig_management was given. if test "${enable_rrsig_management+set}" = set; then : enableval=$enable_rrsig_management; fi # MSG RESULT # CASE case "y$enable_rrsig_management" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrsig_management DONE # # AC_HAS_DISABLE zalloc # if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_SUPPORT has been disabled" >&5 $as_echo_n "checking if ZALLOC_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc was given. if test "${enable_zalloc+set}" = set; then : enableval=$enable_zalloc; fi # MSG RESULT # CASE case "y$enable_zalloc" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE zalloc DONE # # AC_HAS_ENABLE zalloc_statistics # if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_STATISTICS_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_STATISTICS_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_statistics was given. if test "${enable_zalloc_statistics+set}" = set; then : enableval=$enable_zalloc_statistics; fi # CASE case "y$enable_zalloc_statistics" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_statistics DONE # # AC_HAS_ENABLE zalloc_debug # if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_debug was given. if test "${enable_zalloc_debug+set}" = set; then : enableval=$enable_zalloc_debug; fi # CASE case "y$enable_zalloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_debug DONE # # AC_HAS_ENABLE malloc_debug # if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-malloc_debug was given. if test "${enable_malloc_debug+set}" = set; then : enableval=$enable_malloc_debug; fi # CASE case "y$enable_malloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE malloc_debug DONE # # AC_HAS_ENABLE bfd_debug # if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if BFD_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if BFD_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-bfd_debug was given. if test "${enable_bfd_debug+set}" = set; then : enableval=$enable_bfd_debug; fi # CASE case "y$enable_bfd_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE bfd_debug DONE case "$enable_bfd_debug" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlinfo" >&5 $as_echo_n "checking for library containing dlinfo... " >&6; } if ${ac_cv_search_dlinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlinfo (); int main () { return dlinfo (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlinfo+:} false; then : break fi done if ${ac_cv_search_dlinfo+:} false; then : else ac_cv_search_dlinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlinfo" >&5 $as_echo "$ac_cv_search_dlinfo" >&6; } ac_res=$ac_cv_search_dlinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no dl fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sha1_init_ctx" >&5 $as_echo_n "checking for library containing sha1_init_ctx... " >&6; } if ${ac_cv_search_sha1_init_ctx+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sha1_init_ctx (); int main () { return sha1_init_ctx (); ; return 0; } _ACEOF for ac_lib in '' iberty; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sha1_init_ctx=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sha1_init_ctx+:} false; then : break fi done if ${ac_cv_search_sha1_init_ctx+:} false; then : else ac_cv_search_sha1_init_ctx=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sha1_init_ctx" >&5 $as_echo "$ac_cv_search_sha1_init_ctx" >&6; } ac_res=$ac_cv_search_sha1_init_ctx if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo iberty fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bfd_init" >&5 $as_echo_n "checking for library containing bfd_init... " >&6; } if ${ac_cv_search_bfd_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bfd_init (); int main () { return bfd_init (); ; return 0; } _ACEOF for ac_lib in '' bfd; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bfd_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bfd_init+:} false; then : break fi done if ${ac_cv_search_bfd_init+:} false; then : else ac_cv_search_bfd_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bfd_init" >&5 $as_echo "$ac_cv_search_bfd_init" >&6; } ac_res=$ac_cv_search_bfd_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no bfd;exit 1 fi ;; no|*) ;; esac # # AC_HAS_ENABLE mutex_debug # if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MUTEX_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MUTEX_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-mutex_debug was given. if test "${enable_mutex_debug+set}" = set; then : enableval=$enable_mutex_debug; fi # CASE case "y$enable_mutex_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE mutex_debug DONE # # AC_HAS_ENABLE log_thread_id # if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_THREAD_ID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_THREAD_ID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_thread_id was given. if test "${enable_log_thread_id+set}" = set; then : enableval=$enable_log_thread_id; fi # CASE case "y$enable_log_thread_id" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_thread_id DONE # # AC_HAS_ENABLE log_pid # if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_PID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_PID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_pid was given. if test "${enable_log_pid+set}" = set; then : enableval=$enable_log_pid; fi # CASE case "y$enable_log_pid" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_pid DONE # # AC_HAS_ENABLE full_ascii7 # if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if FULL_ASCII7 has been enabled" >&5 $as_echo_n "checking if FULL_ASCII7 has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-full_ascii7 was given. if test "${enable_full_ascii7+set}" = set; then : enableval=$enable_full_ascii7; fi # CASE case "y$enable_full_ascii7" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 1 _ACEOF # CONDITIONAL Y if true; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 0 _ACEOF # CONDITIONAL N if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE full_ascii7 DONE # # AC_HAS_ENABLE non_aa_axfr_support # if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NON_AA_AXFR_SUPPORT has been enabled" >&5 $as_echo_n "checking if NON_AA_AXFR_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-non_aa_axfr_support was given. if test "${enable_non_aa_axfr_support+set}" = set; then : enableval=$enable_non_aa_axfr_support; fi # CASE case "y$enable_non_aa_axfr_support" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE non_aa_axfr_support DONE # # AC_HAS_WITH logdir # if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if logdir has been given" >&5 $as_echo_n "checking if logdir has been given... " >&6; } # ARG WITH # Check whether --with-logdir was given. if test "${with_logdir+set}" = set; then : withval=$with_logdir; # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_WITH_LOGDIR "$with_logdir" // $withval _ACEOF with_logdir="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES logdir="$withval" # ENDIF else # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 0 _ACEOF # CONDITIONAL N if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi with_logdir="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO logdir=${localstatedir}/log/yadifa # ENDIF fi # SUBST # AC_HAS_WITH logdir DONE { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has a sa_len field" >&5 $as_echo_n "checking if sockaddr has a sa_len field... " >&6; } cat > sockaddr_sa_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr sa; sa.sa_len = 4; } _ACEOF has_sockaddr_sa_len=0 ${CC} ${CFLAGS} sockaddr_sa_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_sa_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_sa_len.c sockaddr_sa_len if test $has_sockaddr_sa_len = yes; then HAS_SOCKADDR_SA_LEN_TRUE= HAS_SOCKADDR_SA_LEN_FALSE='#' else HAS_SOCKADDR_SA_LEN_TRUE='#' HAS_SOCKADDR_SA_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_SA_LEN $has_sockaddr_sa_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in has a sin_len field" >&5 $as_echo_n "checking if sockaddr_in has a sin_len field... " >&6; } cat > sockaddr_in_sin_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in sa; sa.sin_len = sizeof(struct sockaddr_in); } _ACEOF has_sockaddr_in_sin_len=0 ${CC} ${CFLAGS} sockaddr_in_sin_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in_sin_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in_sin_len.c sockaddr_in_sin_len if test $has_sockaddr_in_sin_len = yes; then HAS_SOCKADDR_IN_SIN_LEN_TRUE= HAS_SOCKADDR_IN_SIN_LEN_FALSE='#' else HAS_SOCKADDR_IN_SIN_LEN_TRUE='#' HAS_SOCKADDR_IN_SIN_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN_SIN_LEN $has_sockaddr_in_sin_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in6 has a sin6_len field" >&5 $as_echo_n "checking if sockaddr_in6 has a sin6_len field... " >&6; } cat > sockaddr_in6_sin6_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in6 sa; sa.sin6_len = sizeof(struct sockaddr_in6); } _ACEOF has_sockaddr_in6_sin6_len=0 ${CC} ${CFLAGS} sockaddr_in6_sin6_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in6_sin6_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in6_sin6_len.c sockaddr_in6_sin6_len if test $has_sockaddr_in6_sin6_len = yes; then HAS_SOCKADDR_IN6_SIN6_LEN_TRUE= HAS_SOCKADDR_IN6_SIN6_LEN_FALSE='#' else HAS_SOCKADDR_IN6_SIN6_LEN_TRUE='#' HAS_SOCKADDR_IN6_SIN6_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN6_SIN6_LEN $has_sockaddr_in6_sin6_len _ACEOF if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF if true; then HAS_DNSSEC_SUPPORT_TRUE= HAS_DNSSEC_SUPPORT_FALSE='#' else HAS_DNSSEC_SUPPORT_TRUE='#' HAS_DNSSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DNSSEC_SUPPORT 1 _ACEOF if true; then HAS_NSEC3_SUPPORT_TRUE= HAS_NSEC3_SUPPORT_FALSE='#' else HAS_NSEC3_SUPPORT_TRUE='#' HAS_NSEC3_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC3_SUPPORT 1 _ACEOF if true; then HAS_NSEC_SUPPORT_TRUE= HAS_NSEC_SUPPORT_FALSE='#' else HAS_NSEC_SUPPORT_TRUE='#' HAS_NSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC_SUPPORT 1 _ACEOF if false; then HAS_MIRROR_SUPPORT_TRUE= HAS_MIRROR_SUPPORT_FALSE='#' else HAS_MIRROR_SUPPORT_TRUE='#' HAS_MIRROR_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MIRROR_SUPPORT 0 _ACEOF if false; then HAS_DROPALL_SUPPORT_TRUE= HAS_DROPALL_SUPPORT_FALSE='#' else HAS_DROPALL_SUPPORT_TRUE='#' HAS_DROPALL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DROPALL_SUPPORT 0 _ACEOF if false; then HAS_TCL_TRUE= HAS_TCL_FALSE='#' else HAS_TCL_TRUE='#' HAS_TCL_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TCL 0 _ACEOF if false; then HAS_RDTSC_TRUE= HAS_RDTSC_FALSE='#' else HAS_RDTSC_TRUE='#' HAS_RDTSC_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RDTSC 0 _ACEOF if false; then HAS_RRCACHE_ENABLED_TRUE= HAS_RRCACHE_ENABLED_FALSE='#' else HAS_RRCACHE_ENABLED_TRUE='#' HAS_RRCACHE_ENABLED_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RRCACHE_ENABLED 0 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LTO has been enabled" >&5 $as_echo_n "checking if LTO has been enabled... " >&6; } # Check whether --enable-lto was given. if test "${enable_lto+set}" = set; then : enableval=$enable_lto; enable_lto=yes else enable_lto=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lto" >&5 $as_echo "$enable_lto" >&6; } case "$enable_lto" in yes) type -p gold if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: 'gold' not found" >&5 $as_echo "WARNING: 'gold' not found" >&6; } sleep 1 fi if [ ! "$LD" = "" ] then $LD -v |grep -i gold > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: LTO enabled but LD ($LD) is not gold" >&5 $as_echo "WARNING: LTO enabled but LD ($LD) is not gold" >&6; } sleep 1 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: LD not defined" >&5 $as_echo "LD not defined" >&6; } fi if true; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; no|*) if false; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; esac cat <confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${HAS_TOOLS_TRUE}" && test -z "${HAS_TOOLS_FALSE}"; then as_fn_error $? "conditional \"HAS_TOOLS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TOOLS_TRUE}" && test -z "${HAS_TOOLS_FALSE}"; then as_fn_error $? "conditional \"HAS_TOOLS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TOOLS_TRUE}" && test -z "${HAS_TOOLS_FALSE}"; then as_fn_error $? "conditional \"HAS_TOOLS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TOOLS_TRUE}" && test -z "${HAS_TOOLS_FALSE}"; then as_fn_error $? "conditional \"HAS_TOOLS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TOOLS_TRUE}" && test -z "${HAS_TOOLS_FALSE}"; then as_fn_error $? "conditional \"HAS_TOOLS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TOOLS_TRUE}" && test -z "${HAS_TOOLS_FALSE}"; then as_fn_error $? "conditional \"HAS_TOOLS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_SA_LEN_TRUE}" && test -z "${HAS_SOCKADDR_SA_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_SA_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN_SIN_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN_SIN_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN_SIN_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN6_SIN6_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DNSSEC_SUPPORT_TRUE}" && test -z "${HAS_DNSSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DNSSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC3_SUPPORT_TRUE}" && test -z "${HAS_NSEC3_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC3_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC_SUPPORT_TRUE}" && test -z "${HAS_NSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MIRROR_SUPPORT_TRUE}" && test -z "${HAS_MIRROR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MIRROR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DROPALL_SUPPORT_TRUE}" && test -z "${HAS_DROPALL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DROPALL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TCL_TRUE}" && test -z "${HAS_TCL_FALSE}"; then as_fn_error $? "conditional \"HAS_TCL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RDTSC_TRUE}" && test -z "${HAS_RDTSC_FALSE}"; then as_fn_error $? "conditional \"HAS_RDTSC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRCACHE_ENABLED_TRUE}" && test -z "${HAS_RRCACHE_ENABLED_FALSE}"; then as_fn_error $? "conditional \"HAS_RRCACHE_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by yadifa $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ yadifa config.status 2.1.6-5826 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "var/Makefile") CONFIG_FILES="$CONFIG_FILES var/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file, --srcdir, and --disable-option-checking arguments # so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" shift for ac_arg do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; --disable-option-checking) ;; *) case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_sub_configure_args " '$ac_arg'" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi # Always prepend --disable-option-checking to silence warnings, since # different subdirs can have different --enable and --with options. ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 $as_echo "$ac_msg" >&6 as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 fi cd "$ac_popdir" done fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo echo echo "YADIFA BUNDLE DONE" echo "------------------" echo echo yadifa-2.1.6-5826/PaxHeaders.8028/missing0000644000077100007710000000013212473710127015733 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597650.533344534 yadifa-2.1.6-5826/missing0000755000077100007710000001533012473710127015544 0ustar00yadifayadifa00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 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, 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/PaxHeaders.8028/COPYING0000644000077100007710000000012412650131756015375 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.827344 30 ctime=1454597650.492344534 yadifa-2.1.6-5826/COPYING0000664000077100007710000000312012650131756015176 0ustar00yadifayadifa00000000000000 Copyright (c) 2011-2016, EURid. All rights reserved. The YADIFA TM software product is provided under the BSD 3-clause license: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of EURid nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. yadifa-2.1.6-5826/PaxHeaders.8028/sbin0000644000077100007710000000013212654663024015221 xustar000000000000000030 mtime=1454597652.878344534 30 atime=1454597652.878344534 30 ctime=1454597652.878344534 yadifa-2.1.6-5826/sbin/0000775000077100007710000000000012654663024015104 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/sbin/PaxHeaders.8028/yadifad0000644000077100007710000000013212654663025016623 xustar000000000000000030 mtime=1454597653.340344534 30 atime=1454597652.878344534 30 ctime=1454597653.340344534 yadifa-2.1.6-5826/sbin/yadifad/0000775000077100007710000000000012654663025016506 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/Makefile.am0000644000077100007710000000012412650131756020732 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.069344 30 ctime=1454597653.001344534 yadifa-2.1.6-5826/sbin/yadifad/Makefile.am0000664000077100007710000001003112650131756020532 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # YADIFA server Makefile.am script # ############################################################################## ACLOCAL_AMFLAGS = -I ../../m4 dist_noinst_DATA = VERSION sbin_PROGRAMS = yadifad yadifad_SOURCES = \ main.c \ axfr.c \ config_main.c \ config_zone.c \ confs.c \ database-service-zone-desc-load.c \ database-service-zone-desc-unload.c \ database-service-zone-download.c \ database-service-zone-freeze.c \ database-service-zone-load.c \ database-service-zone-mount.c \ database-service-zone-save.c \ database-service-zone-unfreeze.c \ database-service-zone-unload.c \ database-service-zone-unmount.c \ database-service.c \ database.c \ ixfr.c \ log_query.c \ log_statistics.c \ notify.c \ poll-util.c \ process_class_ch.c \ server-mt.c \ server.c \ server_context.c \ signals.c \ zone.c if HAS_NSID_SUPPORT yadifad_SOURCES += config-nsid.c endif noinst_HEADERS = \ axfr.h \ config.h \ config_error.h \ confs.h \ database-service-zone-desc-load.h \ database-service-zone-desc-unload.h \ database-service-zone-download.h \ database-service-zone-freeze.h \ database-service-zone-load.h \ database-service-zone-mount.h \ database-service-zone-save.h \ database-service-zone-unfreeze.h \ database-service-zone-unload.h \ database-service-zone-unmount.h \ database-service.h \ database.h \ ixfr.h \ log_query.h \ log_statistics.h \ notify.h \ poll-util.h \ process_class_ch.h \ server-mt.h \ server.h \ server_context.h \ server_error.h \ signals.h \ zone.h \ zone_data.h \ zone_desc.h \ zone-source.h if HAS_CTRL yadifad_SOURCES += config_control.c \ ctrl.c \ ctrl_query.c \ ctrl_zone.c noinst_HEADERS += ctrl.h \ ctrl_query.h \ ctrl_zone.h endif if HAS_ACL_SUPPORT yadifad_SOURCES += acl.c config_acl.c noinst_HEADERS += config_acl.h endif if HAS_RRL_SUPPORT yadifad_SOURCES += rrl.c noinst_HEADERS += rrl.h endif if HAS_ACL_SUPPORT noinst_HEADERS += acl.h endif if HAS_DYNUPDATE_SUPPORT yadifad_SOURCES += dynupdate_query_service.c noinst_HEADERS += dynupdate_query_service.h endif if HAS_RRSIG_MANAGEMENT_SUPPORT yadifad_SOURCES += database-service-zone-resignature.c noinst_HEADERS += database-service-zone-resignature.h endif include ../../mk/common-settings.mk include ../../mk/common-labels.mk yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/ctrl_zone.h0000644000077100007710000000012412650131756021046 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.028344 30 ctime=1454597653.135344534 yadifa-2.1.6-5826/sbin/yadifad/ctrl_zone.h0000664000077100007710000000540412650131756020656 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup server * @ingroup yadifad * @brief server * * Handles queries made in the CH class (ie: version.*) * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef __CTRL_ZONE__H__ #define __CTRL_ZONE__H__ #include "server-config.h" #if !HAS_CTRL #error "CTRL has not been enabled : do not include this" #endif #include /** * CTRL handling */ ya_result ctrl_zone_freeze(zone_desc_s *zone_desc, bool dolock); ya_result ctrl_zone_freeze_all(); ya_result ctrl_zone_unfreeze(zone_desc_s *zone_desc, bool dolock); ya_result ctrl_zone_unfreeze_all(); #if HAS_DYNAMIC_PROVISIONING ya_result ctrl_zone_generate_from_message(message_data *mesg); /* generate but let on the unactivated side */ ya_result ctrl_zone_config_merge(zone_desc_s *zone_desc, bool dolock); ya_result ctrl_zone_config_merge_all(); ya_result ctrl_zone_config_delete(zone_desc_s *zone_desc, bool dolock); #endif /** @} */ #endif yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/ctrl_query.h0000644000077100007710000000012412650131756021240 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.917344 30 ctime=1454597653.132344534 yadifa-2.1.6-5826/sbin/yadifad/ctrl_query.h0000664000077100007710000000454012650131756021050 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup server * @ingroup yadifad * @brief server * * Handles queries made in the CH class (ie: version.*) * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef __CTRL_QUERY__H__ #define __CTRL_QUERY__H__ #include "server-config.h" #if !HAS_CTRL #error "CTRL has not been enabled : do not include this" #endif #include #include /** * CTRL handling of the queries */ #if HAS_CTRL void ctrl_query_process(message_data *mesg); #endif /** @} */ #endif yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/log_query.h0000644000077100007710000000012412650131756021055 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.933344 30 ctime=1454597653.080344534 yadifa-2.1.6-5826/sbin/yadifad/log_query.h0000664000077100007710000000626012650131756020666 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logging Server logging * @ingroup yadifad * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _LOG_QUERY_H #define _LOG_QUERY_H #include #include #include /******************************************************************************************************************* * * QUERY LOG SPECIALISED FUNCTIONS * ******************************************************************************************************************/ #ifndef LOG_QUERY_C_ extern logger_handle* g_queries_logger; #endif #define log_query_i(...) logger_handle_msg(g_queries_logger,MSG_INFO,__VA_ARGS__) #define log_query_w(...) logger_handle_msg(g_queries_logger,MSG_WARNING,__VA_ARGS__) #define log_query_e(...) logger_handle_msg(g_queries_logger,MSG_ERR,__VA_ARGS__) #ifndef LOG_QUERY_C_ typedef void log_query_function(int, message_data*); #endif extern log_query_function* log_query; void log_query_bind(int socket_fd, message_data *mesg); void log_query_yadifa(int socket_fd, message_data *mesg); static inline void log_query_both(int socket_fd, message_data *mesg) { log_query_yadifa(socket_fd, mesg); log_query_bind(socket_fd, mesg); } static inline void log_query_none(int socket_fd, message_data *mesg) { } void log_query_set_mode(u32 mode); #endif /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/process_class_ch.h0000644000077100007710000000012412650131756022364 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.001344 30 ctime=1454597653.094344534 yadifa-2.1.6-5826/sbin/yadifad/process_class_ch.h0000664000077100007710000000445512650131756022201 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup server * @ingroup yadifad * @brief server * * Handles queries made in the CH class (ie: version.*) * * @{ */ /*----------------------------------------------------------------------------*/ #pragma once #include void class_ch_set_hostname(const char *name); void class_ch_set_version(const char *name); void class_ch_set_id_server(const char *name); /** * Answers to a CH query. Query operation assumed. */ void class_ch_process(message_data *mesg); /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-mount.h0000644000077100007710000000012412650131756024362 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.938344 30 ctime=1454597653.052344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-mount.h0000664000077100007710000000374612650131756024201 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #include void database_service_zone_mount(zone_desc_s *zone_desc); /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/config_acl.h0000644000077100007710000000012412650131756021133 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.943344 30 ctime=1454597653.138344534 yadifa-2.1.6-5826/sbin/yadifad/config_acl.h0000664000077100007710000000521112650131756020737 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup acl Access Control List * @ingroup yadifad * @brief * * @{ */ #pragma once #include "acl.h" /** @brief ACL value parser * * @param[in] value * @param[in] config_command * @param[out] config * * @return an error code */ ya_result config_set_acl_item(const char *value, address_match_set *dest, anytype notused); /// @note In order to use these macros, CONFIG_TYPE has to be defined #define CONFIG_ACL(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, ac) + offsetof(access_control,fieldname_), (config_set_field_function*)config_set_acl_item, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_ACL_FILTER(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_acl_item, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-mount.c0000644000077100007710000000012412650131756024355 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.933344 30 ctime=1454597653.245344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-mount.c0000664000077100007710000001563012650131756024167 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup database Routines for database manipulations * @ingroup yadifad * @brief database functions * * Implementation of routines for the database * - add zone file(s) * - clear zone file(s) * - print zone files(s) * - load db * - unload db * - lookup database result of a message * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include "config.h" #include #include #include #include #include #include "database-service.h" #include "notify.h" #define MODULE_MSG_HANDLE g_server_logger #define DBLOADQ_TAG 0x5144414f4c4244 void database_service_zone_mount(zone_desc_s *zone_desc) { ya_result return_value; #ifdef DEBUG log_debug("database_service_zone_mount(%{dnsname}@%p=%i)", zone_desc->origin, zone_desc, zone_desc->rc); #endif if(zone_desc == NULL) { log_err("zone mount: NULL zone"); return; } log_debug1("database_service_zone_mount: locking zone '%{dnsname}' for mounting", zone_desc->origin); if(FAIL(return_value = zone_lock(zone_desc, ZONE_LOCK_MOUNT))) { log_err("database_service_zone_mount: failed to lock zone settings for '%{dnsname}'", zone_desc->origin); return; } zone_desc->status_flags |= ZONE_STATUS_MOUNTING; zdb_zone *zone = zone_get_loaded_zone(zone_desc); // RC++, because we get to keep a reference if(zone == NULL) { log_err("zone mount: no zone loaded for '%{dnsname}'", zone_desc->origin); zone_desc->status_flags &= ~(ZONE_STATUS_STARTING_UP|ZONE_STATUS_MOUNTING|ZONE_STATUS_PROCESSING); /// @todo check why the two commands were reversed database_fire_zone_mounted(zone_desc, NULL, ERROR); zone_unlock(zone_desc, ZONE_LOCK_MOUNT); return; } log_info("zone mount: %{dnsname}", zone_desc->origin); /* * If the zone descriptor (config) exists and it can be locked by the loader ... */ u32 now = time(NULL); zone_desc->refresh.refreshed_time = now; zone_desc->refresh.retried_time = now; /// @todo arm an alarm for refresh log_debug1("database_service_zone_mount: locking zone '%{dnsname}' for mounting", zone->origin); // locks the descriptor with the loader identity zone_desc_log(MODULE_MSG_HANDLE, MSG_DEBUG1, zone_desc, "database_service_zone_mount"); zdb *db = g_config->database; #if HAS_ACL_SUPPORT zone->extension = &zone_desc->ac; zone->query_access_filter = acl_get_query_access_filter(&zone_desc->ac.allow_query); #endif // zdb_zone *old_zone = zdb_set_zone(db, zone); // RC++, because the zone is put into the database bool send_notify_to_slaves = TRUE; if(old_zone != NULL) { if(zone != old_zone) { // there is already a different zone mounted zdb_zone_lock(old_zone, ZDB_ZONE_MUTEX_REPLACE); // set old zone as invalid old_zone->apex->flags |= ZDB_RR_LABEL_INVALID_ZONE; zdb_zone_unlock(old_zone, ZDB_ZONE_MUTEX_REPLACE); } else { log_debug2("database_service_zone_mount: tried to mount a zone in place of itself (%p is %p)", old_zone, zone); send_notify_to_slaves = FALSE; } zdb_zone_release(old_zone); } // if(send_notify_to_slaves) { #if HAS_MASTER_SUPPORT if(zone_desc->type == ZT_MASTER) { log_debug("notifying slaves of zone %{dnsname}", zone_desc->origin); notify_slaves(zone_desc->origin); // RC++ } else #endif if(zone_desc->type == ZT_SLAVE) { log_debug("notifying explicit slaves of zone %{dnsname}", zone_desc->origin); notify_slaves(zone_desc->origin); // RC++ if(((zone_desc->flags & ZONE_FLAG_NO_MASTER_UPDATES) == 0)) { if(zone_desc->masters != NULL) { log_debug("querying changes of zone %{dnsname} to the master at %{hostaddr}", zone_desc->origin, zone_desc->masters); database_zone_ixfr_query(zone_desc->origin); } else { log_err("zone %{dnsname} has no master defined", zone_desc->origin); } } } // else nothing to do } else { log_debug("no need to send notify to slaves of zone %{dnsname}", zone_desc->origin); } database_fire_zone_mounted(zone_desc, zone, SUCCESS); // RC++ zdb_zone_release(zone); // RC-- zone = NULL; zone_desc->status_flags &= ~(ZONE_STATUS_STARTING_UP|ZONE_STATUS_MOUNTING|ZONE_STATUS_PROCESSING); log_debug1("database_service_zone_mount: unlocking zone '%{dnsname}' for mounting", zone_desc->origin); zone_unlock(zone_desc, ZONE_LOCK_MOUNT); } /** * @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/ctrl.h0000644000077100007710000000012412650131756020013 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.973344 30 ctime=1454597653.128344534 yadifa-2.1.6-5826/sbin/yadifad/ctrl.h0000664000077100007710000000467412650131756017633 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup server * @ingroup yadifad * @brief server * * Handles queries made in the CH class (ie: version.*) * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef __CTRL__H__ #define __CTRL__H__ #include #include #include "config.h" #if !HAS_CTRL #error "CTRL has not been enabled : do not include this" #endif #define HAS_CTRL_DYNAMIC_PROVISIONING 0 /** * CTRL handling */ typedef struct config_control config_control; struct config_control { bool enabled; }; void ctrl_set_enabled(bool b); bool ctrl_get_enabled(); /** @} */ #endif yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/server-mt.h0000644000077100007710000000012412650131756020773 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.075344 30 ctime=1454597653.097344534 yadifa-2.1.6-5826/sbin/yadifad/server-mt.h0000664000077100007710000000455412650131756020610 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup server Server * @ingroup yadifad * @brief Single threaded server. This one has the best performance on all of our setups with kernels <= 2.6.32 * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef SERVER_MT_H_ #define SERVER_MT_H_ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server.h" ya_result server_mt_query_loop(); #endif /* SERVER_MT_H_ */ /* ------------------------------------------------------------ */ /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/log_query.c0000644000077100007710000000012412650131756021050 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.927344 30 ctime=1454597653.273344534 yadifa-2.1.6-5826/sbin/yadifad/log_query.c0000664000077100007710000002173712650131756020667 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logging Server logging * @ingroup yadifad * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "server-config.h" #include "config.h" #include #include "log_query.h" #include "server_context.h" /******************************************************************************************************************* * * QUERY LOG SPECIALISED FUNCTIONS * ******************************************************************************************************************/ #define LOG_QUERY_C_ logger_handle* g_queries_logger = NULL; log_query_function* log_query = log_query_yadifa; void log_query_set_mode(u32 mode) { switch(mode) { case 1: log_query = log_query_yadifa; break; case 2: log_query = log_query_bind; break; case 3: log_query = log_query_both; break; default: log_query = log_query_none; break; } } static u8 log_query_add_du16(char *dest, u16 v) { u8 idx = 8; char tmp[8]; do { char c = (v%10) + '0'; v /= 10; tmp[--idx] = c; } while(v != 0); memcpy(dest, &tmp[idx], 8 - idx); return 8 - idx; } static const char __hexa__[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; static u8 log_query_add_xu16(char *dest, u16 v) { dest[0] = __hexa__[(v>>4)&0xf]; dest[1] = __hexa__[v&0xf]; dest[2] = __hexa__[(v>>12)&0xf]; dest[3] = __hexa__[(v>>8)&0xf]; return 4; } void log_query_bind(int socket_fd, message_data *mesg) { if(g_queries_logger == NULL) { return; } char *buffer; const char *class_name; const char *type_name; char query_text[1024]; buffer = query_text; memcpy(buffer, "client ", 7); buffer+=7; u16 port = 0; switch(mesg->other.sa.sa_family) { case AF_INET: { struct sockaddr_in *ipv4 = &mesg->other.sa4; if(inet_ntop(ipv4->sin_family, &ipv4->sin_addr, buffer, 64) != NULL) { buffer += strlen(buffer); *buffer++ = '#'; port = ntohs(ipv4->sin_port); } break; } case AF_INET6: { struct sockaddr_in6 *ipv6 = &mesg->other.sa6; if(inet_ntop(ipv6->sin6_family, &ipv6->sin6_addr, buffer, 64) != NULL) { buffer += strlen(buffer); *buffer++ = '#'; port = ntohs(ipv6->sin6_port); } break; } } buffer += log_query_add_du16(buffer, port); memcpy(buffer, ": query: ", 9); buffer += 9; buffer += dnsname_to_cstr(buffer, mesg->qname); *buffer++ = ' '; class_name = get_name_from_class(mesg->qclass); if(class_name != NULL) { strcpy(buffer, class_name); // the buffer is big enough buffer += strlen(class_name); } else { memcpy(buffer, "CLASS", 5); buffer += 5; buffer += log_query_add_du16(buffer, mesg->qclass); } *buffer++ = ' '; type_name = get_name_from_type(mesg->qtype); if(type_name != NULL) { strcpy(buffer, type_name); // the buffer is big enough buffer += strlen(type_name); } else { memcpy(buffer, "TYPE", 4); buffer += 4; buffer += log_query_add_du16(buffer, mesg->qtype); } *buffer++ = ' '; *buffer++ = (MESSAGE_RD(mesg->buffer)==0)?'-':'+'; #if HAS_TSIG_SUPPORT if(mesg->tsig.tsig != NULL) { *buffer++ = 'S'; } #endif if(mesg->edns) { *buffer++ = 'E'; } if(mesg->protocol == IPPROTO_TCP) { *buffer++ = 'T'; } if((mesg->rcode_ext & RCODE_EXT_DNSSEC)) { *buffer++ = 'D'; } if(MESSAGE_CD(mesg->buffer) != 0) { *buffer++ = 'C'; } *buffer++ = ' '; *buffer++ = '('; buffer += server_context_append_socket_name(buffer, socket_fd); *buffer++ = ')'; *buffer = '\0'; logger_handle_msg_text_ext(g_queries_logger, MSG_INFO, query_text, buffer - query_text, " queries: info: ", 16, LOGGER_MESSAGE_TIMEMS|LOGGER_MESSAGE_PREFIX); } void log_query_yadifa(int socket_fd, message_data *mesg) { (void)socket_fd; if(g_queries_logger == NULL) { return; } char *buffer; const char *class_name; const char *type_name; char query_text[1024]; buffer = query_text; memcpy(buffer, "query [", 7); buffer+=7; buffer += log_query_add_xu16(buffer, MESSAGE_ID(mesg->buffer)); *buffer++ = ']'; *buffer++ = ' '; *buffer++ = '{'; *buffer++ = (MESSAGE_RD(mesg->buffer)!=0)?'+':'-'; #if HAS_TSIG_SUPPORT *buffer++ = (mesg->tsig.tsig != NULL)? 'S':'-'; #else *buffer++ = '-'; #endif *buffer++ = (mesg->edns)? 'E':'-'; *buffer++ = (mesg->protocol == IPPROTO_TCP)?'T':'-'; *buffer++ = ((mesg->rcode_ext & RCODE_EXT_DNSSEC)!=0)?'D':'-'; *buffer++ = (MESSAGE_CD(mesg->buffer) != 0)?'C':'-'; *buffer++ = '}'; *buffer++ = ' '; buffer += dnsname_to_cstr(buffer, mesg->qname); *buffer++ = ' '; class_name = get_name_from_class(mesg->qclass); if(class_name != NULL) { strcpy(buffer, class_name); // the buffer is big enough buffer += strlen(class_name); } else { memcpy(buffer, "CLASS", 5); buffer += 5; buffer += log_query_add_du16(buffer, mesg->qclass); } *buffer++ = ' '; type_name = get_name_from_type(mesg->qtype); if(type_name != NULL) { strcpy(buffer, type_name); // the buffer is big enough buffer += strlen(type_name); } else { memcpy(buffer, "TYPE", 4); buffer += 4; buffer += log_query_add_du16(buffer, mesg->qtype); } *buffer++ = ' '; *buffer++ = '('; u16 port = 0; switch(mesg->other.sa.sa_family) { case AF_INET: { struct sockaddr_in *ipv4 = &mesg->other.sa4; if(inet_ntop(ipv4->sin_family, &ipv4->sin_addr, buffer, 64) != NULL) { buffer += strlen(buffer); *buffer++ = '#'; port = ntohs(ipv4->sin_port); } break; } case AF_INET6: { struct sockaddr_in6 *ipv6 = &mesg->other.sa6; if(inet_ntop(ipv6->sin6_family, &ipv6->sin6_addr, buffer, 64) != NULL) { buffer += strlen(buffer); *buffer++ = '#'; port = ntohs(ipv6->sin6_port); } break; } } buffer += log_query_add_du16(buffer, port); *buffer++ = ')'; *buffer = '\0'; logger_handle_msg_text(g_queries_logger, MSG_INFO, query_text, buffer - query_text); } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/ixfr.c0000644000077100007710000000012412650131756020012 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.037344 30 ctime=1454597653.270344534 yadifa-2.1.6-5826/sbin/yadifad/ixfr.c0000664000077100007710000004143112650131756017622 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "server.h" #include "ixfr.h" #include "confs.h" #include "notify.h" #include "database-service-zone-download.h" extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger /** * * Handle an IXFR query from a slave. * * @TODO: Set the IXFR storage path */ ya_result ixfr_process(message_data *mesg) { /* * Start an IXFR "writer" thread * Give it the tcp fd * It will store the IXFR for the current database snapshot on the disk if it does not exist yet (writers blocked) * It will then open the stored file and stream it to the tcp fd (writers freed) * ACL/TSIG is not taken in account yet. */ zdb_zone *zone; u8 *fqdn = mesg->qname; u32 fqdn_len = dnsname_len(fqdn); if(fqdn_len > MAX_DOMAIN_LENGTH) { return DOMAIN_TOO_LONG; } ya_result return_value = SUCCESS; /// @todo edf 20141006 -- verify qclass //u16 qclass = GET_U16_AT(mesg->buffer[DNS_HEADER_LENGTH + fqdn_len + 2]); if(((zone = zdb_acquire_zone_read_from_fqdn(g_config->database, fqdn)) != NULL) && ZDB_ZONE_VALID(zone)) { #if ZDB_HAS_ACL_SUPPORT access_control *ac = (access_control*)zone->extension; if(!ACL_REJECTED(acl_check_access_filter(mesg, &ac->allow_transfer))) { #endif /* * Before doing more work, check the serials. */ u32 query_serial; if(ISOK(return_value = message_ixfr_query_get_serial(mesg, &query_serial))) { u32 zone_serial; zdb_zone_lock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); return_value = zdb_zone_getserial(zone, &zone_serial); zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); if(ISOK(return_value)) { if(serial_lt(query_serial, zone_serial)) { // reply with the relevant XFR stream zdb_zone_answer_ixfr(zone, mesg, NULL, NULL, g_config->axfr_max_packet_size, g_config->axfr_max_record_by_packet, g_config->axfr_compress_packets); return SUCCESS; } else { /* already up-to-date */ log_info("ixfr: already up-to-date"); // answer with the SOA packet_writer pc; packet_writer_init(&pc, mesg->buffer, DNS_HEADER_LENGTH + fqdn_len + 2 + 2, MAX_U16); const u8 *soa_rdata; u32 soa_ttl; u16 soa_rdata_size; zdb_zone_getsoa_ttl_rdata(zone, &soa_ttl, &soa_rdata_size, &soa_rdata); packet_writer_add_fqdn(&pc, &mesg->buffer[12]); packet_writer_add_u16(&pc, TYPE_SOA); packet_writer_add_u16(&pc, CLASS_IN); packet_writer_add_u32(&pc, ntohl(soa_ttl)); packet_writer_add_rdata(&pc, TYPE_SOA, soa_rdata, soa_rdata_size); MESSAGE_FLAGS_OR(mesg->buffer, QR_BITS|AA_BITS, 0); MESSAGE_SET_QD(mesg->buffer, NETWORK_ONE_16); MESSAGE_SET_AN(mesg->buffer, NETWORK_ONE_16); MESSAGE_SET_NSAR(mesg->buffer, 0); mesg->send_length = pc.packet_offset; mesg->status = FP_XFR_UP_TO_DATE; } } else { /* broken zone */ log_info("ixfr: broken zone"); mesg->status = FP_XFR_BROKENZONE; } } else { log_info("ixfr: unable to fetch serial from message: %r", return_value); mesg->status = FP_XFR_QUERYERROR; } #if ZDB_HAS_ACL_SUPPORT } else { /* notauth */ log_info("ixfr: not authorised"); mesg->status = FP_XFR_REFUSED; } #endif } else { /* zone not found */ log_info("ixfr: zone not found"); if(zone == NULL) { mesg->status = FP_XFR_REFUSED; } else { mesg->status = FP_INVALID_ZONE; } } if(mesg->status != FP_XFR_UP_TO_DATE) { message_make_error(mesg, mesg->status); } #if HAS_TSIG_SUPPORT if(MESSAGE_HAS_TSIG(*mesg)) { message_sign_answer(mesg,mesg->tsig.tsig); } #endif tcp_send_message_data(mesg); yassert((mesg->sockfd < 0)||(mesg->sockfd >2)); close_ex(mesg->sockfd); return return_value; } /** * Connects to the server and sends an IXFR query with the given parameters. * In case of success the input and output streams are tcp streams to the server, ready to read the answer * In case of error the streams are undefined * * @param servers * @param origin * @param ttl * @param rdata * @param rdata_size * @param is * @param os * @return */ ya_result ixfr_start_query(const host_address *servers, const u8 *origin, u32 ttl, const u8 *soa_rdata, u16 soa_rdata_size, input_stream *is, output_stream *os, message_data *ixfr_queryp) { /** * Create the IXFR query packet */ random_ctx rndctx = thread_pool_get_random_ctx(); ya_result return_value; u32 serial; u16 id = (u16)random_next(rndctx); if(FAIL(return_value = rr_soa_get_serial(soa_rdata, soa_rdata_size, &serial))) { log_err("ixfr: error with the SOA: %r", return_value); return return_value; } log_info("ixfr: sending query from %{dnsname} to %{hostaddr} from serial %i", origin, servers, serial); message_make_ixfr_query(ixfr_queryp, id, origin, ttl, soa_rdata_size, soa_rdata); #if HAS_TSIG_SUPPORT if(servers->tsig != NULL) { log_info("ixfr: transfer will be signed with key '%{dnsname}'", servers->tsig->name); message_sign_query(ixfr_queryp, servers->tsig); } #endif /** * @todo start by doing it UDP (1.0.1) * Send UDP, read UDP (or timeout) * if error, AXFR will be needed * if truncated, TCP will be needed */ message_update_tcp_length(ixfr_queryp); /* * connect & send */ while(FAIL(return_value = tcp_input_output_stream_connect_host_address(servers, is, os, g_config->xfr_connect_timeout))) { int err = errno; if(err != EINTR) { log_info("ixfr: failed to send the query for %{dnsname} to %{hostaddr}: %r", origin, servers, return_value); return return_value; } } #ifdef DEBUG log_debug("ixfr_start_query: write: sending %d bytes to %{hostaddr}", ixfr_queryp->send_length + 2, servers); log_memdump_ex(g_server_logger, LOG_DEBUG, &ixfr_queryp->buffer_tcp_len[0], ixfr_queryp->send_length + 2, 16, OSPRINT_DUMP_HEXTEXT); #endif if(ISOK(return_value = output_stream_write(os, &ixfr_queryp->buffer_tcp_len[0], ixfr_queryp->send_length + 2))) { output_stream_flush(os); int fd = fd_input_stream_get_filedescriptor(is); tcp_set_sendtimeout(fd, 30, 0); tcp_set_recvtimeout(fd, 30, 0); return SUCCESS; } input_stream_close(is); output_stream_close(os); return return_value; } /** * * Send an IXFR query to a master and handle the answer (loads the zone). * * @TODO: Set the IXFR storage path */ ya_result ixfr_query(const host_address *servers, zdb_zone *zone, u32 *out_loaded_serial) { /* * Background: * * Build an ixfr query message * Send it to the master * Wait for the answer * Copy the answer in a file * Load the zone from the file * * Foreground: * * Attach the zone to the database. */ /* * IXFR query */ ya_result return_value; u32 current_serial; u32 ttl; u16 rdata_size; const u8 *rdata; /** @todo check if zdb_zone_lock(zone, ZDB_ZONE_MUTEX_XFR) is needed */ zdb_zone_lock(zone, ZDB_ZONE_MUTEX_XFR); if(FAIL(return_value = zdb_zone_getserial(zone, ¤t_serial))) { zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_XFR); return return_value; } if(FAIL(return_value = zdb_zone_getsoa_ttl_rdata(zone, &ttl, &rdata_size, &rdata))) { zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_XFR); return return_value; } zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_XFR); input_stream is; output_stream os; message_data mesg; /** * start the IXFR query */ if(ISOK(return_value = ixfr_start_query(servers, zone->origin, ttl, rdata, rdata_size, &is, &os, &mesg))) { /** @todo: disables updates/ixfr for the zone */ /* xfr_copy_args xfr; xfr.is = &is; xfr.origin = zone->origin; xfr.message = &mesg; xfr.current_serial = current_serial; xfr.flags = XFR_ALLOW_BOTH|XFR_CURRENT_SERIAL_SET; */ input_stream xfris; if(ISOK(return_value = xfr_input_stream_init(&xfris, zone->origin, &is, &mesg, current_serial, XFR_ALLOW_BOTH|XFR_CURRENT_SERIAL_SET))) { switch(xfr_input_stream_get_type(&xfris)) { case TYPE_AXFR: log_info("ixfr: %{dnsname} server %{hostaddr} answered with AXFR", zone->origin, servers); case TYPE_ANY: { /* delete axfr files */ xfr_delete_axfr(zone->origin); /* delete ix files */ zdb_zone_journal_delete(zone); log_info("ixfr: %{dnsname}: loading AXFR stream from server %{hostaddr}", zone->origin, servers); if(ISOK(return_value = xfr_copy(&xfris, g_config->xfr_path))) { if(out_loaded_serial != NULL) { *out_loaded_serial = xfr_input_stream_get_serial(&xfris); } } else { log_debug("ixfr: %{dnsname}: AXFR stream copy failed: %r", zone->origin, return_value); } break; } case TYPE_IXFR: { log_info("ixfr: %{dnsname}: loading IXFR stream from server %{hostaddr} into the journal", zone->origin, servers); return_value = zdb_zone_journal_append_ixfr_stream(zone, &xfris); u32 ixfr_from_serial; zdb_zone_journal_get_serial_range(zone, &ixfr_from_serial, out_loaded_serial); u32 expected_serial = xfr_input_stream_get_serial(&xfris); #ifdef DEBUG log_debug("ixfr: %{dnsname}: journal_append_ixfr_stream returned %r", zone->origin, return_value); #endif if(ISOK(return_value)) { ya_result ret; log_info("ixfr: %{dnsname}: replaying journal (%u;%u)", zone->origin, ixfr_from_serial, *out_loaded_serial); if(ISOK(ret = zdb_icmtl_replay(zone))) { log_info("ixfr: %{dnsname}: journal replayed", zone->origin); } else { return_value = ret; log_err("zone load: journal replay returned %r", return_value); } if(ISOK(ret) && serial_lt(*out_loaded_serial, expected_serial)) { // should redo an IXFR asap log_info("ixfr: %{dnsname}: loaded serial %u below expected serial: querying IXFR again", zone->origin, *out_loaded_serial, expected_serial); database_service_zone_ixfr_query(zone->origin); } } else { log_err("ixfr: %{dnsname}: the loading IXFR stream from server %{hostaddr} into the journal failed with: %r", zone->origin, servers, return_value); } break; } default: { return_value = ERROR; break; } } input_stream_close(&xfris); if(ISOK(return_value)) { log_debug("ixfr: %{dnsname}: notifying implicit and explicit slaves", zone->origin); notify_slaves(zone->origin); } } else { if(return_value == ZONE_ALREADY_UP_TO_DATE) { return_value = SUCCESS; } else { log_info("ixfr: %{dnsname}: transfer from master failed: %r", zone->origin, return_value); } } input_stream_close(&is); output_stream_close(&os); /** * @todo Here is a good place to check the journal size. * * If it worked, it may be nice to know the current total size of the journaling file * If it's beyond a given size, then an zone file/AXFR could be written on the disk and the older files deleted */ } return return_value; } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-desc-load.h0000644000077100007710000000012412650131756025053 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.989344 30 ctime=1454597653.034344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-desc-load.h0000664000077100007710000000373312650131756024666 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #include "zone_desc.h" void database_load_zone_desc(zone_desc_s *zone_desc); /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/acl.c0000644000077100007710000000012412650131756017601 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.953344 30 ctime=1454597653.326344534 yadifa-2.1.6-5826/sbin/yadifad/acl.c0000664000077100007710000020053712650131756017415 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup acl Access Control List * @ingroup yadifad * @brief * * @{ */ #include "server-config.h" #include #include #include "config.h" #include #include extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #include #include #include #include #include #if !HAS_ACL_SUPPORT #error "ACL support should not be compiled in" #endif #include "acl.h" #define ADRMITEM_TAG 0x4d4554494d524441 #define ACLENTRY_TAG 0x5952544e454c4341 #define ACL_DEBUG_FULL 0 #define ACL_DEBUG_FLUSH 0 // enabling this will greatly slow down the zone configuration #ifndef DEBUG #undef ACL_DEBUG_FULL #define ACL_DEBUG_FULL 0 #endif /* * 2011/10/18 : EDF: disabling the debug because it makes the legitimate error output unreadable. */ #if !ACL_DEBUG_FLUSH #define logger_flush(...) #endif #define STR(x) ((x)!=NULL)?(x):"NULL" /* * Contains all the definitions from the section */ // #ifdef DEBUG #if ACL_DEBUG_FULL != 0 static const char* query_access_filter_type_name[18]= { "RRI", "ARI", "4RI", "RAI", "AAI", "4AI", "R6I", "A6I", "46I", "RRT", "ART", "4RT", "RAT", "AAT", "4AT", "R6T", "A6T", "46T" }; #endif static void amim_ipv4_print(ptr_vector *ipv4v) { #if ACL_DEBUG_FULL != 0 address_match_item **itemp = (address_match_item **)ipv4v->data; s32 idx = 0; #ifdef DEBUG log_debug7("\tipv4@%p", (void*)itemp); logger_flush(); #endif while(idx <= ipv4v->offset) { u8* ip = itemp[idx]->parameters.ipv4.address.bytes; u8* mask = itemp[idx]->parameters.ipv4.mask.bytes; #ifdef DEBUG log_debug7("\t\t[%hhu.%hhu.%hhu.%hhu/%hhu.%hhu.%hhu.%hhu (%hu) %c]", ip[0], ip[1], ip[2], ip[3], mask[0], mask[1], mask[2], mask[3], itemp[idx]->parameters.ipv4.maskbits, (itemp[idx]->parameters.ipv4.rejects == 0) ? 'a' : 'r'); logger_flush(); #endif idx++; } #endif } static void amim_ipv6_print(ptr_vector *ipv6v) { #if ACL_DEBUG_FULL != 0 address_match_item **itemp = (address_match_item **)ipv6v->data; s32 idx = 0; #ifdef DEBUG log_debug7("\tipv6@%p", (void*)itemp); logger_flush(); #endif while(idx <= ipv6v->offset) { u8* ip = itemp[idx]->parameters.ipv6.address.bytes; u8* mask = itemp[idx]->parameters.ipv6.mask.bytes; #ifdef DEBUG log_debug7("\t\t[%2hhx%2hhx:%2hhx%2hhx:%2hhx%2hhx:%2hhx%2hhx:%2hhx%2hhx:%2hhx%2hhx:%2hhx%2hhx:%2hhx%2hhx/%2hhx%2hhx:%2hhx%2hhx:%2hhx%2hhx:%2hhx%2hhx:%2hhx%2hhx:%2hhx%2hhx:%2hhx%2hhx:%2hhx%2hhx (%hi) %c]", ip[0], ip[1], ip[2], ip[3], ip[4], ip[5], ip[6], ip[7], ip[8], ip[9], ip[10], ip[11], ip[12], ip[13], ip[14], ip[15], mask[0], mask[1], mask[2], mask[3], mask[4], mask[5], mask[6], mask[7], mask[8], mask[9], mask[10], mask[11], mask[12], mask[13], mask[14], mask[15], itemp[idx]->parameters.ipv6.maskbits, (itemp[idx]->parameters.ipv6.rejects == 0) ? 'a' : 'r'); logger_flush(); #endif idx++; } #endif } #if HAS_TSIG_SUPPORT static void amim_tsig_print(ptr_vector *tsigv) { #if ACL_DEBUG_FULL != 0 address_match_item **itemp = (address_match_item **)tsigv->data; s32 idx = 0; #ifdef DEBUG log_debug7("\ttsig@%p", (void*)itemp); logger_flush(); #endif while(idx <= tsigv->offset) { u8* name = itemp[idx]->parameters.tsig.name; #ifdef DEBUG log_debug7("\t\t%{dnsname}", name); logger_flush(); #endif idx++; } #endif } #endif // TSIG SUPPORT #endif // static ptr_vector g_acl = EMPTY_PTR_VECTOR; static ptr_vector g_amim = EMPTY_PTR_VECTOR; /* Store the ones defined outside a chain so they can be deleted */ typedef int amim_function(struct address_match_item*, void*); // static int amim_none(const struct address_match_item* item, const void* data) { return AMIM_REJECT; } static int amim_any(const struct address_match_item* item, const void* data) { return AMIM_ACCEPT; } static int amim_ipv4(const struct address_match_item* item, const void* data) { const ipv4_id* items = &item->parameters.ipv4; const u32* ip = (const u32*)data; return ( (items->address.value & items->mask.value) == (*ip & items->mask.value)) ? AMIM_ACCEPT : AMIM_SKIP; } static int amim_ipv4_not(const struct address_match_item *item, const void* data) { return -amim_ipv4(item, data); } static int amim_ipv6(const struct address_match_item *item, const void* data) { const u64* ipv6_bytes = (const u64*)data; const ipv6_id* items = &item->parameters.ipv6; return ( ((items->address.lohi[0] & items->mask.lohi[0]) == (ipv6_bytes[0] & items->mask.lohi[0])) && ((items->address.lohi[1] & items->mask.lohi[1]) == (ipv6_bytes[1] & items->mask.lohi[1])) ) ? AMIM_ACCEPT : AMIM_SKIP; } static int amim_ipv6_not(const struct address_match_item *item, const void *data) { return -amim_ipv6(item, data); } #if HAS_TSIG_SUPPORT static int amim_tsig(const struct address_match_item *item, const void *data) { const message_data *mesg = (const message_data*)data; /* * The TSIG has already been verified as being valid. So all we need to know if : is it allowed ? */ // mesg->tsig->tsig->name; // log_debug("tsig : %p", mesg->tsig.tsig->name); const tsig_item *tsig = mesg->tsig.tsig; if(tsig != NULL) { if(item->parameters.tsig.mac_algorithm == tsig->mac_algorithm) { if(item->parameters.tsig.name_size == tsig->name_len) { if(dnsname_equals(item->parameters.tsig.name, tsig->name)) { return AMIM_ACCEPT; } } } } return AMIM_SKIP; /* no match */ } static int amim_tsig_not(const struct address_match_item *item, const void *data) { return -amim_tsig(item, data); } #endif static int amim_reference(const struct address_match_item *item, const void *data) { return AMIM_REJECT; }// // #if ACL_SORT_RULES != 0 static int amim_ipv4_sort_callback(const void *a, const void *b) { address_match_item *ia = *(address_match_item**)a; address_match_item *ib = *(address_match_item**)b; if(ia->parameters.ipv4.maskbits != ib->parameters.ipv4.maskbits) { /* Bigger value => more specific tag => before in the sort order */ return (ib->parameters.ipv4.maskbits - ia->parameters.ipv4.maskbits); } /* * rejects a = 1 & b = 0 => a rejects and b don't => a comes first */ return (ib->parameters.ipv4.rejects - ia->parameters.ipv4.rejects); } static void amim_ipv4_sort(ptr_vector *ipv4v) { ptr_vector_qsort(ipv4v, amim_ipv4_sort_callback); } static int amim_ipv6_sort_callback(const void *a, const void *b) { address_match_item *ia = *(address_match_item**)a; address_match_item *ib = *(address_match_item**)b; if(ia->parameters.ipv6.maskbits != ib->parameters.ipv6.maskbits) { /* Bigger value => more specific tag => before in the sort order */ return (ib->parameters.ipv6.maskbits - ia->parameters.ipv6.maskbits); } /* * rejects a = 1 & b = 0 => a rejects and b don't => a comes first */ return (ib->parameters.ipv6.rejects - ia->parameters.ipv6.rejects); } static void amim_ipv6_sort(ptr_vector *ipv6v) { ptr_vector_qsort(ipv6v, amim_ipv6_sort_callback); } #endif // #define AML_REJECT 0 /* DO NOT CHANGE THESES VALUES */ #define AML_ACCEPT 1 /* DO NOT CHANGE THESES VALUES */ #define AML_FILTER 2 /* DO NOT CHANGE THESES VALUES */ static inline u32 address_match_list_size(const address_match_list *aml) { return (aml != NULL)?(aml->limit - aml->items):0; } static u32 address_match_list_get_type(const address_match_list *aml) { if(aml == NULL) { return AML_REJECT; } u32 n = address_match_list_size(aml); switch(n) { case 0: { return AML_REJECT; } case 1: { if(aml->items[0]->match == amim_none) { return AML_REJECT; } else if(aml->items[0]->match == amim_any) { return AML_ACCEPT; } } default: { return AML_FILTER; } } } static u32 address_match_set_get_type(const address_match_set *ams) { /* * TSIG cannot be globally accepted nor rejected. * It can only be ignored or filtered. * So [0;1] => 0 and 2 => 1. */ u32 tsig = (address_match_list_get_type(&ams->tsig) >> 1) * 9; if(tsig == 0) { /* no tsig, no modifier here */ return address_match_list_get_type(&ams->ipv4) + address_match_list_get_type(&ams->ipv6) * 3; } else { /* * If a tsig is defined and BOTH IPs rules have a size of zero, then both are accepted. */ if(address_match_list_size(&ams->ipv4) + address_match_list_size(&ams->ipv6) == 0) { return AML_ACCEPT + AML_ACCEPT * 3 + tsig; } else { return address_match_list_get_type(&ams->ipv4) + address_match_list_get_type(&ams->ipv6) * 3 + tsig * 9; } } } #define IS_IPV4_ITEM(x_) (((x_)->match == amim_ipv4)||((x_)->match == amim_ipv4_not)) #define IS_IPV6_ITEM(x_) (((x_)->match == amim_ipv6)||((x_)->match == amim_ipv6_not)) #if HAS_TSIG_SUPPORT #define IS_TSIG_ITEM(x_) (((x_)->match == amim_tsig)||((x_)->match == amim_tsig_not)) #endif #define IS_ANY_ITEM(x_) (((x_)->match == amim_any)||((x_)->match == amim_none)) #define IS_NONE_ITEM(x_) (((x_)->match == amim_any)||((x_)->match == amim_none)) #define IS_IPV4_ITEM_MATCH(x_) ((x_)->match == amim_ipv4) #define IS_IPV6_ITEM_MATCH(x_) ((x_)->match == amim_ipv6) #define IS_TSIG_ITEM_MATCH(x_) ((x_)->match == amim_tsig) #define IS_ANY_ITEM_MATCH(x_) ((x_)->match == amim_any) #define IS_NONE_ITEM_MATCH(x_) ((x_)->match == amim_none) #define IS_IPV4_ITEM_MATCH_NOT(x_) ((x_)->match == amim_ipv4_not) #define IS_IPV6_ITEM_MATCH_NOT(x_) ((x_)->match == amim_ipv6_not) #define IS_TSIG_ITEM_MATCH_NOT(x_) ((x_)->match == amim_tsig_not) #define IS_ANY_ITEM_MATCH_NOT(x_) ((x_)->match == amim_none) #define IS_NONE_ITEM_MATCH_NOT(x_) ((x_)->match == amim_any) static address_match_item* address_match_item_alloc() { address_match_item* item; MALLOC_OR_DIE(address_match_item*, item, sizeof(address_match_item), ADRMITEM_TAG); ZEROMEMORY(item, sizeof (address_match_item)); return item; } static void address_match_item_free(address_match_item *ami) { #ifdef DEBUG u32 txt_size; char txt[512]; txt_size = sizeof(txt); acl_address_match_item_to_string(ami, txt, &txt_size); if(txt_size <= sizeof(txt)) { log_debug7("acl: destroying '%s' (rc=%i)", txt, ami->rc); } else { log_debug7("acl: destroying @%p (rc=%i)", ami, ami->rc); } #endif if(ami->match == amim_reference) { free((void*)ami->parameters.ref.name); } #if HAS_TSIG_SUPPORT else if((ami->match == amim_tsig) || (ami->match == amim_tsig_not)) { free(ami->parameters.tsig.name); free(ami->parameters.tsig.known); } #endif #ifdef DEBUG memset(ami, 0xff, sizeof(address_match_item)); #endif free(ami); } /** * Returns the number of conversions (0 or 1) * * @param amlv * @param word * @param acls * @return */ static ya_result acl_expand_address_match_reference(ptr_vector *amlv, const char* word, const ptr_vector *acls) { ya_result return_value = 0; #ifdef DEBUG log_debug7("acl_expand_address_match_reference(%p, %s, %p)", (void*)amlv, word, (void*)acls); logger_flush(); #endif s32 index = 0; while(index <= acls->offset) { acl_entry* acl = acls->data[index++]; if(strcasecmp(acl->name, word) == 0) { address_match_item **amip = acl->list.items; while(amip < acl->list.limit) { address_match_item *ami = *amip; if(ami->match == amim_reference) { /* recurse */ if(!ami->parameters.ref.mark) { ami->parameters.ref.mark = TRUE; ya_result expand = acl_expand_address_match_reference(amlv, ami->parameters.ref.name, acls); if(expand > 0) { return_value += expand; } else { if(expand == 0) { log_err("acl: expanding '%s': '%s' is undefined", word, ami->parameters.ref.name); } else { log_err("acl: expanding '%s': '%s' cannot be expanded", word, ami->parameters.ref.name); } return_value = MIN_S32; // forces an error } ami->parameters.ref.mark = FALSE; } } else { ptr_vector_append(amlv, ami); ami->rc++; return_value++; } amip++; } break; } } return return_value; } static inline u32 netmask_bit_count(const u8 *bytes, u32 len) { const u8 * const limit = &bytes[len]; u32 bits = 0; while(bytes < limit) { if(*bytes != 0xff) { break; } bits += 8; bytes++; } if(bytes < limit) { u8 c = *bytes; while((c & 0x80) != 0) { c <<= 1; bits++; } } return bits; } static int acl_ptr_vector_address_match_list_compare(const void *a, const void *b) { if(acl_address_match_item_equals((address_match_item*)a, (address_match_item*)b)) { return 0; } else { return -1; } } /** * Used to build the acl content * * [!] (ip [/prefix] | key key_id | "acl_name" | { address_match_list } ) * * If acls is not null, the definitions will be expanded * */ static ya_result acl_parse_address_match_list(address_match_list *aml, const char *description, const ptr_vector *acls) { #ifdef DEBUG log_debug7("acl_parse_address_match_list(%p, \"%s\", %p)", (void*)aml, STR(description), (void*)acls); logger_flush(); #endif if(description == NULL) { return 0; /* successfully parsed 0 descriptors */ } yassert(aml != NULL && aml->items == NULL && aml->limit == NULL); const char *separator = description; ptr_vector list; u32 token_len; bool accept; char token[256]; ptr_vector_init(&list); /* * get each ""; token * parse the token */ while(*separator != '\0') { /* Find the first non-separator, non-space, non-zero char */ while(isspace(*separator)) { separator++; } /* EOL ? */ if(*separator == '\0') { break; } description = separator; while((*separator != ',') && (*separator != ';') && (*separator != '\0')) { separator++; } if(description[0] == '\0') { continue; } token_len = separator - description; while(((*separator == ';') || (*separator == ',')) && (*separator != '\0')) { separator++; } if(token_len > sizeof (token) - 1) { return ACL_TOKEN_SIZE_ERROR; /* token is too big */ } while((token_len > 0) && isspace(description[token_len - 1])) { token_len--; } if(token_len == 0) { continue; } memcpy(token, description, token_len); token[token_len] = '\0'; description = separator; /* We have a token, we can now divide it*/ char *word = token; /* Check for a starting '!' */ accept = TRUE; if(*word == '!') { accept = FALSE; word++; word = (char*)parse_skip_spaces(word); } char *next_word = (char*)parse_next_space(word); if(*next_word != '\0') { *next_word++ = '\0'; next_word = (char*)parse_skip_spaces(next_word); } address_match_item *ami = NULL; if(strcasecmp(word, "key") == 0) { #if HAS_TSIG_SUPPORT /* TSIG : key xxxxx; */ ami = address_match_item_alloc(); ami->match = (accept) ? amim_tsig : amim_tsig_not; # word = next_word; next_word = (char*)parse_next_space(next_word); if(next_word - word > sizeof (token)) { /* free(ami); */ /* pointless since the cleanup will not be fully done anyway (list) */ return ACL_TOKEN_SIZE_ERROR; } /* * Check if the key is known */ u8 dnsname[MAX_DOMAIN_LENGTH]; ya_result dnsname_len = cstr_to_dnsname_with_check(dnsname,word); if(FAIL(dnsname_len)) { return ACL_NAME_PARSE_ERROR; } tsig_item *key = tsig_get(dnsname); if(key == NULL) { /* free(ami); */ /* pointless since the cleanup will not be fully done anyway (list) */ return ACL_UNKNOWN_TSIG_KEY; } ami->parameters.tsig.secret_size = key->mac_size; ami->parameters.tsig.name_size = dnsname_len; ami->parameters.tsig.mac_algorithm = key->mac_algorithm; MALLOC_OR_DIE(u8*, ami->parameters.tsig.known, key->mac_size, GENERIC_TAG); memcpy(ami->parameters.tsig.known, key->mac, key->mac_size); MALLOC_OR_DIE(u8*, ami->parameters.tsig.name, dnsname_len, GENERIC_TAG); memcpy(ami->parameters.tsig.name, dnsname, dnsname_len); #else return ACL_UNKNOWN_TSIG_KEY; // not supported #endif } else if(strcasecmp(word, "none") == 0) { /* Reject all */ ami = address_match_item_alloc(); ami->match = (accept) ? amim_none : amim_any; } else if(strcasecmp(word, "any") == 0) { /* Accept all */ ami = address_match_item_alloc(); ami->match = (accept) ? amim_any : amim_none; } else /* parse an ipv4 or ipv6, with or without an ipv4, ipv6 or sized bitmask */ { u8 buffer[16]; bool mask = FALSE; u32 bits = 0; int proto = -1; char *slash = word; while(*slash != '\0') { if(*slash == '/') { *slash++ = '\0'; slash = (char*)parse_skip_spaces(slash); mask = TRUE; break; } slash++; } if(inet_pton(AF_INET, word, buffer) == 1) { /* ipv4 */ proto = AF_INET; ami = address_match_item_alloc(); ami->match = (accept) ? amim_ipv4 : amim_ipv4_not; ami->parameters.ipv4.rejects = (accept) ? 0 : 1; memcpy(&ami->parameters.ipv4.address.bytes, buffer, 4); if(!mask) { memset(&ami->parameters.ipv4.mask.bytes, 0xff, 4); ami->parameters.ipv4.maskbits = 32; } } else if(inet_pton(AF_INET6, word, buffer) == 1) { /* ipv6 */ proto = AF_INET6; ami = address_match_item_alloc(); ami->match = (accept) ? amim_ipv6 : amim_ipv6_not; ami->parameters.ipv6.rejects = (accept) ? 0 : 1; memcpy(&ami->parameters.ipv6.address.bytes, buffer, 16); if(!mask) { memset(&ami->parameters.ipv6.mask.bytes, 0xff, 16); ami->parameters.ipv6.maskbits = 128; } } else { /* It could be a reference: */ if(!accept || mask) /* Cannot do a 'not' reference. * Cannot get a '/' in a reference. */ { return ACL_UNEXPECTED_NEGATION; } /* * If the acls have already been (fully) defined: * Look for 'word' in the acls and expand it. * Add every ACL entry */ if(acls != NULL) { ya_result expand; if((expand = acl_expand_address_match_reference(&list, word, acls)) <= 0) { ptr_vector_destroy(&list); if(expand == 0) { log_err("acl: '%s' is undefined", word); } else { log_err("acl: '%s' cannot be expanded", word); } return ACL_UNDEFINED_TOKEN; } } else /* just store the name */ { ami = address_match_item_alloc(); ami->match = amim_reference; ami->parameters.ref.name = strdup(word); ami->parameters.ref.mark = FALSE; #ifdef DEBUG log_debug7("acl_parse_address_match_list(%p, %s, %p) : adding %p (%s)", (void*)aml, STR(description), (void*)acls, (void*)ami, word); #endif ptr_vector_append(&list, ami); ami->rc++; } continue; } /* * If a raw value has been put in an "allow", then I have to keep track to delete it at shutdown */ if(acls != NULL) { address_match_item *known = ptr_vector_linear_search(&g_amim, ami, acl_ptr_vector_address_match_list_compare); if(known == NULL) { log_debug7("acl_parse_address_match_list(%p, %s, %p) : adding to amim", (void*)aml, STR(description), (void*)acls, (void*)ami, word); ptr_vector_append(&g_amim, ami); ami->rc++; } else { // this one is known already address_match_item_free(ami); ami = known; } } if(mask) { word = slash; if(inet_pton(AF_INET, word, buffer) == 1) { /* ipv4 */ if(proto != AF_INET) { /* free(ami); */ /* pointless since the cleanup will not be fully done anyway (list) */ return ACL_WRONG_V4_MASK; } ami->match = (accept) ? amim_ipv4 : amim_ipv4_not; memcpy(&ami->parameters.ipv4.mask.bytes, buffer, 4); ami->parameters.ipv4.maskbits = netmask_bit_count(ami->parameters.ipv4.mask.bytes, 4); } else if(inet_pton(AF_INET6, word, buffer) == 1) { /* ipv6 */ if(proto != AF_INET6) { /* free(ami); */ /* pointless since the cleanup will not be fully done anyway (list) */ return ACL_WRONG_V6_MASK; } ami->match = (accept) ? amim_ipv6 : amim_ipv6_not; memcpy(&ami->parameters.ipv6.mask.bytes, buffer, 16); ami->parameters.ipv6.maskbits = netmask_bit_count(ami->parameters.ipv4.mask.bytes, 16); } else if(ISOK(parse_u32_check_range(word, &bits, 0, (proto == AF_INET) ? 32 : 128, 10))) { ZEROMEMORY(buffer, sizeof (buffer)); u8 *b = buffer; u8 maskbits = bits; while(bits >= 8) { *b++ = 0xff; bits -= 8; } while(bits > 0) { *b >>= 1; *b |= 0x80; bits--; } if(proto == AF_INET) { memcpy(&ami->parameters.ipv4.mask, buffer, 4); ami->parameters.ipv4.maskbits = maskbits; } else { memcpy(&ami->parameters.ipv6.mask, buffer, 16); ami->parameters.ipv6.maskbits = maskbits; } } else { /* free(ami); */ /* pointless since the cleanup will not be fully done anyway (list) */ return ACL_WRONG_MASK; /* Wrong mask */ } } } yassert(ami != NULL); #ifdef DEBUG log_debug7("acl_parse_address_match_list(%p, %s, %p) : adding %p (---)", (void*)aml, STR(description), (void*)acls, (void*)ami); logger_flush(); #endif ptr_vector_append(&list, ami); ami->rc++; } /* while there is something to parse */ u32 count = list.offset + 1; if(count > 0) { ptr_vector_shrink(&list); #ifdef DEBUG log_debug7("acl_parse_address_match_list(%p, %s, %p) : items at %p", (void*)aml, STR(description), (void*)acls, (void*)list.data); logger_flush(); #endif aml->items = (address_match_item**)list.data; aml->limit = &aml->items[count]; } else { // the list is empty ptr_vector_destroy(&list); } if(count > 1000) { return ACL_TOO_MUCH_TOKENS; } return count; } ya_result acl_add_definition(const char* name, const char *description) { #ifdef DEBUG log_debug7("acl_add_definition(%s, %s)", STR(name), STR(description)); logger_flush(); #endif yassert(name != NULL); yassert(description != NULL); acl_entry *acl; ya_result return_code; s32 index = 0; while(index <= g_acl.offset) { acl = (acl_entry*)g_acl.data[index++]; if(strcasecmp(acl->name, name) == 0) { return ACL_DUPLICATE_ENTRY; } } MALLOC_OR_DIE(acl_entry*, acl, sizeof (acl_entry), ACLENTRY_TAG); ZEROMEMORY(acl, sizeof (acl_entry)); if(FAIL(return_code = acl_parse_address_match_list(&acl->list, description, NULL))) { free(acl); return return_code; } acl->name = strdup(name); #ifdef DEBUG log_debug7("acl_add_definition(%s @ %p, %s) list %p items %p", STR(name), (void*)acl, STR(description), (void*)&acl->list, (void*)acl->list.items); logger_flush(); #endif ptr_vector_append(&g_acl, acl); return SUCCESS; } static void acl_free_address_match_item(void *ami_) { address_match_item *ami = (address_match_item*)ami_; if(--ami->rc <= 0) { address_match_item_free(ami); } else { u32 txt_size; char txt[512]; txt_size = sizeof(txt); acl_address_match_item_to_string(ami, txt, &txt_size); if(txt_size <= sizeof(txt)) { log_debug7("acl: not destroying '%s' (rc=%i)", txt, ami->rc); } else { log_debug7("acl: not destroying @%p (rc=%i)", ami, ami->rc); } } } static void acl_free_definition(void *def) { acl_entry *entry = (acl_entry*)def; #ifdef DEBUG log_debug7("acl_free_definition(%p) : '%s'", def, entry->name); logger_flush(); #endif free((void*)entry->name); address_match_item **amip = entry->list.items; address_match_item **limit = entry->list.limit; while(amip < limit) { address_match_item* ami = (*amip++); if(--ami->rc <= 0) { address_match_item_free(ami); } } #ifdef DEBUG log_debug7("acl_free_definition(%p) items: %p", def, (void*)entry->list.items); logger_flush(); #endif free(entry->list.items); free(entry); } void acl_free_definitions() { #ifdef DEBUG log_debug7("acl_free_definitions()"); logger_flush(); #endif log_debug7("acl_free_definitions(): %u amim", ptr_vector_size(&g_amim)); ptr_vector_free_empties(&g_amim, &acl_free_address_match_item); ptr_vector_destroy(&g_amim); log_debug7("acl_free_definitions(): %u acl", ptr_vector_size(&g_acl)); ptr_vector_free_empties(&g_acl, &acl_free_definition); ptr_vector_destroy(&g_acl); } /** * Builds an access control using the text descriptors and the acl data. * Expands the access control. * */ ya_result acl_build_access_control(access_control *ac, const char *allow_query, const char *allow_update, const char *allow_update_forwarding, const char *allow_transfer, const char *allow_notify, const char *allow_control) { #ifdef DEBUG log_debug7("acl_build_access_control(%p, %s, %s ,%s, %s, %s)", (void*)ac, STR(allow_query), STR(allow_update), STR(allow_update_forwarding), STR(allow_transfer), STR(allow_notify), STR(allow_control)); logger_flush(); #endif ya_result return_code; if(ISOK(return_code = acl_build_access_control_item(&ac->allow_query, allow_query))) { if(ISOK(return_code = acl_build_access_control_item(&ac->allow_update, allow_update))) { if(ISOK(return_code = acl_build_access_control_item(&ac->allow_update_forwarding, allow_update_forwarding))) { if(ISOK(return_code = acl_build_access_control_item(&ac->allow_transfer, allow_transfer))) { if(ISOK(return_code = acl_build_access_control_item(&ac->allow_notify, allow_notify))) { return_code = acl_build_access_control_item(&ac->allow_control, allow_control); } } } } } return return_code; } void acl_empties_address_match_list(address_match_list *aml) { #ifdef DEBUG log_debug7("acl_empties_address_match_list(%p): %p", (void*)aml, (void*)aml->items); logger_flush(); #endif for(address_match_item **amip = aml->items; amip < aml->limit; amip++) { address_match_item *ami = *amip; ami->rc--; if(ami->rc <= 0) { log_debug7("acl_empties_address_match_list(%p): %p has rc=%i", (void*)aml, ami->rc); s32 amim_idx = ptr_vector_index_of(&g_amim, ami, acl_ptr_vector_address_match_list_compare); if(amim_idx >= 0) { log_debug7("acl_empties_address_match_list(%p): %p is part of amim", (void*)aml, ami->rc); ptr_vector_end_swap(&g_amim, amim_idx); g_amim.offset--; } address_match_item_free(ami); } } #ifdef DEBUG if(aml->items != NULL) { size_t n = (u8*)aml->limit - (u8*)aml->items; memset(aml->items, 0xff, n); } #endif free(aml->items); aml->items = NULL; aml->limit = NULL; } void acl_empties_address_match_set(address_match_set *ams) { #ifdef DEBUG log_debug7("acl_empties_address_match_set(%p)", (void*)ams); logger_flush(); #endif acl_empties_address_match_list(&ams->ipv4); acl_empties_address_match_list(&ams->ipv6); acl_empties_address_match_list(&ams->tsig); } void acl_empties_access_control(access_control *ac) { #ifdef DEBUG log_debug7("acl_empties_access_control(%p)", (void*)ac); logger_flush(); #endif acl_empties_address_match_set(&ac->allow_notify); acl_empties_address_match_set(&ac->allow_query); acl_empties_address_match_set(&ac->allow_transfer); acl_empties_address_match_set(&ac->allow_update); acl_empties_address_match_set(&ac->allow_update_forwarding); acl_empties_address_match_set(&ac->allow_control); } void acl_copy_address_match_list(address_match_list *target, const address_match_list* aml) { int n = aml->limit - aml->items; if(n > 0) { MALLOC_OR_DIE(address_match_item**, target->items, n * sizeof(address_match_item*), ADRMITEM_TAG); target->limit = &target->items[n]; for(int i = 0; i < n; i++) { target->items[i] = address_match_item_alloc(); memcpy(target->items[i], aml->items[i], sizeof(address_match_item)); if(target->items[i]->match == amim_reference) { target->items[i]->parameters.ref.name = strdup(target->items[i]->parameters.ref.name); } } } else { target->items = NULL; target->limit = NULL; } } void acl_copy_address_match_set(address_match_set *target, const address_match_set *ams) { acl_copy_address_match_list(&target->ipv4, &ams->ipv4); acl_copy_address_match_list(&target->ipv6, &ams->ipv6); acl_copy_address_match_list(&target->tsig, &ams->tsig); } void acl_copy_access_control(access_control *target, const access_control *ac) { acl_copy_address_match_set(&target->allow_query, &ac->allow_query); acl_copy_address_match_set(&target->allow_update, &ac->allow_update); acl_copy_address_match_set(&target->allow_update_forwarding, &ac->allow_update_forwarding); acl_copy_address_match_set(&target->allow_transfer, &ac->allow_transfer); acl_copy_address_match_set(&target->allow_notify, &ac->allow_notify); acl_copy_address_match_set(&target->allow_control, &ac->allow_control); } ya_result acl_build_access_control_item(address_match_set *ams, const char* allow_whatever) { #ifdef DEBUG log_debug7("acl_build_access_control_item(%p, \"%s\")", ams, STR(allow_whatever)); #endif ya_result return_code; address_match_list aml; ZEROMEMORY(&aml, sizeof (aml)); if(ISOK(return_code = acl_parse_address_match_list(&aml, allow_whatever, &g_acl))) { if(aml.items == NULL) { /* * Empty set */ #ifdef DEBUG log_debug7("acl_build_access_control_item(%p, \"%s\") returning empty set", ams, STR(allow_whatever)); #endif return SUCCESS; } ptr_vector ipv4v = EMPTY_PTR_VECTOR; ptr_vector ipv6v = EMPTY_PTR_VECTOR; #if HAS_TSIG_SUPPORT ptr_vector tsigv = EMPTY_PTR_VECTOR; #endif address_match_item **amip = aml.items; while(amip < aml.limit) { address_match_item *ami = *amip; if(IS_IPV4_ITEM(ami)) { if(((ami->parameters.ipv4.maskbits == 32) || (ami->parameters.ipv4.maskbits == 0)) && (ami->parameters.ipv4.address.value == 0) ) { /* A.K.A any/none IPv4 */ // ^ | & // A 0 => A 0 0 0 0 // A ~0 => R 0 1 1 0 // R 0 => R 1 0 1 0 // R ~0 => A 1 1 1 1 // REJECTS NONE bool rejects = (ami->parameters.ipv4.rejects != 0); bool none = (ami->parameters.ipv4.maskbits != 0); bool xored = (rejects || none) && !(rejects && none); //acl_free_address_match_item(item); //item = alloc_address_match_item(); ami->match = (xored) ? amim_none : amim_any; } ptr_vector_append(&ipv4v, ami); ami->rc++; } else if(IS_IPV6_ITEM(ami)) { if(((ami->parameters.ipv6.maskbits == 128) || (ami->parameters.ipv6.maskbits == 0)) && IPV6_ADDRESS_ALL0(ami->parameters.ipv6.address)) { /* A.K.A any/none IPv6 */ // A 0 => A // A ~0 => R // R 0 => R // R ~0 => A // REJECTS NONE bool rejects = (ami->parameters.ipv6.rejects != 0); bool none = (ami->parameters.ipv6.maskbits != 0); bool xored = (rejects || none) && !(rejects && none); //acl_free_address_match_item(item); //item = alloc_address_match_item(); ami->match = (xored) ? amim_none : amim_any; } ptr_vector_append(&ipv6v, ami); ami->rc++; } #if HAS_TSIG_SUPPORT else if(IS_TSIG_ITEM(ami)) { ptr_vector_append(&tsigv, ami); ami->rc++; } #endif else /* any or none */ { ptr_vector_append(&ipv4v, ami); ami->rc++; ptr_vector_append(&ipv6v, ami); ami->rc++; //ptr_vector_append(&tsigv, item); } amip++; } ptr_vector_shrink(&ipv4v); ams->ipv4.items = (address_match_item**)ipv4v.data; ams->ipv4.limit = &ams->ipv4.items[ipv4v.offset + 1]; #if ACL_SORT_RULES != 0 amim_ipv4_sort(&ipv4v); #endif #ifdef DEBUG amim_ipv4_print(&ipv4v); #endif ptr_vector_shrink(&ipv6v); ams->ipv6.items = (address_match_item**)ipv6v.data; ams->ipv6.limit = &ams->ipv6.items[ipv6v.offset + 1]; #if ACL_SORT_RULES != 0 amim_ipv6_sort(&ipv6v); #endif #ifdef DEBUG amim_ipv6_print(&ipv6v); #endif #if HAS_TSIG_SUPPORT ptr_vector_shrink(&tsigv); ams->tsig.items = (address_match_item**)tsigv.data; ams->tsig.limit = &ams->tsig.items[tsigv.offset + 1]; #ifdef DEBUG amim_tsig_print(&tsigv); #endif #endif } acl_empties_address_match_list(&aml); #ifdef DEBUG output_stream baos; bytearray_output_stream_init(&baos, NULL, 0); acl_address_match_set_to_stream(&baos, ams); output_stream_write_u8(&baos,0); log_debug7("acl_build_access_control_item(%p, \"%s\"): %s", ams, STR(allow_whatever), bytearray_output_stream_buffer(&baos)); output_stream_close(&baos); #endif #ifdef DEBUG log_debug7("acl_build_access_control_item(%p, \"%s\") returning {%p,%p,%p}", ams, STR(allow_whatever), ams->ipv4.items, ams->ipv6.items, ams->tsig.items); #endif return return_code; } // static void acl_merge_address_match_set(address_match_set *dest, const address_match_set *src) { if((dest->ipv4.items == NULL) && (dest->ipv6.items == NULL) && (dest->tsig.items == NULL)) { dest->ipv4.items = src->ipv4.items; dest->ipv4.limit = src->ipv4.limit; dest->ipv6.items = src->ipv6.items; dest->ipv6.limit = src->ipv6.limit; dest->tsig.items = src->tsig.items; dest->tsig.limit = src->tsig.limit; } } void acl_merge_access_control(access_control *dest, const access_control *src) { acl_merge_address_match_set(&dest->allow_notify, &src->allow_notify); acl_merge_address_match_set(&dest->allow_query, &src->allow_query); acl_merge_address_match_set(&dest->allow_transfer, &src->allow_transfer); acl_merge_address_match_set(&dest->allow_update, &src->allow_update); acl_merge_address_match_set(&dest->allow_update_forwarding, &src->allow_update_forwarding); acl_merge_address_match_set(&dest->allow_control, &src->allow_control); } static void acl_unmerge_address_match_set(address_match_set *dest, const address_match_set *src) { if(dest->ipv4.items == src->ipv4.items) { dest->ipv4.items = NULL; dest->ipv4.limit = NULL; } if(dest->ipv6.items == src->ipv6.items) { dest->ipv6.items = NULL; dest->ipv6.limit = NULL; } if(dest->tsig.items == src->tsig.items) { dest->tsig.items = NULL; dest->tsig.limit = NULL; } } void acl_unmerge_access_control(access_control *dest, const access_control *src) { acl_unmerge_address_match_set(&dest->allow_notify, &src->allow_notify); acl_unmerge_address_match_set(&dest->allow_query, &src->allow_query); acl_unmerge_address_match_set(&dest->allow_transfer, &src->allow_transfer); acl_unmerge_address_match_set(&dest->allow_update, &src->allow_update); acl_unmerge_address_match_set(&dest->allow_update_forwarding, &src->allow_update_forwarding); acl_unmerge_address_match_set(&dest->allow_control, &src->allow_control); }// bool acl_address_match_set_isempty(const address_match_set *ams) { return (ams->ipv4.items == NULL) && (ams->ipv6.items == NULL) && (ams->tsig.items == NULL); } static ya_result acl_address_match_set_check_v4(const address_match_set *set, const struct sockaddr_in *ipv4) { ya_result return_code = 0; address_match_item **itemp = (address_match_item**)set->ipv4.items; while(itemp < set->ipv4.limit) { address_match_item *item = *itemp++; /* * < 0 : rejected (stop) * > 0 : accepted (stop) * = 0 : didn't matched (continue) */ if((return_code = item->match(item, &ipv4->sin_addr.s_addr)) != AMIM_SKIP) { break; } } return return_code; } static ya_result acl_address_match_set_check_v6(const address_match_set *set, const struct sockaddr_in6 *ipv6) { ya_result return_code = 0; address_match_item **itemp = (address_match_item**)set->ipv6.items; while(itemp < set->ipv6.limit) { address_match_item *item = *itemp++; /* * < 0 : rejected (stop) * > 0 : accepted (stop) * = 0 : didn't matched (continue) */ if((return_code = item->match(item, ipv6->sin6_addr.s6_addr)) != AMIM_SKIP) { break; } } return return_code; } static ya_result acl_address_match_set_check_tsig(const address_match_set *set, const void *message_with_tsig) { ya_result return_code = 0; address_match_item **itemp = (address_match_item**)set->tsig.items; while(itemp < set->tsig.limit) { address_match_item *item = *itemp++; /* * < 0 : rejected (stop) * > 0 : accepted (stop) * = 0 : didn't matched (continue) */ if((return_code = item->match(item, message_with_tsig)) != AMIM_SKIP) { break; } } return return_code; } /********************************************************************************************************************************/ // // RRI ARI 4RI static inline ya_result acl_check_access_filter_RRI(const message_data *mesg, const address_match_set *ams) { return AMIM_REJECT; } static inline ya_result acl_check_access_filter_ARI(const message_data *mesg, const address_match_set *ams) { return (mesg->other.sa.sa_family == AF_INET)?AMIM_ACCEPT:AMIM_REJECT; } static inline ya_result acl_check_access_filter_4RI(const message_data *mesg, const address_match_set *ams) { if(mesg->other.sa.sa_family == AF_INET) { return acl_address_match_set_check_v4(ams, &mesg->other.sa4) - 1; /* -1 to transform ignore to reject */ } return AMIM_REJECT; } // RAI AAI 4AI static inline ya_result acl_check_access_filter_RAI(const message_data *mesg, const address_match_set *ams) { return (mesg->other.sa.sa_family == AF_INET6)?AMIM_ACCEPT:AMIM_REJECT; } static ya_result acl_check_access_filter_AAI(const message_data *mesg, const address_match_set *ams) { return AMIM_ACCEPT; } static inline ya_result acl_check_access_filter_4AI(const message_data *mesg, const address_match_set *ams) { if(mesg->other.sa.sa_family == AF_INET) { return acl_address_match_set_check_v4(ams, &mesg->other.sa4) - 1; } else { return AMIM_ACCEPT; } } // R6I A6I 46I static inline ya_result acl_check_access_filter_R6I(const message_data *mesg, const address_match_set *ams) { if(mesg->other.sa.sa_family == AF_INET6) { return acl_address_match_set_check_v6(ams, &mesg->other.sa6) -1; } return AMIM_REJECT; } static inline ya_result acl_check_access_filter_A6I(const message_data *mesg, const address_match_set *ams) { if(mesg->other.sa.sa_family == AF_INET6) { return acl_address_match_set_check_v6(ams, &mesg->other.sa6) - 1; } else { return AMIM_ACCEPT; } } static inline ya_result acl_check_access_filter_46I(const message_data *mesg, const address_match_set *ams) { if(mesg->other.sa.sa_family == AF_INET) { return acl_address_match_set_check_v4(ams, &mesg->other.sa4) - 1; } else if(mesg->other.sa.sa_family == AF_INET6) { return acl_address_match_set_check_v6(ams, &mesg->other.sa6) - 1; } return AMIM_REJECT; } // TSIG // RRT ART 4RT static inline ya_result acl_check_access_filter_RRT(const message_data *mesg, const address_match_set *ams) { return AMIM_REJECT; } static inline ya_result acl_check_access_filter_ART(const message_data *mesg, const address_match_set *ams) { if((mesg->ar_start != NULL) && (mesg->other.sa.sa_family == AF_INET)) { return acl_address_match_set_check_tsig(ams, mesg) - 1; } return AMIM_REJECT; } static inline ya_result acl_check_access_filter_4RT(const message_data *mesg, const address_match_set *ams) { if((mesg->ar_start != NULL) && (mesg->other.sa.sa_family == AF_INET)) { if(!ACL_REJECTED(acl_address_match_set_check_v4(ams, &mesg->other.sa4))) { return acl_address_match_set_check_tsig(ams, mesg) - 1; } } return AMIM_REJECT; } // RAT AAT 4AT static inline ya_result acl_check_access_filter_RAT(const message_data *mesg, const address_match_set *ams) { if((mesg->ar_start != NULL) && (mesg->other.sa.sa_family == AF_INET6)) { return acl_address_match_set_check_tsig(ams, mesg) - 1; } return AMIM_REJECT; } static inline ya_result acl_check_access_filter_AAT(const message_data *mesg, const address_match_set *ams) { if(mesg->ar_start != NULL) { return acl_address_match_set_check_tsig(ams, mesg) - 1; } return AMIM_REJECT; } static inline ya_result acl_check_access_filter_4AT(const message_data *mesg, const address_match_set *ams) { if(mesg->ar_start != NULL) { if(mesg->other.sa.sa_family == AF_INET) { if(ACL_REJECTED(acl_address_match_set_check_v4(ams, &mesg->other.sa4))) { return AMIM_REJECT; } } return acl_address_match_set_check_tsig(ams, mesg) - 1; } return AMIM_REJECT; } // R6T A6T 46T static inline ya_result acl_check_access_filter_R6T(const message_data *mesg, const address_match_set *ams) { if(mesg->ar_start != NULL) { if(mesg->other.sa.sa_family == AF_INET6) { if(!ACL_REJECTED(acl_address_match_set_check_v6(ams, &mesg->other.sa6))) { return acl_address_match_set_check_tsig(ams, mesg) - 1; } } } return AMIM_REJECT; } static inline ya_result acl_check_access_filter_A6T(const message_data *mesg, const address_match_set *ams) { if(mesg->ar_start != NULL) { if(mesg->other.sa.sa_family == AF_INET6) { if(ACL_REJECTED(acl_address_match_set_check_v6(ams, &mesg->other.sa6))) { return AMIM_REJECT; } } return acl_address_match_set_check_tsig(ams, mesg) - 1; } return AMIM_REJECT; } static inline ya_result acl_check_access_filter_46T(const message_data *mesg, const address_match_set *ams) { if(mesg->ar_start != NULL) { if(mesg->other.sa.sa_family == AF_INET) { if(ACL_REJECTED(acl_address_match_set_check_v4(ams, &mesg->other.sa4))) { return AMIM_REJECT; } } else if(mesg->other.sa.sa_family == AF_INET6) { if(ACL_REJECTED(acl_address_match_set_check_v6(ams, &mesg->other.sa6))) { return AMIM_REJECT; } } return acl_address_match_set_check_tsig(ams, mesg) - 1; } return AMIM_REJECT; } ya_result acl_check_access_filter(const message_data *mesg, const address_match_set *ams) { ya_result return_code = AMIM_SKIP; /* * If there the client is on IPvX and IPvX has rules, the default is set to REJECT * then the client's address is compared to all the items in the list, returning on a match. */ if(mesg->other.sa.sa_family == AF_INET) { if(ams->ipv4.items != NULL) { if(ACL_REJECTED(return_code = acl_address_match_set_check_v4(ams, &mesg->other.sa4))) { return return_code; } } } else if(mesg->other.sa.sa_family == AF_INET6) { if(ams->ipv6.items != NULL) { if(ACL_REJECTED(return_code = acl_address_match_set_check_v6(ams, &mesg->other.sa6))) { return return_code; } } } #ifdef DEBUG else { log_err("acl: unsupported address family %d", mesg->other.sa.sa_family); return AMIM_REJECT; } #endif /* * At this point, none of the IPs have been explicitly rejected. * If they are accepted */ /* * If no address has been matched, then if the rules are holding any TSIG, ... */ if(ams->tsig.items != NULL) { if(mesg->ar_start != NULL) { return_code += acl_address_match_set_check_tsig(ams, mesg); } else { return_code = AMIM_REJECT; } } return_code--; return return_code; } // /* * RRI ARI FRI * RAI AAI FAI * RFI AFI FFI * RRF ARF FRF * RAF AAF FAF * RFF AFF FFF */ #define CAF(x) acl_check_access_filter_##x static acl_check_access_filter_callback* access_filter_by_type[18]= { CAF(RRI), CAF(ARI), CAF(4RI), CAF(RAI), CAF(AAI), CAF(4AI), CAF(R6I), CAF(A6I), CAF(46I), CAF(RRT), CAF(ART), CAF(4RT), CAF(RAT), CAF(AAT), CAF(4AT), CAF(R6T), CAF(A6T), CAF(46T) }; #undef CAF acl_check_access_filter_callback * acl_get_check_access_filter(const address_match_set *set) { acl_check_access_filter_callback* cb; u32 t = address_match_set_get_type(set); cb = access_filter_by_type[t]; return cb; } /********************************************************************************************************************************/ // /** * This macro is a template for the hook function from the allow_query input to the generic input * The only hooks that are not using it are the most simple ones (returning ACCEPT or REJECT) */ #define CAF_HOOK(x) static inline ya_result acl_query_access_filter_##x(const message_data *mesg, const void *extension) \ { \ const access_control *ac = (const access_control*)extension; \ return acl_check_access_filter_##x(mesg, &ac->allow_query); \ } static ya_result acl_query_access_filter_AAI(const message_data *mesg, const void *extension) { return AMIM_ACCEPT; } static ya_result acl_query_access_filter_RRI(const message_data *mesg, const void *extension) { return AMIM_REJECT; } static ya_result acl_query_access_filter_RRT(const message_data *mesg, const void *extension) { return AMIM_REJECT; } //CAF_HOOK(RRI) CAF_HOOK(ARI) CAF_HOOK(4RI) CAF_HOOK(RAI) //CAF_HOOK(AAI) CAF_HOOK(4AI) CAF_HOOK(R6I) CAF_HOOK(A6I) CAF_HOOK(46I) //CAF_HOOK(RRT) CAF_HOOK(ART) CAF_HOOK(4RT) CAF_HOOK(RAT) CAF_HOOK(AAT) CAF_HOOK(4AT) CAF_HOOK(R6T) CAF_HOOK(A6T) CAF_HOOK(46T) // #define QAF(x) acl_query_access_filter_##x static acl_query_access_filter_callback* query_access_filter_by_type[18]= { QAF(RRI), QAF(ARI), QAF(4RI), QAF(RAI), QAF(AAI), QAF(4AI), QAF(R6I), QAF(A6I), QAF(46I), QAF(RRT), QAF(ART), QAF(4RT), QAF(RAT), QAF(AAT), QAF(4AT), QAF(R6T), QAF(A6T), QAF(46T) }; #undef QAF acl_query_access_filter_callback * acl_get_query_access_filter(const address_match_set *set) { acl_query_access_filter_callback* cb; u32 t = address_match_set_get_type(set); cb = query_access_filter_by_type[t]; return cb; } ya_result acl_address_match_item_to_stream(output_stream *os, const address_match_item *ami) { ya_result return_code; if(ami == NULL) { return 0; } else if(IS_IPV4_ITEM(ami)) { s8 b = ami->parameters.ipv4.maskbits; //s8 r = ami->parameters.ipv4.rejects; struct sockaddr_in ipv4; ipv4.sin_addr.s_addr = ami->parameters.ipv4.address.value; ipv4.sin_family = AF_INET; if(IS_IPV4_ITEM_MATCH(ami)) { return_code = osformat(os, "%{sockaddrip}/%d", &ipv4, b); } else { return_code = osformat(os, "!%{sockaddrip}/%d", &ipv4, b); } } else if(IS_IPV6_ITEM(ami)) { s16 b = ami->parameters.ipv6.maskbits; //s8 r = ami->parameters.ipv6.rejects; struct sockaddr_in6 ipv6; memcpy((u8*)&ipv6.sin6_addr, ami->parameters.ipv6.address.bytes, 16); ipv6.sin6_family = AF_INET6; if(IS_IPV6_ITEM_MATCH(ami)) { return_code = osformat(os, "%{sockaddrip}/%d", &ipv6, b); } else { return_code = osformat(os, "!%{sockaddrip}/%d", &ipv6, b); } } #if HAS_TSIG_SUPPORT else if(IS_TSIG_ITEM(ami)) { if(IS_TSIG_ITEM_MATCH(ami)) { return_code = osformat(os, "key %{dnsname}", ami->parameters.tsig.name); } else { return_code = osformat(os, "! key %{dnsname}", ami->parameters.tsig.name); } } #endif else if(IS_ANY_ITEM(ami)) { if(IS_ANY_ITEM_MATCH(ami)) { osformat(os, "[%i]", ami->rc); return 1; } else { osformat(os, "[%i]", ami->rc); return 2; } } else { return_code = osformat(os, "?"); } if(ISOK(return_code)) { osformat(os, "[%i]", ami->rc); return_code = 0; } return return_code; } void acl_address_match_set_to_stream(output_stream *os, const address_match_set *ams) { address_match_item **item; address_match_item **limit; ya_result any_none = 0; ya_result return_code; char spc; item = ams->ipv4.items; limit = ams->ipv4.limit; spc = ' '; while(item < limit) { output_stream_write_u8(os, (u8)spc); return_code = acl_address_match_item_to_stream(os, *item); if(return_code > 0) { any_none |= return_code; break; } spc = ','; item++; } item = ams->ipv6.items; limit = ams->ipv6.limit; while(item < limit) { output_stream_write_u8(os, (u8)spc); return_code = acl_address_match_item_to_stream(os, *item); if(return_code > 0) { any_none |= return_code; break; } spc = ','; item++; } item = ams->tsig.items; limit = ams->tsig.limit; while(item < limit) { output_stream_write_u8(os, (u8)spc); return_code = acl_address_match_item_to_stream(os, *item); if(return_code > 0) { any_none |= return_code; break; } spc = ','; item++; } if(any_none != 0) { if(any_none & 1) { osformat(os, "%cany", spc); spc = ','; } if(any_none & 2) { osformat(os, "%cnone", spc); } } } ya_result acl_address_match_item_to_string(const address_match_item *ami, char *out_txt, u32 *out_txt_lenp) { ya_result return_code; u32 out_txt_len = *out_txt_lenp; if(ami == NULL) { return_code = snformat(out_txt, out_txt_len, "NULL->REJECT"); } else if(IS_IPV4_ITEM(ami)) { s8 b = ami->parameters.ipv4.maskbits; //s8 r = ami->parameters.ipv4.rejects; struct sockaddr_in ipv4; ipv4.sin_addr.s_addr = ami->parameters.ipv4.address.value; ipv4.sin_family = AF_INET; if(IS_IPV4_ITEM_MATCH(ami)) { return_code = snformat(out_txt, out_txt_len, "[%{sockaddrip}/%d]", &ipv4, b); } else { return_code = snformat(out_txt, out_txt_len, "![%{sockaddrip}/%d]", &ipv4, b); } } else if(IS_IPV6_ITEM(ami)) { s16 b = ami->parameters.ipv6.maskbits; //s8 r = ami->parameters.ipv6.rejects; struct sockaddr_in6 ipv6; memcpy((u8*)&ipv6.sin6_addr, ami->parameters.ipv6.address.bytes, 16); ipv6.sin6_family = AF_INET6; if(IS_IPV6_ITEM_MATCH(ami)) { return_code = snformat(out_txt, out_txt_len, "[%{sockaddrip}/%d]", &ipv6, b); } else { return_code = snformat(out_txt, out_txt_len, "![%{sockaddrip}/%d]", &ipv6, b); } } #if HAS_TSIG_SUPPORT else if(IS_TSIG_ITEM(ami)) { if(IS_TSIG_ITEM_MATCH(ami)) { return_code = snformat(out_txt, out_txt_len, "[%{dnsname}]", ami->parameters.tsig.name); } else { return_code = snformat(out_txt, out_txt_len, "![%{dnsname}]", ami->parameters.tsig.name); } } #endif else if(IS_ANY_ITEM(ami)) { if(IS_ANY_ITEM_MATCH(ami)) { return_code = snformat(out_txt, out_txt_len, "[any]"); } else { return_code = snformat(out_txt, out_txt_len, "[none]"); } } else { return_code = snformat(out_txt, out_txt_len, "?"); } if(ISOK(return_code)) { *out_txt_lenp = return_code; } return return_code; } bool acl_address_match_item_equals(const address_match_item *a, const address_match_item *b) { if(a == b) { return TRUE; } if((a == NULL) || (b == NULL)) { return FALSE; } if(a->match == b->match) { if((a->match == amim_none) || (a->match == amim_any)) { return TRUE; } if((a->match == amim_ipv4) || (a->match == amim_ipv4_not)) { return a->parameters.ipv4.address.value == b->parameters.ipv4.address.value; } if((a->match == amim_ipv6) || (a->match == amim_ipv6_not)) { return (a->parameters.ipv6.address.lohi[0] == b->parameters.ipv6.address.lohi[0]) || (a->parameters.ipv6.address.lohi[1] == b->parameters.ipv6.address.lohi[1]); } #if HAS_TSIG_SUPPORT if((a->match == amim_tsig) || (a->match == amim_tsig_not)) { return (a->parameters.tsig.mac_algorithm == b->parameters.tsig.mac_algorithm) && (a->parameters.tsig.name_size == b->parameters.tsig.name_size) && (a->parameters.tsig.secret_size == b->parameters.tsig.secret_size) && (memcmp(a->parameters.tsig.name, b->parameters.tsig.name, a->parameters.tsig.name_size) == 0) && (memcmp(a->parameters.tsig.known, b->parameters.tsig.known, a->parameters.tsig.secret_size) == 0); } #endif if(a->match == amim_reference) { return (a->parameters.ref.mark == b->parameters.ref.mark) && (strcmp(a->parameters.ref.name, b->parameters.ref.name) == 0); } } return FALSE; } bool acl_address_match_list_equals(const address_match_list *a, const address_match_list *b) { if(a == b) { return TRUE; } if((a == NULL) || (b == NULL)) { return FALSE; } u64 n = address_match_list_size(a); if(n == address_match_list_size(b)) { address_match_item **a_items = a->items; address_match_item **b_items = b->items; for(intptr i = 0; i < n; i++) { if(!acl_address_match_item_equals(a_items[i], b_items[i])) { return FALSE; } } return TRUE; } return FALSE; } bool acl_address_match_set_equals(const address_match_set *a, const address_match_set *b) { if(a == b) { return TRUE; } if((a == NULL) || (b == NULL)) { return FALSE; } return acl_address_match_list_equals(&a->ipv4, &b->ipv4) && acl_address_match_list_equals(&a->ipv6, &b->ipv6) && acl_address_match_list_equals(&a->tsig, &b->tsig); } bool acl_address_control_equals(const access_control *a, const access_control *b) { if(a == b) { return TRUE; } if((a == NULL) || (b == NULL)) { return FALSE; } return acl_address_match_set_equals(&a->allow_query, &b->allow_query) && acl_address_match_set_equals(&a->allow_update, &b->allow_update) && acl_address_match_set_equals(&a->allow_update_forwarding, &b->allow_update_forwarding) && acl_address_match_set_equals(&a->allow_transfer, &b->allow_transfer) && acl_address_match_set_equals(&a->allow_notify, &b->allow_notify) && acl_address_match_set_equals(&a->allow_control, &b->allow_control); } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/ChangeLog0000644000077100007710000000012412610121331020430 xustar000000000000000027 mtime=1444979417.160777 27 atime=1454597463.968344 30 ctime=1454597653.170344534 yadifa-2.1.6-5826/sbin/yadifad/ChangeLog0000664000077100007710000000001312610121331020227 0ustar00yadifayadifa00000000000000see README yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/AUTHORS0000644000077100007710000000012412344035553017744 xustar000000000000000027 mtime=1401961323.997372 27 atime=1454597463.922344 30 ctime=1454597653.163344534 yadifa-2.1.6-5826/sbin/yadifad/AUTHORS0000664000077100007710000000013512344035553017550 0ustar00yadifayadifa00000000000000Gery Van Emelen Eric Diaz Fernandez yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/ctrl_zone.c0000644000077100007710000000012412650131756021041 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.015344 30 ctime=1454597653.322344534 yadifa-2.1.6-5826/sbin/yadifad/ctrl_zone.c0000664000077100007710000001167412650131756020657 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup server * @ingroup yadifad * @brief server * * Handles queries made in the CH class (ie: version.*) * * @{ */ /*----------------------------------------------------------------------------*/ #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include #include #include extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #include "confs.h" #include "signals.h" #include "acl.h" #include "ctrl.h" #include "database-service.h" #ifdef HAS_CTRL extern logger_handle* g_server_logger; extern zone_data_set database_zone_desc; ya_result ctrl_zone_freeze(zone_desc_s *zone_desc, bool dolock) { ya_result return_value; if(dolock) { zone_set_lock(&database_zone_desc); } return_value = MAKE_DNSMSG_ERROR(RCODE_SERVFAIL); if(zdb_zone_exists_from_dnsname(g_config->database, zone_desc->origin)) { return_value = SUCCESS; #ifdef DEBUG log_debug("ctrl: zone freeze for %{dnsname}", zone_desc->origin); #endif database_zone_freeze(zone_desc->origin); } /* add the zone to the database */ if(dolock) { zone_set_unlock(&database_zone_desc); } return return_value; } ya_result ctrl_zone_freeze_all() { zone_set_lock(&database_zone_desc); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&database_zone_desc.set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s *)zone_node->value; ctrl_zone_freeze(zone_desc, FALSE); } zone_set_unlock(&database_zone_desc); return SUCCESS; } ya_result ctrl_zone_unfreeze(zone_desc_s *zone_desc, bool dolock) { ya_result return_value; if(dolock) { zone_set_lock(&database_zone_desc); } return_value = MAKE_DNSMSG_ERROR(RCODE_SERVFAIL); if(zdb_zone_exists_from_dnsname(g_config->database, zone_desc->origin)) { return_value = SUCCESS; #ifdef DEBUG log_debug("ctrl: zone unfreeze for %{dnsname}", zone_desc->origin); #endif database_zone_unfreeze(zone_desc->origin); } /* add the zone to the database */ if(dolock) { zone_set_unlock(&database_zone_desc); } return return_value; } ya_result ctrl_zone_unfreeze_all() { zone_set_lock(&database_zone_desc); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&database_zone_desc.set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s *)zone_node->value; ctrl_zone_unfreeze(zone_desc, FALSE); } zone_set_unlock(&database_zone_desc); return SUCCESS; } #endif /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/zone.h0000644000077100007710000000012412650131756020022 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.000344 30 ctime=1454597653.114344534 yadifa-2.1.6-5826/sbin/yadifad/zone.h0000664000077100007710000002126212650131756017632 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #pragma once /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "config.h" #include #include #include #include typedef struct zone_data_set zone_data_set; struct zone_data_set { ptr_set set; mutex_t lock; }; #if HAS_CTRL #include "ctrl.h" #endif #include "zone_desc.h" /* ------------------------------------------------------------ * * VALUES */ #define BRACKET_CLOSED 0x00U #define BRACKET_OPEN 0x01U /** flag settings for printing the zone file * \param 0 means not printing of the resource records * \param 1 means printing of the resource records */ #define WITHOUT_RR 0 #define WITH_RR 1 #define ZONE_NAME 0x01U #define ZONE_TYPE 0x02U #define ZONE_ACL 0x04U #define ZONE_GLOBAL_RR 0x08U #define ZONE_RR 0x10U #define ZONE_ALL (ZONE_NAME | ZONE_TYPE | ZONE_ACL | ZONE_GLOBAL_RR | ZONE_RR) struct zone_command_s { union { u8 *origin; zdb_zone *zone; void *ptr; } parm; u32 id; }; typedef struct zone_command_s zone_command_s; typedef bool zone_data_matching_callback(zone_desc_s*); bool zone_data_is_clone(zone_desc_s *desc); s32 zone_desc_match(const zone_desc_s *a, const zone_desc_s *b); void zone_init(zone_data_set *set); /** @brief Initializing zone_data variable * * Allocates and clears a new zone data (fully empty) * * @retval clean new zone_data */ zone_desc_s *zone_alloc(); zone_desc_s *zone_clone(zone_desc_s *zone_setup); /** \brief * Frees a zone data * * @param[in] src is a * to the zone data */ void zone_acquire(zone_desc_s *zone_desc); void zone_free(zone_desc_s *zone_setup); #define zone_release(zd__) zone_free(zd__) void zone_dump_allocated(); /** * */ void zone_remove_all_matching(zone_data_set *dset, zone_data_matching_callback *matchcallback); #if 1 // NOT USED /** \brief Frees all elements of the collection * * @param[in] src the collection * * @return NONE */ void zone_free_all(zone_data_set *set); #endif ya_result zone_complete_settings(zone_desc_s *zone_desc); /** * * Adds the zone in the collection (if it's not there already) * * @param set * @param zone * @return */ ya_result zone_register(zone_data_set *set, zone_desc_s *zone); /** * Removes the zone with the given origin from the collection. * Returns a pointer to the zone. (The caller may destroy it if * he wants) */ zone_desc_s *zone_unregister(zone_data_set *set, const u8 *origin); /** * returns the zone_data from the zone config that's just after the name * in lexicographic order * * @param name * @return */ zone_desc_s *zone_getafterdnsname(const u8 *name); /** * returns the zone_data from the zone config for the name * * @param name * @return */ zone_desc_s *zone_acquirebydnsname(const u8 *name); /* * functions used for removing a zone_desc */ void zone_setmodified(zone_desc_s *zone_desc, bool v); void zone_setloading(zone_desc_s *zone_desc, bool v); void zone_setmustsavefile(zone_desc_s *zone_desc, bool v); void zone_setmustsaveaxfr(zone_desc_s *zone_desc, bool v); void zone_setsavingfile(zone_desc_s *zone_desc, bool v); void zone_setsavingaxfr(zone_desc_s *zone_desc, bool v); void zone_setstartingup(zone_desc_s *zone_desc, bool v); void zone_setdynamicupdating(zone_desc_s *zone_desc, bool v); bool zone_isidle(zone_desc_s *zone_desc); bool zone_isfrozen(zone_desc_s *zone_desc); bool zone_ismodified(zone_desc_s *zone_desc); bool zone_isloading(zone_desc_s *zone_desc); bool zone_mustsavefile(zone_desc_s *zone_desc); bool zone_mustsaveaxfr(zone_desc_s *zone_desc); bool zone_issavingfile(zone_desc_s *zone_desc); bool zone_issavingaxfr(zone_desc_s *zone_desc); bool zone_isdynamicupdating(zone_desc_s *zone_desc); bool zone_canbeedited(zone_desc_s *zone_desc); bool zone_ismaster(zone_desc_s *zone_desc); zdb_zone *zone_get_loaded_zone(zone_desc_s *zone_desc); zdb_zone *zone_set_loaded_zone(zone_desc_s *zone_desc, zdb_zone *zone); bool zone_has_loaded_zone(zone_desc_s *zone_desc); /* * This will mark a zone as being obsolete. * It means that we are about to delete it. * It also means that nobody can lock it anymore, but the destoyer) (lock will return an error for anybody else) */ ya_result zone_wait_unlocked(zone_desc_s *zone_desc); void zone_set_lock(zone_data_set *dset); void zone_set_unlock(zone_data_set *dset); bool zone_islocked(zone_desc_s *zone_desc); /* * returns true if a zone is obsolete */ bool zone_is_obsolete(zone_desc_s *zone_desc); /* * returns true if the zone hasn't even tried to load its zone */ bool zone_isstartingup(zone_desc_s *zone_desc); /* * returns the owner, or error if the zone_desc is obsolete */ ya_result zone_try_lock(zone_desc_s *zone_desc, u8 owner_mark); /* * wait for lock (and return the owner) or return an error if the zone_desc becomes obsolete */ ya_result zone_lock(zone_desc_s *zone_desc, u8 owner_mark); /* * unlocks if locked by the owner, else return an error */ void zone_unlock(zone_desc_s *zone_desc, u8 owner_mark); const char *zone_type_to_name(zone_type t); const char* zone_dnssec_to_name(u32 dnssec_flags); void zone_setdefaults(zone_desc_s *zone_desc); // 0 : no merge, 1 : merge, < 0 : error ya_result zone_setwithzone(zone_desc_s *zone_desc, zone_desc_s *src); static inline bool zone_maintains_dnssec(zone_desc_s *zone_desc) { return (zone_desc->flags & ZONE_FLAG_MAINTAIN_DNSSEC) != 0; } static inline bool zone_is_auto_notify(zone_desc_s *zone_desc) { return (zone_desc->flags & ZONE_FLAG_NOTIFY_AUTO) != 0; } static inline void zone_auto_notify_set(zone_desc_s *zone_desc, bool enable) { if(enable) { zone_desc->flags |= ZONE_FLAG_NOTIFY_AUTO; } else { zone_desc->flags &= ~ZONE_FLAG_NOTIFY_AUTO; } } static inline bool zone_is_drop_before_load(zone_desc_s *zone_desc) { return (zone_desc->flags & ZONE_FLAG_DROP_BEFORE_LOAD) != 0; } void zone_enqueue_command(zone_desc_s *zone_desc, u32 id, void* parm, bool has_priority); zone_command_s* zone_dequeue_command(zone_desc_s *zone_desc); void zone_command_free(zone_command_s *cmd); /** * * Functions to log a zone desc * * @param zone_desc * @param text */ void zone_desc_log(logger_handle* handle, u32 level, const zone_desc_s *zone_desc, const char *text); void zone_desc_log_all(logger_handle* handle, u32 level, zone_data_set *dset, const char *text); /** */ void zone_desc_status_flags_long_format(const void *value, output_stream *os, s32 padding, char pad_char, bool left_justified, void* reserved_for_method_parameters); /* ------------------------------------------------------------ */ /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-save.h0000644000077100007710000000012412650131756024156 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.051344 30 ctime=1454597653.055344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-save.h0000664000077100007710000000373712650131756023775 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #include "zone_desc.h" void database_service_zone_save(zone_desc_s *zone_desc); /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/Makefile.in0000644000077100007710000000013212654662543020751 xustar000000000000000030 mtime=1454597475.879344535 30 atime=1454597475.878344535 30 ctime=1454597653.156344534 yadifa-2.1.6-5826/sbin/yadifad/Makefile.in0000664000077100007710000013733612654662543020574 0ustar00yadifayadifa00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # YADIFA server Makefile.am script # ############################################################################## ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # ALL # ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@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@ sbin_PROGRAMS = yadifad$(EXEEXT) @HAS_NSID_SUPPORT_TRUE@am__append_1 = config-nsid.c @HAS_CTRL_TRUE@am__append_2 = config_control.c \ @HAS_CTRL_TRUE@ ctrl.c \ @HAS_CTRL_TRUE@ ctrl_query.c \ @HAS_CTRL_TRUE@ ctrl_zone.c @HAS_CTRL_TRUE@am__append_3 = ctrl.h \ @HAS_CTRL_TRUE@ ctrl_query.h \ @HAS_CTRL_TRUE@ ctrl_zone.h @HAS_ACL_SUPPORT_TRUE@am__append_4 = acl.c config_acl.c @HAS_ACL_SUPPORT_TRUE@am__append_5 = config_acl.h @HAS_RRL_SUPPORT_TRUE@am__append_6 = rrl.c @HAS_RRL_SUPPORT_TRUE@am__append_7 = rrl.h @HAS_ACL_SUPPORT_TRUE@am__append_8 = acl.h @HAS_DYNUPDATE_SUPPORT_TRUE@am__append_9 = dynupdate_query_service.c @HAS_DYNUPDATE_SUPPORT_TRUE@am__append_10 = dynupdate_query_service.h @HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE@am__append_11 = database-service-zone-resignature.c @HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE@am__append_12 = database-service-zone-resignature.h @USES_SUNC_TRUE@am__append_13 = @USES_SUNC_FALSE@am__append_14 = -O0 @HAS_CC_NO_IDENT_TRUE@am__append_15 = -fno-ident @HAS_CC_ANSI_TRUE@am__append_16 = -ansi @HAS_CC_PEDANTIC_TRUE@am__append_17 = -pedantic @HAS_CC_WALL_TRUE@am__append_18 = -Wall -Wno-unknown-pragmas @HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE@am__append_19 = -Werror=missing-field-initializers @HAS_CC_STD_GNU99_TRUE@am__append_20 = -std=gnu99 @HAS_CC_STD_C99_TRUE@@HAS_CC_STD_GNU99_FALSE@am__append_21 = -std=c99 @HAS_CC_STD_GNU99_FALSE@@HAS_CC_XC99_TRUE@am__append_22 = -xc99 @HAS_CC_TUNE_NATIVE_TRUE@am__append_23 = -mtune=native @FORCE64BITS_TRUE@@HAS_CC_M64_TRUE@am__append_24 = -m64 @FORCE64BITS_TRUE@@HAS_CC_M64_TRUE@am__append_25 = -m64 @FORCE32BITS_TRUE@@FORCE64BITS_FALSE@@HAS_CC_M32_TRUE@am__append_26 = -m32 @FORCE32BITS_TRUE@@FORCE64BITS_FALSE@@HAS_CC_M32_TRUE@am__append_27 = -m32 # # DEBUG # @HAS_CC_G3_TRUE@am__append_28 = -g3 @HAS_CC_G3_FALSE@@HAS_CC_G_TRUE@am__append_29 = -g @HAS_CC_DWARF4_TRUE@am__append_30 = -gdwarf-4 @HAS_CC_DWARF3_TRUE@@HAS_CC_DWARF4_FALSE@am__append_31 = -gdwarf-3 # # Intel C Compiler # ############################################################################### #ICC #IPO= -ipo (need to use the intel xiar instead of ar) @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@am__append_32 = -DLTO -ipo @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@am__append_33 = -ipo @USES_ICC_TRUE@am__append_34 = -DUSES_ICC @HAS_CC_ANSI_ALIAS_TRUE@@USES_ICC_TRUE@am__append_35 = -ansi-alias -U__STRICT_ANSI__ @USES_ICC_TRUE@am__append_36 = -DMODE_DEBUG_ICC # # LLVM Clang # ############################################################################### # CLANG @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@am__append_37 = -DLTO -flto @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@am__append_38 = -flto @USES_CLANG_TRUE@am__append_39 = -DUSES_LLVM @USES_CLANG_TRUE@am__append_40 = -DMODE_DEBUG_CLANG # Note: add a _d suffix for debug builds ? # # Gnu C # ############################################################################### #GCC @HAS_CPU_NIAGARA_TRUE@@USES_GCC_TRUE@am__append_41 = -mcpu=niagara @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@am__append_42 = -DLTO -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@am__append_43 = -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin @USES_GCC_TRUE@am__append_44 = -DUSES_GCC @USES_GCC_TRUE@am__append_45 = -DMODE_DEBUG_GCC @USES_SUNC_TRUE@am__append_46 = -DUSES_SUNC @USES_SUNC_TRUE@am__append_47 = -DMODE_DEBUG_SUNC # Note: add a _d suffix for debug builds ? # # Unknown compiler # ############################################################################### # if an unknown compiler is used, it should have its own section @USES_UNKNOWN_TRUE@am__append_48 = -DUSES_UNKNOWN_COMPILER @USES_UNKNOWN_TRUE@am__append_49 = -DMODE_DEBUG_UNKNOWN # # Some BSD-based OSes need this # @IS_BSD_FAMILY_TRUE@am__append_50 = -I./include @IS_SOLARIS_FAMILY_TRUE@am__append_51 = -D_POSIX_PTHREAD_SEMANTICS @HAS_CC_RDYNAMIC_TRUE@am__append_52 = -rdynamic @HAS_CC_RDYNAMIC_TRUE@am__append_53 = -rdynamic # workaround a bug where clang does not handle properly profiling and optimizations @USES_CLANG_TRUE@am__append_54 = -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../../m4/libtool.m4 \ $(top_srcdir)/../../m4/ltoptions.m4 \ $(top_srcdir)/../../m4/ltsugar.m4 \ $(top_srcdir)/../../m4/ltversion.m4 \ $(top_srcdir)/../../m4/lt~obsolete.m4 \ $(top_srcdir)/../../m4/eurid.m4 \ $(top_srcdir)/../../m4/yadifa.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(dist_noinst_DATA) \ $(am__noinst_HEADERS_DIST) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = server-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am__yadifad_SOURCES_DIST = main.c axfr.c config_main.c config_zone.c \ confs.c database-service-zone-desc-load.c \ database-service-zone-desc-unload.c \ database-service-zone-download.c \ database-service-zone-freeze.c database-service-zone-load.c \ database-service-zone-mount.c database-service-zone-save.c \ database-service-zone-unfreeze.c \ database-service-zone-unload.c database-service-zone-unmount.c \ database-service.c database.c ixfr.c log_query.c \ log_statistics.c notify.c poll-util.c process_class_ch.c \ server-mt.c server.c server_context.c signals.c zone.c \ config-nsid.c config_control.c ctrl.c ctrl_query.c ctrl_zone.c \ acl.c config_acl.c rrl.c dynupdate_query_service.c \ database-service-zone-resignature.c @HAS_NSID_SUPPORT_TRUE@am__objects_1 = config-nsid.$(OBJEXT) @HAS_CTRL_TRUE@am__objects_2 = config_control.$(OBJEXT) ctrl.$(OBJEXT) \ @HAS_CTRL_TRUE@ ctrl_query.$(OBJEXT) ctrl_zone.$(OBJEXT) @HAS_ACL_SUPPORT_TRUE@am__objects_3 = acl.$(OBJEXT) \ @HAS_ACL_SUPPORT_TRUE@ config_acl.$(OBJEXT) @HAS_RRL_SUPPORT_TRUE@am__objects_4 = rrl.$(OBJEXT) @HAS_DYNUPDATE_SUPPORT_TRUE@am__objects_5 = \ @HAS_DYNUPDATE_SUPPORT_TRUE@ dynupdate_query_service.$(OBJEXT) @HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE@am__objects_6 = database-service-zone-resignature.$(OBJEXT) am_yadifad_OBJECTS = main.$(OBJEXT) axfr.$(OBJEXT) \ config_main.$(OBJEXT) config_zone.$(OBJEXT) confs.$(OBJEXT) \ database-service-zone-desc-load.$(OBJEXT) \ database-service-zone-desc-unload.$(OBJEXT) \ database-service-zone-download.$(OBJEXT) \ database-service-zone-freeze.$(OBJEXT) \ database-service-zone-load.$(OBJEXT) \ database-service-zone-mount.$(OBJEXT) \ database-service-zone-save.$(OBJEXT) \ database-service-zone-unfreeze.$(OBJEXT) \ database-service-zone-unload.$(OBJEXT) \ database-service-zone-unmount.$(OBJEXT) \ database-service.$(OBJEXT) database.$(OBJEXT) ixfr.$(OBJEXT) \ log_query.$(OBJEXT) log_statistics.$(OBJEXT) notify.$(OBJEXT) \ poll-util.$(OBJEXT) process_class_ch.$(OBJEXT) \ server-mt.$(OBJEXT) server.$(OBJEXT) server_context.$(OBJEXT) \ signals.$(OBJEXT) zone.$(OBJEXT) $(am__objects_1) \ $(am__objects_2) $(am__objects_3) $(am__objects_4) \ $(am__objects_5) $(am__objects_6) yadifad_OBJECTS = $(am_yadifad_OBJECTS) yadifad_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(yadifad_SOURCES) DIST_SOURCES = $(am__yadifad_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dist_noinst_DATA) am__noinst_HEADERS_DIST = axfr.h config.h config_error.h confs.h \ database-service-zone-desc-load.h \ database-service-zone-desc-unload.h \ database-service-zone-download.h \ database-service-zone-freeze.h database-service-zone-load.h \ database-service-zone-mount.h database-service-zone-save.h \ database-service-zone-unfreeze.h \ database-service-zone-unload.h database-service-zone-unmount.h \ database-service.h database.h ixfr.h log_query.h \ log_statistics.h notify.h poll-util.h process_class_ch.h \ server-mt.h server.h server_context.h server_error.h signals.h \ zone.h zone_data.h zone_desc.h zone-source.h ctrl.h \ ctrl_query.h ctrl_zone.h config_acl.h rrl.h acl.h \ dynupdate_query_service.h database-service-zone-resignature.h HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)server-config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope am__DIST_COMMON = $(srcdir)/../../mk/common-labels.mk \ $(srcdir)/../../mk/common-settings.mk $(srcdir)/Makefile.in \ $(srcdir)/server-config.h.in AUTHORS COPYING ChangeLog INSTALL \ NEWS README compile config.guess config.sub depcomp install-sh \ ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCOPTIMISATIONFLAGS = @CCOPTIMISATIONFLAGS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DNSCORE = @DNSCORE@ DNSDB = @DNSDB@ DNSLG = @DNSLG@ DNSZONE = @DNSZONE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAS_ACL_SUPPORT = @HAS_ACL_SUPPORT@ HAS_BFD_DEBUG_SUPPORT = @HAS_BFD_DEBUG_SUPPORT@ HAS_BIG_ENDIAN = @HAS_BIG_ENDIAN@ HAS_CC_ADDRESS_SANITIZER_CHECK = @HAS_CC_ADDRESS_SANITIZER_CHECK@ HAS_CC_ANSI = @HAS_CC_ANSI@ HAS_CC_ANSI_ALIAS = @HAS_CC_ANSI_ALIAS@ HAS_CC_CATCH_UNDEFINED_BEHAVIOR = @HAS_CC_CATCH_UNDEFINED_BEHAVIOR@ HAS_CC_DWARF2 = @HAS_CC_DWARF2@ HAS_CC_DWARF3 = @HAS_CC_DWARF3@ HAS_CC_DWARF4 = @HAS_CC_DWARF4@ HAS_CC_EXCEPTIONS = @HAS_CC_EXCEPTIONS@ HAS_CC_G = @HAS_CC_G@ HAS_CC_G3 = @HAS_CC_G3@ HAS_CC_M32 = @HAS_CC_M32@ HAS_CC_M64 = @HAS_CC_M64@ HAS_CC_MISSING_FIELD_INITIALIZERS = @HAS_CC_MISSING_FIELD_INITIALIZERS@ HAS_CC_NO_IDENT = @HAS_CC_NO_IDENT@ HAS_CC_NO_OMIT_FRAME_POINTER = @HAS_CC_NO_OMIT_FRAME_POINTER@ HAS_CC_PEDANTIC = @HAS_CC_PEDANTIC@ HAS_CC_RDYNAMIC = @HAS_CC_RDYNAMIC@ HAS_CC_SANITIZE_ADDRESS = @HAS_CC_SANITIZE_ADDRESS@ HAS_CC_STACK_PROTECTOR = @HAS_CC_STACK_PROTECTOR@ HAS_CC_STD_C99 = @HAS_CC_STD_C99@ HAS_CC_STD_GNU99 = @HAS_CC_STD_GNU99@ HAS_CC_TUNE_NATIVE = @HAS_CC_TUNE_NATIVE@ HAS_CC_WALL = @HAS_CC_WALL@ HAS_CC_XC99 = @HAS_CC_XC99@ HAS_CTRL = @HAS_CTRL@ HAS_CTRL_DYNAMIC_PROVISIONING = @HAS_CTRL_DYNAMIC_PROVISIONING@ HAS_DYNUPDATE_SUPPORT = @HAS_DYNUPDATE_SUPPORT@ HAS_FULL_ASCII7 = @HAS_FULL_ASCII7@ HAS_LITTLE_ENDIAN = @HAS_LITTLE_ENDIAN@ HAS_LOGDIR = @HAS_LOGDIR@ HAS_LOG_PID_ALWAYS_ON = @HAS_LOG_PID_ALWAYS_ON@ HAS_LOG_THREAD_ID_ALWAYS_ON = @HAS_LOG_THREAD_ID_ALWAYS_ON@ HAS_MALLOC_DEBUG_SUPPORT = @HAS_MALLOC_DEBUG_SUPPORT@ HAS_MASTER_SUPPORT = @HAS_MASTER_SUPPORT@ HAS_MESSAGES_SUPPORT = @HAS_MESSAGES_SUPPORT@ HAS_MUTEX_DEBUG_SUPPORT = @HAS_MUTEX_DEBUG_SUPPORT@ HAS_NON_AA_AXFR_SUPPORT = @HAS_NON_AA_AXFR_SUPPORT@ HAS_NSID_SUPPORT = @HAS_NSID_SUPPORT@ HAS_RRL_SUPPORT = @HAS_RRL_SUPPORT@ HAS_RRSIG_MANAGEMENT_SUPPORT = @HAS_RRSIG_MANAGEMENT_SUPPORT@ HAS_TSIG_SUPPORT = @HAS_TSIG_SUPPORT@ HAS_ZALLOC_DEBUG_SUPPORT = @HAS_ZALLOC_DEBUG_SUPPORT@ HAS_ZALLOC_STATISTICS_SUPPORT = @HAS_ZALLOC_STATISTICS_SUPPORT@ HAS_ZALLOC_SUPPORT = @HAS_ZALLOC_SUPPORT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IS_BSD_FAMILY = @IS_BSD_FAMILY@ IS_DARWIN_OS = @IS_DARWIN_OS@ IS_LINUX_FAMILY = @IS_LINUX_FAMILY@ IS_SOLARIS_FAMILY = @IS_SOLARIS_FAMILY@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL = @OPENSSL@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ 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@ logdir = @logdir@ 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_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I ../../m4 dist_noinst_DATA = VERSION yadifad_SOURCES = main.c axfr.c config_main.c config_zone.c confs.c \ database-service-zone-desc-load.c \ database-service-zone-desc-unload.c \ database-service-zone-download.c \ database-service-zone-freeze.c database-service-zone-load.c \ database-service-zone-mount.c database-service-zone-save.c \ database-service-zone-unfreeze.c \ database-service-zone-unload.c database-service-zone-unmount.c \ database-service.c database.c ixfr.c log_query.c \ log_statistics.c notify.c poll-util.c process_class_ch.c \ server-mt.c server.c server_context.c signals.c zone.c \ $(am__append_1) $(am__append_2) $(am__append_4) \ $(am__append_6) $(am__append_9) $(am__append_11) noinst_HEADERS = axfr.h config.h config_error.h confs.h \ database-service-zone-desc-load.h \ database-service-zone-desc-unload.h \ database-service-zone-download.h \ database-service-zone-freeze.h database-service-zone-load.h \ database-service-zone-mount.h database-service-zone-save.h \ database-service-zone-unfreeze.h \ database-service-zone-unload.h database-service-zone-unmount.h \ database-service.h database.h ixfr.h log_query.h \ log_statistics.h notify.h poll-util.h process_class_ch.h \ server-mt.h server.h server_context.h server_error.h signals.h \ zone.h zone_data.h zone_desc.h zone-source.h $(am__append_3) \ $(am__append_5) $(am__append_7) $(am__append_8) \ $(am__append_10) $(am__append_12) # # # AM_CFLAGS = -D_THREAD_SAFE -D_REENTRANT -D_FILE_OFFSET_BITS=64 \ -I$(abs_builddir) -I$(abs_srcdir)/include $(am__append_15) \ $(am__append_16) $(am__append_17) $(am__append_18) \ $(am__append_19) $(am__append_20) $(am__append_21) \ $(am__append_22) $(am__append_23) $(am__append_24) \ $(am__append_26) $(am__append_32) $(am__append_34) \ $(am__append_35) $(am__append_37) $(am__append_39) \ $(am__append_41) $(am__append_42) $(am__append_44) \ $(am__append_46) $(am__append_48) $(am__append_50) \ $(am__append_51) $(LOCALFLAGS) $(YCFLAGS) AM_LDFLAGS = $(am__append_25) $(am__append_27) $(am__append_33) \ $(am__append_38) $(am__append_43) $(YLDFLAGS) DEBUGFLAGS = $(am__append_13) $(am__append_14) $(am__append_28) \ $(am__append_29) $(am__append_30) $(am__append_31) \ $(am__append_36) $(am__append_40) $(am__append_45) \ $(am__append_47) $(am__append_49) LOCALFLAGS = -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)"' -DLOCALSTATEDIR='"$(localstatedir)"' -DDATAROOTDIR='"$(datarootdir)"' -DDATADIR='"$(datadir)"' -DLOCALEDIR='"$(localedir)"' -DLOGDIR='"$(logdir)"' @HAS_LTO_SUPPORT_FALSE@@USES_CLANG_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_FALSE@@USES_GCC_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@AM_AR = llvm-ar @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@AM_AR = gcc-ar @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@AM_AR = xiar # # Sun C # ############################################################################### # SUNC @USES_SUNC_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_FALSE@@USES_CLANG_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_FALSE@@USES_GCC_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@AM_LD = ld.gold @USES_ICC_TRUE@AM_LD = ld @USES_SUNC_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@AM_RANLIB = gcc-ranlib YRCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -DCMR YPCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -pg -DCMP $(am__append_54) YDCFLAGS = -DDEBUG $(DEBUGFLAGS) -DCMD YSCFLAGS = $(YRCFLAGS) YRLDFLAGS = YPLDFLAGS = -pg $(am__append_52) YDLDFLAGS = -g $(am__append_53) YSLDFLAGS = $(YRLDFLAGS) AM_MAKEFLAGS = MODE_CFLAGS="$(AM_CFLAGS)" CC=$(CC) AR=$(AM_AR) LD=$(AM_LD) YCFLAGS = $(YSCFLAGS) YLDFLAGS = $(YNLDFLAGS) all: server-config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../mk/common-settings.mk $(srcdir)/../../mk/common-labels.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu 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; $(srcdir)/../../mk/common-settings.mk $(srcdir)/../../mk/common-labels.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): server-config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/server-config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status server-config.h $(srcdir)/server-config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f server-config.h stamp-h1 install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list yadifad$(EXEEXT): $(yadifad_OBJECTS) $(yadifad_DEPENDENCIES) $(EXTRA_yadifad_DEPENDENCIES) @rm -f yadifad$(EXEEXT) $(AM_V_CCLD)$(LINK) $(yadifad_OBJECTS) $(yadifad_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/axfr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config-nsid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_acl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_control.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/config_zone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/confs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctrl_query.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ctrl_zone.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database-service-zone-desc-load.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database-service-zone-desc-unload.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database-service-zone-download.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database-service-zone-freeze.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database-service-zone-load.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database-service-zone-mount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database-service-zone-resignature.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database-service-zone-save.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database-service-zone-unfreeze.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database-service-zone-unload.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database-service-zone-unmount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database-service.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dynupdate_query_service.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ixfr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_query.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log_statistics.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/notify.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/poll-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process_class_ch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rrl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server-mt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/server_context.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signals.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/zone.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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 "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -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__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(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 \ && cd "$$am__cwd" \ || exit 1 $(am__post_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: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { 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-am all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS) server-config.h installdirs: for dir in "$(DESTDIR)$(sbindir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -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-sbinPROGRAMS .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ clean-cscope clean-generic clean-libtool clean-sbinPROGRAMS \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-compile 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-sbinPROGRAMS 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 tags-am uninstall uninstall-am uninstall-sbinPROGRAMS .PRECIOUS: Makefile release: echo YCFLAGS=$(YRCFLAGS) echo YLDFLAGS=$(YRLDFLAGS) $(MAKE) all "YCFLAGS=$(YRCFLAGS)" "YLDFLAGS=$(YRLDFLAGS)" profile: echo YCFLAGS=$(YPCFLAGS) echo YLDFLAGS=$(YPLDFLAGS) $(MAKE) all "YCFLAGS=$(YPCFLAGS)" "YLDFLAGS=$(YPLDFLAGS)" debug: echo YCFLAGS=$(YDCFLAGS) echo YLDFLAGS=$(YDLDFLAGS) $(MAKE) all "YCFLAGS=$(YDCFLAGS)" "YLDFLAGS=$(YDLDFLAGS)" rebuild: clean release release-install: release install profile-install: profile install debug-install: debug install buildinfo.h: config.log echo \#pragma once > buildinfo.h 2> /dev/null echo // generated file, do not modify >> buildinfo.h 2> /dev/null echo \#define BUILD_OPTIONS \"$$(grep "./configure" config.log | head -1 | sed 's/.*\.\/configure *//')\" >> buildinfo.h 2> /dev/null # 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: yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/signals.h0000644000077100007710000000012412650131756020507 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.029344 30 ctime=1454597653.111344534 yadifa-2.1.6-5826/sbin/yadifad/signals.h0000664000077100007710000000544012650131756020317 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef SIGNALS_H_ #define SIGNALS_H_ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "config.h" #include #include #include #include "confs.h" /* ------------------------------------------------------------ * * VALUES */ #define SA_SHUTDOWN 0 #define SA_CONT 1 #define SA_RELOAD 2 #define SA_LOOP 3 #define SA_PRINT 4 /* ------------------------------------------------------------ * * PROTOTYPES */ ya_result signal_handler_init(); void signal_handler_finalise(); /* ------------------------------------------------------------ */ #endif /* SIGNALS_H_ */ /* ------------------------------------------------------------ */ /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/zone.c0000644000077100007710000000012412650131756020015 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.996344 30 ctime=1454597653.305344534 yadifa-2.1.6-5826/sbin/yadifad/zone.c0000664000077100007710000014044212650131756017627 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup zone Routines for zone_data struct * @ingroup yadifad * @brief zone functions * * Implementation of routines for the zone_data struct * - add * - adjust * - init * - parse * - print * - remove database * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include #include /* or netinet/in.h */ #include #include #include #include #include #include #ifdef DEBUG #include #endif #include "server.h" #include "zone.h" #include "server_error.h" #include "config_error.h" #include "database-service.h" #define ZONEDATA_TAG 0x41544144454e4f5a #define ZDORIGIN_TAG 0x4e494749524f445a /* * 2011/10/18 : EDF: disabling the debug because it makes the legitimate error output unreadable. */ #undef DEBUGLNF #undef DEBUGF #undef OSDEBUG #undef LDEBUG #undef OSLDEBUG #define DEBUGLNF(...) #define DEBUGF(...) #define OSDEBUG(...) #define LDEBUG(...) #define OSLDEBUG(...) #ifndef NAME_MAX #define NAME_MAX 1024 #endif #define MODULE_MSG_HANDLE g_server_logger /* Zone file variables */ extern zone_data_set database_zone_desc; static mutex_t zone_desc_rc_mtx = MUTEX_INITIALIZER; #ifdef DEBUG static u64_set zone_desc_tracked_set = U64_SET_EMPTY; static u64 zone_desc_next_id = 0; #endif /*------------------------------------------------------------------------------ * STATIC PROTOTYPES */ /*------------------------------------------------------------------------------ * FUNCTIONS */ #if HAS_DYNAMIC_PROVISIONING bool zone_data_is_clone(zone_desc_s *desc) { return (desc != NULL) && ((desc->dynamic_provisioning.flags & ZONE_CTRL_FLAG_CLONE) != 0); } #endif static int zone_dnsname_compare(const void *node_a, const void *node_b) { const u8 *m_a = (const u8*)node_a; const u8 *m_b = (const u8*)node_b; return dnsname_compare(m_a, m_b); } void zone_init(zone_data_set *dset) { dset->set.root = NULL; dset->set.compare = zone_dnsname_compare; mutex_init(&dset->lock); } void zone_finalize(zone_data_set *dset) { mutex_destroy(&dset->lock); dset->set.root = NULL; dset->set.compare = zone_dnsname_compare; } /** @brief Initializing zone_data variable * * The function not only initialize a new zone_data struct, but if needed * will add the struct to the linked list * * @param[in,out] dst the new zone_data struct * * @retval OK */ zone_desc_s * zone_alloc() { zone_desc_s *zone_desc; /* Alloc & clear zone_data structure */ ZALLOC_OR_DIE(zone_desc_s*, zone_desc, zone_desc_s, ZONEDATA_TAG); ZEROMEMORY(zone_desc, sizeof(zone_desc_s)); bpqueue_init(&zone_desc->commands); mutex_init(&zone_desc->lock); pthread_cond_init(&zone_desc->lock_cond, NULL); zone_desc->qclass = CLASS_IN; #if HAS_RRSIG_MANAGEMENT_SUPPORT zone_desc->signature.sig_validity_interval = MAX_S32; zone_desc->signature.sig_validity_regeneration = MAX_S32; /* * The validity of newly generated signature will be off by at most this */ zone_desc->signature.sig_validity_jitter = MAX_S32; zone_desc->signature.scheduled_sig_invalid_first = MAX_S32; #endif zone_desc->rc = 1; #ifdef DEBUG zone_desc->instance_time_us = timeus(); mutex_lock(&zone_desc_rc_mtx); zone_desc->instance_id = zone_desc_next_id++; u64_node* node = u64_set_avl_insert(&zone_desc_tracked_set, zone_desc->instance_id); node->value = zone_desc; mutex_unlock(&zone_desc_rc_mtx); #endif log_debug6("new: ?@%p", zone_desc); return zone_desc; } /** \brief * Frees a zone data * * @param[in] src is a * to the zone data */ zone_desc_s * zone_clone(zone_desc_s *zone_desc) { zone_desc_s *clone = zone_alloc(); memcpy(clone, zone_desc, sizeof(zone_desc_s)); clone->masters = host_address_copy_list(zone_desc->masters); clone->notifies = host_address_copy_list(zone_desc->notifies); #if HAS_ACL_SUPPORT /* acl_unmerge_access_control(&zone_setup->ac, &g_config->ac); COMMENTED OUT acl_empties_access_control(&zone_setup->ac); COMMENTED OUT */ #endif /* Free memory */ clone->domain = strdup(zone_desc->domain); clone->file_name = strdup(zone_desc->file_name); clone->origin = dnsname_dup(zone_desc->origin); clone->rc = 1; log_debug6("clone: %{dnsname}@%p of @%p rc=%i", zone_desc->origin, clone, zone_desc, zone_desc->rc); return clone; } void zone_acquire(zone_desc_s *zone_desc) { mutex_lock(&zone_desc_rc_mtx); #ifdef DEBUG s32 old_rc = zone_desc->rc; #endif s32 rc = ++zone_desc->rc; mutex_unlock(&zone_desc_rc_mtx); log_debug6("acquire: %{dnsname}@%p rc=%i", zone_desc->origin, zone_desc, rc); #ifdef DEBUG char prefix[80]; snformat(prefix, sizeof(prefix), "acquire: %{dnsname}@%p", zone_desc->origin, zone_desc); log_debug7("%s: RC from %i to %i", prefix, old_rc, rc); debug_log_stacktrace(g_server_logger, MSG_DEBUG7, prefix); #endif } void zone_dump_allocated() { #ifdef DEBUG mutex_lock(&zone_desc_rc_mtx); u64_set_avl_iterator iter; u64_set_avl_iterator_init(&zone_desc_tracked_set, &iter); while(u64_set_avl_iterator_hasnext(&iter)) { u64_node *node = u64_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s*)node->value; u32 status_flags = zone_desc->status_flags; format_writer status_flags_fw = {zone_desc_status_flags_long_format, &status_flags}; log_debug1("zone dump: %p #%llu, %llu, rc=%u, %{dnsname} status=%w",zone_desc, zone_desc->instance_id, zone_desc->instance_time_us, zone_desc->rc, zone_desc->origin, &status_flags_fw); } mutex_unlock(&zone_desc_rc_mtx); #else // not implemented #endif } /** * * Decrements reference and eventually destroys the zone desc * * @param zone_desc */ void zone_free(zone_desc_s *zone_desc) { // note: the zone MUST be locked by the caller if(zone_desc != NULL) { mutex_lock(&zone_desc_rc_mtx); #ifdef DEBUG s32 old_rc = zone_desc->rc; #endif s32 rc = --zone_desc->rc; mutex_unlock(&zone_desc_rc_mtx); log_debug6("release: %{dnsname}@%p rc=%i", zone_desc->origin, zone_desc, rc); #ifdef DEBUG char prefix[80]; snformat(prefix, sizeof(prefix), "release: %{dnsname}@%p", zone_desc->origin, zone_desc); log_debug7("%s: RC from %i to %i", prefix, old_rc, rc); debug_log_stacktrace(g_server_logger, MSG_DEBUG7, prefix); #endif if(rc <= 0) { log_debug7("zone_free(%p): '%s' (%i)", zone_desc, zone_desc->domain, rc); if(zone_desc->loaded_zone != NULL) { alarm_close(zone_desc->loaded_zone->alarm_handle); zone_desc->loaded_zone->alarm_handle = ALARM_HANDLE_INVALID; zdb_zone_release(zone_desc->loaded_zone); zone_desc->loaded_zone = NULL; } #ifdef DEBUG log_debug7("zone_free(%p): '%s' #%llu %llu", zone_desc, zone_desc->domain, zone_desc->instance_id, zone_desc->instance_time_us); mutex_lock(&zone_desc_rc_mtx); u64_set_avl_delete(&zone_desc_tracked_set, zone_desc->instance_id); mutex_unlock(&zone_desc_rc_mtx); #endif host_address_delete_list(zone_desc->masters); zone_desc->masters = NULL; host_address_delete_list(zone_desc->notifies); zone_desc->notifies = NULL; #if HAS_ACL_SUPPORT acl_unmerge_access_control(&zone_desc->ac, &g_config->ac); acl_empties_access_control(&zone_desc->ac); #endif /* Free memory */ free(zone_desc->domain); free(zone_desc->file_name); free(zone_desc->origin); pthread_cond_destroy(&zone_desc->lock_cond); mutex_destroy(&zone_desc->lock); #ifdef DEBUG memset(zone_desc, 0xfe, sizeof(zone_desc_s)); #endif ZFREE(zone_desc, zone_desc_s); } } } void zone_remove_all_matching(zone_data_set *dset, zone_data_matching_callback *matchcallback) { if(dset != NULL) { zone_set_lock(dset); ptr_vector candidates = EMPTY_PTR_VECTOR; ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&dset->set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s*)zone_node->value; if(zone_desc != NULL) { if(matchcallback(zone_desc)) { ptr_vector_append(&candidates, zone_desc); } } } for(s32 i = 0; i <= candidates.offset; i++) { zone_desc_s *zone_desc = (zone_desc_s*)candidates.data[i]; ptr_set_avl_delete(&dset->set, zone_desc->origin); zone_free(zone_desc); } ptr_vector_destroy(&candidates); zone_set_unlock(dset); } } #if 1 // NOT USED /** \brief Frees all elements of the collection * * @param[in] src the collection * * @return NONE */ void zone_free_all(zone_data_set *dset) { if(dset != NULL) { zone_set_lock(dset); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&dset->set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s*)zone_node->value; if(zone_desc != NULL) { #ifdef DEBUG // status should be idle mutex_lock(&zone_desc_rc_mtx); s32 rc = zone_desc->rc; mutex_unlock(&zone_desc_rc_mtx); if(rc != 1) { if(rc > 0) { log_debug5("zone: warning, zone %{dnsname} has RC=%i", zone_desc->origin, rc); } else { log_debug5("zone: warning, zone ? has RC=%i", rc); } } #endif zone_free(zone_desc); } } ptr_set_avl_destroy(&dset->set); zone_set_unlock(dset); } } #endif ya_result zone_complete_settings(zone_desc_s *zone_desc) { // type if(zone_desc->type == ZT_SLAVE) { if(zone_desc->masters == NULL /* || address_matched(zone_desc->masters, g_config->listen, g_config->port) */) { return DATABASE_ZONE_MISSING_MASTER; } } #if HAS_MASTER_SUPPORT else if(zone_desc->type == ZT_MASTER) { if(zone_desc->file_name == NULL || zone_desc->file_name[0] == '\0') { return ZONE_LOAD_MASTER_ZONE_FILE_UNDEFINED; } } #endif else // zone type is not supported { return DATABASE_ZONE_MISSING_TYPE; } // origin if(zone_desc->origin == NULL) { if(zone_desc->domain == NULL) { return DATABASE_ZONE_MISSING_DOMAIN; } // else the origin can be set from the domain // set the domain to lower case char *p = zone_desc->domain; while(*p != 0) { *p = tolower(*p); p++; } ya_result return_code; MALLOC_OR_DIE(u8*, zone_desc->origin, strlen(zone_desc->domain) + 2, ZDORIGIN_TAG); if(FAIL(return_code = cstr_to_dnsname(zone_desc->origin, zone_desc->domain))) { free(zone_desc->origin); zone_desc->origin = NULL; return return_code; } } #if HAS_ACL_SUPPORT // acl acl_merge_access_control(&zone_desc->ac, &g_config->ac); #endif return SUCCESS; } #define ZONE_DESC_COMPARE_FIELD_PTR(field_a_, field_b_, comparator_, flag_) \ if(field_a_ != field_b_) \ { \ if((field_b_ != NULL) && (field_b_ != NULL)) \ { \ if(comparator_(field_a_, field_b_) != 0) \ { \ return_code |= flag_; \ } \ } \ else \ { \ return_code |= flag_; \ } \ } #define ZONE_DESC_EQUALS_FIELD_PTR(field_a_, field_b_, comparator_, flag_) \ if(field_a_ != field_b_) \ { \ if((field_b_ != NULL) && (field_b_ != NULL)) \ { \ if(!comparator_(field_a_, field_b_)) \ { \ return_code |= flag_; \ } \ } \ else \ { \ return_code |= flag_; \ } \ } s32 zone_desc_match(const zone_desc_s *a, const zone_desc_s *b) { u32 return_code = 0; if(a == b) { return 0; } if((a == NULL) || (b == NULL)) { return MIN_S32; } ZONE_DESC_COMPARE_FIELD_PTR(a->origin,b->origin,dnsname_compare, ZONE_DESC_MATCH_ORIGIN); ZONE_DESC_COMPARE_FIELD_PTR(a->domain,b->domain,strcmp, ZONE_DESC_MATCH_DOMAIN); if((a->file_name != NULL) && (b->file_name != NULL)) { ZONE_DESC_COMPARE_FIELD_PTR(a->file_name,b->file_name,strcmp, ZONE_DESC_MATCH_FILE_NAME); } else if(a->file_name != b->file_name) { return_code |= ZONE_DESC_MATCH_FILE_NAME; } ZONE_DESC_EQUALS_FIELD_PTR(a->masters,b->masters,host_address_list_equals, ZONE_DESC_MATCH_MASTERS); ZONE_DESC_EQUALS_FIELD_PTR(a->notifies,b->notifies,host_address_list_equals, ZONE_DESC_MATCH_NOTIFIES); #if HAS_ACL_SUPPORT if(!acl_address_control_equals(&a->ac, &b->ac)) { return_code |= ZONE_DESC_MATCH_ACL; } #endif #if HAS_CTRL if(memcmp(&a->dynamic_provisioning, &b->dynamic_provisioning, sizeof(dynamic_provisioning_s)) != 0) { return_code |= ZONE_DESC_MATCH_DYNAMIC; } ZONE_DESC_EQUALS_FIELD_PTR(a->slaves,b->slaves,host_address_list_equals, ZONE_DESC_MATCH_SLAVES); #endif /* if(memcmp(&a->refresh, &b->refresh, sizeof(zone_data_refresh)) != 0) { return_code |= ZONE_DESC_MATCH_REFRESH; } */ if(memcmp(&a->notify, &b->notify, sizeof(zone_notify_s)) != 0) { return_code |= ZONE_DESC_MATCH_NOTIFY; } #if HAS_DNSSEC_SUPPORT != 0 if(a->dnssec_mode != b->dnssec_mode) { return_code |= ZONE_DESC_MATCH_DNSSEC_MODE; } #endif if(a->type != b->type) { return_code |= ZONE_DESC_MATCH_TYPE; } return return_code; } /** * Adds the zone in the collection (if it's not there already) * The zone must have at least it's domain set */ ya_result zone_register(zone_data_set *dset, zone_desc_s *zone_desc) { zone_complete_settings(zone_desc); if(zone_desc->origin == NULL) { if(zone_desc->domain == NULL) { log_err("config: zone: ?: no domain set (not loaded)", zone_desc->domain); return DATABASE_ZONE_MISSING_DOMAIN; } } zone_set_lock(dset); ptr_node *zone_desc_node = ptr_set_avl_find(&dset->set, zone_desc->origin); if(zone_desc_node != NULL) { // already known zone_desc_s *current_zone_desc = (zone_desc_s*)zone_desc_node->value; s32 zone_desc_match_bitmap = ~0; if(current_zone_desc == zone_desc) { // already log_debug("zone: %{dnsname} has already been set", zone_desc->origin); zone_set_unlock(dset); return SUCCESS; } else if((zone_desc_match_bitmap = zone_desc_match(zone_desc, current_zone_desc)) == 0) { // already log_debug("zone: %{dnsname} has already been set", zone_desc->origin); zone_set_unlock(dset); return DATABASE_ZONE_CONFIG_CLONE; } else { /* * compare the zones are decide (overwrite or replace ?) * * if the zones are equals : no operation * if the zones differs ... * ask for a reload of the desc * */ log_err("zone: %{dnsname} has been set differently (bitmap=%08x) (ignoring)", zone_desc->origin, zone_desc_match_bitmap); // zone_desc_node->value = zone_desc; /// @todo this is wrong zone_set_unlock(dset); return DATABASE_ZONE_CONFIG_DUP; } } else { log_info("zone: %{dnsname} is a new zone", zone_desc->origin); zone_desc->status_flags = ZONE_STATUS_STARTING_UP; } if(zone_desc->type == ZT_SLAVE) { log_debug1("zone: %{dnsname} is a slave, verifying master settings", zone_desc->origin); /** * @todo Check that the master is single and is NOT a link to one of the listen addresses of the server * This could trigger a deadlock (zone needs to be "locked" at the same time for read+write-blocked * and for write.) */ if(zone_desc->masters == NULL /* || address_matched(zone_desc->masters, g_config->listen, g_config->port) */) { zone_set_unlock(dset); log_err("zone: %{dnsname} has no master setting (not loaded)", zone_desc->origin); free(zone_desc->origin); zone_desc->origin = NULL; return DATABASE_ZONE_MISSING_MASTER; } log_debug("zone: %{dnsname} is a slave, master is %{hostaddr}", zone_desc->origin, zone_desc->masters); } ya_result return_value; ptr_node *node = ptr_set_avl_insert(&dset->set, zone_desc->origin); if(node->value == NULL) { //log_info("zone: the zone %{dnsname} has been registered", zone_desc->origin); node->value = zone_desc; return_value = SUCCESS; } else { // already //log_err("zone: the zone %{dnsname} has already been set", zone_desc->origin); free(zone_desc->origin); zone_desc->origin = NULL; return_value = DATABASE_ZONE_CONFIG_DUP; } zone_set_unlock(dset); return return_value; } /** * Removes the zone with the given origin from the collection. * Returns a pointer to the zone. (The caller may destroy it if * he wants) */ zone_desc_s * zone_unregister(zone_data_set *dset, const u8 *origin) { zone_desc_s *zone_desc = NULL; zone_set_lock(dset); ptr_node *node = ptr_set_avl_find(&dset->set, origin); if(node != NULL) { zone_desc = (zone_desc_s*)node->value; if(zone_desc != NULL) { if(ISOK(zone_wait_unlocked(zone_desc))) { ptr_set_avl_delete(&dset->set, origin); } } } zone_set_unlock(dset); return zone_desc; } void zone_set_lock(zone_data_set *dset) { mutex_lock(&dset->lock); } void zone_set_unlock(zone_data_set *dset) { mutex_unlock(&dset->lock); } /** * returns the zone_data from the zone config that's just after the name * in lexicographic order * * @param name * @return */ zone_desc_s* zone_getafterdnsname(const u8 *name) { zone_desc_s *zone_desc = NULL; zone_set_lock(&database_zone_desc); ptr_node *zone_node = ptr_set_avl_find(&database_zone_desc.set, name); if(zone_node != NULL) { zone_node = ptr_set_avl_node_next(zone_node); if(zone_node != NULL) { zone_desc = (zone_desc_s*)zone_node->value; zone_acquire(zone_desc); } } zone_set_unlock(&database_zone_desc); return zone_desc; } zone_desc_s* zone_acquirebydnsname(const u8 *name) { zone_desc_s *zone_desc = NULL; zone_set_lock(&database_zone_desc); ptr_node *zone_node = ptr_set_avl_find(&database_zone_desc.set, name); if(zone_node != NULL) { zone_desc = (zone_desc_s*)zone_node->value; zone_acquire(zone_desc); } zone_set_unlock(&database_zone_desc); return zone_desc; } void zone_setmodified(zone_desc_s *zone_desc, bool v) { const u32 mask = ZONE_STATUS_MODIFIED; if(v) { zone_desc->status_flags |= mask; } else { zone_desc->status_flags &= ~mask; } } void zone_setloading(zone_desc_s *zone_desc, bool v) { const u32 mask = ZONE_STATUS_LOADING; if(v) { zone_desc->status_flags |= mask; } else { zone_desc->status_flags &= ~mask; } } void zone_setmustsavefile(zone_desc_s *zone_desc, bool v) { const u32 mask = ZONE_STATUS_SAVETO_ZONE_FILE; if(v) { zone_desc->status_flags |= mask; } else { zone_desc->status_flags &= ~mask; } } void zone_setmustsaveaxfr(zone_desc_s *zone_desc, bool v) { const u32 mask = ZONE_STATUS_SAVETO_AXFR_FILE; if(v) { zone_desc->status_flags |= mask; } else { zone_desc->status_flags &= ~mask; } } void zone_setsavingfile(zone_desc_s *zone_desc, bool v) { const u32 mask = ZONE_STATUS_SAVING_ZONE_FILE; if(v) { zone_desc->status_flags |= mask; } else { zone_desc->status_flags &= ~mask; } } void zone_setsavingaxfr(zone_desc_s *zone_desc, bool v) { const u32 mask = ZONE_STATUS_SAVING_AXFR_FILE; if(v) { zone_desc->status_flags |= mask; } else { zone_desc->status_flags &= ~mask; } } void zone_setstartingup(zone_desc_s *zone_desc, bool v) { const u32 mask = ZONE_STATUS_STARTING_UP; if(v) { zone_desc->status_flags |= mask; } else { zone_desc->status_flags &= ~mask; } } bool zone_isidle(zone_desc_s *zone_desc) { return (zone_desc->status_flags & ZONE_STATUS_BUSY) == 0; } bool zone_isfrozen(zone_desc_s *zone_desc) { return (zone_desc->status_flags & ZONE_STATUS_FROZEN) != 0; } bool zone_ismodified(zone_desc_s *zone_desc) { return ((zone_desc->status_flags & ZONE_STATUS_MODIFIED) != 0); } bool zone_isloading(zone_desc_s *zone_desc) { return ((zone_desc->status_flags & ZONE_STATUS_LOADING) != 0); } bool zone_mustsavefile(zone_desc_s *zone_desc) { return ((zone_desc->status_flags & ZONE_STATUS_SAVETO_ZONE_FILE) != 0); } bool zone_mustsaveaxfr(zone_desc_s *zone_desc) { return ((zone_desc->status_flags & ZONE_STATUS_SAVETO_AXFR_FILE) != 0); } bool zone_issavingfile(zone_desc_s *zone_desc) { return ((zone_desc->status_flags & ZONE_STATUS_SAVING_ZONE_FILE) != 0); } bool zone_issavingaxfr(zone_desc_s *zone_desc) { return ((zone_desc->status_flags & ZONE_STATUS_SAVING_AXFR_FILE) != 0); } bool zone_isstartingup(zone_desc_s *zone_desc) { return ((zone_desc->status_flags & ZONE_STATUS_STARTING_UP) != 0); } bool zone_isdynamicupdating(zone_desc_s *zone_desc) { return ((zone_desc->status_flags & ZONE_STATUS_DYNAMIC_UPDATING) != 0); } bool zone_canbeedited(zone_desc_s *zone_desc) { return ((zone_desc->status_flags & (ZONE_STATUS_STARTING_UP|ZONE_STATUS_DYNAMIC_UPDATING|ZONE_STATUS_SAVING_AXFR_FILE|ZONE_STATUS_SAVING_ZONE_FILE|ZONE_STATUS_LOADING)) == 0); } bool zone_ismaster(zone_desc_s *zone_desc) { return zone_desc->type == ZT_MASTER; } ya_result zone_wait_unlocked(zone_desc_s *zone_desc) { log_debug6("zone_set_obsolete(%{dnsname}@%p, %u)", zone_desc->origin, zone_desc, ZONE_LOCK_UNREGISTER); mutex_lock(&zone_desc->lock); if((zone_desc->lock_owner_count | zone_desc->lock_wait_count) != 0) { do { cond_wait(&zone_desc->lock_cond, &zone_desc->lock); } while((zone_desc->lock_owner_count | zone_desc->lock_wait_count) != 0); } pthread_cond_broadcast(&zone_desc->lock_cond); mutex_unlock(&zone_desc->lock); return SUCCESS; } bool zone_is_obsolete(zone_desc_s *zone_desc) { bool r; mutex_lock(&zone_desc->lock); r = ((zone_desc->lock_owner_count | zone_desc->lock_wait_count) == 0) && ((zone_desc->status_flags & (ZONE_STATUS_UNREGISTERING|ZONE_STATUS_MARKED_FOR_DESTRUCTION)) != 0); mutex_unlock(&zone_desc->lock); return r; } ya_result zone_try_lock(zone_desc_s *zone_desc, u8 owner_id) { log_debug6("zone_try_lock(%{dnsname}@%p, %u", zone_desc->origin, zone_desc, owner_id); ya_result return_value = ERROR; mutex_lock(&zone_desc->lock); if((zone_desc->lock_owner == ZONE_LOCK_NOBODY) || (zone_desc->lock_owner == owner_id)) { zone_desc->lock_owner = owner_id & 0x7f; zone_desc->lock_owner_count++; pthread_cond_broadcast(&zone_desc->lock_cond); return_value = owner_id; } mutex_unlock(&zone_desc->lock); return return_value; } ya_result zone_lock(zone_desc_s *zone_desc, u8 owner_id) { ya_result return_value = ERROR; log_debug6("zone_lock(%{dnsname}@%p, %02x)", zone_desc->origin, zone_desc, owner_id); mutex_lock(&zone_desc->lock); if(zone_desc->lock_owner != ZONE_LOCK_UNREGISTER) { if((zone_desc->lock_owner != ZONE_LOCK_NOBODY) && (zone_desc->lock_owner != owner_id)) { zone_desc->lock_wait_count++; do { cond_wait(&zone_desc->lock_cond, &zone_desc->lock); } while((zone_desc->lock_owner != ZONE_LOCK_NOBODY) && (zone_desc->lock_owner != owner_id)); zone_desc->lock_wait_count--; } zone_desc->lock_owner = owner_id & 0x7f; zone_desc->lock_owner_count++; return_value = owner_id; } pthread_cond_broadcast(&zone_desc->lock_cond); mutex_unlock(&zone_desc->lock); return return_value; } void zone_unlock(zone_desc_s *zone_desc, u8 owner_mark) { log_debug6("zone_unlock(%{dnsname}@%p, %02x)", zone_desc->origin, zone_desc, owner_mark); mutex_lock(&zone_desc->lock); yassert(zone_desc->lock_owner == (owner_mark & 0x7f)); yassert(zone_desc->lock_owner_count > 0); if((--zone_desc->lock_owner_count) == 0) { zone_desc->lock_owner = ZONE_LOCK_NOBODY; } pthread_cond_broadcast(&zone_desc->lock_cond); mutex_unlock(&zone_desc->lock); } bool zone_islocked(zone_desc_s *zone_desc) { mutex_lock(&zone_desc->lock); bool ret = (zone_desc->lock_owner != ZONE_LOCK_NOBODY); mutex_unlock(&zone_desc->lock); return ret; } /** * Sets non-static values in a zone descriptor * * @param zone_desc */ void zone_setdefaults(zone_desc_s *zone_desc) { u32 port; if(FAIL(parse_u32_check_range(g_config->server_port, &port, 1, MAX_U16, 10))) { port = DNS_DEFAULT_PORT; } zone_desc->status_flags = ZONE_STATUS_STARTING_UP; #if HAS_ACL_SUPPORT acl_merge_access_control(&zone_desc->ac, &g_config->ac); #endif #if HAS_RRSIG_MANAGEMENT_SUPPORT && HAS_DNSSEC_SUPPORT /* * The newly generated signatures will be valid for that amount of days */ if(zone_desc->signature.sig_validity_interval == MAX_S32) { zone_desc->signature.sig_validity_interval = MIN(g_config->sig_validity_interval, SIGNATURE_VALIDITY_INTERVAL_MAX); /* days */ } if(zone_desc->signature.sig_validity_regeneration == MAX_S32) { zone_desc->signature.sig_validity_regeneration = MIN(g_config->sig_validity_regeneration, SIGNATURE_VALIDITY_REGENERATION_MAX); } /* * The validity of newly generated signature will be off by at most this */ if(zone_desc->signature.sig_validity_jitter == MAX_S32) { zone_desc->signature.sig_validity_jitter = MIN(g_config->sig_validity_jitter, SIGNATURE_VALIDITY_JITTER_MAX); } /* * The first epoch when a signature will be marked as invalid. */ zone_desc->signature.sig_invalid_first = MAX_S32; zone_desc->signature.scheduled_sig_invalid_first = MAX_S32; #endif #if HAS_DYNAMIC_PROVISIONING memset(&zone_desc->dynamic_provisioning, 0, sizeof(dynamic_provisioning_s)); //zone->dynamic_provisioning.flags |= ZONE_CTRL_FLAG_GENERATE_ZONE; #endif zone_desc->notify.retry_count = atoi(S_NOTIFY_RETRY_COUNT); zone_desc->notify.retry_period = atoi(S_NOTIFY_RETRY_PERIOD) * 60; zone_desc->notify.retry_period_increase = atoi(S_NOTIFY_RETRY_PERIOD_INCREASE) * 60; host_set_default_port_value(zone_desc->masters, ntohs(port)); host_set_default_port_value(zone_desc->notifies, ntohs(port)); // seems incorrect here : acl_copy_access_control(&zone_desc->ac, &g_config->ac); } /** * Merges the settings of a zone into another zone descriptor. * * @param desc_zone_desc * @param src_zone_desc * @return 0 if the zone are equals * 1 if some parts have been edited * or an error code */ ya_result zone_setwithzone(zone_desc_s *desc_zone_desc, zone_desc_s *src_zone_desc) { bool changed = FALSE; if(desc_zone_desc->domain != NULL) { if(strcmp(desc_zone_desc->domain, src_zone_desc->domain) != 0) { log_debug1("zone_setwithzone: domain does not match '%s'!='%s'", desc_zone_desc->domain, src_zone_desc->domain); return ERROR; } } else { desc_zone_desc->domain = strdup(src_zone_desc->domain); desc_zone_desc->qclass = src_zone_desc->qclass; desc_zone_desc->type = src_zone_desc->type; desc_zone_desc->dnssec_mode = src_zone_desc->dnssec_mode; desc_zone_desc->dynamic_provisioning.flags = desc_zone_desc->dynamic_provisioning.flags; desc_zone_desc->origin = dnsname_dup(src_zone_desc->origin); desc_zone_desc->status_flags = src_zone_desc->status_flags; if(src_zone_desc->file_name != NULL) { desc_zone_desc->file_name = strdup(src_zone_desc->file_name); } changed = TRUE; } #if HAS_ACL_SUPPORT acl_copy_access_control(&desc_zone_desc->ac, &src_zone_desc->ac); #endif #if HAS_RRSIG_MANAGEMENT_SUPPORT && HAS_DNSSEC_SUPPORT /* * The newly generated signatures will be valid for that amount of days */ if(desc_zone_desc->signature.sig_validity_interval != src_zone_desc->signature.sig_validity_interval) { desc_zone_desc->signature.sig_validity_interval = src_zone_desc->signature.sig_validity_interval; changed = TRUE; } if(desc_zone_desc->signature.sig_validity_regeneration != src_zone_desc->signature.sig_validity_regeneration) { desc_zone_desc->signature.sig_validity_regeneration = src_zone_desc->signature.sig_validity_regeneration; changed = TRUE; } if(desc_zone_desc->signature.sig_validity_jitter != src_zone_desc->signature.sig_validity_jitter) { desc_zone_desc->signature.sig_validity_jitter = src_zone_desc->signature.sig_validity_jitter; changed = TRUE; } /* * The first epoch when a signature will be marked as invalid. */ if(desc_zone_desc->signature.sig_invalid_first != src_zone_desc->signature.sig_invalid_first) { desc_zone_desc->signature.sig_invalid_first = src_zone_desc->signature.sig_invalid_first; changed = TRUE; } if(desc_zone_desc->signature.scheduled_sig_invalid_first != src_zone_desc->signature.scheduled_sig_invalid_first) { desc_zone_desc->signature.scheduled_sig_invalid_first = src_zone_desc->signature.scheduled_sig_invalid_first; changed = TRUE; } #endif #if HAS_DYNAMIC_PROVISIONING if(memcmp(&desc_zone_desc->dynamic_provisioning, &src_zone_desc->dynamic_provisioning, sizeof(dynamic_provisioning_s)) != 0) { memcpy(&desc_zone_desc->dynamic_provisioning, &src_zone_desc->dynamic_provisioning, sizeof(dynamic_provisioning_s)); changed = TRUE; } #endif if(desc_zone_desc->notify.retry_count != src_zone_desc->notify.retry_count) { desc_zone_desc->notify.retry_count = src_zone_desc->notify.retry_count; changed = TRUE; } if(desc_zone_desc->notify.retry_period != src_zone_desc->notify.retry_period) { desc_zone_desc->notify.retry_period = src_zone_desc->notify.retry_period; changed = TRUE; } if(desc_zone_desc->notify.retry_period_increase != src_zone_desc->notify.retry_period_increase) { desc_zone_desc->notify.retry_period_increase = src_zone_desc->notify.retry_period_increase; changed = TRUE; } if(desc_zone_desc->flags != src_zone_desc->flags) { desc_zone_desc->flags = src_zone_desc->flags; changed = TRUE; } changed |= host_address_update_host_address_list(&desc_zone_desc->masters, src_zone_desc->masters); changed |= host_address_update_host_address_list(&desc_zone_desc->notifies, src_zone_desc->notifies); changed |= host_address_update_host_address_list(&desc_zone_desc->slaves, src_zone_desc->slaves); if(src_zone_desc->file_name != NULL) { if(strcmp(desc_zone_desc->file_name, src_zone_desc->file_name) != 0) { free(desc_zone_desc->file_name); desc_zone_desc->file_name = strdup(src_zone_desc->file_name); changed = TRUE; } } #if HAS_MASTER_SUPPORT // master zone without a file name ... if((desc_zone_desc->file_name == NULL) && (desc_zone_desc->type == ZT_MASTER)) { desc_zone_desc->dynamic_provisioning.flags |= ZONE_CTRL_FLAG_GENERATE_ZONE; changed = TRUE; } #endif return (changed)?1:0; // 1 if changed, 0 is no operation performed } /** * * helper formatting tool to print the zone descriptor status flags as a chain of characters * * @param value * @param os * @param padding * @param pad_char * @param left_justified * @param reserved_for_method_parameters */ #ifdef SHORT_VERSION_IS_LESS_CLEAR /** * used by zone_desc_status_flags_format */ static const char status_letters[32] = "IclL" "MUdD" "zZaA" "sSeE" "RxX#" "f---" "T---" "ur/!"; static void zone_desc_status_flags_format(const void *value, output_stream *os, s32 padding, char pad_char, bool left_justified, void* reserved_for_method_parameters) { (void)padding; (void)pad_char; (void)left_justified; (void)reserved_for_method_parameters; u32 status = *((u32*)value); const char *p = status_letters; if(status == 0) { output_stream_write(os, (const u8*)"i", 1); } else { do { if(status & 1) { output_stream_write(os, p, 1); } p++; status >>= 1; } while(status != 0); } } #endif /** * used by zone_desc_status_flags_long_format */ static const char *status_words[32] = { //"IDLE", "STARTING-UP", // 0 "MODIFIED", "LOAD", "LOADING", "MOUNTING", "UNMOUNTING", // 5 "DROP", "DROPPING", "SAVETO-ZONE-FILE", "SAVING-ZONE-FILE", "SAVETO-AXFR-FILE", // 10 "SAVING-AXFR-FILE", "SIGNATURES-UPDATE", "SIGNATURES-UPDATING", "DYNAMIC-UPDATE", "DYNAMIC-UPDATING", // 15 "READONLY", "DOWNLOAD-XFR-FILE", "DOWNLOADING-XFR-FILE", "DROP-AFTER-RELOAD", "FROZEN", // 20 "?", "?", "?", "DOWNLOADED", "?", // 25 "?", "?", "ZONE-STATUS-UNREGISTERING", "REGISTERED", "MARKED-FOR-DESTRUCTION", "PROCESSING" }; void zone_desc_status_flags_long_format(const void *value, output_stream *os, s32 padding, char pad_char, bool left_justified, void* reserved_for_method_parameters) { (void)padding; (void)pad_char; (void)left_justified; (void)reserved_for_method_parameters; u32 status = *((u32*)value); const char **p = status_words; if(status == 0) { output_stream_write(os, (const u8*)"IDLE", 4); } else { do { if(status & 1) { const char *word = *p; output_stream_write(os, word, strlen(word)); output_stream_write(os, (const char*)" ", 1); } p++; status >>= 1; } while(status != 0); } } #if HAS_ACL_SUPPORT /** * * helper formatting tool to print the ACL fields of the zone descriptor * * @param value * @param os * @param padding * @param pad_char * @param left_justified * @param reserved_for_method_parameters */ static void zone_desc_ams_format(const void *value, output_stream *os, s32 padding, char pad_char, bool left_justified, void* reserved_for_method_parameters) { (void)padding; (void)pad_char; (void)left_justified; (void)reserved_for_method_parameters; address_match_set *ams = (address_match_set*)value; acl_address_match_set_to_stream(os, ams); } #endif void zone_desc_log(logger_handle* handle, u32 level, const zone_desc_s *zone_desc, const char *text) { if(text == NULL) { text = "NULL"; } if(zone_desc == NULL) { logger_handle_msg(handle, level, "%s: NULL", text); return; } logger_handle_msg(handle, level, "%s: %{dnsname} @%p '%s' file='%s'", text, FQDNNULL(zone_desc->origin), zone_desc, STRNULL(zone_desc->domain), STRNULL(zone_desc->file_name)); u32 status_flags = zone_desc->status_flags; //format_writer status_flags_fw = {zone_desc_status_flags_format, &status_flags}; format_writer status_flags_fw = {zone_desc_status_flags_long_format, &status_flags}; logger_handle_msg(handle, level, "%s: %{dnsname} status=%w", text, FQDNNULL(zone_desc->origin), &status_flags_fw); logger_handle_msg(handle, level, "%s: %{dnsname} dnssec=%s type=%s flags=%x lock=%02hhx #olock=%d #wlock=%d", text, FQDNNULL(zone_desc->origin), zone_dnssec_to_name(zone_desc->dnssec_mode), zone_type_to_name(zone_desc->type), zone_desc->flags, zone_desc->lock_owner, zone_desc->lock_owner_count, zone_desc->lock_wait_count); logger_handle_msg(handle, level, "%s: %{dnsname} refreshed=%d retried=%d next=%d", text, FQDNNULL(zone_desc->origin), zone_desc->refresh.refreshed_time, zone_desc->refresh.retried_time, zone_desc->refresh.zone_update_next_time); #if HAS_RRSIG_MANAGEMENT_SUPPORT u32 sig_invalid_first = zone_desc->signature.sig_invalid_first; u32 scheduled_sig_invalid_first = zone_desc->signature.scheduled_sig_invalid_first; EPOCH_DEF(sig_invalid_first); EPOCH_DEF(scheduled_sig_invalid_first); logger_handle_msg(handle, level, "%s: %{dnsname} interval=%d jitter=%d regeneration=%d invalid=%w scheduled-update=%w", text, FQDNNULL(zone_desc->origin), zone_desc->signature.sig_validity_interval, zone_desc->signature.sig_validity_jitter, zone_desc->signature.sig_validity_regeneration, EPOCH_REF(sig_invalid_first), EPOCH_REF(scheduled_sig_invalid_first)); #endif logger_handle_msg(handle, level, "%s: %{dnsname} master=%{hostaddr}", text, FQDNNULL(zone_desc->origin), zone_desc->masters); logger_handle_msg(handle, level, "%s: %{dnsname} notified=%{hostaddrlist}", text, FQDNNULL(zone_desc->origin), zone_desc->notifies); #if HAS_ACL_SUPPORT format_writer status_ams_fw = {zone_desc_ams_format, &zone_desc->ac.allow_query}; logger_handle_msg(handle, level, "%s: %{dnsname} allow query=%w", text, FQDNNULL(zone_desc->origin), &status_ams_fw); status_ams_fw.value = &zone_desc->ac.allow_update; logger_handle_msg(handle, level, "%s: %{dnsname} allow update=%w", text, FQDNNULL(zone_desc->origin), &status_ams_fw); status_ams_fw.value = &zone_desc->ac.allow_update_forwarding; logger_handle_msg(handle, level, "%s: %{dnsname} allow update forwarding=%w", text, FQDNNULL(zone_desc->origin), &status_ams_fw); status_ams_fw.value = &zone_desc->ac.allow_transfer; logger_handle_msg(handle, level, "%s: %{dnsname} allow transfer=%w", text, FQDNNULL(zone_desc->origin), &status_ams_fw); status_ams_fw.value = &zone_desc->ac.allow_notify; logger_handle_msg(handle, level, "%s: %{dnsname} allow notify=%w", text, FQDNNULL(zone_desc->origin), &status_ams_fw); #endif #if HAS_DYNAMIC_PROVISIONING #if HAS_ACL_SUPPORT status_ams_fw.value = &zone_desc->ac.allow_control; logger_handle_msg(handle, level, "%s: %{dnsname} allow control=%w", text, FQDNNULL(zone_desc->origin), &status_ams_fw); #endif logger_handle_msg(handle, level, "%s: %{dnsname} + dp v=%hx flags=%hx expire=%x refresh=%x retry=%x ts=%x:%x", text, FQDNNULL(zone_desc->origin), zone_desc->dynamic_provisioning.version, zone_desc->dynamic_provisioning.flags, zone_desc->dynamic_provisioning.expire, zone_desc->dynamic_provisioning.refresh, zone_desc->dynamic_provisioning.retry, zone_desc->dynamic_provisioning.timestamp, zone_desc->dynamic_provisioning.timestamp_lo); logger_handle_msg(handle, level, "%s: %{dnsname} + dp slaves=%{hostaddrlist}", text, FQDNNULL(zone_desc->origin), zone_desc->slaves); u32 command_count = zone_desc->commands.size; bpqueue_node_s *command_node = zone_desc->commands.first; for(u32 i = 0; i < command_count; i++) { zone_command_s *cmd = (zone_command_s*)command_node->data; logger_handle_msg(handle, level, "%s: %{dnsname} @%p & [%-2i] (%i) %s", text, FQDNNULL(zone_desc->origin), zone_desc, i, command_node->priority, database_service_operation_get_name(cmd->id)); command_node = command_node->next; } #endif } void zone_desc_log_all(logger_handle* handle, u32 level, zone_data_set *dset, const char *text) { zone_set_lock(dset); if(!ptr_set_avl_isempty(&dset->set)) { ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&dset->set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s*)zone_node->value; zone_desc_log(handle, level, zone_desc, text); } zone_set_unlock(dset); } else { zone_set_unlock(dset); log_info("%s set is empty", text); } } const char* type_to_name[5] = { "hint", "master", "slave", "stub" }; const char* zone_type_to_name(zone_type t) { if((t >= ZT_HINT) && (t <= ZT_STUB)) { return type_to_name[t]; } return "invalid"; } const char *dnssec_to_name[4] = { "nosec", "nsec", "nsec3", "nsec3-optout" }; const char* zone_dnssec_to_name(u32 dnssec_flags) { if((dnssec_flags & ZONE_DNSSEC_FL_MASK) < 4) { return dnssec_to_name[dnssec_flags & ZONE_DNSSEC_FL_MASK]; } return "invalid"; } void zone_enqueue_command(zone_desc_s *zone_desc, u32 id, void* parm, bool has_priority) /// @todo edf 20141016 -- test all callers RCs { if(!has_priority && ((zone_desc->status_flags & ZONE_STATUS_MARKED_FOR_DESTRUCTION) != 0)) { log_err("tried to queue to a zone marked for destruction"); return; } #ifdef DEBUG log_debug("zone_desc: enqueue command %{dnsname}@%p=%i %c %s", zone_desc->origin, zone_desc, zone_desc->rc, (has_priority)?'H':'L', database_service_operation_get_name(id)); #endif zone_command_s *cmd; ZALLOC_OR_DIE(zone_command_s*, cmd, zone_command_s, GENERIC_TAG); cmd->parm.ptr = parm; cmd->id = id; bpqueue_enqueue(&zone_desc->commands, cmd, (has_priority)?0:1); } zone_command_s* zone_dequeue_command(zone_desc_s *zone_desc) { zone_command_s *cmd = (zone_command_s*)bpqueue_dequeue(&zone_desc->commands); if(cmd != NULL) { #ifdef DEBUG log_debug("zone_desc: dequeue command %{dnsname}@%p=%i - %s", zone_desc->origin, zone_desc, zone_desc->rc, database_service_operation_get_name(cmd->id)); #endif } #ifdef DEBUG else { log_debug("zone_desc: dequeue command %{dnsname}@%p=%i - NULL", zone_desc->origin, zone_desc, zone_desc->rc); } #endif return cmd; } void zone_command_free(zone_command_s *cmd) { ZFREE(cmd, zone_command_s); } zdb_zone * zone_get_loaded_zone(zone_desc_s *zone_desc) { yassert(zone_islocked(zone_desc)); zdb_zone *zone = zone_desc->loaded_zone; // OK if(zone != NULL) { zdb_zone_acquire(zone); } return zone; } zdb_zone * zone_set_loaded_zone(zone_desc_s *zone_desc, zdb_zone *zone) { yassert(zone_islocked(zone_desc)); zdb_zone *old_zone = zone_desc->loaded_zone; // OK if(zone != NULL) { zdb_zone_acquire(zone); } zone_desc->loaded_zone = zone; // OK return old_zone; } bool zone_has_loaded_zone(zone_desc_s *zone_desc) { yassert(zone_islocked(zone_desc)); zdb_zone *zone = zone_desc->loaded_zone; // OK return zone != NULL; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/INSTALL0000644000077100007710000000013212473710127017724 xustar000000000000000030 mtime=1424986199.129058409 30 atime=1424986199.129058409 30 ctime=1454597653.173344534 yadifa-2.1.6-5826/sbin/yadifad/INSTALL0000644000077100007710000003661012473710127017536 0ustar00yadifayadifa00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command `./configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/signals.c0000644000077100007710000000012412650131756020502 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.017344 30 ctime=1454597653.301344534 yadifa-2.1.6-5826/sbin/yadifad/signals.c0000664000077100007710000006237612650131756020325 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #if HAS_PTHREAD_SETNAME_NP #ifdef DEBUG #define _GNU_SOURCE 1 #endif #endif #include #include "config.h" #include #include #include #include #if defined(__linux__) || defined(__gnu_hurd__) #include #elif defined(__sun) #include #endif #include #include #include #include #include "signals.h" #include "server_context.h" #include "server.h" #define MODULE_MSG_HANDLE g_server_logger #define MAXTRACE 128 // Let this to 0 // This prevents the coredump from occurring. // Let's configure this using runtime flags. #define SIGNAL_HOOK_COREDUMP 1 #define LOGGER_REOPEN_MIN_PERIOD_US 10000000 ya_result database_save_all_zones_to_disk(); /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ //extern server_context_t *server_context; static pthread_t signal_thread = 0; static mutex_t signal_mutex = MUTEX_INITIALIZER; // static volatile time_t signal_task_logger_handle_reopen_last_active = 0; static volatile int signal_handler_read_fd = -1; static volatile int signal_handler_write_fd = -1; static bool sigsegv_trytrace = TRUE; static bool sigsegv_tryloggerflush = TRUE; // signal can be lost, a full pipe will not block and lose even more. // shutdown is thus given an override so that it cannot be lost after // the signal handler gets it. static volatile bool signal_shutdown_received = FALSE; /*------------------------------------------------------------------------------ * FUNCTIONS */ /* * signals are not supposed to be interrupted by other signals * still, it happened once, the pthread_create of another signal : deadlock * so, here is another check (mutexes are of course forbidden) */ // tool to avoid external function calls during the signal static int signal_strcat(char *dest, const char* src) { char *p = dest; while(*p != '\0') { p++; } while(*src != '\0') { *p++ = *src++; } *p = '\0'; return p - dest; } // tool to avoid external function calls during the signal static int signal_int2str(char *dest, int src) { char *p = dest; int tmp = src; do { p++; tmp /= 10; } while(tmp > 0); *p = '\0'; do { char c = '0' + (char)(src % 10); src /= 10; --p; *p = c; } while(src > 0); while(p > dest) { --p; *p = ' '; } return p - dest; } // tool to avoid external function calls during the signal static int signal_ptr2str(char *dest, void* srcp) { intptr src = (intptr)srcp; char *p = dest; int shift = ((sizeof(intptr) - 1) << 3) + 4; do { char c = (src >> shift) & 0xf; if(c < 10) { c += '0'; } else { c += 'A' - 10; } *p++ = c; shift -= 4; } while(shift >= 0); *p = '\0'; return sizeof(intptr) * 2; } // static void signal_task_reconfigure_reopen_log() { log_debug1("signal_task_reconfigure_reopen_log()"); u64 now = timeus(); if(now - signal_task_logger_handle_reopen_last_active > LOGGER_REOPEN_MIN_PERIOD_US) { signal_task_logger_handle_reopen_last_active = now; if(g_config->reloadable) { yadifad_config_update(g_config->config_file); } else { log_err("cannot reopen configuration file(s): '%s' is outside of jail", g_config->config_file); } logger_reopen(); } #ifdef DEBUG else { double dt = LOGGER_REOPEN_MIN_PERIOD_US - (now - signal_task_logger_handle_reopen_last_active); dt /= 1000000.0; log_debug1("signal_task_reconfigure_reopen_log(): ignore for %.3fs", dt); } #endif log_debug1("signal_task_reconfigure_reopen_log(): end"); } /***/ static void signal_task_database_save_all_zones_to_disk() { log_debug("signal_task_database_save_all_zones_to_disk()"); if(g_config->database != NULL) { database_save_all_zones_to_disk(); } log_debug("signal_task_database_save_all_zones_to_disk(): end"); } /**/ static void signal_task_shutdown() { log_debug("signal_task_shutdown()"); program_mode = SA_SHUTDOWN; if(!dnscore_shuttingdown()) { program_mode = SA_SHUTDOWN; dnscore_shutdown(); } log_debug("signal_task_shutdown(): end"); } static void* signal_handler_thread(void* parms) { (void)parms; #if HAS_PTHREAD_SETNAME_NP #ifdef DEBUG pthread_setname_np(pthread_self(), "signal-handler"); #endif #endif log_info("signal: thread started"); while(signal_handler_read_fd >= 0) { u8 signum; ya_result return_code; #ifdef DEBUG log_debug7("signal: waiting for next signal"); #endif if(FAIL(return_code = readfully(signal_handler_read_fd, &signum, sizeof(signum)))) { log_err("signal: error reading the next signal: %r", return_code); break; } #ifdef DEBUG log_debug7("signal: handling signal %i", signum); #endif if(signal_shutdown_received) { #ifdef DEBUG if(signum != SIGINT && signum != SIGTERM) { log_debug7("signal: check that, handling a SIGINT instead"); } #endif signum = SIGINT; } switch(signum) { case SIGHUP: { signal_task_reconfigure_reopen_log(); break; } case SIGUSR1: { signal_task_database_save_all_zones_to_disk(); break; } case SIGUSR2: { break; } case SIGINT: case SIGTERM: { signal_task_shutdown(); } case MAX_U8: { log_info("signal: thread stopping"); close_ex(signal_handler_read_fd); mutex_lock(&signal_mutex); signal_handler_read_fd = -1; mutex_unlock(&signal_mutex); break; } default: { break; } } } log_info("signal: thread stopped"); mutex_lock(&signal_mutex); signal_thread = 0; mutex_unlock(&signal_mutex); return NULL; } /** \brief handle the signals received * * @param[in] signo * * @note The signal handler CANNOT use the loggers or it has to use its own channels + handle. * The reason being mutexes are not reentrant. So if a signal occurs while the log mutex is on * the signal will deadlock as soon as it tries to log. * * return NONE */ static void signal_handler(int signo, siginfo_t* info, void* context) { /* ------------------------------------------------------------ */ switch(signo) { case SIGINT: case SIGTERM: { /* * We are shutting down : ignore other "command" signals * Also, in order to avoid handling an hammering of signals, * (and risking missing the shutdown if the pipe is already full) * we set a volatile that will be sync "soon" (no mutexes here please) */ int errno_value = errno; signal(SIGHUP, SIG_IGN); signal(SIGUSR1, SIG_IGN); signal(SIGINT, SIG_IGN); signal(SIGTERM, SIG_IGN); errno = errno_value; signal_shutdown_received = TRUE; // fall-through } case SIGHUP: case SIGUSR1: { int errno_value = errno; u8 signum = (u8)signo; write(signal_handler_write_fd, &signum, sizeof(signum)); errno = errno_value; break; } #if SIGNAL_HOOK_COREDUMP case SIGABRT: case SIGBUS: case SIGFPE: case SIGILL: case SIGSEGV: { // reactivate the default handler int errno_value = errno; signal(signo, SIG_DFL); if(sigsegv_trytrace) { char filepath[PATH_MAX]; char number[32]; sigsegv_trytrace = FALSE; for(int source = 0; source <= 1; source++) { char *eol = (source == 0)?"\n":""; int fd = -1; /// @note edf: set to -1 to shut-up false positive "uninitialised" int len; filepath[0] = '\0'; signal_strcat(filepath, g_config->log_path); signal_strcat(filepath, "/"); signal_strcat(filepath, "sig-"); signal_int2str(number, signo); signal_strcat(filepath, number); signal_strcat(filepath, "-"); signal_int2str(number, getpid()); signal_strcat(filepath, number); if(source == 0) { fd = open_create_ex(filepath, O_WRONLY|O_CREAT|O_APPEND, 0644); if(fd < 0) { continue; } } else { if(!logger_is_running()) { continue; } } len = signal_strcat(filepath, eol); if(source == 0) { writefully(fd, filepath, len); fsync(fd); } else { log_err(filepath); } #if defined(__linux__) || defined(__gnu_hurd__) void* buffer[MAXTRACE]; char** strings; int n = backtrace(buffer, MAXTRACE); int i; time_t now = time(NULL); filepath[0] = '\0'; signal_strcat(filepath, "got signal "); signal_int2str(number, signo); signal_strcat(filepath, number); signal_strcat(filepath, " at time="); signal_int2str(number, now); signal_strcat(filepath, number); signal_strcat(filepath, " for address "); signal_ptr2str(number, info->si_addr); signal_strcat(filepath, number); len = signal_strcat(filepath, eol); if(source == 0) { writefully(fd, filepath, len); fsync(fd); } else { log_err(filepath); } strings = backtrace_symbols(buffer, n); if(strings != NULL) { for(i = 0; i < n; i++) { filepath[0] = '\0'; signal_strcat(filepath, "\t["); signal_int2str(number, i); signal_strcat(filepath, number); signal_strcat(filepath, "]: "); signal_strcat(filepath, strings[i]); len = signal_strcat(filepath, eol); if(source == 0) { writefully(fd, filepath, len); fsync(fd); } else { log_err(filepath); } } } else { filepath[0] = '\0'; signal_strcat(filepath, "no backtrace available: "); signal_int2str(number, errno); signal_strcat(filepath, number); len = signal_strcat(filepath, eol); if(source == 0) { writefully(fd, filepath, len); fsync(fd); } else { log_err(filepath); } } filepath[0] = '\0'; signal_strcat(filepath, "pid: "); signal_int2str(number, getpid()); signal_strcat(filepath, number); signal_strcat(filepath, " "); signal_strcat(filepath, "thread id: "); signal_int2str(number, (u32)pthread_self()); signal_strcat(filepath, number); len = signal_strcat(filepath, eol); if(source == 0) { writefully(fd, filepath, len); fsync(fd); // fd IS initialised : (source == 0) => fd set } else { log_err(filepath); } #elif defined(__sun) filepath[0] = '\0'; signal_strcat(filepath, "got signal "); signal_int2str(number, signo); signal_strcat(filepath, number); signal_strcat(filepath, eol); if(source == 0) // 0 -> output to file, else to the logger if it's on { writefully(fd, filepath, len); printstack(fd); fsync(fd); } else { signal_strcat(filepath, "stack trace dumped in "); signal_strcat(filepath, g_config->log_path); signal_strcat(filepath, "/"); signal_strcat(filepath, "sig-"); signal_int2str(number, signo); signal_strcat(filepath, number); signal_strcat(filepath, "-"); signal_int2str(number, getpid()); signal_strcat(filepath, number); log_err(filepath); } #else filepath[0] = '\0'; signal_strcat(filepath, "got signal "); signal_int2str(number, signo); signal_strcat(filepath, number); len = signal_strcat(filepath, "\nno backtrace available\n"); if(source == 0) { writefully(fd, filepath, len); fsync(fd); } else { log_err(filepath); } #endif if(source == 0) { close_ex(fd); } } // for both sources /** * Do NOT free(strings) : * If the memory is corrupted, this is one more chance to crash * */ } // if sigsegv_trytrace /* There COULD be some relevant information in the logger */ /* try to flush it */ if(sigsegv_tryloggerflush) { sigsegv_tryloggerflush = FALSE; logger_flush(); log_err("CRITICAL ERROR"); logger_flush(); } errno = errno_value; /* trigger the original signal (to dump a core if possible ) */ raise(signo); /* should never be reached : Exit without disabling stuff (no atexit registered function called) */ _exit(EXIT_CODE_SELFCHECK_ERROR); break; } #endif /* case SIGUSR2: case SIGCHLD: */ default: { break; } } } /** \brief initialize the signals * * @param NONE * * @return NONE * */ int signal_handler_init() { int fds[2]; log_debug("signal_handler_init()"); if((signal_handler_read_fd >= 0) || (signal_handler_write_fd >= 0)) { log_debug("signal_handler_init() : already initialised"); return INVALID_STATE_ERROR; // invalid status } if(pipe(fds) < 0) { int pipe_err = ERRNO_ERROR; log_debug("signal_handler_init(): %r", pipe_err); return pipe_err; } signal_handler_read_fd = fds[0]; signal_handler_write_fd = fds[1]; int write_fd_flags = fcntl(signal_handler_write_fd, F_GETFL, 0); write_fd_flags |= O_NONBLOCK; if(fcntl(signal_handler_write_fd, F_SETFL, write_fd_flags) < 0) { int fcntl_err = ERRNO_ERROR; log_debug("signal_handler_init(): %r", fcntl_err); return fcntl_err; } int pthread_errcode; if((pthread_errcode = pthread_create(&signal_thread, NULL, signal_handler_thread, NULL)) != 0) { close_ex(signal_handler_read_fd); close_ex(signal_handler_write_fd); signal_handler_read_fd = -1; signal_handler_write_fd = -1; pthread_errcode = MAKE_ERRNO_ERROR(pthread_errcode); log_debug("signal_handler_init(): %r", pthread_errcode); return pthread_errcode; } u8 handled_signals[] = { SIGHUP, /* Hangup (POSIX). */ SIGINT, /* Interrupt (ANSI). */ SIGQUIT, /* Quit (POSIX). */ SIGIOT, /* IOT trap (4.2 BSD). */ SIGUSR1, /* User-defined signal 1 (POSIX). */ #if SIGNAL_HOOK_COREDUMP SIGABRT, /* Abort (ANSI). */ SIGILL, /* Illegal instruction (ANSI). */ /* ERROR/EXIT */ SIGBUS, /* BUS error (4.2 BSD). */ SIGFPE, /* Floating-point exception (ANSI). */ /* ERROR/EXIT */ SIGSEGV, /* Segmentation violation (ANSI). */ /* ERROR/EXIT */ #endif SIGUSR2, /* User-defined signal 2 (POSIX). */ SIGALRM, /* Alarm clock (POSIX). */ SIGTERM, /* Termination (ANSI). */ /* SIGSTKFLT,*/ /* Stack fault. */ SIGCHLD, /* Child status has changed (POSIX). */ SIGCONT, /* Continue (POSIX). */ SIGTSTP, /* Keyboard stop (POSIX). */ SIGTTIN, /* Background read from tty (POSIX). */ SIGTTOU, /* Background write to tty (POSIX). */ SIGURG, /* Urgent condition on socket (4.2 BSD). */ SIGXCPU, /* CPU limit exceeded (4.2 BSD). */ SIGXFSZ, /* File size limit exceeded (4.2 BSD). */ 0 }; u8 ignored_signals[] = { SIGPIPE, /* Broken pipe (POSIX). */ 0 }; struct sigaction action; int signal_idx; ZEROMEMORY(&action,sizeof(action)); action.sa_sigaction = signal_handler; for(signal_idx = 0; handled_signals[signal_idx] != 0; signal_idx++) { #ifdef SA_NOCLDWAIT action.sa_flags = SA_SIGINFO | SA_NOCLDSTOP | SA_NOCLDWAIT; #else /// @note 20151119 edf -- quick fix for Debian Hurd i386, and any other system missing SA_NOCLDWAIT action.sa_flags = SA_SIGINFO | SA_NOCLDSTOP; #endif switch(signal_idx) { case SIGBUS: case SIGFPE: case SIGILL: case SIGSEGV: { sigemptyset(&action.sa_mask); /* can interrupt the interrupt */ break; } default: { sigfillset(&action.sa_mask); /* don't interrupt the interrupt */ break; } } sigaction(handled_signals[signal_idx], &action, NULL); } action.sa_handler = SIG_IGN; for(signal_idx = 0; ignored_signals[signal_idx] != 0; signal_idx++) { sigaction(ignored_signals[signal_idx], &action, NULL); } log_debug("signal_handler_init() done"); return SUCCESS; } void signal_handler_finalise() { log_debug("signal_handler_finalise()"); if(signal_handler_write_fd >= 0) { log_debug1("signal: pipe not closed yet"); mutex_lock(&signal_mutex); pthread_t signal_thread_local = signal_thread; mutex_unlock(&signal_mutex); if(signal_handler_read_fd >= 0) { u8 stop_value = MAX_U8; if(signal_thread_local != 0) { log_debug1("signal: handler is still running"); writefully(signal_handler_write_fd, &stop_value, sizeof(stop_value)); pthread_join(signal_thread_local, NULL); mutex_lock(&signal_mutex); signal_thread = 0; mutex_unlock(&signal_mutex); log_debug1("signal: handler has stopped"); } else { log_debug1("signal: handler is not running anymore"); } int signal_handler_read_fd_local = signal_handler_read_fd; if(signal_handler_read_fd_local >= 0) { close_ex(signal_handler_read_fd_local); mutex_lock(&signal_mutex); signal_handler_read_fd = -1; mutex_unlock(&signal_mutex); } } else { if(signal_thread_local != 0) { log_debug1("signal: waiting for the handler to stop"); pthread_join(signal_thread_local, NULL); mutex_lock(&signal_mutex); signal_thread = 0; mutex_unlock(&signal_mutex); } log_debug1("signal: handler has stopped"); } close_ex(signal_handler_write_fd); signal_handler_write_fd = -1; } else { if(signal_handler_read_fd >= 0) { log_err("signal: invalid pipe status r:%i>=0 && w:%i>=0", signal_handler_read_fd, signal_handler_write_fd); } if(signal_thread != 0) { log_err("signal: handler is unexpectedly still running"); } } log_debug("signal_handler_finalise() done"); } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/dynupdate_query_service.h0000644000077100007710000000012412650131756024011 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.973344 30 ctime=1454597653.149344534 yadifa-2.1.6-5826/sbin/yadifad/dynupdate_query_service.h0000664000077100007710000000524512650131756023624 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef __DYNUPDATE_QUERY_SERVICE__H__ #define __DYNUPDATE_QUERY_SERVICE__H__ #include #include "database.h" /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ /** * * Move this into YADIFAD * * The dynupdate service loads the next update from the queue and runs it. */ ya_result dynupdate_query_service_start(); ya_result dynupdate_query_service_stop(); ya_result dynupdate_query_service_enqueue(zdb *db, message_data *msg, struct msghdr *udp_msghdr); /* ------------------------------------------------------------ */ #endif // __DYNUPDATE_QUERY_SERVICE__H__ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/compile0000644000077100007710000000013212473710127020246 xustar000000000000000030 mtime=1424986199.162058409 30 atime=1424986199.162058409 30 ctime=1454597653.184344534 yadifa-2.1.6-5826/sbin/yadifad/compile0000755000077100007710000001624512473710127020065 0ustar00yadifayadifa00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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, 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-desc-unload.c0000644000077100007710000000012412650131756025411 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.986344 30 ctime=1454597653.231344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-desc-unload.c0000664000077100007710000001346112650131756025223 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup database Routines for database manipulations * @ingroup yadifad * @brief database functions * * Implementation of routines for the database * - add zone file(s) * - clear zone file(s) * - print zone files(s) * - load db * - unload db * - lookup database result of a message * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include "config.h" #include #include "zone.h" #include "database-service.h" #define MODULE_MSG_HANDLE g_server_logger extern logger_handle *g_server_logger; extern zone_data_set database_zone_desc; void database_service_zone_desc_unload(zone_desc_s *zone_desc) { // Ensure that the zone is not mounted log_debug1("database_service_zone_desc_unload(%{dnsname}@%p=%i)", zone_desc->origin, zone_desc, zone_desc->rc); yassert(zone_desc != NULL); if(FAIL(zone_lock(zone_desc, ZONE_LOCK_DESC_UNLOAD))) { log_err("database_service_zone_desc_unload: failed to lock zone settings for '%{dnsname}'", zone_desc->origin); return; } if((zone_desc->status_flags & ZONE_STATUS_REGISTERED) == 0) { log_err("database_service_zone_desc_unload(%p) %{dnsname} is not registered!", zone_desc, zone_desc->origin); zone_desc->status_flags &= ~ZONE_STATUS_PROCESSING; zone_unlock(zone_desc, ZONE_LOCK_DESC_UNLOAD); return; } if(database_zone_desc_is_mounted(zone_desc->origin)) { // mounted : unmount and unload, then try again log_debug2("database_service_zone_desc_unload(%p) %{dnsname} is mounted: unmount & retry", zone_desc, zone_desc->origin); #ifdef DEBUG database_zone_desc_is_mounted(zone_desc->origin); #endif yassert(zone_has_loaded_zone(zone_desc)); zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_UNMOUNT, NULL, TRUE); zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_UNLOAD, NULL, TRUE); // default zone zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_DESC_UNLOAD, NULL, TRUE); zone_desc->status_flags &= ~ZONE_STATUS_PROCESSING; zone_unlock(zone_desc, ZONE_LOCK_DESC_UNLOAD); } else { /* * Remove the zone desc from the registered zones * Remove the zone desc from any alarm/task * Garbage the zone desc (new tool I have to make that mostly answers the dyn-prov-del issue) * ... * At some point in the future, free/destroy the zone desc */ log_debug2("database_service_zone_desc_unload(%p) unregistering %{dnsname}", zone_desc, zone_desc->origin); u32 queue_size = bpqueue_size(&zone_desc->commands); if(queue_size > 0) { log_err("database_service_zone_desc_unload(%p) has still %u commands in the queue", zone_desc, queue_size); } zone_unlock(zone_desc, ZONE_LOCK_DESC_UNLOAD); zone_desc_s *zone_unregistered_desc = zone_unregister(&database_zone_desc, zone_desc->origin); if(zone_desc == zone_unregistered_desc) { zone_desc->status_flags &= ~ZONE_STATUS_REGISTERED; zone_release(zone_desc); } else { log_err("database_service_zone_desc_unload(%p) but registered zone descriptor is %p", zone_desc, zone_unregistered_desc); if(zone_unregistered_desc != NULL) { zone_release(zone_unregistered_desc); } else { log_err("database_service_zone_desc_unload(%p) the zone is not registered at all!", zone_desc, zone_unregistered_desc); } } zone_desc->status_flags &= ~ZONE_STATUS_PROCESSING; zone_desc->status_flags |= ZONE_STATUS_MARKED_FOR_DESTRUCTION; } log_debug1("database_service_zone_desc_unload(%p) done", zone_desc); } /** * @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/server_context.h0000644000077100007710000000012412650131756022121 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.000344 30 ctime=1454597653.104344534 yadifa-2.1.6-5826/sbin/yadifad/server_context.h0000664000077100007710000000567612650131756021744 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup server Server * @ingroup yadifad * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #pragma once #include "config.h" #include #include "database.h" #include "confs.h" #if HAS_MESSAGES_SUPPORT #define UDP_USE_MESSAGES 1 #else #define UDP_USE_MESSAGES 0 #endif #ifdef __cplusplus extern "C" { #endif /** \brief Initialize sockets and copy the config parameters into server_context_t * * @param[in] config * @param[out] server_context * * @retval OK * @return otherwise log_quit will stop the program */ int config_update_network(config_data *); /** * Appends the name of the socket s to the buffer. * The buffer has to be big enough, no size test is performed. * * @param buffer * @param s * * @return the length of the name */ u32 server_context_append_socket_name(char *buffer, u16 s); /** \brief Closes all sockets and remove pid file * * @param[in] config * @param[in] server_context * * @retval OK * @return otherwise log_quit will stop the program */ void server_context_clear(config_data *); #ifdef __cplusplus } #endif yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/server.c0000644000077100007710000000012412650131756020350 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.033344 30 ctime=1454597653.294344534 yadifa-2.1.6-5826/sbin/yadifad/server.c0000664000077100007710000007311312650131756020162 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup server Server * @ingroup yadifad * @brief Server initialisation and launch * * Starts server * * @{ */ /*----------------------------------------------------------------------------*/ #define SERVER_C_ /** @note: here we define the variable that is holding the default logger handle for the current source file * Such a handle should NEVER been set in an include file. */ #include "server-config.h" #include "config.h" #include #include #include #include #include logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #include "signals.h" #include "database-service.h" #include "log_query.h" #include "poll-util.h" #include "server-mt.h" #include "notify.h" #include "server_context.h" #include "axfr.h" #include "ixfr.h" #include "process_class_ch.h" #if HAS_DYNUPDATE_SUPPORT #include "dynupdate_query_service.h" #endif #if HAS_CTRL #include "ctrl.h" #include "ctrl_query.h" #endif #if HAS_RRL_SUPPORT #include "rrl.h" #endif static struct thread_pool_s *server_tcp_thread_pool = NULL; struct thread_pool_s *server_disk_thread_pool = NULL; #include "server.h" server_statistics_t server_statistics; static bool server_statistics_initialised = FALSE; volatile int program_mode = SA_CONT; /** @note must be volatile */ /******************************************************************************************************************* * * TCP protocol * ******************************************************************************************************************/ void tcp_send_message_data(message_data* mesg) { mesg->buffer_tcp_len[0] = (mesg->send_length >> 8); mesg->buffer_tcp_len[1] = (mesg->send_length); /* * Message status cannot be used here to set the rcode. * The main reason being : it is better done when the message is built * The other reason being : OPT contains extended codes. A pain to parse and handle here. */ //yassert(((mesg->status < 15) && ((MESSAGE_LOFLAGS(mesg->buffer) & RCODE_BITS) == mesg->status)) || (mesg->status >= 15) ); #ifdef DEBUG log_debug("tcp: answering %d bytes @%p to socket %d", mesg->send_length + 2, mesg->buffer_tcp_len, mesg->sockfd); log_memdump_ex(g_server_logger, MSG_DEBUG5, mesg->buffer, mesg->send_length, 16, OSPRINT_DUMP_HEXTEXT); #endif /** * SAME AS READ : THERE HAS TO BE A RATE ! */ #if !HAS_DROPALL_SUPPORT ya_result sent; if(FAIL(sent = writefully_limited(mesg->sockfd, mesg->buffer_tcp_len, mesg->send_length + 2, g_config->tcp_query_min_rate_us))) { log_err("tcp write error: %r", sent); tcp_set_abortive_close(mesg->sockfd); } #endif } /** \brief Does the tcp processing * * When pselect has an TCP request, this function reads the tcp packet, * processes dns packet and send reply * * @param[in,out] mesg * * @retval OK * @return status of message is written in mesg->status */ static int server_process_tcp_task(zdb *database, message_data *mesg, u16 svr_sockfd) { ya_result return_code = SUCCESS; u16 dns_query_len; ssize_t received; ssize_t next_message_size; #ifdef DEBUG log_info("tcp: processing socket %i (%{sockaddr})", mesg->sockfd, &mesg->other.sa); #endif int loop_count = 0; tcp_set_recvtimeout(mesg->sockfd, 1, 0); tcp_set_nodelay(mesg->sockfd, TRUE); tcp_set_cork(mesg->sockfd, FALSE); s64 tstart = (s64)timeus(); /** @note do a full read, not one that can be interrupted or deliver only a part of what we need (readfully) */ while((next_message_size = readfully_limited(mesg->sockfd, &dns_query_len, 2, g_config->tcp_query_min_rate_us)) == 2) { ++loop_count; #ifdef DEBUG log_debug("tcp: loop count = %d", loop_count); #endif u16 native_dns_query_len = ntohs(dns_query_len); if(native_dns_query_len == 0) { log_err("tcp: message size is 0"); /** @todo no linger, check the best place to do it */ return_code = UNPROCESSABLE_MESSAGE; break; } /** * read with an expected rate */ if((received = readfully_limited(mesg->sockfd, mesg->buffer, native_dns_query_len, g_config->tcp_query_min_rate_us)) != native_dns_query_len) { if(ISOK(received)) { log_err("tcp: message read: received %d bytes but %hd were expected", received, native_dns_query_len); } else { log_err("tcp: message read: %r", ERRNO_ERROR); } mesg->received = 0; tcp_set_abortive_close(mesg->sockfd); return_code = UNPROCESSABLE_MESSAGE; break; } mesg->received = received; #ifdef DEBUG log_memdump_ex(g_server_logger, MSG_DEBUG5, mesg->buffer, mesg->received, 16, OSPRINT_DUMP_HEXTEXT); #endif mesg->protocol = IPPROTO_TCP; switch(MESSAGE_OP(mesg->buffer)) { case OPCODE_QUERY: { if(ISOK(return_code = message_process_query(mesg))) { mesg->size_limit = DNSPACKET_MAX_LENGTH; switch(mesg->qclass) { case CLASS_IN: { log_query(svr_sockfd, mesg); if(mesg->qtype == TYPE_AXFR) { /* * Start an AXFR "writer" thread * Give it the tcp fd * It will store the current AXFR on the disk if it does not exist yet (writers blocked) * It will then open the stored file and stream it back to the tcp fd (writers freed) * ACL/TSIG is not taken in account yet. */ TCPSTATS(tcp_axfr_count++); return_code = axfr_process(mesg); #ifdef DEBUG log_debug("server_process_tcp scheduled : %r", return_code); #endif return return_code; /* AXFR PROCESSING: process then closes: all in background */ } if(mesg->qtype == TYPE_IXFR) { /* * Start an IXFR "writer" thread * Give it the tcp fd * It will either send the incremental changes (stored on the disk), either answer with an AXFR * ACL/TSIG is not taken in account yet. */ TCPSTATS(tcp_ixfr_count++); return_code = ixfr_process(mesg); #ifdef DEBUG log_debug("server_process_tcp scheduled : %r", return_code); #endif return return_code; /* IXFR PROCESSING: process then closes: all in background */ } #ifdef DEBUG log_debug("server_process_tcp query"); #endif TCPSTATS(tcp_queries_count++); /* * This query must go through the task channel. */ database_query(database, mesg); #ifdef DEBUG log_debug("server_process_tcp write"); #endif tcp_send_message_data(mesg); TCPSTATS(tcp_referrals_count += mesg->referral); TCPSTATS(tcp_fp[mesg->status]++); TCPSTATS(tcp_output_size_total += mesg->send_length); break; } // case query IN case CLASS_CH: { log_query(svr_sockfd, mesg); class_ch_process(mesg); TCPSTATS(tcp_fp[mesg->status]++); tcp_send_message_data(mesg); break; } default: { message_make_error(mesg, FP_NOT_SUPP_CLASS); TCPSTATS(tcp_fp[FP_NOT_SUPP_CLASS]++); break; } } // query class } // if message process succeeded else // an error occurred : no query to be done at all { log_warn("query [%04hx] error %i : %r", ntohs(MESSAGE_ID(mesg->buffer)), mesg->status, return_code); TCPSTATS(tcp_fp[mesg->status]++); #ifdef DEBUG log_memdump_ex(MODULE_MSG_HANDLE, MSG_DEBUG5, mesg->buffer, mesg->received, 16, OSPRINT_DUMP_ALL); #endif if( (return_code != INVALID_MESSAGE) && (((g_config->server_flags & SERVER_FL_ANSWER_FORMERR) != 0) || mesg->status != RCODE_FORMERR) && (MESSAGE_QR(mesg->buffer) == 0) ) { if(!MESSAGEP_HAS_TSIG(mesg)) { message_transform_to_error(mesg); } tcp_send_message_data(mesg); } else { TCPSTATS(tcp_dropped_count++); tcp_set_agressive_close(mesg->sockfd, 1); close_ex(mesg->sockfd); } } break; } // case query case OPCODE_NOTIFY: { if(ISOK(return_code = message_process(mesg))) { mesg->size_limit = DNSPACKET_MAX_LENGTH; switch(mesg->qclass) { case CLASS_IN: { /// @todo notify on TCP TCPSTATS(tcp_notify_input_count++); break; } default: { message_make_error(mesg, FP_NOT_SUPP_CLASS); TCPSTATS(tcp_fp[FP_NOT_SUPP_CLASS]++); break; } } // notify class } // if message process succeeded else // an error occurred : no query to be done at all { log_warn("notify [%04hx] error %i : %r", ntohs(MESSAGE_ID(mesg->buffer)), mesg->status, return_code); TCPSTATS(tcp_fp[mesg->status]++); #ifdef DEBUG log_memdump_ex(MODULE_MSG_HANDLE, MSG_DEBUG5, mesg->buffer, mesg->received, 16, OSPRINT_DUMP_ALL); #endif if( (return_code != INVALID_MESSAGE) && (((g_config->server_flags & SERVER_FL_ANSWER_FORMERR) != 0) || mesg->status != RCODE_FORMERR) && (MESSAGE_QR(mesg->buffer) == 0) ) { if(!MESSAGEP_HAS_TSIG(mesg)) { message_transform_to_error(mesg); } tcp_send_message_data(mesg); } else { TCPSTATS(tcp_dropped_count++); tcp_set_agressive_close(mesg->sockfd, 1); close_ex(mesg->sockfd); } } break; } // case notify case OPCODE_UPDATE: { if(ISOK(return_code = message_process(mesg))) { switch(mesg->qclass) { case CLASS_IN: { /* * _ Post an update on the scheduler * _ wait for the end of the update * _ proceed */ /** * @note It's the responsibility of the called function (or one of its callees) to ensure * this does not take much time and thus to trigger a background task with the * scheduler if needed. */ #if HAS_DYNUPDATE_SUPPORT TCPSTATS(tcp_updates_count++); log_info("update (%04hx) %{dnsname} %{dnstype} (%{sockaddr})", ntohs(MESSAGE_ID(mesg->buffer)), mesg->qname, &mesg->qtype, &mesg->other.sa); if(ISOK(database_update(database, mesg))) { tcp_send_message_data(mesg); TCPSTATS(tcp_fp[mesg->status]++); } #else message_make_error(mesg, FP_FEATURE_DISABLED); tcp_send_message_data(mesg); TCPSTATS(tcp_fp[FP_FEATURE_DISABLED]++); #endif break; } // update class IN default: { message_make_error(mesg, FP_NOT_SUPP_CLASS); TCPSTATS(tcp_fp[FP_NOT_SUPP_CLASS]++); break; } } // update class } // if message process succeeded else // an error occurred : no query to be done at all { log_warn("update [%04hx] error %i : %r", ntohs(MESSAGE_ID(mesg->buffer)), mesg->status, return_code); TCPSTATS(tcp_fp[mesg->status]++); #ifdef DEBUG log_memdump_ex(MODULE_MSG_HANDLE, MSG_DEBUG5, mesg->buffer, mesg->received, 16, OSPRINT_DUMP_ALL); #endif if( (return_code != INVALID_MESSAGE) && (((g_config->server_flags & SERVER_FL_ANSWER_FORMERR) != 0) || mesg->status != RCODE_FORMERR) && (MESSAGE_QR(mesg->buffer) == 0) ) { if(!MESSAGEP_HAS_TSIG(mesg)) { message_transform_to_error(mesg); } tcp_send_message_data(mesg); } else { TCPSTATS(tcp_dropped_count++); tcp_set_agressive_close(mesg->sockfd, 1); close_ex(mesg->sockfd); } } break; } // case update #if HAS_CTRL case OPCODE_CTRL: { if(ISOK(return_code = message_process(mesg))) { switch(mesg->qclass) { case CLASS_CTRL: { ctrl_query_process(mesg); break; } // ctrl class CTRL default: { /** * @todo Handle unknown classes better */ log_warn("query [%04hx] %{dnsname} %{dnstype} %{dnsclass} (%{sockaddrip}) : unsupported class", ntohs(MESSAGE_ID(mesg->buffer)), mesg->qname, &mesg->qtype, &mesg->qclass, &mesg->other.sa); mesg->status = FP_CLASS_NOTFOUND; message_transform_to_error(mesg); break; } } /* switch class */ if(mesg->status != FP_PACKET_DROPPED) { TCPSTATS(tcp_fp[mesg->status]++); tcp_send_message_data(mesg); } else { TCPSTATS(tcp_dropped_count++); tcp_set_agressive_close(mesg->sockfd, 1); close_ex(mesg->sockfd); } } else // an error occurred : no query to be done at all { log_warn("ctrl [%04hx] error %i : %r", ntohs(MESSAGE_ID(mesg->buffer)), mesg->status, return_code); TCPSTATS(tcp_fp[mesg->status]++); #ifdef DEBUG log_memdump_ex(MODULE_MSG_HANDLE, MSG_DEBUG5, mesg->buffer, mesg->received, 16, OSPRINT_DUMP_ALL); #endif if( (return_code != INVALID_MESSAGE) && (((g_config->server_flags & SERVER_FL_ANSWER_FORMERR) != 0) || mesg->status != RCODE_FORMERR) && (MESSAGE_QR(mesg->buffer) == 0) ) { if(mesg->tsig.tsig == NULL) { message_transform_to_error(mesg); tcp_send_message_data(mesg); } else { /// @todo edf 20150428 -- handle this more nicely TCPSTATS(tcp_dropped_count++); tcp_set_agressive_close(mesg->sockfd, 1); close_ex(mesg->sockfd); } } else { TCPSTATS(tcp_dropped_count++); tcp_set_agressive_close(mesg->sockfd, 1); close_ex(mesg->sockfd); } } break; } // case ctrl #endif // HAS_CTRL default: { log_warn("unknown [%04hx] error: %r", ntohs(MESSAGE_ID(mesg->buffer)), MAKE_DNSMSG_ERROR(mesg->status)); if( (return_code != INVALID_MESSAGE) && (((g_config->server_flags & SERVER_FL_ANSWER_FORMERR) != 0) || mesg->status != RCODE_FORMERR) && (MESSAGE_QR(mesg->buffer) == 0) ) { if(!MESSAGEP_HAS_TSIG(mesg)) { message_transform_to_error(mesg); } tcp_send_message_data(mesg); } else { TCPSTATS(tcp_dropped_count++); tcp_set_agressive_close(mesg->sockfd, 1); close_ex(mesg->sockfd); } } } // switch operation code } // while received bytes if(loop_count > 0) { // If the next message size is not 2, then we didn't had to expect a message if(next_message_size == 2) { // If we have got an error while receiving (tcp too slow), then abort the connection if(ISOK(received)) { tcp_set_agressive_close(mesg->sockfd, 1); } else { log_err("tcp: %{sockaddr} message #%i processing failed: %r", &mesg->other.sa, loop_count, received); tcp_set_abortive_close(mesg->sockfd); } } else { // We processed at least one message but this last one was either // non-existent, or truncated, or too slow : // // We give it a second and we close. tcp_set_agressive_close(mesg->sockfd, 1); } } else { s64 d = MAX((s64)timeus() - tstart, 0); double s = d / 1000000.; log_err("tcp: %{sockaddr} connection didn't sent the message size after %5.3fs: %r", &mesg->other.sa, s, next_message_size); tcp_set_abortive_close(mesg->sockfd); } #ifdef DEBUG log_info("tcp: closing socket %i, loop count = %d", mesg->sockfd, loop_count); #endif close_ex(mesg->sockfd); mesg->sockfd = -1; return return_code; } typedef struct server_process_tcp_thread_parm server_process_tcp_thread_parm; struct server_process_tcp_thread_parm { zdb *database; socketaddress sa; socklen_t addr_len; int sockfd; int svr_sockfd; }; static void* server_process_tcp_thread(void* parm) { #ifdef DEBUG log_debug("tcp: begin"); #endif server_process_tcp_thread_parm* tcp_parm = (server_process_tcp_thread_parm*)parm; message_data mesg; #ifdef DEBUG memset(&mesg, 0xff, sizeof(message_data)); #endif mesg.sockfd = tcp_parm->sockfd; mesg.process_flags = ~0; /** @todo FIX ME */ memcpy(&mesg.other, &tcp_parm->sa, tcp_parm->addr_len); mesg.addr_len = tcp_parm->addr_len; server_process_tcp_task(tcp_parm->database, &mesg, tcp_parm->svr_sockfd); free(parm); #ifdef DEBUG log_debug("tcp: end"); #endif return NULL; } void server_process_tcp(zdb *database, tcp *tcp_itf) { server_process_tcp_thread_parm* parm; socklen_t addr_len; socketaddress addr; addr_len = sizeof(addr); /* * AFAIK there are two relevant fields in mesg at this point: addr & sockfd * After the accept only the sockfd is relevant */ /* I know I'm already in an #if with the same condition but I want to mark * the code I've c&p from the original do_tcp_process */ #ifdef DEBUG log_debug("server_process_tcp_thread_start begin"); #endif int current_tcp = poll_update(); /** * @note we MAY want to accept & close before rejecting. But in case of a DOS we lose. * here we will just ignore until it's possible to do something about it (or it's cancelled) * */ if(current_tcp >= g_config->max_tcp_queries) { log_info("tcp: rejecting: already %d/%d handled", current_tcp, g_config->max_tcp_queries); int rejected_fd = accept(tcp_itf->sockfd, &addr.sa, &addr_len); tcp_set_abortive_close(rejected_fd); close_ex(rejected_fd); TCPSTATS(tcp_overflow_count++); return; } TCPSTATS(tcp_input_count++); MALLOC_OR_DIE(server_process_tcp_thread_parm*, parm, sizeof(server_process_tcp_thread_parm), TPROCPRM_TAG); parm->database = database; /** @todo test: timeout */ /* don't test -1, test < 0 instead (test + js instead of add + stall + jz */ while((parm->sockfd = accept(tcp_itf->sockfd, &addr.sa, &addr_len)) < 0) { int err = errno; if(err != EINTR) { log_err("tcp: accept returned %r\n", MAKE_ERRNO_ERROR(err)); free(parm); return; } } if(addr_len > MAX(sizeof(struct sockaddr_in),sizeof(struct sockaddr_in6))) { log_err("tcp: addr_len = %i, max allowed is %i", addr_len, MAX(sizeof(struct sockaddr_in),sizeof(struct sockaddr_in6))); close_ex(parm->sockfd); free(parm); return; } memcpy(&parm->sa, &addr, addr_len); parm->addr_len = addr_len; parm->svr_sockfd = tcp_itf->sockfd; if(poll_add(parm->sockfd)) { log_debug("tcp: using slot %d/%d", current_tcp + 1 , g_config->max_tcp_queries); /* * And here is the AXFR change: if it's an AXFR, then we need to ensure that * _ we are allowed (TSIG, time limit between two AXFR "milestones", ...) * _ we have the AXFR file ready and if not, fork to generate it * * The thread is launched anyway and waits for the file with the right serial to be generated. * When the file is finally available, it is sent to the caller. * * If it's not an AXFR, then we do as ever. */ #ifdef DEBUG log_debug("server_process_tcp_thread_start scheduling job"); #endif thread_pool_enqueue_call(server_tcp_thread_pool, server_process_tcp_thread, parm, NULL, "server_process_tcp_thread_start"); } else { log_debug("server_process_tcp_thread_start tcp overflow"); close_ex(parm->sockfd); free(parm); } #ifdef DEBUG log_debug("server_process_tcp_thread_start end"); #endif } /******************************************************************************************************************* * * Server init, load, start, stop and exit * ******************************************************************************************************************/ /** @brief Startup server with all its processes * * Never returns. Ends with the program. */ ya_result server_run() { log_info("server starting with pid %lu", getpid()); #if HAS_RRL_SUPPORT // Sets the RRL rrl_init(); #endif // Resets the statistics if(!server_statistics_initialised) { server_statistics_initialised = TRUE; ZEROMEMORY(&server_statistics, sizeof (server_statistics_t)); mutex_init(&server_statistics.mtx); } // Initialises the TCP thread pool (used to answer to TCP queries) if((server_tcp_thread_pool != NULL) && (thread_pool_get_size(server_tcp_thread_pool) != g_config->max_tcp_queries)) { // the thread-pool size is wrong ya_result return_code; if(FAIL(return_code = thread_pool_resize(server_tcp_thread_pool, g_config->max_tcp_queries))) { return return_code; } if(return_code != g_config->max_tcp_queries) { log_err("could not properly set the TCP handlers"); return ERROR; } } if(server_tcp_thread_pool == NULL) { server_tcp_thread_pool = thread_pool_init_ex(g_config->max_tcp_queries, g_config->max_tcp_queries * 2, "server-tcp-tp"); if(server_tcp_thread_pool == NULL) { log_err("tcp thread pool init failed"); return ERROR; } } if(server_disk_thread_pool == NULL) { server_disk_thread_pool = thread_pool_init_ex(4, 64, "disk-io"); if(server_tcp_thread_pool == NULL) { log_warn("disk thread pool init failed"); return ERROR; } } OSDEBUG(termout, "I come to serve ...\n"); log_info("I come to serve ..."); /** I could not resist ... */ /* Initialises the TCP usage limit structure (It's global and defined at the beginning of server.c */ poll_alloc(g_config->max_tcp_queries); /* Go to work */ log_debug("thread count by address: %i", g_config->thread_count_by_address); server_mt_query_loop(); /* Proper shutdown. All this could be simply dropped since it takes time for "nothing". * But it's good to check that nothing is broken. */ poll_free(); log_info("clearing context"); thread_pool_destroy(server_tcp_thread_pool); server_tcp_thread_pool = NULL; thread_pool_destroy(server_disk_thread_pool); server_disk_thread_pool = NULL; /* Clear config struct and close all fd's */ server_context_clear(g_config); #if HAS_RRL_SUPPORT rrl_finalize(); #endif return SUCCESS; } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-unfreeze.h0000644000077100007710000000012412650131756025043 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.984344 30 ctime=1454597653.059344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-unfreeze.h0000664000077100007710000000374312650131756024657 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #include "zone_desc.h" void database_service_zone_unfreeze(zone_desc_s *zone_desc); /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-download.c0000644000077100007710000000012412650131756025022 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.977344 30 ctime=1454597653.235344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-download.c0000664000077100007710000003103612650131756024632 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup database Routines for database manipulations * @ingroup yadifad * @brief database functions * * Implementation of routines for the database * - add zone file(s) * - clear zone file(s) * - print zone files(s) * - load db * - download db * - lookup database result of a message * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include "config.h" #include #include #include #include #include "database-service.h" #include "axfr.h" #include "ixfr.h" #define MODULE_MSG_HANDLE g_server_logger #define DBLOADQ_TAG 0x5144414f4c4244 /**********************************************************************************************************************/ struct database_service_zone_download_parms_s { u16 qtype; u8 origin[MAX_DOMAIN_LENGTH]; }; typedef struct database_service_zone_download_parms_s database_service_zone_download_parms_s; static ya_result database_service_zone_download_xfr(u16 qtype, const u8 *origin) { ya_result return_value; #ifdef DEBUG log_debug("database_service_zone_download_xfr(%{dnstype},%{dnsname})", &qtype, origin); #endif zone_desc_s *zone_desc = zone_acquirebydnsname(origin); /* * If the zone descriptor (config) exists and it can be locked by the loader ... */ if(zone_desc == NULL) { log_debug1("database_service_zone_download_thread: no zone settings for '%{dnsname}'", origin); return ERROR; } log_debug1("database_service_zone_download_thread: locking zone '%{dnsname}' for loading", origin); // locks the descriptor with the loader identity if(FAIL(return_value = zone_lock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC))) { log_debug1("database_service_zone_download_thread: failed to lock zone settings for '%{dnsname}'", origin); zone_release(zone_desc); return return_value; } const u32 must_be_off = ZONE_STATUS_DOWNLOADING_XFR_FILE | ZONE_STATUS_DOWNLOADED | ZONE_STATUS_LOAD | ZONE_STATUS_LOADING; if((zone_desc->status_flags & must_be_off) != 0) { zone_unlock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); log_debug1("database_service_zone_download_thread: invalid status for '%{dnsname}'", origin); zone_release(zone_desc); return ERROR; } zone_desc->status_flags |= ZONE_STATUS_DOWNLOADING_XFR_FILE; zone_unlock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); zdb_zone *zone = zdb_acquire_zone_read_from_fqdn(g_config->database, origin); // ACQUIRES (obviously) if(zone != NULL) { soa_rdata soa; u32 local_serial; zdb_zone_lock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); return_value = zdb_zone_getsoa(zone, &soa); //return_value = zdb_zone_getserial(zone, &local_serial); zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); local_serial = soa.serial; if(ISOK(return_value)) { log_debug("database_service_zone_download_thread: serial of %{dnsname} on the server is %d", origin, local_serial); u32 master_serial; zone_lock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); return_value = message_query_serial(origin, zone_desc->masters, &master_serial); zone_unlock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); if(ISOK(return_value)) { log_debug("database_service_zone_download_thread: serial of %{dnsname} on the master is %d", origin, master_serial); if(serial_le(master_serial, local_serial)) { if(serial_lt(master_serial, local_serial)) { log_warn("database_service_zone_download_thread: serial of %{dnsname} is lower on the master", origin); } log_debug("database_service_zone_download_thread: serial of %{dnsname} is not lower than the one on the master", origin); zone_lock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); zone_desc->status_flags &= ~(ZONE_STATUS_DOWNLOADING_XFR_FILE|ZONE_STATUS_PROCESSING); zone_desc->refresh.refreshed_time = time(NULL); zone_desc->refresh.retried_time = zone_desc->refresh.refreshed_time; u32 next_refresh = zone_desc->refresh.refreshed_time + soa.refresh; EPOCH_DEF(next_refresh); log_info("database: refresh: zone %{dnsname}: refreshed, next one at %w", origin, EPOCH_REF(next_refresh)); database_zone_refresh_maintenance_wih_zone(zone, next_refresh); zdb_zone_release(zone); database_fire_zone_downloaded(origin, TYPE_NONE, local_serial, SUCCESS); zone_unlock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); zone_release(zone_desc); return SUCCESS; } } else { log_err("database: could not get the serial of %{dnsname} from the master @%{hostaddr}: %r", zone_desc->origin, zone_desc->masters, return_value); } } } // get ready with the download of the AXFR/IXFR zone_lock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); host_address *servers = host_address_copy_list(zone_desc->masters); zone_unlock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); u32 loaded_serial = ~0; u16 transfer_type = 0; switch(qtype) { case TYPE_AXFR: { log_info("slave: %{dnsname} AXFR query to the master", origin); if(ISOK(return_value = axfr_query(servers, origin, &loaded_serial))) { zone_lock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); zone_desc->refresh.refreshed_time = time(NULL); zone_desc->status_flags |= ZONE_STATUS_DOWNLOADED; zone_unlock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); transfer_type = (u16)return_value; if(transfer_type != 0) { log_info("slave: loaded %{dnstype} for domain %{dnsname} from master at %{hostaddr}, serial is %d", &qtype, origin, servers, loaded_serial); } } else { log_err("slave: query error for domain %{dnsname} from master at %{hostaddr}: %r", origin, servers, return_value); } break; } case TYPE_IXFR: { log_info("slave: %{dnsname} IXFR query to the master", origin); if(zone == NULL) { log_err("slave: zone %{dnsname} is not in the database", origin); return_value = ERROR; break; } if((zone_desc->flags & ZONE_FLAG_NO_MASTER_UPDATES) == 0) { if(ISOK(return_value = ixfr_query(servers, zone, &loaded_serial))) { zone_lock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); zone_desc->refresh.refreshed_time = time(NULL); zone_unlock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); transfer_type = (u16)return_value; if(transfer_type != 0) { log_info("slave: loaded %{dnstype} for domain %{dnsname} from master at %{hostaddr}, new serial is %d", &qtype, origin, servers, loaded_serial); } } else { log_err("slave: query error for domain %{dnsname} from master at %{hostaddr}: %r", origin, servers, return_value); } } else { log_info("slave: master updates for domain %{dnsname} disabled by configuration", origin); loaded_serial = 0; } // else XFRs to the master are disabled break; } default: { log_err("slave: %{hostaddr} gave unexpected answer type %{dnstype} for domain %{dnsname}", servers, &qtype, origin); break; } } if(zone != NULL) { zdb_zone_release(zone); } zone_lock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); zone_desc->status_flags &= ~(ZONE_STATUS_DOWNLOADING_XFR_FILE|ZONE_STATUS_PROCESSING); database_fire_zone_downloaded(origin, transfer_type, loaded_serial, return_value); zone_unlock(zone_desc, ZONE_LOCK_DOWNLOAD_DESC); #ifdef DEBUG log_debug("database_service_zone_download_thread(%{dnstype},%{dnsname}) done", &qtype, origin); #endif zone_release(zone_desc); host_address_delete_list(servers); return SUCCESS; } static void* database_service_zone_download_thread(void *parms) { #ifdef DEBUG log_debug("database_service_zone_download_thread(%p)", parms); #endif database_service_zone_download_parms_s *database_service_zone_download_parms = (database_service_zone_download_parms_s*)parms; const u8 *origin = database_service_zone_download_parms->origin; u16 qtype = database_service_zone_download_parms->qtype; database_service_zone_download_xfr(qtype, origin); free(database_service_zone_download_parms); database_service_zone_download_parms = NULL; return NULL; } void database_service_zone_axfr_query(const u8 *origin) { #ifdef DEBUG log_debug("database_service_zone_axfr_query(%{dnsname})", origin); #endif database_service_zone_download_parms_s *parm; MALLOC_OR_DIE(database_service_zone_download_parms_s*, parm, sizeof(database_service_zone_download_parms_s), GENERIC_TAG); parm->qtype = TYPE_AXFR; dnsname_copy(parm->origin, origin); database_service_zone_download_queue_thread(database_service_zone_download_thread, parm, NULL, "database_service_zone_download_thread"); } void database_service_zone_ixfr_query(const u8 *origin) { #ifdef DEBUG log_debug("database_service_zone_ixfr_query(%{dnsname})", origin); #endif database_service_zone_download_parms_s *parm; MALLOC_OR_DIE(database_service_zone_download_parms_s*, parm, sizeof(database_service_zone_download_parms_s), GENERIC_TAG); parm->qtype = TYPE_IXFR; dnsname_copy(parm->origin, origin); database_service_zone_download_queue_thread(database_service_zone_download_thread, parm, NULL, "database_service_zone_download_thread"); } /** * @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/ctrl.c0000644000077100007710000000012412650131756020006 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.966344 30 ctime=1454597653.315344534 yadifa-2.1.6-5826/sbin/yadifad/ctrl.c0000664000077100007710000000556012650131756017621 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup server * @ingroup yadifad * @brief server * * Handles queries made in the CH class (ie: version.*) * * @{ */ /*----------------------------------------------------------------------------*/ #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #include "server-config.h" #include "confs.h" #include "signals.h" #include "acl.h" #include "notify.h" #include "ctrl.h" #include "database-service.h" #ifdef HAS_CTRL extern logger_handle* g_server_logger; /* Zone file variables */ extern zone_data_set database_zone_desc; static config_control g_ctrl_config = { TRUE }; void ctrl_set_enabled(bool b) { g_ctrl_config.enabled = b; } bool ctrl_get_enabled() { return g_ctrl_config.enabled; } #endif // HAS_CTRL /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-desc-unload.h0000644000077100007710000000012412650131756025416 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.997344 30 ctime=1454597653.038344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-desc-unload.h0000664000077100007710000000374512650131756025234 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #include "zone_desc.h" void database_service_zone_desc_unload(zone_desc_s *zone_desc); /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/configure0000644000077100007710000000013212654662544020611 xustar000000000000000030 mtime=1454597476.839344534 30 atime=1454597476.344344534 30 ctime=1454597653.006344534 yadifa-2.1.6-5826/sbin/yadifad/configure0000775000077100007710000232552112654662544020434 0ustar00yadifayadifa00000000000000#! /bin/sh # From configure.ac Revision: 5826 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for yadifad 2.1.6-5826. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: bugreport@yadifa.eu about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='yadifad' PACKAGE_TARNAME='yadifad' PACKAGE_VERSION='2.1.6-5826' PACKAGE_STRING='yadifad 2.1.6-5826' PACKAGE_BUGREPORT='bugreport@yadifa.eu' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS HAS_LTO_SUPPORT_FALSE HAS_LTO_SUPPORT_TRUE DNSLG DNSZONE DNSDB DNSCORE OPENSSL HAS_RRCACHE_ENABLED_FALSE HAS_RRCACHE_ENABLED_TRUE HAS_RDTSC_FALSE HAS_RDTSC_TRUE HAS_TCL_FALSE HAS_TCL_TRUE HAS_DROPALL_SUPPORT_FALSE HAS_DROPALL_SUPPORT_TRUE HAS_MIRROR_SUPPORT_FALSE HAS_MIRROR_SUPPORT_TRUE HAS_NSEC_SUPPORT_FALSE HAS_NSEC_SUPPORT_TRUE HAS_NSEC3_SUPPORT_FALSE HAS_NSEC3_SUPPORT_TRUE HAS_DNSSEC_SUPPORT_FALSE HAS_DNSSEC_SUPPORT_TRUE HAS_SOCKADDR_IN6_SIN6_LEN_FALSE HAS_SOCKADDR_IN6_SIN6_LEN_TRUE HAS_SOCKADDR_IN_SIN_LEN_FALSE HAS_SOCKADDR_IN_SIN_LEN_TRUE HAS_SOCKADDR_SA_LEN_FALSE HAS_SOCKADDR_SA_LEN_TRUE logdir HAS_LOGDIR HAS_LOGDIR_FALSE HAS_LOGDIR_TRUE HAS_NON_AA_AXFR_SUPPORT HAS_NON_AA_AXFR_SUPPORT_FALSE HAS_NON_AA_AXFR_SUPPORT_TRUE HAS_FULL_ASCII7 HAS_FULL_ASCII7_FALSE HAS_FULL_ASCII7_TRUE HAS_LOG_PID_ALWAYS_ON HAS_LOG_PID_ALWAYS_ON_FALSE HAS_LOG_PID_ALWAYS_ON_TRUE HAS_LOG_THREAD_ID_ALWAYS_ON HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE HAS_MUTEX_DEBUG_SUPPORT HAS_MUTEX_DEBUG_SUPPORT_FALSE HAS_MUTEX_DEBUG_SUPPORT_TRUE HAS_BFD_DEBUG_SUPPORT HAS_BFD_DEBUG_SUPPORT_FALSE HAS_BFD_DEBUG_SUPPORT_TRUE HAS_MALLOC_DEBUG_SUPPORT HAS_MALLOC_DEBUG_SUPPORT_FALSE HAS_MALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_DEBUG_SUPPORT HAS_ZALLOC_DEBUG_SUPPORT_FALSE HAS_ZALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_STATISTICS_SUPPORT HAS_ZALLOC_STATISTICS_SUPPORT_FALSE HAS_ZALLOC_STATISTICS_SUPPORT_TRUE HAS_ZALLOC_SUPPORT HAS_ZALLOC_SUPPORT_FALSE HAS_ZALLOC_SUPPORT_TRUE HAS_RRSIG_MANAGEMENT_SUPPORT HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE HAS_DYNUPDATE_SUPPORT HAS_DYNUPDATE_SUPPORT_FALSE HAS_DYNUPDATE_SUPPORT_TRUE HAS_TSIG_SUPPORT HAS_TSIG_SUPPORT_FALSE HAS_TSIG_SUPPORT_TRUE HAS_ACL_SUPPORT HAS_ACL_SUPPORT_FALSE HAS_ACL_SUPPORT_TRUE HAS_NSID_SUPPORT HAS_NSID_SUPPORT_FALSE HAS_NSID_SUPPORT_TRUE HAS_CTRL HAS_MASTER_SUPPORT HAS_MASTER_SUPPORT_FALSE HAS_MASTER_SUPPORT_TRUE HAS_MESSAGES_SUPPORT HAS_MESSAGES_SUPPORT_FALSE HAS_MESSAGES_SUPPORT_TRUE HAS_RRL_SUPPORT HAS_RRL_SUPPORT_FALSE HAS_RRL_SUPPORT_TRUE HAS_CTRL_DYNAMIC_PROVISIONING HAS_CTRL_DYNAMIC_PROVISIONING_FALSE HAS_CTRL_DYNAMIC_PROVISIONING_TRUE HAS_CTRL_FALSE HAS_CTRL_TRUE HAS_BIG_ENDIAN HAS_LITTLE_ENDIAN HAS_BIG_ENDIAN_FALSE HAS_BIG_ENDIAN_TRUE HAS_LITTLE_ENDIAN_FALSE HAS_LITTLE_ENDIAN_TRUE HAS_MEMALIGN_ISSUES_FALSE HAS_MEMALIGN_ISSUES_TRUE HAS_CC_RDYNAMIC HAS_CC_RDYNAMIC_FALSE HAS_CC_RDYNAMIC_TRUE HAS_CC_CATCH_UNDEFINED_BEHAVIOR HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE HAS_CC_ADDRESS_SANITIZER_CHECK HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE HAS_CC_NO_OMIT_FRAME_POINTER HAS_CC_NO_OMIT_FRAME_POINTER_FALSE HAS_CC_NO_OMIT_FRAME_POINTER_TRUE HAS_CC_SANITIZE_ADDRESS HAS_CC_SANITIZE_ADDRESS_FALSE HAS_CC_SANITIZE_ADDRESS_TRUE HAS_CC_MISSING_FIELD_INITIALIZERS HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE HAS_CC_EXCEPTIONS HAS_CC_EXCEPTIONS_FALSE HAS_CC_EXCEPTIONS_TRUE HAS_CC_STACK_PROTECTOR HAS_CC_STACK_PROTECTOR_FALSE HAS_CC_STACK_PROTECTOR_TRUE HAS_CC_DWARF4 HAS_CC_DWARF4_FALSE HAS_CC_DWARF4_TRUE HAS_CC_DWARF3 HAS_CC_DWARF3_FALSE HAS_CC_DWARF3_TRUE HAS_CC_DWARF2 HAS_CC_DWARF2_FALSE HAS_CC_DWARF2_TRUE HAS_CC_G3 HAS_CC_G3_FALSE HAS_CC_G3_TRUE HAS_CC_G HAS_CC_G_FALSE HAS_CC_G_TRUE HAS_CC_WALL HAS_CC_WALL_FALSE HAS_CC_WALL_TRUE HAS_CC_M64 HAS_CC_M64_FALSE HAS_CC_M64_TRUE HAS_CC_M32 HAS_CC_M32_FALSE HAS_CC_M32_TRUE HAS_CC_XC99 HAS_CC_XC99_FALSE HAS_CC_XC99_TRUE HAS_CC_STD_C99 HAS_CC_STD_C99_FALSE HAS_CC_STD_C99_TRUE HAS_CC_STD_GNU99 HAS_CC_STD_GNU99_FALSE HAS_CC_STD_GNU99_TRUE HAS_CC_PEDANTIC HAS_CC_PEDANTIC_FALSE HAS_CC_PEDANTIC_TRUE HAS_CC_ANSI_ALIAS HAS_CC_ANSI_ALIAS_FALSE HAS_CC_ANSI_ALIAS_TRUE HAS_CC_ANSI HAS_CC_ANSI_FALSE HAS_CC_ANSI_TRUE HAS_CC_NO_IDENT HAS_CC_NO_IDENT_FALSE HAS_CC_NO_IDENT_TRUE HAS_CC_TUNE_NATIVE HAS_CC_TUNE_NATIVE_FALSE HAS_CC_TUNE_NATIVE_TRUE CCOPTIMISATIONFLAGS USES_UNKNOWN_FALSE USES_UNKNOWN_TRUE USES_SUNC_FALSE USES_SUNC_TRUE USES_CLANG_FALSE USES_CLANG_TRUE USES_GCC_FALSE USES_GCC_TRUE USES_ICC_FALSE USES_ICC_TRUE FORCE64BITS_FALSE FORCE64BITS_TRUE FORCE32BITS_FALSE FORCE32BITS_TRUE HAS_CPU_AMDINTEL_FALSE HAS_CPU_AMDINTEL_TRUE HAS_CPU_NIAGARA_FALSE HAS_CPU_NIAGARA_TRUE IS_SOLARIS_FAMILY IS_SOLARIS_FAMILY_FALSE IS_SOLARIS_FAMILY_TRUE IS_LINUX_FAMILY IS_LINUX_FAMILY_FALSE IS_LINUX_FAMILY_TRUE IS_BSD_FAMILY IS_BSD_FAMILY_FALSE IS_BSD_FAMILY_TRUE IS_DARWIN_OS IS_DARWIN_OS_FALSE IS_DARWIN_OS_TRUE CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC build_os build_vendor build_cpu build AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_largefile enable_force32bits enable_force64bits enable_ctrl_dynamic_provisioning enable_rrl enable_messages enable_master enable_ctrl enable_nsid enable_acl enable_tsig enable_dynupdate enable_rrsig_management enable_zalloc enable_zalloc_statistics enable_zalloc_debug enable_malloc_debug enable_bfd_debug enable_mutex_debug enable_log_thread_id enable_log_pid enable_full_ascii7 enable_non_aa_axfr_support with_logdir with_openssl_lib with_openssl_include with_openssl with_dnscore with_dnsdb with_dnszone with_dnslg enable_lto ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures yadifad 2.1.6-5826 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/yadifad] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of yadifad 2.1.6-5826:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=no] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --enable-force32bits Forces a 32 bits binary compilation --enable-force64bits Forces a 64 bits binary compilation --enable-ctrl-dynamic-provisioning Enable dynamic provisioning --disable-rrl Disable DNS Response Rate Limiter --enable-messages Enable use messages instead of send (needed if you use more than one IP aliased on the same network interface) --disable-master Disable DNS master --enable-ctrl Enable remote control --disable-nsid Disable NSID support --disable-acl Disable ACL support --disable-tsig Disable TSIG support --disable-dynupdate Disable dynamic update support --disable-rrsig-management Disable RRSIG verification and generation for zones --disable-zalloc Disable zalloc memory system --enable-zalloc-statistics Enable zalloc statistics support --enable-zalloc-debug Enable zalloc debug support --enable-malloc-debug Enable malloc debug support --enable-bfd-debug Enable bfd debug support --enable-mutex-debug Enable mutex debug support --enable-log-thread-id Enable write the thread id in each line of log --enable-log-pid Enable write the pid in each line of log --enable-full-ascii7 Enable YADIFA will now accept ASCII7 characters in DNS names (not recommended) --enable-non-aa-axfr-support Enable Allows AXFR answer from master without AA bit set (Microsoft DNS) --enable-lto Enable LTO support, requires gold linker Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-logdir build sets the directory where to put the log files --with-openssl-lib=DIR Use the openssl library from directory DIR --with-openssl-include=DIR Use the openssl headers from directory DIR --with-openssl=DIR Use the openssl from directory DIR --with-dnscore=DIR Use the dnscore from directory DIR/lib (devs only) --with-dnsdb=DIR Use the dnsdb from directory DIR/lib (devs only) --with-dnszone=DIR Use the dnszone from directory DIR/lib (devs only) --with-dnslg=DIR Use the dnslg from directory DIR/lib (devs only) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF yadifad configure 2.1.6-5826 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------------- ## ## Report this to bugreport@yadifa.eu ## ## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by yadifad $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo echo echo "YADIFAD START" echo "-------------" echo echo cpu_intel_compatible=1 icc_enabled=0 ac_os_workaround_done=0 # requires_tcl=0 requires_ssl=0 requires_dnscore=0 requires_dnsdb=0 requires_dnszone=0 requires_dnslg=0 requires_dnstcl=0 ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='yadifad' VERSION='2.1.6-5826' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 $as_echo_n "checking how to create a pax tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_pax-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' am__tar_="$_am_tar --format=posix -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x pax -w "$$tardir"' am__tar_='pax -L -x pax -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H pax -L' am__tar_='find "$tardir" -print | cpio -o -H pax -L' am__untar='cpio -i -H pax -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_pax}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_pax+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_pax=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 $as_echo "$am_cv_prog_tar_pax" >&6; } # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers server-config.h" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=no fi enable_dlopen=no enable_win32_dll=no # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: case "$(uname -s)" in Darwin) alias libtoolize="glibtoolize" which libtool > /dev/null 2>&1 if [ $? -ne 0 ] then which glibtool > /dev/null 2>&1 if [ $? -eq 0 ] then alias libtool="glibtool" fi fi echo 'brol' | sed 's/brol/truc/' > /dev/null 2>&1 if [ $? -ne 0 ] then alias sed="gsed" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin workaround" >&5 $as_echo "Darwin workaround" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: nothing to do" >&5 $as_echo "nothing to do" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf in -lc" >&5 $as_echo_n "checking for printf in -lc... " >&6; } if ${ac_cv_lib_c_printf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char printf (); int main () { return printf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_printf=yes else ac_cv_lib_c_printf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_printf" >&5 $as_echo "$ac_cv_lib_c_printf" >&6; } if test "x$ac_cv_lib_c_printf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBC 1 _ACEOF LIBS="-lc $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check for Darwin or Linux for ac_header in linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check for Darwin or Linux for ac_header in sys/types.h i386/types.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default" if test "x$ac_cv_type_uint64_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UINT64_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default" if test "x$ac_cv_type_int64_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INT64_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" if test "x$ac_cv_type_long_long" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LONG_LONG 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "$ac_includes_default" if test "x$ac_cv_type_u_char" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_U_CHAR 1 _ACEOF fi cat >>confdefs.h <<_ACEOF #define TCP_LISTENQ 1024 _ACEOF cat >>confdefs.h <<_ACEOF #define MAX_INTERFACES 16 _ACEOF # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi if [ $ac_os_workaround_done -eq 0 ] then ac_os_workaround_done=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of OS this is" >&5 $as_echo_n "checking what kind of OS this is... " >&6; } is_darwin_os=0 is_bsd_family=0 is_solaris_family=0 is_linux_family=0 case "$(uname -s)" in Darwin) is_darwin_os=1 is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OSX" >&5 $as_echo "OSX" >&6; } ;; FreeBSD) is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: BSD" >&5 $as_echo "BSD" >&6; } ;; Linux) is_linux_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 $as_echo "Linux" >&6; } ;; SunOS) is_solaris_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SunOS" >&5 $as_echo "SunOS" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: not specifically supported" >&5 $as_echo "not specifically supported" >&6; } ;; esac if [ "$is_darwin_os" = "" ] then echo "OS detection failed to give relevant results" exit 1; fi if [ $is_darwin_os -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 1 _ACEOF if true; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 0 _ACEOF if false; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi fi if [ $is_bsd_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 1 _ACEOF if true; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 0 _ACEOF if false; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi fi if [ $is_linux_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 1 _ACEOF if true; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 0 _ACEOF if false; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi fi if [ $is_solaris_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 1 _ACEOF if true; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 0 _ACEOF if false; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi fi fi cat >>confdefs.h <<_ACEOF #define DEFAULT_ASSUMED_CPU_COUNT 2 _ACEOF cpu_intel_compatible=1 if false; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi if false; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for the CPU options" >&5 $as_echo_n "checking checking for the CPU options... " >&6; } CPU_UNKNOWN=1 CFLAGS3264= case "$(uname -i 2>/dev/null)" in SUNW,SPARC-Enterprise-T1000) cat >>confdefs.h <<_ACEOF #define HAS_CPU_NIAGARA 1 _ACEOF if true; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: UtrasparcT1" >&5 $as_echo "UtrasparcT1" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=0 ;; *) ;; esac case "$(uname -m)" in x86_64) cat >>confdefs.h <<_ACEOF #define HAS_CPU_AMDINTEL 1 _ACEOF if true; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: AMD/Intel" >&5 $as_echo "AMD/Intel" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=1 ;; *) ;; esac case "${CPU_UNKNOWN}" in 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: generic" >&5 $as_echo "generic" >&6; } ;; 0) ;; esac if [ "$is_solaris_family" = "" ] then echo "OS must be detected first" exit 1 fi if [ $is_solaris_family -eq 1 ] then echo "Solaris ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if either force 32 or 64 bits is enabled" >&5 $as_echo_n "checking if either force 32 or 64 bits is enabled... " >&6; } if [ ! "$enable_force32bits" = "yes" ] then if [ ! "$enable_force64bits" = "yes" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forcing 64 bits" >&5 $as_echo "no, forcing 64 bits" >&6; } enable_force64bits="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else echo "Not Solaris ..." fi echo "Force ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 32 bits is enabled" >&5 $as_echo_n "checking if force 32 bits is enabled... " >&6; } if false; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi # Check whether --enable-force32bits was given. if test "${enable_force32bits+set}" = set; then : enableval=$enable_force32bits; enable_force32bits=yes else enable_force32bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force32bits" >&5 $as_echo "$enable_force32bits" >&6; } case "$enable_force32bits" in yes) CFLAGS3264=-m32 if test $enable_force32bits = yes; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 64 bits is enabled" >&5 $as_echo_n "checking if force 64 bits is enabled... " >&6; } if false; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi # Check whether --enable-force64bits was given. if test "${enable_force64bits+set}" = set; then : enableval=$enable_force64bits; enable_force64bits=yes else enable_force64bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force64bits" >&5 $as_echo "$enable_force64bits" >&6; } case "$enable_force64bits" in yes) CFLAGS3264=-m64 if test $enable_force64bits = yes; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi if [ "$enable_force32" = "yes" ] then echo "cannot do both --enable-force32bits and --enable-force64bits at the same time" exit 1 fi ;; *) ;; esac cat /etc/redhat-version > /dev/null 2>&1 if [ $? -eq 0 ] then is_redhat_family=1 else is_redhat_family=0 fi CFLAGS= VERSION_OPT=--version $CC --version > /dev/null 2>&1 if [ $? -ne 0 ] then $CC -V > /dev/null 2>&1 if [ $? -ne 0 ] then CCVER='0.0' CCNAME='unknown' VERSION_OPT='' else VERSION_OPT='-V' fi fi if [ ! "$VERSION_OPT" = "" ] then CCVER=$($CC $VERSION_OPT 2>&1|head -1|sed 's/[^0-9.]*\([0-9.]*\).*/\1/') if [ "$CCVER" = "" ] then CCVER='0.0' fi CCNAME=$($CC $VERSION_OPT 2>&1|head -1|sed -e 's/.*clang.*/clang/' -e 's/.*gcc.*/gcc/' -e 's/.*icc.*/icc/' -e 's/.*Sun C.*/Sun C/'|tr A-Z a-z) if [ "$CCNAME" = "" ] then CCNAME='unknown' fi else CCVER='0.0' CCNAME='unknown' fi # version opt CCMAJOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $1}') CCMINOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $2}') if [ "$CCMAJOR" = "" ] then CCMAJOR=0 fi if [ "$CCMINOR" = "" ] then CCMINOR=0 fi if [ "$CCNAME" = "gcc" ] then CCOPTIMISATIONFLAGS=-O3 if [ $CCMAJOR -lt 4 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC < 4.0 has optimisations issues with YADIFA." sleep 1 elif [ $CCMAJOR -eq 4 ] then if [ $CCMINOR -lt 6 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC before 4.6 have optimisation issues with YADIFA." sleep 1 elif [ $CCMINOR -eq 6 ] then CCOPTIMISATIONFLAGS=-O2 else # hopefully after 4.6 the issue is fixed ... CCOPTIMISATIONFLAGS=-O3 fi fi if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if true; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "icc" ] then echo "ICC" CCOPTIMISATIONFLAGS=-O3 if true; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi AR=xiar elif [ "$CCNAME" = "clang" ] then echo "CLANG" CCOPTIMISATIONFLAGS=-O3 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if true; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "Sun C" ] then echo "Sun C" CCOPTIMISATIONFLAGS=-xO5 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if true; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi else echo "unsupported compiler" CCNAME=$CC CCOPTIMISATIONFLAGS=-O2 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if true; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi fi # # We've been told RedHat does not like -O3 at all, so ... # if [ $is_redhat_family -ne 0 ] then if [ "$CCOPTIMISATIONFLAGS " eq "-O3" ] then CCOPTIMISATIONFLAGS=-O2 fi fi echo "detected compiler is $CCNAME $CCMAJOR $CCMINOR" CCOPTIMISATIONFLAGS=$CCOPTIMISATIONFLAGS if [ $cpu_intel_compatible -eq 0 ] then if [ $icc_enabled -ne 0 ] then echo "ERROR: cannot enable ICC with CPU other than x86 or amd64" exit 1 fi fi # # AC_COMPILER_SUPPORTS -mtune=native # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mtune=native" >&5 $as_echo_n "checking if compiler supports -mtune=native... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-TUNE_NATIVE.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -mtune=native test-gcc-TUNE_NATIVE.c -o test-gcc-TUNE_NATIVE > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-TUNE_NATIVE* # # AC_COMPILER_SUPPORTS -fno-ident # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-ident" >&5 $as_echo_n "checking if compiler supports -fno-ident... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_IDENT.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-ident test-gcc-NO_IDENT.c -o test-gcc-NO_IDENT > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_IDENT* # # AC_COMPILER_SUPPORTS -ansi # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi" >&5 $as_echo_n "checking if compiler supports -ansi... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi test-gcc-ANSI.c -o test-gcc-ANSI > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI* # # AC_COMPILER_SUPPORTS -ansi-alias # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi-alias" >&5 $as_echo_n "checking if compiler supports -ansi-alias... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI_ALIAS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi-alias test-gcc-ANSI_ALIAS.c -o test-gcc-ANSI_ALIAS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI_ALIAS* # # AC_COMPILER_SUPPORTS -pedantic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -pedantic" >&5 $as_echo_n "checking if compiler supports -pedantic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-PEDANTIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -pedantic test-gcc-PEDANTIC.c -o test-gcc-PEDANTIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-PEDANTIC* # # AC_COMPILER_SUPPORTS -std=gnu99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=gnu99" >&5 $as_echo_n "checking if compiler supports -std=gnu99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_GNU99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=gnu99 test-gcc-STD_GNU99.c -o test-gcc-STD_GNU99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_GNU99* # # AC_COMPILER_SUPPORTS -std=c99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=c99" >&5 $as_echo_n "checking if compiler supports -std=c99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_C99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=c99 test-gcc-STD_C99.c -o test-gcc-STD_C99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_C99* # # AC_COMPILER_SUPPORTS -xc99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -xc99" >&5 $as_echo_n "checking if compiler supports -xc99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-XC99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -xc99 test-gcc-XC99.c -o test-gcc-XC99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-XC99* # # AC_COMPILER_SUPPORTS -m32 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m32" >&5 $as_echo_n "checking if compiler supports -m32... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M32.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m32 test-gcc-M32.c -o test-gcc-M32 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M32* # # AC_COMPILER_SUPPORTS -m64 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m64" >&5 $as_echo_n "checking if compiler supports -m64... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M64.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m64 test-gcc-M64.c -o test-gcc-M64 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M64* # # AC_COMPILER_SUPPORTS -Wall # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Wall" >&5 $as_echo_n "checking if compiler supports -Wall... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-WALL.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Wall test-gcc-WALL.c -o test-gcc-WALL > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-WALL* # # AC_COMPILER_SUPPORTS -g # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g" >&5 $as_echo_n "checking if compiler supports -g... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g test-gcc-G.c -o test-gcc-G > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G* # # AC_COMPILER_SUPPORTS -g3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g3" >&5 $as_echo_n "checking if compiler supports -g3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g3 test-gcc-G3.c -o test-gcc-G3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G3* # # AC_COMPILER_SUPPORTS -gdwarf-2 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-2" >&5 $as_echo_n "checking if compiler supports -gdwarf-2... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF2.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-2 test-gcc-DWARF2.c -o test-gcc-DWARF2 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF2* # # AC_COMPILER_SUPPORTS -gdwarf-3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-3" >&5 $as_echo_n "checking if compiler supports -gdwarf-3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-3 test-gcc-DWARF3.c -o test-gcc-DWARF3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF3* # # AC_COMPILER_SUPPORTS -gdwarf-4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-4" >&5 $as_echo_n "checking if compiler supports -gdwarf-4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF4.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-4 test-gcc-DWARF4.c -o test-gcc-DWARF4 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF4* # # AC_COMPILER_SUPPORTS -fstack-protector --param=ssp-buffer-size=4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fstack-protector --param=ssp-buffer-size=4" >&5 $as_echo_n "checking if compiler supports -fstack-protector --param=ssp-buffer-size=4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STACK_PROTECTOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fstack-protector --param=ssp-buffer-size=4 test-gcc-STACK_PROTECTOR.c -o test-gcc-STACK_PROTECTOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STACK_PROTECTOR* # # AC_COMPILER_SUPPORTS -fexceptions # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fexceptions" >&5 $as_echo_n "checking if compiler supports -fexceptions... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-EXCEPTIONS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fexceptions test-gcc-EXCEPTIONS.c -o test-gcc-EXCEPTIONS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-EXCEPTIONS* # # AC_COMPILER_SUPPORTS -Werror=missing-field-initializers # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=missing-field-initializers" >&5 $as_echo_n "checking if compiler supports -Werror=missing-field-initializers... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-MISSING_FIELD_INITIALIZERS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Werror=missing-field-initializers test-gcc-MISSING_FIELD_INITIALIZERS.c -o test-gcc-MISSING_FIELD_INITIALIZERS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-MISSING_FIELD_INITIALIZERS* # # AC_COMPILER_SUPPORTS -fsanitize=address # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fsanitize=address" >&5 $as_echo_n "checking if compiler supports -fsanitize=address... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-SANITIZE_ADDRESS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fsanitize=address test-gcc-SANITIZE_ADDRESS.c -o test-gcc-SANITIZE_ADDRESS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-SANITIZE_ADDRESS* # # AC_COMPILER_SUPPORTS -fno-omit-frame-pointer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-omit-frame-pointer" >&5 $as_echo_n "checking if compiler supports -fno-omit-frame-pointer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_OMIT_FRAME_POINTER.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-omit-frame-pointer test-gcc-NO_OMIT_FRAME_POINTER.c -o test-gcc-NO_OMIT_FRAME_POINTER > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_OMIT_FRAME_POINTER* # # AC_COMPILER_SUPPORTS -faddress-sanitizer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -faddress-sanitizer" >&5 $as_echo_n "checking if compiler supports -faddress-sanitizer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ADDRESS_SANITIZER_CHECK.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -faddress-sanitizer test-gcc-ADDRESS_SANITIZER_CHECK.c -o test-gcc-ADDRESS_SANITIZER_CHECK > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ADDRESS_SANITIZER_CHECK* # # AC_COMPILER_SUPPORTS -fcatch_undefined_behavior # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fcatch_undefined_behavior" >&5 $as_echo_n "checking if compiler supports -fcatch_undefined_behavior... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-CATCH_UNDEFINED_BEHAVIOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fcatch_undefined_behavior test-gcc-CATCH_UNDEFINED_BEHAVIOR.c -o test-gcc-CATCH_UNDEFINED_BEHAVIOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-CATCH_UNDEFINED_BEHAVIOR* # # AC_COMPILER_SUPPORTS -rdynamic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -rdynamic" >&5 $as_echo_n "checking if compiler supports -rdynamic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-RDYNAMIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -rdynamic test-gcc-RDYNAMIC.c -o test-gcc-RDYNAMIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-RDYNAMIC* { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking if memory accesses must be size-aligned" >&5 $as_echo_n "checking checking if memory accesses must be size-aligned... " >&6; } if false; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat > memalign_issues_test.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc, char** argv) { char* p = (char*)malloc(8); p++; int* intp= (int*)p; *intp=1; return 0; } _ACEOF ${CC} ${CFLAGS} memalign_issues_test.c -o memalign_issues_test > /dev/null 2>&1 has_memalign_issues=0 ./memalign_issues_test > /dev/null 2>&1 if [ $? -ne 0 ]; then has_memalign_issues=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f memalign_issues_test memalign_issues_test.c if test $has_memalign_issues; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MEMALIGN_ISSUES $has_memalign_issues _ACEOF # # AC_ENDIANNESS # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking endianness: " >&5 $as_echo_n "checking endianness: ... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-endian.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_STDIO_H #include #endif #if defined __FreeBSD__ #if HAVE_SYS_ENDIAN_H #include #endif #elif defined __APPLE__ #if HAVE_MACHINE_ENDIAN_H #include #endif #elif defined __sun #if HAVE_SYS_BYTEORDER_H #include #endif #else #if HAVE_ENDIAN_H #include #endif #if HAVE_BYTESWAP_H #include #endif #endif static int magic = 0x00525545; int main(int argc,char** argv) { (void)argc; (void)argv; int pp = -1; int c = -1; #if defined _BIG_ENDIAN pp = 2; #elif defined _LITTLE_ENDIAN pp = 1; #endif #ifdef __BYTE_ORDER #if __BYTE_ORDER == __LITTLE_ENDIAN pp = 1; #elif __BYTE_ORDER == __BIG_ENDIAN pp = 2; #endif // printf("__BYTE_ORDER=%x\n", __BYTE_ORDER); #endif #ifdef _BYTE_ORDER #if _BYTE_ORDER == _LITTLE_ENDIAN pp = 1; #elif _BYTE_ORDER == _BIG_ENDIAN pp = 2; #endif printf("_BYTE_ORDER=%x\n", _BYTE_ORDER); #endif #ifdef BYTE_ORDER #if BYTE_ORDER == LITTLE_ENDIAN pp = 1; #elif BYTE_ORDER == BIG_ENDIAN pp = 2; #endif // printf("BYTE_ORDER=%x\n", BYTE_ORDER); #endif # #ifdef WORDS_BIGENDIAN // printf("WORDS_BIGENDIAN=%x\n", WORDS_BIGENDIAN); if(pp == 1) // could be -1 or 2 { pp = -2; } else { pp = 2; } #endif char *p = (char*)&magic; if(*p == '\0') { c = 2; } else if(*p == 'E') { c = 1; } if((pp < 0) || (c < 0)) { printf("*** WARNING *** preprocessor says %i, real test says %i *** WARNING ***\n", pp, c); } if(c == pp) { return c; } else { return -1; } } _ACEOF $CC test-gcc-endian.c -o test-gcc-endian > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"failed to compile test\"" >&5 $as_echo "\"failed to compile test\"" >&6; } exit 1 fi ./test-gcc-endian if [ $? -eq 1 ] then if true; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if false; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: little" >&5 $as_echo "little" >&6; } else if false; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if true; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: big" >&5 $as_echo "big" >&6; } fi rm -f test-gcc-endian.c* test-gcc-endian for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done for ac_header in stdio.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDIO_H 1 _ACEOF fi done for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRING_H 1 _ACEOF fi done for ac_header in endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default" if test "x$ac_cv_header_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ENDIAN_H 1 _ACEOF fi done for ac_header in syslog.h do : ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYSLOG_H 1 _ACEOF fi done for ac_header in fcntl.h do : ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FCNTL_H 1 _ACEOF fi done for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF fi done for ac_header in linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in byteswap.h do : ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" if test "x$ac_cv_header_byteswap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BYTESWAP_H 1 _ACEOF fi done for ac_header in machine/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "machine/endian.h" "ac_cv_header_machine_endian_h" "$ac_includes_default" if test "x$ac_cv_header_machine_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACHINE_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/time.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIME_H 1 _ACEOF fi done for ac_header in sys/stat.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_stat_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_STAT_H 1 _ACEOF fi done for ac_header in sys/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" if test "x$ac_cv_header_sys_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/byteorder.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/byteorder.h" "ac_cv_header_sys_byteorder_h" "$ac_includes_default" if test "x$ac_cv_header_sys_byteorder_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_BYTEORDER_H 1 _ACEOF fi done for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done for ac_header in netinet/in.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET_IN_H 1 _ACEOF fi done for ac_header in netinet6/in6.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet6/in6.h" "ac_cv_header_netinet6_in6_h" "$ac_includes_default" if test "x$ac_cv_header_netinet6_in6_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET6_IN6_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_spin_init" >&5 $as_echo_n "checking checking for pthread_spin_init... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_spinlock_t lock; pthread_spin_init(&lock, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SPINLOCK 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_setname_np" >&5 $as_echo_n "checking checking for pthread_setname_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __USE_GNU #include int main () { pthread_setname_np(pthread_self(), "myname"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SETNAME_NP 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # # AC_HAS_ENABLE ctrl_dynamic_provisioning # if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL_DYNAMIC_PROVISIONING has been enabled" >&5 $as_echo_n "checking if CTRL_DYNAMIC_PROVISIONING has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl_dynamic_provisioning was given. if test "${enable_ctrl_dynamic_provisioning+set}" = set; then : enableval=$enable_ctrl_dynamic_provisioning; fi # CASE case "y$enable_ctrl_dynamic_provisioning" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl_dynamic_provisioning DONE # # AC_HAS_DISABLE rrl # if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRL_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrl was given. if test "${enable_rrl+set}" = set; then : enableval=$enable_rrl; fi # MSG RESULT # CASE case "y$enable_rrl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrl DONE # # AC_HAS_ENABLE messages # if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MESSAGES_SUPPORT has been enabled" >&5 $as_echo_n "checking if MESSAGES_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-messages was given. if test "${enable_messages+set}" = set; then : enableval=$enable_messages; fi # CASE case "y$enable_messages" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE messages DONE # # AC_HAS_DISABLE master # if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MASTER_SUPPORT has been disabled" >&5 $as_echo_n "checking if MASTER_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-master was given. if test "${enable_master+set}" = set; then : enableval=$enable_master; fi # MSG RESULT # CASE case "y$enable_master" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_dynupdate='no' enable_rrsig_management='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE master DONE # # AC_HAS_ENABLE ctrl # if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL has been enabled" >&5 $as_echo_n "checking if CTRL has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl was given. if test "${enable_ctrl+set}" = set; then : enableval=$enable_ctrl; fi # CASE case "y$enable_ctrl" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl DONE # # AC_HAS_DISABLE nsid # if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NSID_SUPPORT has been disabled" >&5 $as_echo_n "checking if NSID_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-nsid was given. if test "${enable_nsid+set}" = set; then : enableval=$enable_nsid; fi # MSG RESULT # CASE case "y$enable_nsid" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE nsid DONE # # AC_HAS_DISABLE acl # if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ACL_SUPPORT has been disabled" >&5 $as_echo_n "checking if ACL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-acl was given. if test "${enable_acl+set}" = set; then : enableval=$enable_acl; fi # MSG RESULT # CASE case "y$enable_acl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_tsig='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE acl DONE # # AC_HAS_DISABLE tsig # if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if TSIG_SUPPORT has been disabled" >&5 $as_echo_n "checking if TSIG_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-tsig was given. if test "${enable_tsig+set}" = set; then : enableval=$enable_tsig; fi # MSG RESULT # CASE case "y$enable_tsig" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE tsig DONE # # AC_HAS_DISABLE dynupdate # if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if DYNUPDATE_SUPPORT has been disabled" >&5 $as_echo_n "checking if DYNUPDATE_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-dynupdate was given. if test "${enable_dynupdate+set}" = set; then : enableval=$enable_dynupdate; fi # MSG RESULT # CASE case "y$enable_dynupdate" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE dynupdate DONE # # AC_HAS_DISABLE rrsig_management # if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRSIG_MANAGEMENT_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRSIG_MANAGEMENT_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrsig_management was given. if test "${enable_rrsig_management+set}" = set; then : enableval=$enable_rrsig_management; fi # MSG RESULT # CASE case "y$enable_rrsig_management" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrsig_management DONE # # AC_HAS_DISABLE zalloc # if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_SUPPORT has been disabled" >&5 $as_echo_n "checking if ZALLOC_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc was given. if test "${enable_zalloc+set}" = set; then : enableval=$enable_zalloc; fi # MSG RESULT # CASE case "y$enable_zalloc" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE zalloc DONE # # AC_HAS_ENABLE zalloc_statistics # if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_STATISTICS_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_STATISTICS_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_statistics was given. if test "${enable_zalloc_statistics+set}" = set; then : enableval=$enable_zalloc_statistics; fi # CASE case "y$enable_zalloc_statistics" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_statistics DONE # # AC_HAS_ENABLE zalloc_debug # if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_debug was given. if test "${enable_zalloc_debug+set}" = set; then : enableval=$enable_zalloc_debug; fi # CASE case "y$enable_zalloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_debug DONE # # AC_HAS_ENABLE malloc_debug # if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-malloc_debug was given. if test "${enable_malloc_debug+set}" = set; then : enableval=$enable_malloc_debug; fi # CASE case "y$enable_malloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE malloc_debug DONE # # AC_HAS_ENABLE bfd_debug # if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if BFD_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if BFD_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-bfd_debug was given. if test "${enable_bfd_debug+set}" = set; then : enableval=$enable_bfd_debug; fi # CASE case "y$enable_bfd_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE bfd_debug DONE case "$enable_bfd_debug" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlinfo" >&5 $as_echo_n "checking for library containing dlinfo... " >&6; } if ${ac_cv_search_dlinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlinfo (); int main () { return dlinfo (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlinfo+:} false; then : break fi done if ${ac_cv_search_dlinfo+:} false; then : else ac_cv_search_dlinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlinfo" >&5 $as_echo "$ac_cv_search_dlinfo" >&6; } ac_res=$ac_cv_search_dlinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no dl fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sha1_init_ctx" >&5 $as_echo_n "checking for library containing sha1_init_ctx... " >&6; } if ${ac_cv_search_sha1_init_ctx+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sha1_init_ctx (); int main () { return sha1_init_ctx (); ; return 0; } _ACEOF for ac_lib in '' iberty; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sha1_init_ctx=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sha1_init_ctx+:} false; then : break fi done if ${ac_cv_search_sha1_init_ctx+:} false; then : else ac_cv_search_sha1_init_ctx=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sha1_init_ctx" >&5 $as_echo "$ac_cv_search_sha1_init_ctx" >&6; } ac_res=$ac_cv_search_sha1_init_ctx if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo iberty fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bfd_init" >&5 $as_echo_n "checking for library containing bfd_init... " >&6; } if ${ac_cv_search_bfd_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bfd_init (); int main () { return bfd_init (); ; return 0; } _ACEOF for ac_lib in '' bfd; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bfd_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bfd_init+:} false; then : break fi done if ${ac_cv_search_bfd_init+:} false; then : else ac_cv_search_bfd_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bfd_init" >&5 $as_echo "$ac_cv_search_bfd_init" >&6; } ac_res=$ac_cv_search_bfd_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no bfd;exit 1 fi ;; no|*) ;; esac # # AC_HAS_ENABLE mutex_debug # if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MUTEX_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MUTEX_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-mutex_debug was given. if test "${enable_mutex_debug+set}" = set; then : enableval=$enable_mutex_debug; fi # CASE case "y$enable_mutex_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE mutex_debug DONE # # AC_HAS_ENABLE log_thread_id # if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_THREAD_ID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_THREAD_ID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_thread_id was given. if test "${enable_log_thread_id+set}" = set; then : enableval=$enable_log_thread_id; fi # CASE case "y$enable_log_thread_id" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_thread_id DONE # # AC_HAS_ENABLE log_pid # if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_PID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_PID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_pid was given. if test "${enable_log_pid+set}" = set; then : enableval=$enable_log_pid; fi # CASE case "y$enable_log_pid" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_pid DONE # # AC_HAS_ENABLE full_ascii7 # if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if FULL_ASCII7 has been enabled" >&5 $as_echo_n "checking if FULL_ASCII7 has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-full_ascii7 was given. if test "${enable_full_ascii7+set}" = set; then : enableval=$enable_full_ascii7; fi # CASE case "y$enable_full_ascii7" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 1 _ACEOF # CONDITIONAL Y if true; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 0 _ACEOF # CONDITIONAL N if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE full_ascii7 DONE # # AC_HAS_ENABLE non_aa_axfr_support # if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NON_AA_AXFR_SUPPORT has been enabled" >&5 $as_echo_n "checking if NON_AA_AXFR_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-non_aa_axfr_support was given. if test "${enable_non_aa_axfr_support+set}" = set; then : enableval=$enable_non_aa_axfr_support; fi # CASE case "y$enable_non_aa_axfr_support" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE non_aa_axfr_support DONE # # AC_HAS_WITH logdir # if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if logdir has been given" >&5 $as_echo_n "checking if logdir has been given... " >&6; } # ARG WITH # Check whether --with-logdir was given. if test "${with_logdir+set}" = set; then : withval=$with_logdir; # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_WITH_LOGDIR "$with_logdir" // $withval _ACEOF with_logdir="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES logdir="$withval" # ENDIF else # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 0 _ACEOF # CONDITIONAL N if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi with_logdir="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO logdir=${localstatedir}/log/yadifa # ENDIF fi # SUBST # AC_HAS_WITH logdir DONE { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has a sa_len field" >&5 $as_echo_n "checking if sockaddr has a sa_len field... " >&6; } cat > sockaddr_sa_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr sa; sa.sa_len = 4; } _ACEOF has_sockaddr_sa_len=0 ${CC} ${CFLAGS} sockaddr_sa_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_sa_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_sa_len.c sockaddr_sa_len if test $has_sockaddr_sa_len = yes; then HAS_SOCKADDR_SA_LEN_TRUE= HAS_SOCKADDR_SA_LEN_FALSE='#' else HAS_SOCKADDR_SA_LEN_TRUE='#' HAS_SOCKADDR_SA_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_SA_LEN $has_sockaddr_sa_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in has a sin_len field" >&5 $as_echo_n "checking if sockaddr_in has a sin_len field... " >&6; } cat > sockaddr_in_sin_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in sa; sa.sin_len = sizeof(struct sockaddr_in); } _ACEOF has_sockaddr_in_sin_len=0 ${CC} ${CFLAGS} sockaddr_in_sin_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in_sin_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in_sin_len.c sockaddr_in_sin_len if test $has_sockaddr_in_sin_len = yes; then HAS_SOCKADDR_IN_SIN_LEN_TRUE= HAS_SOCKADDR_IN_SIN_LEN_FALSE='#' else HAS_SOCKADDR_IN_SIN_LEN_TRUE='#' HAS_SOCKADDR_IN_SIN_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN_SIN_LEN $has_sockaddr_in_sin_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in6 has a sin6_len field" >&5 $as_echo_n "checking if sockaddr_in6 has a sin6_len field... " >&6; } cat > sockaddr_in6_sin6_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in6 sa; sa.sin6_len = sizeof(struct sockaddr_in6); } _ACEOF has_sockaddr_in6_sin6_len=0 ${CC} ${CFLAGS} sockaddr_in6_sin6_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in6_sin6_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in6_sin6_len.c sockaddr_in6_sin6_len if test $has_sockaddr_in6_sin6_len = yes; then HAS_SOCKADDR_IN6_SIN6_LEN_TRUE= HAS_SOCKADDR_IN6_SIN6_LEN_FALSE='#' else HAS_SOCKADDR_IN6_SIN6_LEN_TRUE='#' HAS_SOCKADDR_IN6_SIN6_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN6_SIN6_LEN $has_sockaddr_in6_sin6_len _ACEOF if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF if true; then HAS_DNSSEC_SUPPORT_TRUE= HAS_DNSSEC_SUPPORT_FALSE='#' else HAS_DNSSEC_SUPPORT_TRUE='#' HAS_DNSSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DNSSEC_SUPPORT 1 _ACEOF if true; then HAS_NSEC3_SUPPORT_TRUE= HAS_NSEC3_SUPPORT_FALSE='#' else HAS_NSEC3_SUPPORT_TRUE='#' HAS_NSEC3_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC3_SUPPORT 1 _ACEOF if true; then HAS_NSEC_SUPPORT_TRUE= HAS_NSEC_SUPPORT_FALSE='#' else HAS_NSEC_SUPPORT_TRUE='#' HAS_NSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC_SUPPORT 1 _ACEOF if false; then HAS_MIRROR_SUPPORT_TRUE= HAS_MIRROR_SUPPORT_FALSE='#' else HAS_MIRROR_SUPPORT_TRUE='#' HAS_MIRROR_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MIRROR_SUPPORT 0 _ACEOF if false; then HAS_DROPALL_SUPPORT_TRUE= HAS_DROPALL_SUPPORT_FALSE='#' else HAS_DROPALL_SUPPORT_TRUE='#' HAS_DROPALL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DROPALL_SUPPORT 0 _ACEOF if false; then HAS_TCL_TRUE= HAS_TCL_FALSE='#' else HAS_TCL_TRUE='#' HAS_TCL_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TCL 0 _ACEOF if false; then HAS_RDTSC_TRUE= HAS_RDTSC_FALSE='#' else HAS_RDTSC_TRUE='#' HAS_RDTSC_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RDTSC 0 _ACEOF if false; then HAS_RRCACHE_ENABLED_TRUE= HAS_RRCACHE_ENABLED_FALSE='#' else HAS_RRCACHE_ENABLED_TRUE='#' HAS_RRCACHE_ENABLED_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RRCACHE_ENABLED 0 _ACEOF requires_dnscore=1 requires_dnsdb=1 requires_dnscore=1 requires_dnszone=1 requires_dnsdb=1 requires_dnscore=1 LDDYN="-Wl,-Bdynamic" LDSTAT="-Wl,-Bstatic" echo -n "checking if -Bstatic & -Bdynamic are supported ... " $CC -Wl,-Bstatic 2>&1|grep Bstatic > /dev/null if [ $? -eq 0 ] then echo "not supported"; LDDYN="" LDSTAT="" else echo "supported"; fi LIBS="$LDDYN $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_gethostbyname=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_gethostbyname+:} false; then : break fi done if ${ac_cv_search_gethostbyname+:} false; then : else ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 $as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_socket+:} false; then : break fi done if ${ac_cv_search_socket+:} false; then : else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi if [ $requires_tcl -eq 1 ] then echo "TCL is required by this setup ..." CFLAGS="$CFLAGS -DWITHTCLINCLUDED -I${tcl_includedir}" LDFLAGS="-L${tcl_libdir} $LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing Tcl_Main" >&5 $as_echo_n "checking for library containing Tcl_Main... " >&6; } if ${ac_cv_search_Tcl_Main+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char Tcl_Main (); int main () { return Tcl_Main (); ; return 0; } _ACEOF for ac_lib in '' ${tcl_version}; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_Tcl_Main=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_Tcl_Main+:} false; then : break fi done if ${ac_cv_search_Tcl_Main+:} false; then : else ac_cv_search_Tcl_Main=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_Tcl_Main" >&5 $as_echo "$ac_cv_search_Tcl_Main" >&6; } ac_res=$ac_cv_search_Tcl_Main if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo "could not find ${tcl_version} :: tcl_includedir=${tcl_includedir} :: tcl_libdir=${tcl_libdir}"; exit 1 fi fi if [ $requires_ssl -eq 1 ] then echo "SSL is required by this setup ..." SSLDEPS="" echo "Finding the SSL dependencies" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing deflate" >&5 $as_echo_n "checking for library containing deflate... " >&6; } if ${ac_cv_search_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflate (); int main () { return deflate (); ; return 0; } _ACEOF for ac_lib in '' z; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_deflate=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_deflate+:} false; then : break fi done if ${ac_cv_search_deflate+:} false; then : else ac_cv_search_deflate=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_deflate" >&5 $as_echo "$ac_cv_search_deflate" >&6; } ac_res=$ac_cv_search_deflate if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi echo "SSLDEPS=${SSLDEPS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SSL is available" >&5 $as_echo_n "checking if SSL is available... " >&6; } ac_check_lib_ssl=0 # Check whether --with-openssl_lib was given. if test "${with_openssl_lib+set}" = set; then : withval=$with_openssl_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LDFLAGS="-L$with_openssl_lib $SSLDEPS $LDFLAGS" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi # Check whether --with-openssl_include was given. if test "${with_openssl_include+set}" = set; then : withval=$with_openssl_include; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CFLAGS="-I$with_openssl_include $CFLAGS $CFLAGS3264" echo "CFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi # Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; echo "yes" OPENSSL="${withval}" CFLAGS="-I$with_openssl/include $CFLAGS $CFLAGS3264" LDFLAGS="-L$with_openssl/lib $SSLDEPS $LDFLAGS" echo "CFLAGS=$CFLAGS" echo "LDFLAGS=$LDFLAGS" ac_check_lib_ssl=1 else echo "no" CFLAGS="$CFLAGS $CFLAGS3264" LDFLAGS="$SSLDEPS $LDFLAGS" echo "CFLAGS=${CFLAGS}" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi if [ $ac_check_lib_ssl -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RSA_new" >&5 $as_echo_n "checking for library containing RSA_new... " >&6; } if ${ac_cv_search_RSA_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char RSA_new (); int main () { return RSA_new (); ; return 0; } _ACEOF for ac_lib in '' crypto; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_RSA_new=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_RSA_new+:} false; then : break fi done if ${ac_cv_search_RSA_new+:} false; then : else ac_cv_search_RSA_new=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RSA_new" >&5 $as_echo "$ac_cv_search_RSA_new" >&6; } ac_res=$ac_cv_search_RSA_new if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5 $as_echo_n "checking for library containing SSL_library_init... " >&6; } if ${ac_cv_search_SSL_library_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char SSL_library_init (); int main () { return SSL_library_init (); ; return 0; } _ACEOF for ac_lib in '' ssl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_SSL_library_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_SSL_library_init+:} false; then : break fi done if ${ac_cv_search_SSL_library_init+:} false; then : else ac_cv_search_SSL_library_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5 $as_echo "$ac_cv_search_SSL_library_init" >&6; } ac_res=$ac_cv_search_SSL_library_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi fi else echo "SSL is not required by this setup" fi if [ $requires_dnscore -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Core library" >&5 $as_echo_n "checking for the DNS Core library... " >&6; } # Check whether --with-dnscore was given. if test "${with_dnscore+set}" = set; then : withval=$with_dnscore; CFLAGS="-I$with_dnscore/include $CFLAGS" LDFLAGS="-L$with_dnscore/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnscore_init in -ldnscore" >&5 $as_echo_n "checking for dnscore_init in -ldnscore... " >&6; } if ${ac_cv_lib_dnscore_dnscore_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnscore $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnscore_init (); int main () { return dnscore_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnscore_dnscore_init=yes else ac_cv_lib_dnscore_dnscore_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnscore_dnscore_init" >&5 $as_echo "$ac_cv_lib_dnscore_dnscore_init" >&6; } if test "x$ac_cv_lib_dnscore_dnscore_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSCORE 1 _ACEOF LIBS="-ldnscore $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnscore ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnscore_init in -ldnscore" >&5 $as_echo_n "checking for dnscore_init in -ldnscore... " >&6; } if ${ac_cv_lib_dnscore_dnscore_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnscore $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnscore_init (); int main () { return dnscore_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnscore_dnscore_init=yes else ac_cv_lib_dnscore_dnscore_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnscore_dnscore_init" >&5 $as_echo "$ac_cv_lib_dnscore_dnscore_init" >&6; } if test "x$ac_cv_lib_dnscore_dnscore_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSCORE 1 _ACEOF LIBS="-ldnscore $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnscore/include $CFLAGS" LDFLAGS="-L../../lib/dnscore/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnscore $LDDYN" fi fi fi if [ $requires_dnsdb -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Database library" >&5 $as_echo_n "checking for the DNS Database library... " >&6; } # Check whether --with-dnsdb was given. if test "${with_dnsdb+set}" = set; then : withval=$with_dnsdb; CFLAGS="-I$with_dnsdb/include $CFLAGS" LDFLAGS="-L$with_dnsdb/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zdb_init in -ldnsdb" >&5 $as_echo_n "checking for zdb_init in -ldnsdb... " >&6; } if ${ac_cv_lib_dnsdb_zdb_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnsdb $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zdb_init (); int main () { return zdb_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnsdb_zdb_init=yes else ac_cv_lib_dnsdb_zdb_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnsdb_zdb_init" >&5 $as_echo "$ac_cv_lib_dnsdb_zdb_init" >&6; } if test "x$ac_cv_lib_dnsdb_zdb_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSDB 1 _ACEOF LIBS="-ldnsdb $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnsdb ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zdb_init in -ldnsdb" >&5 $as_echo_n "checking for zdb_init in -ldnsdb... " >&6; } if ${ac_cv_lib_dnsdb_zdb_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnsdb $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zdb_init (); int main () { return zdb_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnsdb_zdb_init=yes else ac_cv_lib_dnsdb_zdb_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnsdb_zdb_init" >&5 $as_echo "$ac_cv_lib_dnsdb_zdb_init" >&6; } if test "x$ac_cv_lib_dnsdb_zdb_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSDB 1 _ACEOF LIBS="-ldnsdb $LIBS" else exit fi else echo "embedded" CFLAGS="-I${srcdir}/../../lib/dnsdb/include $CFLAGS" LDFLAGS="-L../../lib/dnsdb/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnsdb $LDDYN" fi fi fi if [ $requires_dnszone -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Zone library" >&5 $as_echo_n "checking for the DNS Zone library... " >&6; } # Check whether --with-dnszone was given. if test "${with_dnszone+set}" = set; then : withval=$with_dnszone; CFLAGS="-I$with_dnszone/include $CFLAGS" LDFLAGS="-L$with_dnszone/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnszone_init in -ldnszone" >&5 $as_echo_n "checking for dnszone_init in -ldnszone... " >&6; } if ${ac_cv_lib_dnszone_dnszone_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnszone $LDSTAT -ldnsdb -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnszone_init (); int main () { return dnszone_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnszone_dnszone_init=yes else ac_cv_lib_dnszone_dnszone_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnszone_dnszone_init" >&5 $as_echo "$ac_cv_lib_dnszone_dnszone_init" >&6; } if test "x$ac_cv_lib_dnszone_dnszone_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSZONE 1 _ACEOF LIBS="-ldnszone $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnszone ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnszone_init in -ldnszone" >&5 $as_echo_n "checking for dnszone_init in -ldnszone... " >&6; } if ${ac_cv_lib_dnszone_dnszone_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnszone $LDSTAT -ldnsdb -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnszone_init (); int main () { return dnszone_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnszone_dnszone_init=yes else ac_cv_lib_dnszone_dnszone_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnszone_dnszone_init" >&5 $as_echo "$ac_cv_lib_dnszone_dnszone_init" >&6; } if test "x$ac_cv_lib_dnszone_dnszone_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSZONE 1 _ACEOF LIBS="-ldnszone $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnszone/include $CFLAGS" LDFLAGS="-L../../lib/dnszone/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnszone $LDDYN" fi fi fi if [ $requires_dnslg -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Looking Glass library" >&5 $as_echo_n "checking for the DNS Looking Glass library... " >&6; } # Check whether --with-dnslg was given. if test "${with_dnslg+set}" = set; then : withval=$with_dnslg; CFLAGS="-I$with_dnslg/include $CFLAGS" LDFLAGS="-L$with_dnslg/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnslg_init in -ldnslg" >&5 $as_echo_n "checking for dnslg_init in -ldnslg... " >&6; } if ${ac_cv_lib_dnslg_dnslg_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnslg $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnslg_init (); int main () { return dnslg_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnslg_dnslg_init=yes else ac_cv_lib_dnslg_dnslg_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnslg_dnslg_init" >&5 $as_echo "$ac_cv_lib_dnslg_dnslg_init" >&6; } if test "x$ac_cv_lib_dnslg_dnslg_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSLG 1 _ACEOF LIBS="-ldnslg $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnslg ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnslg_init in -ldnslg" >&5 $as_echo_n "checking for dnslg_init in -ldnslg... " >&6; } if ${ac_cv_lib_dnslg_dnslg_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnslg $LDSTAT -ldnscore $LDDYN $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnslg_init (); int main () { return dnslg_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnslg_dnslg_init=yes else ac_cv_lib_dnslg_dnslg_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnslg_dnslg_init" >&5 $as_echo "$ac_cv_lib_dnslg_dnslg_init" >&6; } if test "x$ac_cv_lib_dnslg_dnslg_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSLG 1 _ACEOF LIBS="-ldnslg $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnslg/include $CFLAGS" LDFLAGS="-L../../lib/dnslg/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnslg $LDDYN" fi fi fi LDFLAGS="$LDFLAGS $LDDYN" LIBS="$LDDYN $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LTO has been enabled" >&5 $as_echo_n "checking if LTO has been enabled... " >&6; } # Check whether --enable-lto was given. if test "${enable_lto+set}" = set; then : enableval=$enable_lto; enable_lto=yes else enable_lto=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lto" >&5 $as_echo "$enable_lto" >&6; } case "$enable_lto" in yes) type -p gold if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: 'gold' not found" >&5 $as_echo "WARNING: 'gold' not found" >&6; } sleep 1 fi if [ ! "$LD" = "" ] then $LD -v |grep -i gold > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: LTO enabled but LD ($LD) is not gold" >&5 $as_echo "WARNING: LTO enabled but LD ($LD) is not gold" >&6; } sleep 1 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: LD not defined" >&5 $as_echo "LD not defined" >&6; } fi if true; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; no|*) if false; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; esac for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done done # Provide a safe default value. : "${ac_cv_func_select_args=int,int *,struct timeval *}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG1 $1 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in bzero memset select socket do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_SA_LEN_TRUE}" && test -z "${HAS_SOCKADDR_SA_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_SA_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN_SIN_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN_SIN_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN_SIN_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN6_SIN6_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DNSSEC_SUPPORT_TRUE}" && test -z "${HAS_DNSSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DNSSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC3_SUPPORT_TRUE}" && test -z "${HAS_NSEC3_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC3_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC_SUPPORT_TRUE}" && test -z "${HAS_NSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MIRROR_SUPPORT_TRUE}" && test -z "${HAS_MIRROR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MIRROR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DROPALL_SUPPORT_TRUE}" && test -z "${HAS_DROPALL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DROPALL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TCL_TRUE}" && test -z "${HAS_TCL_FALSE}"; then as_fn_error $? "conditional \"HAS_TCL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RDTSC_TRUE}" && test -z "${HAS_RDTSC_FALSE}"; then as_fn_error $? "conditional \"HAS_RDTSC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRCACHE_ENABLED_TRUE}" && test -z "${HAS_RRCACHE_ENABLED_FALSE}"; then as_fn_error $? "conditional \"HAS_RRCACHE_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by yadifad $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ yadifad config.status 2.1.6-5826 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "server-config.h") CONFIG_HEADERS="$CONFIG_HEADERS server-config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi make buildinfo.h echo echo "SUMMARY for YADIFAD:" echo "-------------------" echo echo "CC .................................. : $CC" echo "LD .................................. : $LD" echo "AR .................................. : $AR" echo "CFLAGS .............................. : $CFLAGS" echo "CPPFLAGS ............................ : $CPPFLAGS" echo "LDFLAGS ............................. : $LDFLAGS" echo "LIBS ................................ : $LIBS" echo echo "ZALLOC .............................. : $enable_zalloc" echo "ZALLOC STATISTICS ................... : $enable_zalloc_statistics" echo "ZALLOC DEBUG ........................ : $enable_zalloc_debug" echo "ACL ................................. : $enable_acl" echo "TSIG ................................ : $enable_tsig" echo "MASTER .............................. : $enable_master" echo "DYNUPDATE ........................... : $enable_dynupdate" echo "RRSIG MANAGEMENT .................... : $enable_rrsig_management" echo "CTRL ................................ : $enable_ctrl" echo "NSEC ................................ : $enable_nsec" echo "NSEC3 ............................... : $enable_nsec3" echo "RRL ................................. : $enable_rrl" if [ ! "${OPENSSL}" = "" ] then echo echo "Using OpenSLL from .................. : ${OPENSSL}" fi case "$enable_mirror" in yes) echo echo "MIRROR............................... : yes" ;; *) ;; esac echo echo "Install prefix ...................... : $prefix" echo "Install sysconf ..................... : $sysconfdir" echo echo echo "YADIFAD DONE" echo "------------" echo echo yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/missing0000644000077100007710000000013212473710127020267 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597653.207344534 yadifa-2.1.6-5826/sbin/yadifad/missing0000755000077100007710000001533012473710127020100 0ustar00yadifayadifa00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 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, 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/COPYING0000644000077100007710000000012412650131756017731 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.942344 30 ctime=1454597653.166344534 yadifa-2.1.6-5826/sbin/yadifad/COPYING0000664000077100007710000000312012650131756017532 0ustar00yadifayadifa00000000000000 Copyright (c) 2011-2016, EURid. All rights reserved. The YADIFA TM software product is provided under the BSD 3-clause license: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of EURid nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/README0000644000077100007710000000012412654656702017565 xustar000000000000000027 mtime=1454595522.700671 27 atime=1454597464.054344 30 ctime=1454597653.180344534 yadifa-2.1.6-5826/sbin/yadifad/README0000664000077100007710000005773012654656702017406 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ 20160126: YADIFA 2.1.6 Fixes: - fixed an issue where the referral would not be measured for UDP on a optimised build. 20160108: YADIFA 2.1.5 Dynamic updates do not use temporary files anymore which improves their general performance. The statistics now shows the referrals. Fixes: - fixed an issue where getting a huge incremental transfer would prevent the server from answering queries while applying the changes. - fixed an issue serving IXFR that would occur when a incremental change step was bigger than 64KB - fixed an issue for Solaris with the memory alignment fix not active everywhere - fixed an issue on the Solaris build settings - fixed an issue where sometimes yadifad would not find a configuration file given as a parameter with a relative path - fixed an issue where a wild-card would not be properly returned with an AXFR - fixed an issue where dynamically updating a zone at a speed such that the zone file would need to be written multiple times on disk before finishing the previous write could lead to a deadlock 20151026: YADIFA 2.1.4 The zone reader error reporting has been improved. Stacktrace support added for Solaris. Known issue: - Adding and or removing NSEC3PARAM dynamically is not properly handled. Fixes: - fixed an issue where an NSEC3 answer proving a * query would lead to a crash - fixed an issue where a private key may be not recognised as such - fixed an issue where dynamic update prerequisite check would fail a valid match - fixed an issue where zone signature maintenance would only start if all private keys were available. 20150821: YADIFA 2.1.3 Fixes: - fixed an issue that could lead to a crash at startup - fixed an issue where parsing a TYPE#### record would stop the parser prematurely 20150814: YADIFA 2.1.2 The ./configure script has a new option: --enable-full-ascii7 This changes the behaviour of DNS name validation to accept all the ASCII7 characters instead of only the DNS-space ones. Enabling this option is not recommended. Fixes: - fixes an issue where the hmac-shaX identification string sent with a TSIG had the suffix ".sig-alg.reg.int". 20150714: YADIFA 2.1.1 The yadifa command line has a new option: --config|-c file : read the specific configuration file instead of ~/.yadifa.rc Issues detected on the NSEC3 database have now been upgraded from debug to info/warning Fixes: - fixed an issue where, on some cases; the garbage collector for the zones was not triggering for a long time. - fixed an issue in the Makefile (courtesy of DENIC) - fixed an issue where a few bytes could be leaked in some rare cases when failing to unload a zone - fixed an issue in RRL where some values of IPv6 prefix - fixed an issue accepting some answers on IXFR transfers 20150424: YADIFA 2.1.0 New journal file format: This new format addresses a few issues like having maximum journal file and a relatively constant random access time even for very big sizes. The internal messaging queue has been changed to address huge amount of zones. New CHaos queries supported: hostname id.server Known issues: _ building successfully with LTO may require to append both AR=gcc-ar and RANLIB=gcc-ranlib to the ./configure command 20150403: YADIFA 2.0.6 This release is a public release. This minor update's sole purpose is to fix YADIFA builds on OpenBSD. Fixes: - fixed a crash that could occur while sending a massive amount of notifications - OpenBSD builds are fixed. Tested on: OpenBSD 5.6 amd64, standard installation. Configure: ./configure Tested on: OpenBSD 5.6 amd64, with gcc 4.9 installed. Configure: ./configure CC=egcc 20150226: YADIFA 2.0.5 This release is a public release. Fixes: - fixed an issue with huge IXFR transfers as a master - fixed an issue with notifications on slave-slave-master setup - fixed an issue with a potential infinite loop loading an AXFR from a master - fixed missing hmac-sha* from configuration - fixed an issue with TLSA records parsing - fixed an issue with base 16 encoding - fixed an issue parsing * domains - fixed an issue with some RRL motivated answers - increased the maximum number of network interfaces from 5 to 16 - fixed an error in the configuration examples where "statistics" was used instead of "stats" - minor fixes and improvements 20141216: YADIFA 2.0.4 This release is a public release. By popular demand, the default log file directory is now PREFIX/var/log/yadifa. It can be set using --with-logdir=/my/dir Improved build mechanism. It has been tested to work automatically on Linux, FreeBSD, OSX, SunOS. RedHat family builds will use -O2 as maximum optimisations. Note that some optional features are now enabled by default but can be disabled. Fixes: - fixed an issue with the AXFR transfer where the serial number would not be properly taken into account - fixed an issue with the notify mechanism that could occur if the server was only listening to 127.0.0.1 - fixed an issue with bogus DNSKEY records that may potentially lead to a crash in openssl - fixed a reported potential "tmpfile" vulnerability on DEBUG builds (generated with make debug) - fixed an issue with IPv6 connections on some architectures - typos fixes - minor fixes and improvements 20141104: Architecture portability enhancements. On Solaris, if no --enable-force32bits nor --enable-force64bits is set, then 64 bits will be forced (fixes an issue at link-time) ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC3 Extensions Required, dynamically linked, not stripped, no debugging information available PATH=/opt/csw/bin:/usr/ccs/bin:$PATH ./configure --enable-force32bits PATH=/opt/csw/bin:/usr/ccs/bin:$PATH make 20141030: Architecture portability enhancements. FreeBSD 9 FreeBSD dnode3 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 gcc (GCC) 4.2.1 20070831 patched [FreeBSD] ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900044), not stripped Ubuntu Linux dnode10 3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xe3b8601b9b5e59f8c9ce519cacbe9b8ff544ff1d, not stripped OSX Darwin RD-Mac-Mini.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Mach-O 64-bit executable x86_64 20141029: Architecture portability enhancements. uname -a gcc --version file yadifad YellowDog Linux Linux 2.6.29-3.ydl61.4 #1 SMP Mon Sep 7 14:50:27 PDT 2009 ppc64 ppc64 ppc64 GNU/Linux gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available Debian PPC64 Linux 3.2.0-3-powerpc64 #1 SMP Mon Jul 23 08:03:56 UTC 2012 ppc64 GNU/Linux gcc (Debian 4.6.3-8) 4.6.3 ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xedc47c984a4af7eb9a7ecbc0f135e4d064ba08f0, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available 20141016: YADIFA 2.0.2 TCP fallback support on truncation 20140905: YADIFA 2.0.0 This release is a public release Fixes: - fixed a log incorrectly reporting an error when the client didn't close the TCP connection fast enough - fixed an issue with the statistics on TCP queries Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140829: YADIFA 2.0.0-beta3-public This release is a public release - --disable-master feature at configure now builds a slave-only server Fixes: - fixed an issue with TSIG signed queries - fixed an issue with thread pool live resizing - fixed an issue where reading an undeleted obsolete journal ending at the start of a newly transferred zone from the master would incorrectly trigger an error Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140630: YADIFA 2.0.0-beta2-public This release is a public release - basepath disabled - pidpath removed, only pidfile remains - log reopen notification is now timestamped - slave zones no longer complain about missing NSEC/NSEC3 private keys - the error code ZRE_FILE_NOT_FOUND has been replaced by the more accurate code ZRE_NO_VALID_FILE_FOUND - default logging settings no longer output debug Fixes: - fixed issue in flag computation (AD,CD) - fixed an issue with journal truncation sometimes leading to a crash - zone parsing now correctly accepts '#' as a comment marker - zone parsing now rejects wrong fqdn as soon as it reads them, leading to a more accurate error message - removing the last dnskey of a zone no longer crashes the server Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. yadifa remote client commands prototype is now available with the following supported commands: -shutdown shuts down yadifa e.g. ./yadifa -s "192.0.2.1 port 53" -t shutdown -cfgreload reloads the and sections of the yadifad configuration e.g. ./yadifa -s "192.0.2.1 port 53" -t cfgreload -logreopen closes and reopen the log files e.g. ./yadifa -s "192.0.2.1 port 53" -t logreopen -freezeall prevents all zones from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freezeall -freeze prevents a zone from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freeze -q somedomain.eu -unfreezeall enables updates of all zones again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreezeall -unfreeze enables updates of a zone again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreeze -q somedomain.eu In order to work, the allow-control ACL must be defined either in
for the global commands and may also be defined in for the ones targeting a specific zone. e.g. allow-control 127.0.0.1 Note that tsig is not supported in the client yet. 20140528: YADIFA 2.0.0-beta1-public This release is a public release - NSID implemented (enabled at ./configure time with --enable-nsid - generic parser for: - getops - zone file - resolv.conf - configuration - '@' can now be used in a zone file - new binary for controlling 'yadifad' (yadifa) - framework is rewritten for multi core systems - single core server has been removed Fixes: - fixed several minor issues Know issues: - removing all dnskeys from a zone file crashes the server - yadifa has some issues with nodelay, nocork 20130424: YADIFA 1.1.0 _ added DSA signature _ added SHA-256 SHA-384 SHA-512 digest algorithms _ now supports additional DNSSEC algorithms: DSASHA1 DSASHA1_NSEC3 RSASHA256_NSEC3 RSASHA512_NSEC3 _ Respone Rate Limitation implemented (enabled at ./configure time with --enable-rrl) _ --enable-tiny-footprint now reduces the memory usage further by reducing the standard log queue from 2^20 to 2^12 entries _ the general speed has been slightly improved _ dynamic updates pending for more than 3 seconds are now dropped with an error _ dynamic provisioning Fixes: _ fixed a memory leak that could occur at NSEC3 generation when loading the zone failed in a particular way _ fixed a memory leak at ixfr send _ fixed handling of '_' character that was improperly stored in the database _ fixed bandwidth limit settings (tcp stream in and out) not always being taken from the configuration _ fixed TSIG answer verification for notifies _ fixed error codes not being registered and thus logged as unknown hexadecimal error code. _ other minor fixes 20130612: YADIFA 1.0.3 Fixes only (backports from 1.1.0) Fixes: _ fixed an issue preventing YADIFA from being build from another directory _ fixed an issue with OSX systems where gsed has to be used instead of sed _ fixed an issue with the '_' character not being properly handled _ fixed an issue where reading MX record from a zone file would incorrecly be rejected as invalid _ fixed an issue where the OPT record would not be properly written _ fixed an issue where an undefined ACL reference would be silently ignored _ fixed missing code tags for several error codes. From now on unregistered codes are dumped in hexadicimal. _ fixed portability issues with BSD and OSX _ fixed several minor issues 20120921: YADIFA 1.0.2 Fixes only Fixes: _ fixed an issue where the journal file was sometimes not properly closed at the end of a task _ fixed an issue where the TCP usage slots would sometimes wrongly return that they were all being used _ fixed an issue on IXFR processing (slave side) where the type of answer from the master would not be properly detected _ fixed an issue with TSIG on secrets not exactly 16 bytes long (binary form) _ fixed an issue on 32 bits architectures where the sig-validity-* fields would not be properly handled if not set on each zone section. _ slightly improved the replay time of big journal files _ fixed several minor issues Known issues: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120709: YADIFA 1.0.1 _ logging repeat compression is now by channel instead of global Fixes: _ fixed an issue where glibc whould assert if libgcc_s.so (libgcc_s.so.1) and libc.so (libc.so.6) where not available inside the chrooted directory of YADIFA _ fixed an issue in the syslog module Known issues: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120625: YADIFA 1.0.0 _ LTO support can be enabled with --enable-lto but this is not working with clang. LTO does not increase the performance significally _ parallel processing of listening addresses can now be enabled. It can be set using thread-count-by-address in the
section. By default YADIFA will not use parallel processing as this feature has not been as thoroughly tested as the single-thread processing model _ default parameters tuning _ fixes Known issue: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 20120530: YADIFA 1.0.0RC3 _ the configuration parser now ignores undefined logger names and report them with a warning _ syslog messages are now put in the name of "yadifad" instead of the name used for the "syslog" channel _ syslog messages do not print the time from YADIFA anymore _ improved the steps involved in loading a locally cached slave zone _ zones are now loaded in background _ man page yadifad-conf.man5 renamed into yadifad.conf.man5 Fixes: _ AXFR/IXFR answers with the RA bit set are nolonger rejected as invalid _ YADIFA now answers to SIGINT again (shutdown) _ fixed an issue where obsolete AXFR files were not always being deleted _ fixed an issue occurring when both IPv4 and IPv6 were available to handle a notify _ fixed journal replay issue where some RRSIGs records were not properly removed _ fixed an issue occurring with IPv6 queries _ fixed an issue in the generation of a specific NSEC3 error answer _ fixed named query style layout Known issue: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120328: YADIFA 1.0.0RC2 _ fixed logging issue on work file creation error _ fixed an issue where IXFR queries could be rejected as being wrongly formatted _ fixed an issue in the query logging text _ enabled command line options ( -u uid -g gid -d ) 20120319: YADIFA 1.0.0RC1 Is a full functional authoritative name server: - works as primary or secondary name server - AXFR - IXFR - NOTIFY - NSUPDATE - TSIG - CLASSES: - IN - CH (just for version) - TYPES: - AAAA - CNAME - DNSKEY - DS - HINFO - MX - NAPTR - NS - NSEC3 - NSEC3PARAM - NSEC - PTR - RRSIG - SOA - SRV - SSHFP - TXT - Automatic resigning - DNSSEC algorithms: - 5 (RSASHA1) - 7 (RSASHA1-NSEC3 - ACL's KNOWN ISSUES: NSEC3: _ cannot work with multiple NSEC3PARAM chains with mixed OPT-IN/OUT settings _ adding a new NSEC3 chain expects that the master sends the NSEC3PARAM first (it does not seems to be always the case) We have a case where a master starts with 2 thousands NSEC3 opt-out records then adds 6 millions NSEC3 opt-in records but does not give the NSEC3PARAM record first. The slave server rejects them all because it's unable to link them to a chain. (This one has high priority) DNSSEC: _ it is not allowed to change the zone security mode (unsecure, NSEC, or NSEC3). Once the zone is loaded it keeps its security mode. _ dynamic updates of NSEC as well as NSEC3 records are refused QUIT: the server will shutdown on the following conditions: _ detection of an impossible situation or an internal integrity issue (ie: for any reason the SOA has vanished from a zone) _ memory limit reached which prevents any more work _ ipc issue which prevent internal services communication ACL: _ since the access control is set by zone and CHAOS class is not implemented as a configurable zone, it is not possible (yet) to specifically block CHAOS queries. 20111121: YADIFA 0.5.5 - many fixes KNOWN ISSUE: NSEC3 slave zone replay fails. 20110706: YADIFA 0.5.0 - slave mode, AXFR/IXFR (no TSIG yet for the slave-side transfer) - answers to a notify from the master - polls the (first) master on the masters list - maintains the .axfr & .ix files (deletes the obsoletes ones) - TSIG queries are checked - Replays the zone journal on startup after the zone load (journaling) - Answers IXFR queries (journaling) 20110601: YADIFA 0.4.0 Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries with TSIG - nsupdate functionality (journaling) - TSIG on client server side will be transmitted, but not checked - ACL works - The zone has SOA, NS A resource records. 20110524: YADIFA 0.3.0 First release internally of yadifad 20110524115500 GMT+1. Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries - The zone has SOA, NS A resource records. 20091224: YADIFA 0.2.0 _ Answers AXFR queries _ ACL based on IP and TSIG (not all query types are ACL'ed yet) 20091104: YADIFA 0.1.0 YADIFA is a work in progress. The main goal is to have an alternative for BIND or NSD. Version 0.1.0 is an authoritative server only. It has no: - AXFR/IXFR functionality - dynupdate - support for NSEC - support for NSEC3 - caching mechanism - additional tools (eg.dig, dnssectools, drill,...) It has: - a very fast way to give authoritative answer - a very fast method for loading the database and checking the zone files This first release is to have a feeling how it works in an operational environment. TODO Everything what is not implemented, has to be implemented. Most of the code is there, but is not activated. No comformity tests has been done. (This of course is on the todo list) Bug Reports and Mailing Lists Bugs reports should be sent to bugreport@yadifa.eu yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/log_statistics.c0000644000077100007710000000012412651632654022101 xustar000000000000000027 mtime=1453798828.948622 27 atime=1454597463.950344 30 ctime=1454597653.277344534 yadifa-2.1.6-5826/sbin/yadifad/log_statistics.c0000664000077100007710000002064512651632654021715 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logging Server logging * @ingroup yadifad * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "server-config.h" #include "config.h" #define LOG_STATISTICS_C_ #include "log_statistics.h" logger_handle* g_statistics_logger; void log_statistics_legend() { logger_handle_msg(g_statistics_logger, MSG_INFO, "statistics legend: \n" "\n" "input: \n" "\n" "\tin : input count \n" "\tqr : query count \n" "\tni : notify count \n" "\tup : update count \n" "\tdr : dropped count \n" "\tst : total bytes sent (simple queries only) \n" "\tun : undefined opcode count \n" "\trf : referral count\n" "\tax : axfr query count \n" "\tix : ixfr query count \n" "\tov : (tcp) connection overflow \n" "\n" "output:\n" "\n" "\tOK : NOERROR answer count \n" "\tFE : FORMERR answer count \n" "\tSF : SERVFAIL answer count \n" "\tNE : NXDOMAIN answer count \n" "\tNI : NOTIMP answer count \n" "\tRE : REFUSED answer count \n" "\tXD : YXDOMAIN answer count \n" "\tXR : YXRRSET answer count \n" "\tNR : NXRRSET answer count \n" "\tNA : NOTAUTH answer count \n" "\tNZ : NOTZONE answer count \n" "\tBV : BADVERS answer count \n" "\tBS : BADSIG answer count \n" "\tBK : BADKEY answer count \n" "\tBT : BADTIME answer count \n" "\tBM : BADMODE answer count \n" "\tBN : BADNAME answer count \n" "\tBA : BADALG answer count \n" "\tTR : BADTRUNC answer count\n" #if HAS_RRL_SUPPORT "\n" "rrl:\n" "\n" "\tsl : truncated answer count\n" "\tdr : dropped answer count\n" #endif ); } void log_statistics(server_statistics_t *server_statistics) { #ifdef DEBUG zone_dump_allocated(); #endif logger_handle_msg(g_statistics_logger, MSG_INFO, "udp (in=%llu qr=%llu ni=%llu up=%llu " "dr=%llu st=%llu un=%llu " "rf=%llu" ") " "tcp (in=%llu qr=%llu ni=%llu up=%llu " "dr=%llu st=%llu un=%llu " "rf=%llu " "ax=%llu ix=%llu ov=%llu) " "udpa (OK=%llu FE=%llu SF=%llu NE=%llu " "NI=%llu RE=%llu XD=%llu XR=%llu " "NR=%llu NA=%llu NZ=%llu BV=%llu " "BS=%llu BK=%llu BT=%llu BM=%llu " "BN=%llu BA=%llu TR=%llu) " "tcpa (OK=%llu FE=%llu SF=%llu NE=%llu " "NI=%llu RE=%llu XD=%llu XR=%llu " "NR=%llu NA=%llu NZ=%llu BV=%llu " "BS=%llu BK=%llu BT=%llu BM=%llu " "BN=%llu BA=%llu TR=%llu) " #if HAS_RRL_SUPPORT "rrl (sl=%llu dr=%llu)" #endif , // udp server_statistics->udp_input_count, server_statistics->udp_queries_count, server_statistics->udp_notify_input_count, server_statistics->udp_updates_count, server_statistics->udp_dropped_count, server_statistics->udp_output_size_total, server_statistics->udp_undefined_count, server_statistics->udp_referrals_count, // tcp server_statistics->tcp_input_count, server_statistics->tcp_queries_count, server_statistics->tcp_notify_input_count, server_statistics->tcp_updates_count, server_statistics->tcp_dropped_count, server_statistics->tcp_output_size_total, server_statistics->tcp_undefined_count, server_statistics->tcp_referrals_count, server_statistics->tcp_axfr_count, server_statistics->tcp_ixfr_count, server_statistics->tcp_overflow_count, // udp fp server_statistics->udp_fp[RCODE_NOERROR], server_statistics->udp_fp[RCODE_FORMERR], server_statistics->udp_fp[RCODE_SERVFAIL], server_statistics->udp_fp[RCODE_NXDOMAIN], server_statistics->udp_fp[RCODE_NOTIMP], server_statistics->udp_fp[RCODE_REFUSED], server_statistics->udp_fp[RCODE_YXDOMAIN], server_statistics->udp_fp[RCODE_YXRRSET], server_statistics->udp_fp[RCODE_NXRRSET], server_statistics->udp_fp[RCODE_NOTAUTH], server_statistics->udp_fp[RCODE_NOTZONE], server_statistics->udp_fp[RCODE_BADVERS], server_statistics->udp_fp[RCODE_BADSIG], server_statistics->udp_fp[RCODE_BADKEY], server_statistics->udp_fp[RCODE_BADTIME], server_statistics->udp_fp[RCODE_BADMODE], server_statistics->udp_fp[RCODE_BADNAME], server_statistics->udp_fp[RCODE_BADALG], server_statistics->udp_fp[RCODE_BADTRUNC], // tcp fp server_statistics->tcp_fp[RCODE_NOERROR], server_statistics->tcp_fp[RCODE_FORMERR], server_statistics->tcp_fp[RCODE_SERVFAIL], server_statistics->tcp_fp[RCODE_NXDOMAIN], server_statistics->tcp_fp[RCODE_NOTIMP], server_statistics->tcp_fp[RCODE_REFUSED], server_statistics->tcp_fp[RCODE_YXDOMAIN], server_statistics->tcp_fp[RCODE_YXRRSET], server_statistics->tcp_fp[RCODE_NXRRSET], server_statistics->tcp_fp[RCODE_NOTAUTH], server_statistics->tcp_fp[RCODE_NOTZONE], server_statistics->tcp_fp[RCODE_BADVERS], server_statistics->tcp_fp[RCODE_BADSIG], server_statistics->tcp_fp[RCODE_BADKEY], server_statistics->tcp_fp[RCODE_BADTIME], server_statistics->tcp_fp[RCODE_BADMODE], server_statistics->tcp_fp[RCODE_BADNAME], server_statistics->tcp_fp[RCODE_BADALG], server_statistics->tcp_fp[RCODE_BADTRUNC] #if HAS_RRL_SUPPORT , server_statistics->rrl_slip, server_statistics->rrl_drop #endif ); } /* ------------------------------------------------------------ */ /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/zone_data.h0000644000077100007710000000012412650131756021013 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.988344 30 ctime=1454597653.118344534 yadifa-2.1.6-5826/sbin/yadifad/zone_data.h0000664000077100007710000002254612650131756020631 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef ZONE_DATA_H #define ZONE_DATA_H #include #include #include "list.h" #include "acl.h" #ifdef __cplusplus extern "C" { #endif #define ZT_HINT 0 /**< zone file: hint */ #define ZT_MASTER 1 /**< zone file: master */ #define ZT_SLAVE 2 /**< zone file: slave */ #define ZT_STUB 3 /**< zone file: stub */ #define ZT_UNKNOWN 4 /**< zone file: unknown */ #define ZT_STRING_HINT "hint" #define ZT_STRING_MASTER "master" #define ZT_STRING_SLAVE "slave" #define ZT_STRING_STUB "stub" #define ZT_STRING_UNKNOWN "unknown" #define ZONE_DNSSEC_FL_NOSEC 0 #define ZONE_DNSSEC_FL_NSEC 1 #define ZONE_DNSSEC_FL_NSEC3 2 #define ZONE_DNSSEC_FL_NSEC3_OPTOUT 3 #define ZONE_DNSSEC_FL_MASK 7 #define ZONE_CTRL_FLAG_CLONE 1 /* has a parent in the config */ #define ZONE_CTRL_FLAG_EDITED 2 /* has been edited dynamically (it's a dynamic provisioning zone) */ #define ZONE_CTRL_FLAG_READ_FROM_CONF 4 /* has been read from the configuration file */ #define ZONE_CTRL_FLAG_READ_FROM_DIFF 8 /* has been read from the configuration updates file */ #define ZONE_CTRL_FLAG_SAVED_TO_DIFF 16 /* has been saved to the configuration updates file */ #define ZONE_CTRL_FLAG_DYNAMIC 32 /* not used anymore */ #define ZONE_CTRL_FLAG_GENERATE_ZONE 128 #define ZONE_STATUS_STARTING_UP 128 /* before we even tried to load it */ #define ZONE_STATUS_IDLE 0 /* nothing happening */ #define ZONE_STATUS_LOADING 2 /* in the process of loading the zone */ #define ZONE_STATUS_MODIFIED 1 /* has been updated since last write on/load from disk */ #define ZONE_STATUS_SAVETO_ZONE_FILE 4 /* dumping to ... required */ #define ZONE_STATUS_SAVETO_AXFR_FILE 8 #define ZONE_STATUS_SAVING_ZONE_FILE 16 /* dumping to ... at this moment */ #define ZONE_STATUS_SAVING_AXFR_FILE 32 #define ZONE_STATUS_SIGNATURES_UPDATE 256 /* needs to update the signatures (?) */ #define ZONE_STATUS_SIGNATURES_UPDATING 512 /* updating signatures */ #define ZONE_STATUS_DYNAMIC_UPDATE 1024 /* needs to update the database (?) */ #define ZONE_STATUS_DYNAMIC_UPDATING 2048 /* updating the database */ // locks owners #define ZONE_LOCK_NOBODY 0 #define ZONE_LOCK_LOAD 1 #define ZONE_LOCK_UNLOAD 2 #define ZONE_LOCK_LOAD_DESC 3 #define ZONE_LOCK_UNLOAD_DESC 4 #define ZONE_LOCK_REPLACE_DESC 5 #define ZONE_LOCK_UNREGISTER 0xff #define ZONE_NOTIFY_AUTO 1 /* do not automatically notifies servers in the zone */ enum zone_type { UNKNOWN = ZT_UNKNOWN, HINT = ZT_HINT, MASTER = ZT_MASTER, SLAVE = ZT_SLAVE, STUB = ZT_STUB, INVALID = MAX_S32 /* ensures the enum is 32 bits (at least) */ }; typedef enum zone_type zone_type; /** * * About slave refresh: * * REFRESH A 32 bit time interval before the zone should be * refreshed. * RETRY A 32 bit time interval that should elapse before a * failed refresh should be retried. * EXPIRE A 32 bit time value that specifies the upper limit on * the time interval that can elapse before the zone is no * longer authoritative. */ typedef struct zone_data_refresh zone_data_refresh; struct zone_data_refresh { /* last successful refresh time */ u32 refreshed_time; /* last time we retried */ u32 retried_time; /* for the sole use of retry.c (updated and used by it) */ u32 zone_update_next_time; }; typedef struct zone_data_notify zone_data_notify; struct zone_data_notify { /* retry count */ u32 retry_count; /* period in minutes */ u32 retry_period; /* increase of the period (in minutes) after each retry */ u32 retry_period_increase; }; /// @note HAS_DYNAMIC_PROVISIONING typedef struct dynamic_provisioning_s dynamic_provisioning_s; struct dynamic_provisioning_s { u8 version; u8 padding; u16 flags; u32 timestamp; u32 refresh; u32 retry; u32 expire; u32 timestamp_lo; /* 0 for now */ u32 checksum; /* MUST BE LAST FIELD */ }; /// #define ZONE_DESC_MATCH_ORIGIN 0x00000001 #define ZONE_DESC_MATCH_DOMAIN 0x00000002 #define ZONE_DESC_MATCH_FILE_NAME 0x00000004 #define ZONE_DESC_MATCH_MASTERS 0x00000008 #define ZONE_DESC_MATCH_NOTIFIES 0x00000010 #define ZONE_DESC_MATCH_DYNAMIC 0x00000020 #define ZONE_DESC_MATCH_SLAVES 0x00000040 #define ZONE_DESC_MATCH_REFRESH 0x00000080 #define ZONE_DESC_MATCH_NOTIFY 0x00000100 #define ZONE_DESC_MATCH_DNSSEC_MODE 0x00000200 #define ZONE_DESC_MATCH_TYPE 0x00000400 typedef struct zone_data zone_data; struct zone_data { /* fqdn */ u8 *origin; // cannot change /* ascii domain name */ char *domain; // cannot change /* name of the file on disk */ char *file_name; // may change /* The list of the masters (for a slave) */ host_address *masters; // may change /* If master which are the servers to notify for updates * IXFR or AXFR */ host_address *notifies; // may change /* Restrited list of ip address allowed to query */ access_control ac; // may change /* zone refresh settings */ zone_data_refresh refresh; // may change /* zone notify settings */ zone_data_notify notify; // may change #if HAS_DNSSEC_SUPPORT != 0 /* * The newly generated signatures will be valid for that amount of days */ u32 sig_validity_interval; /* * I forgot what it was supposed to be used for */ u32 sig_validity_regeneration; /* * The validity of newly generated signature will be off by at most this */ u32 sig_validity_jitter; /* * The first epoch when a signature will be marked as invalid. */ u32 scheduled_sig_invalid_first; #endif #if HAS_DNSSEC_SUPPORT != 0 u32 dnssec_mode; /* needs to be u32 */ #endif u16 qclass; // cannot change /// @note HAS_DYNAMIC_PROVISIONING dynamic_provisioning_s dynamic_provisioning; host_address *slaves; /// smp_int is_saving_as_text; /* Type of zone file (master, slave, stub, unknown) */ zone_type type; volatile u8 status_flag; volatile u8 notify_flags; /* marks */ mutex_t lock; volatile u8 lock_owner; volatile u8 obsolete_owner; }; #ifdef __cplusplus } #endif #endif /* ZONE_DATA_H */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/server-config.h.in0000644000077100007710000000013212654662541022231 xustar000000000000000030 mtime=1454597473.887344535 30 atime=1454597473.886344535 30 ctime=1454597653.160344534 yadifa-2.1.6-5826/sbin/yadifad/server-config.h.in0000664000077100007710000002245412654662541022046 0ustar00yadifayadifa00000000000000/* server-config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* number of harware core if the auto-detect fails */ #undef DEFAULT_ASSUMED_CPU_COUNT /* always on */ #undef HAS_ACL_SUPPORT /* bfd debug support disabled. */ #undef HAS_BFD_DEBUG_SUPPORT /* i386, Athlon, Opteron, Core2, i3, i5, i7, ... */ #undef HAS_CPU_AMDINTEL /* T1000 has a Niagara cpu */ #undef HAS_CPU_NIAGARA /* remote control disabled. */ #undef HAS_CTRL /* dynamic provisioning disabled. */ #undef HAS_CTRL_DYNAMIC_PROVISIONING /* always on */ #undef HAS_DNSSEC_SUPPORT /* always off */ #undef HAS_DROPALL_SUPPORT /* dynamic update support disabled. */ #undef HAS_DYNUPDATE_SUPPORT /* YADIFA will now accept ASCII7 characters in DNS names (not recommended) disabled. */ #undef HAS_FULL_ASCII7 /* where to put the log files */ #undef HAS_LOGDIR /* write the pid in each line of log disabled. */ #undef HAS_LOG_PID_ALWAYS_ON /* write the thread id in each line of log disabled. */ #undef HAS_LOG_THREAD_ID_ALWAYS_ON /* malloc debug support disabled. */ #undef HAS_MALLOC_DEBUG_SUPPORT /* DNS master disabled. */ #undef HAS_MASTER_SUPPORT /* Define this to enable slow but safe unaligned memory accesses */ #undef HAS_MEMALIGN_ISSUES /* use messages instead of send (needed if you use more than one IP aliased on the same network interface) disabled. */ #undef HAS_MESSAGES_SUPPORT /* always off */ #undef HAS_MIRROR_SUPPORT /* mutex debug support disabled. */ #undef HAS_MUTEX_DEBUG_SUPPORT /* Allows AXFR answer from master without AA bit set (Microsoft DNS) disabled. */ #undef HAS_NON_AA_AXFR_SUPPORT /* always on */ #undef HAS_NSEC3_SUPPORT /* always on */ #undef HAS_NSEC_SUPPORT /* NSID support disabled. */ #undef HAS_NSID_SUPPORT /* The system supports thread names */ #undef HAS_PTHREAD_SETNAME_NP /* The system supports spinlocks */ #undef HAS_PTHREAD_SPINLOCK /* always off */ #undef HAS_RDTSC /* always off */ #undef HAS_RRCACHE_ENABLED /* DNS Response Rate Limiter disabled. */ #undef HAS_RRL_SUPPORT /* RRSIG verification and generation for zones disabled. */ #undef HAS_RRSIG_MANAGEMENT_SUPPORT /* The sockaddr_in6 struct has an sin6_len field */ #undef HAS_SOCKADDR_IN6_SIN6_LEN /* The sockaddr_in struct has an sin_len field */ #undef HAS_SOCKADDR_IN_SIN_LEN /* The sockaddr struct has an sa_len field */ #undef HAS_SOCKADDR_SA_LEN /* always off */ #undef HAS_TCL /* always on */ #undef HAS_TSIG_SUPPORT /* where to put the log files */ #undef HAS_WITH_LOGDIR /* zalloc debug support disabled. */ #undef HAS_ZALLOC_DEBUG_SUPPORT /* zalloc statistics support disabled. */ #undef HAS_ZALLOC_STATISTICS_SUPPORT /* zalloc memory system disabled. */ #undef HAS_ZALLOC_SUPPORT /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_BYTESWAP_H /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the header file. */ #undef HAVE_I386_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_I386_TYPES_H /* Define to 1 if the system has the type `int64_t'. */ #undef HAVE_INT64_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `c' library (-lc). */ #undef HAVE_LIBC /* Define to 1 if you have the `dnscore' library (-ldnscore). */ #undef HAVE_LIBDNSCORE /* Define to 1 if you have the `dnsdb' library (-ldnsdb). */ #undef HAVE_LIBDNSDB /* Define to 1 if you have the `dnslg' library (-ldnslg). */ #undef HAVE_LIBDNSLG /* Define to 1 if you have the `dnszone' library (-ldnszone). */ #undef HAVE_LIBDNSZONE /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_LIMITS_H /* Define to 1 if the system has the type `long long'. */ #undef HAVE_LONG_LONG /* Define to 1 if you have the header file. */ #undef HAVE_MACHINE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_NETINET6_IN6_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_PPC_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BYTEORDER_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSLIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if the system has the type `uint64_t'. */ #undef HAVE_UINT64_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `u_char'. */ #undef HAVE_U_CHAR /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* BSD */ #undef IS_BSD_FAMILY /* OSX */ #undef IS_DARWIN_OS /* LINUX */ #undef IS_LINUX_FAMILY /* SOLARIS */ #undef IS_SOLARIS_FAMILY /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* max nic interfaces */ #undef MAX_INTERFACES /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* TCP queue */ #undef TCP_LISTENQ /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef mode_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ #undef vfork #ifdef DEBUG #define DPRINTF(p) printf p #else #define DPRINTF(p) /* nothing */ #endif /* DEBUG */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/zone-source.h0000644000077100007710000000012412650131756021320 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.057344 30 ctime=1454597653.125344534 yadifa-2.1.6-5826/sbin/yadifad/zone-source.h0000664000077100007710000001207512650131756021132 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #define ZONE_SOURCE_MISSING 0 #define ZONE_SOURCE_EXISTS 1 #define ZONE_SOURCE_OBSOLETE 2 #define ZONE_SOURCE_RELEVANT 4 #define ZONE_SOURCE_TEMPLATE 8 #define ZONE_SOURCE_LOCALE 16 // on disk #define ZONE_SOURCE_REMOTE 32 // on master #define ZONE_SOURCE_LOADED 64 // in DB struct zone_source { u32 serial; u32 base_serial; u32 flags; const char *type_name; }; typedef struct zone_source zone_source; #define ZONE_SOURCE_EMPTY {0, 0, 0, "UNDEFINED"} #define ZONE_SOURCE_INIT(__type_name) {0, 0, 0, (__type_name)} static inline void zone_source_init(zone_source *zs, const char *type_name) { zs->serial = 0; zs->flags = 0; zs->type_name = type_name; } static inline void zone_source_set(zone_source *zs, u32 flags) { zs->flags |= flags; } static inline void zone_source_unset(zone_source *zs, u32 flags) { zs->flags &= ~flags; } static inline bool zone_source_has_flags(zone_source *zs, u32 flags) { return (zs->flags & flags) == flags; } static inline bool zone_source_exists(zone_source *zs) { yassert(zs != NULL); bool ret = zone_source_has_flags(zs, ZONE_SOURCE_EXISTS); return ret; } static inline bool zone_source_is_relevant(zone_source *zs) { yassert(zs != NULL); bool ret = zone_source_has_flags(zs, ZONE_SOURCE_RELEVANT|ZONE_SOURCE_EXISTS); return ret; } static inline void zone_source_disable(zone_source *zs) { yassert(zs != NULL); zs->flags |= ZONE_SOURCE_OBSOLETE; zs->flags &= ~ZONE_SOURCE_RELEVANT; } static inline void zone_source_set_serial(zone_source *zs, u32 serial) { yassert(zs != NULL); zs->serial = serial; zs->base_serial = serial; } static inline void zone_source_set_journal_serial(zone_source *zs, u32 serial) { yassert(zs != NULL); zs->serial = serial; } static inline int zone_source_compare(zone_source *zsa, zone_source *zsb) { yassert(zsa != NULL); yassert(zsb != NULL); if(zone_source_exists(zsa)) { if(zone_source_exists(zsb)) { if(zsa->serial != zsb->serial) { return serial_gt(zsa->serial, zsb->serial)?1:-1; // B or A } else { return 0; // equal } } else { return -1; // A } } else { if(zone_source_exists(zsb)) { return 1; // B } else { return 0; // equaly lame } } } static inline zone_source* zone_source_get_best(zone_source *zsa, zone_source *zsb) { yassert(zsa != NULL); yassert(zsb != NULL); if(zone_source_exists(zsa)) { if(zone_source_exists(zsb)) { if(zsa->serial != zsb->serial) { return serial_gt(zsa->serial, zsb->serial)?zsa:zsb; // B or A } else { return zsa; // equal } } else { return zsa; // A } } else { if(zone_source_exists(zsb)) { return zsb; // B } else { return zsa; // equaly lame } } } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/ctrl_query.c0000644000077100007710000000012412650131756021233 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.072344 30 ctime=1454597653.319344534 yadifa-2.1.6-5826/sbin/yadifad/ctrl_query.c0000664000077100007710000010360412650131756021044 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup server * @ingroup yadifad * @brief server * * Handles queries made in the CH class (ie: version.*) * * @{ */ /*----------------------------------------------------------------------------*/ #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include #include extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #include "confs.h" #include "signals.h" #include "acl.h" #include "ctrl.h" #include "ctrl_zone.h" #include "log_query.h" #include "database-service.h" #include "notify.h" #ifdef HAS_CTRL extern zone_data_set database_zone_desc; // CH fqdn TXT command // freeze zone // unfreeze zone // reload zone // load zone // drop zone /** * The q&d model used types for control. * * Do we want a script model ? A loop could make sense but I don't see a real practical use yet. * * for $z in (a,b,c,d){load $z} * if(whatever) {notify hostname} * * Do we want optional encryption ? (This may be interesting). * * ie: one may want to send a command with a TSIG through an unsafe network. * * If we use TXT we can simply have: * * script. TXT load this;foreach(a,b,c,d){drop $};if(whateverstatus){reload whatever} * key. TXT mycbckeyname * * */ /*****************************************************************************/ static ya_result ctrl_query_parse_no_parameters(packet_unpack_reader_data *pr) { (void)pr; return SUCCESS; } static ya_result ctrl_query_parse_bytes(packet_unpack_reader_data *pr, void *out, u32 out_size) { struct type_class_ttl_rdlen cmd_tctr; packet_reader_skip_fqdn(pr); packet_reader_read(pr, &cmd_tctr, 10); cmd_tctr.rdlen = ntohs(cmd_tctr.rdlen); if(cmd_tctr.rdlen <= out_size) { cmd_tctr.rdlen -= out_size; ya_result return_code = packet_reader_read(pr, out, out_size); return return_code; } else { return ERROR; // not enough bytes } } /* * * rdata = "apple.com" * rdata = "apple.com" CH * rdata = "apple.com" CH "bla bla" * */ static ya_result ctrl_query_parse_fqdn_class_view(packet_unpack_reader_data *pr, u8 *fqdn, u32 fqdn_size, u16 *rclass, char *view, u32 view_size) { struct type_class_ttl_rdlen cmd_tctr; packet_reader_skip_fqdn(pr); packet_reader_read(pr, &cmd_tctr, 10); cmd_tctr.rdlen = ntohs(cmd_tctr.rdlen); fqdn[0] = '\0'; *rclass = CLASS_IN; view[0] = '\0'; if(cmd_tctr.rdlen != 0) { ya_result return_code; u32 from = pr->offset; if(ISOK(return_code = packet_reader_read_fqdn(pr, fqdn, fqdn_size))) { cmd_tctr.rdlen -= pr->offset -from; if(cmd_tctr.rdlen > 2) { if(ISOK(return_code = packet_reader_read(pr, rclass, 2))) { cmd_tctr.rdlen -= 2; if(cmd_tctr.rdlen > 0) { u32 n = MIN(cmd_tctr.rdlen, view_size - 1); if(ISOK(return_code = packet_reader_read(pr, view, n))) { view[n] = '\0'; } } } } else { if(cmd_tctr.rdlen != 0) { return_code = ERROR; // the one forbidden value is 1 byte available } } } return return_code; } else { if(cmd_tctr.rdlen == 0) { return 0; // nothing read } else { return ERROR; // not enough bytes } } } static ya_result ctrl_query_parse_byte_fqdn_class_view(packet_unpack_reader_data *pr, u8* one_byte, u8 *fqdn, u32 fqdn_size, u16 *rclass, char *view, u32 view_size) { struct type_class_ttl_rdlen cmd_tctr; packet_reader_skip_fqdn(pr); packet_reader_read(pr, &cmd_tctr, 10); cmd_tctr.rdlen = ntohs(cmd_tctr.rdlen); fqdn[0] = '\0'; *rclass = CLASS_IN; view[0] = '\0'; if(cmd_tctr.rdlen != 0) { ya_result return_code; u32 from = pr->offset; if(ISOK(return_code = packet_reader_read(pr, one_byte, 1))) { if(ISOK(return_code = packet_reader_read_fqdn(pr, fqdn, fqdn_size))) { cmd_tctr.rdlen -= pr->offset -from; if(cmd_tctr.rdlen > 2) { if(ISOK(return_code = packet_reader_read(pr, rclass, 2))) { cmd_tctr.rdlen -= 2; if(cmd_tctr.rdlen > 0) { u32 n = MIN(cmd_tctr.rdlen, view_size - 1); if(ISOK(return_code = packet_reader_read(pr, view, n))) { view[n] = '\0'; } } } } else { if(cmd_tctr.rdlen != 0) { return_code = ERROR; // the one forbidden value is 1 byte available } } } } return pr->offset - from; } else { if(cmd_tctr.rdlen == 0) { return 0; // nothing read } else { return ERROR; // not enough bytes } } } static void ctrl_query_server_shutdown(message_data *mesg) { packet_unpack_reader_data pr; u16 cmd_type; u16 cmd_class; packet_reader_init(&pr, mesg->buffer, mesg->received); packet_reader_skip(&pr, DNS_HEADER_LENGTH); packet_reader_skip_fqdn(&pr); packet_reader_read_u16(&pr, &cmd_type); ya_result return_code = packet_reader_read_u16(&pr, &cmd_class); u16 qc = ntohs(MESSAGE_QD(mesg->buffer)); u16 pc = ntohs(MESSAGE_AN(mesg->buffer)); u16 an = ntohs(MESSAGE_NS(mesg->buffer)); if(ISOK(return_code) && (qc == 1) && (pc == 0) && (an == 0) && (cmd_type == TYPE_CTRL_SRVSHUTDOWN) && (cmd_class == CLASS_CTRL)) { if(ISOK(return_code = ctrl_query_parse_no_parameters(&pr))) { log_info("ctrl: shutdown"); if(!ACL_REJECTED(acl_check_access_filter(mesg, &g_config->ac.allow_control))) { program_mode = SA_SHUTDOWN; dnscore_shutdown(); mesg->send_length = mesg->received; } else { log_err("ctrl: shutdown: rejected by ACL"); message_make_error(mesg, RCODE_REFUSED); } } else { message_make_error(mesg, RCODE_FORMERR); } } else { message_make_error(mesg, RCODE_FORMERR); } } static void ctrl_query_logger_reopen(message_data *mesg) { packet_unpack_reader_data pr; u16 cmd_type; u16 cmd_class; packet_reader_init(&pr, mesg->buffer, mesg->received); packet_reader_skip(&pr, DNS_HEADER_LENGTH); packet_reader_skip_fqdn(&pr); packet_reader_read_u16(&pr, &cmd_type); ya_result return_code = packet_reader_read_u16(&pr, &cmd_class); u16 qc = ntohs(MESSAGE_QD(mesg->buffer)); u16 pc = ntohs(MESSAGE_AN(mesg->buffer)); u16 an = ntohs(MESSAGE_NS(mesg->buffer)); if(ISOK(return_code) && (qc == 1) && (pc == 0) && (an == 0) && (cmd_type == TYPE_CTRL_SRVLOGREOPEN) && (cmd_class == CLASS_CTRL)) { if(ISOK(return_code = ctrl_query_parse_no_parameters(&pr))) { log_info("ctrl: logger reopen"); if(!ACL_REJECTED(acl_check_access_filter(mesg, &g_config->ac.allow_control))) { logger_reopen(); mesg->send_length = mesg->received; } else { log_err("ctrl: logger reopen: rejected by ACL"); message_make_error(mesg, RCODE_REFUSED); } } else { message_make_error(mesg, RCODE_FORMERR); } } else { message_make_error(mesg, RCODE_FORMERR); } } static void ctrl_query_config_reload(message_data *mesg) { packet_unpack_reader_data pr; u16 cmd_type; u16 cmd_class; packet_reader_init(&pr, mesg->buffer, mesg->received); packet_reader_skip(&pr, DNS_HEADER_LENGTH); packet_reader_skip_fqdn(&pr); packet_reader_read_u16(&pr, &cmd_type); ya_result return_code = packet_reader_read_u16(&pr, &cmd_class); u16 qc = ntohs(MESSAGE_QD(mesg->buffer)); u16 pc = ntohs(MESSAGE_AN(mesg->buffer)); u16 an = ntohs(MESSAGE_NS(mesg->buffer)); if(ISOK(return_code) && (qc == 1) && (pc == 0) && (an == 0) && (cmd_type == TYPE_CTRL_SRVCFGRELOAD) && (cmd_class == CLASS_CTRL)) { if(ISOK(return_code = ctrl_query_parse_no_parameters(&pr))) { log_info("ctrl: config reload"); if(!ACL_REJECTED(acl_check_access_filter(mesg, &g_config->ac.allow_control))) { yadifad_config_update(g_config->config_file); mesg->send_length = mesg->received; } else { log_err("ctrl: config reload: rejected by ACL"); message_make_error(mesg, RCODE_REFUSED); } } else { message_make_error(mesg, RCODE_FORMERR); } } else { message_make_error(mesg, RCODE_FORMERR); } } static void ctrl_query_log_query_enable(message_data *mesg) { packet_unpack_reader_data pr; u16 cmd_type; u16 cmd_class; packet_reader_init(&pr, mesg->buffer, mesg->received); packet_reader_skip(&pr, DNS_HEADER_LENGTH); packet_reader_skip_fqdn(&pr); packet_reader_read_u16(&pr, &cmd_type); ya_result return_code = packet_reader_read_u16(&pr, &cmd_class); u16 qc = ntohs(MESSAGE_QD(mesg->buffer)); u16 pc = ntohs(MESSAGE_AN(mesg->buffer)); u16 an = ntohs(MESSAGE_NS(mesg->buffer)); if(ISOK(return_code) && (qc == 1) && (pc == 1) && (an == 0) && (cmd_type == TYPE_CTRL_SRVQUERYLOG) && (cmd_class == CLASS_CTRL)) { u8 on_off = 0; if(ISOK(return_code = ctrl_query_parse_bytes(&pr, &on_off, 1))) { log_info("ctrl: log query: %hhu", on_off & 1); if(!ACL_REJECTED(acl_check_access_filter(mesg, &g_config->ac.allow_control))) { if((on_off & 1) != 0) { if(g_config->queries_log_type != 0) { log_query_set_mode(g_config->queries_log_type); } else { log_query_set_mode(1); // yadifa } } else { log_query_set_mode(0); // none } mesg->send_length = mesg->received; } else { log_err("ctrl: log query enable: rejected by ACL"); message_make_error(mesg, RCODE_REFUSED); } } } else { message_make_error(mesg, RCODE_FORMERR); } } static void ctrl_query_log_level(message_data *mesg) { packet_unpack_reader_data pr; u16 cmd_type; u16 cmd_class; packet_reader_init(&pr, mesg->buffer, mesg->received); packet_reader_skip(&pr, DNS_HEADER_LENGTH); packet_reader_skip_fqdn(&pr); packet_reader_read_u16(&pr, &cmd_type); ya_result return_code = packet_reader_read_u16(&pr, &cmd_class); u16 qc = ntohs(MESSAGE_QD(mesg->buffer)); u16 pc = ntohs(MESSAGE_AN(mesg->buffer)); u16 an = ntohs(MESSAGE_NS(mesg->buffer)); if(FAIL(return_code) && (qc == 1) && (pc == 1) && (an == 0) && (cmd_type == TYPE_CTRL_SRVLOGLEVEL) && (cmd_class == CLASS_CTRL)) { u8 level = 0; if(ISOK(return_code = ctrl_query_parse_bytes(&pr, &level, 1))) { log_info("ctrl: log level: %hhu", level); if(!ACL_REJECTED(acl_check_access_filter(mesg, &g_config->ac.allow_control))) { logger_set_level(level); mesg->send_length = mesg->received; } else { log_err("ctrl: log level: rejected by ACL"); message_make_error(mesg, RCODE_REFUSED); } } } else { message_make_error(mesg, RCODE_FORMERR); } } /** * Freeze ONE zone * * @param mesg */ /** * * Freeze ALL zones (that are controllable by the current sender) * * The proper way to handle all zones from an external command is to try them one by one * (because of the ACL) * * @param mesg */ static u16 ctrl_query_zone_freeze_all(message_data *mesg) { u32 success = 0; u32 error = 0; zone_set_lock(&database_zone_desc); mesg->send_length = mesg->received; ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&database_zone_desc.set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s *)zone_node->value; if(!ACL_REJECTED(acl_check_access_filter(mesg, &zone_desc->ac.allow_control))) { ya_result return_value; if(ISOK(return_value = ctrl_zone_freeze(zone_desc, FALSE))) { success++; } else { error++; } } else { // no need to handle this, it just means that the controller has no rights on this } } zone_set_unlock(&database_zone_desc); if(success > 0) { // part was ok return RCODE_NOERROR; } else if(error > 0) { // part was wrong return RCODE_SERVFAIL; } else { // no zone accepts this controller return RCODE_REFUSED; } } static void ctrl_query_zone_freeze(message_data *mesg) { packet_unpack_reader_data pr; u16 cmd_type; u16 cmd_class; u16 rclass; u8 fqdn[MAX_DOMAIN_LENGTH]; char view[32]; packet_reader_init(&pr, mesg->buffer, mesg->received); packet_reader_skip(&pr, DNS_HEADER_LENGTH); packet_reader_skip_fqdn(&pr); packet_reader_read_u16(&pr, &cmd_type); ya_result return_code = packet_reader_read_u16(&pr, &cmd_class); u16 qc = ntohs(MESSAGE_QD(mesg->buffer)); u16 pc = ntohs(MESSAGE_AN(mesg->buffer)); u16 an = ntohs(MESSAGE_NS(mesg->buffer)); u16 tmp_status = RCODE_FORMERR; if(ISOK(return_code) && (qc == 1) && (an == 0) && (cmd_type == TYPE_CTRL_ZONEFREEZE) && (cmd_class == CLASS_CTRL)) { if(pc == 1) { if(ISOK(return_code = ctrl_query_parse_fqdn_class_view(&pr, fqdn, sizeof(fqdn), &rclass, view, sizeof(view)))) { log_info("ctrl: zone freeze: '%{dnsname}' %{dnsclass}", fqdn, &rclass); zone_desc_s* zone_desc = zone_acquirebydnsname(fqdn); tmp_status = RCODE_REFUSED; if((zone_desc != NULL) && (rclass == zone_desc->qclass) && (view[0] == '\0')) { tmp_status = RCODE_NOTAUTH; if(!ACL_REJECTED(acl_check_access_filter(mesg, &zone_desc->ac.allow_control))) { ya_result return_value; if(ISOK(return_value = ctrl_zone_freeze(zone_desc, TRUE))) { tmp_status = RCODE_NOERROR; } else { tmp_status = return_value & 0x1f; } } else { log_err("ctrl: zone freeze: rejected by ACL"); } zone_release(zone_desc); } else { log_err("ctrl: zone freeze: zone '%{dnsname}' %{dnsclass} not found", fqdn, &rclass); } } } else if(pc == 0) { tmp_status = ctrl_query_zone_freeze_all(mesg); } } if(tmp_status != RCODE_NOERROR) { message_make_error(mesg, tmp_status); } } /** * * Unfreeze ALL zones (that are controllable by the current sender) * * The proper way to handle all zones from an external command is to try them one by one * (because of the ACL) * * @param mesg */ static u16 ctrl_query_zone_unfreeze_all(message_data *mesg) { u32 success = 0; u32 error = 0; zone_set_lock(&database_zone_desc); mesg->send_length = mesg->received; ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&database_zone_desc.set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s *)zone_node->value; if(!ACL_REJECTED(acl_check_access_filter(mesg, &zone_desc->ac.allow_control))) { ya_result return_value; if(ISOK(return_value = ctrl_zone_unfreeze(zone_desc, FALSE))) { success++; } else { error++; } } else { // no need to handle this, it just means that the controller has no rights on this } } zone_set_unlock(&database_zone_desc); if(success > 0) { // part was ok return RCODE_NOERROR; } else if(error > 0) { // part was wrong return RCODE_SERVFAIL; } else { // no zone accepts this controller return RCODE_REFUSED; } } /** * Unfreeze ONE zone * * @param mesg */ static void ctrl_query_zone_unfreeze(message_data *mesg) { packet_unpack_reader_data pr; u16 cmd_type; u16 cmd_class; u16 rclass; u8 fqdn[MAX_DOMAIN_LENGTH]; char view[32]; packet_reader_init(&pr, mesg->buffer, mesg->received); packet_reader_skip(&pr, DNS_HEADER_LENGTH); packet_reader_skip_fqdn(&pr); packet_reader_read_u16(&pr, &cmd_type); ya_result return_code = packet_reader_read_u16(&pr, &cmd_class); u16 qc = ntohs(MESSAGE_QD(mesg->buffer)); u16 pc = ntohs(MESSAGE_AN(mesg->buffer)); u16 an = ntohs(MESSAGE_NS(mesg->buffer)); u16 tmp_status = RCODE_FORMERR; if(ISOK(return_code) && (qc == 1) && (an == 0) && (cmd_type == TYPE_CTRL_ZONEUNFREEZE) && (cmd_class == CLASS_CTRL)) { if(pc == 1) { if(ISOK(return_code = ctrl_query_parse_fqdn_class_view(&pr, fqdn, sizeof(fqdn), &rclass, view, sizeof(view)))) { log_info("ctrl: zone unfreeze: '%{dnsname}' %{dnsclass}", fqdn, &rclass); zone_desc_s* zone_desc = zone_acquirebydnsname(fqdn); tmp_status = RCODE_REFUSED; if((zone_desc != NULL) && (rclass == zone_desc->qclass) && (view[0] == '\0')) { tmp_status = RCODE_NOTAUTH; if(!ACL_REJECTED(acl_check_access_filter(mesg, &zone_desc->ac.allow_control))) { ya_result return_value; tmp_status = RCODE_SERVFAIL; if(ISOK(return_value = ctrl_zone_unfreeze(zone_desc, TRUE))) { tmp_status = RCODE_NOERROR; mesg->send_length = mesg->received; } else { tmp_status = return_value & 0x1f; } } else { log_err("ctrl: zone unfreeze: rejected by ACL"); } zone_release(zone_desc); } else { log_err("ctrl: zone unfreeze: zone '%{dnsname}' %{dnsclass} not found", fqdn, &rclass); } } } else if(pc == 0) { tmp_status = ctrl_query_zone_unfreeze_all(mesg); } } if(tmp_status != RCODE_NOERROR) { message_make_error(mesg, tmp_status); } } static void ctrl_query_zone_sync(message_data *mesg) { packet_unpack_reader_data pr; u16 cmd_type; u16 cmd_class; u16 rclass; u8 fqdn[MAX_DOMAIN_LENGTH]; char view[32]; packet_reader_init(&pr, mesg->buffer, mesg->received); packet_reader_skip(&pr, DNS_HEADER_LENGTH); packet_reader_skip_fqdn(&pr); packet_reader_read_u16(&pr, &cmd_type); ya_result return_code = packet_reader_read_u16(&pr, &cmd_class); u16 qc = ntohs(MESSAGE_QD(mesg->buffer)); u16 pc = ntohs(MESSAGE_AN(mesg->buffer)); u16 an = ntohs(MESSAGE_NS(mesg->buffer)); u16 tmp_status = RCODE_FORMERR; if(ISOK(return_code) && (qc == 1) && (pc == 1) && (an == 0) && (cmd_type == TYPE_CTRL_ZONESYNC) && (cmd_class == CLASS_CTRL)) { u8 clean; if((return_code = ctrl_query_parse_byte_fqdn_class_view(&pr, &clean, fqdn, sizeof(fqdn), &rclass, view, sizeof(view))) > 0 ) { log_info("ctrl: zone sync: clean=%hhu '%{dnsname}' %{dnsclass}", clean & 1, fqdn, &rclass); zone_desc_s* zone_desc = zone_acquirebydnsname(fqdn); tmp_status = RCODE_REFUSED; if((zone_desc != NULL) && (rclass == zone_desc->qclass) && (view[0] == '\0')) { tmp_status = RCODE_NOTAUTH; if(!ACL_REJECTED(acl_check_access_filter(mesg, &zone_desc->ac.allow_control))) { database_zone_save_ex(fqdn, (clean & 1) != 0); tmp_status = RCODE_NOERROR; mesg->send_length = mesg->received; } else { log_err("ctrl: zone sync: rejected by ACL"); } zone_release(zone_desc); } else { log_err("ctrl: zone sync: zone '%{dnsname}' %{dnsclass} not found", fqdn, &rclass); } } } if(tmp_status != RCODE_NOERROR) { message_make_error(mesg, tmp_status); } } static void ctrl_query_zonenotify(message_data *mesg) { packet_unpack_reader_data pr; u16 cmd_type; u16 cmd_class; u16 rclass; u8 fqdn[MAX_DOMAIN_LENGTH]; char view[32]; packet_reader_init(&pr, mesg->buffer, mesg->received); packet_reader_skip(&pr, DNS_HEADER_LENGTH); packet_reader_skip_fqdn(&pr); packet_reader_read_u16(&pr, &cmd_type); ya_result return_code = packet_reader_read_u16(&pr, &cmd_class); u16 qc = ntohs(MESSAGE_QD(mesg->buffer)); u16 pc = ntohs(MESSAGE_AN(mesg->buffer)); u16 an = ntohs(MESSAGE_NS(mesg->buffer)); u16 tmp_status = RCODE_FORMERR; if(ISOK(return_code) && (qc == 1) && (pc == 1) && (an == 0) && (cmd_type == TYPE_CTRL_ZONENOTIFY) && (cmd_class == CLASS_CTRL)) { if(ISOK(return_code = ctrl_query_parse_fqdn_class_view(&pr, fqdn, sizeof(fqdn), &rclass, view, sizeof(view)))) { log_info("ctrl: zone notify: '%{dnsname}' %{dnsclass}", fqdn, &rclass); zone_desc_s *zone_desc = zone_acquirebydnsname(fqdn); tmp_status = RCODE_REFUSED; if((zone_desc != NULL) && (rclass == zone_desc->qclass) && (view[0] == '\0')) { tmp_status = RCODE_NOTAUTH; if(!ACL_REJECTED(acl_check_access_filter(mesg, &zone_desc->ac.allow_control))) { notify_slaves(fqdn); tmp_status = RCODE_NOERROR; mesg->send_length = mesg->received; } else { log_err("ctrl: zone notify: rejected by ACL"); } zone_release(zone_desc); } } else { log_err("ctrl: zone notify: zone '%{dnsname}' %{dnsclass} not found", fqdn, &rclass); } } if(tmp_status != RCODE_NOERROR) { message_make_error(mesg, tmp_status); } } static void ctrl_query_zonereload(message_data *mesg) { packet_unpack_reader_data pr; u16 cmd_type; u16 cmd_class; u16 rclass; u8 fqdn[MAX_DOMAIN_LENGTH]; char view[32]; packet_reader_init(&pr, mesg->buffer, mesg->received); packet_reader_skip(&pr, DNS_HEADER_LENGTH); packet_reader_skip_fqdn(&pr); packet_reader_read_u16(&pr, &cmd_type); ya_result return_code = packet_reader_read_u16(&pr, &cmd_class); u16 qc = ntohs(MESSAGE_QD(mesg->buffer)); u16 pc = ntohs(MESSAGE_AN(mesg->buffer)); u16 an = ntohs(MESSAGE_NS(mesg->buffer)); u16 tmp_status = RCODE_FORMERR; if(ISOK(return_code) && (qc == 1) && (pc == 1) && (an == 0) && (cmd_type == TYPE_CTRL_ZONERELOAD) && (cmd_class == CLASS_CTRL)) { if(ISOK(return_code = ctrl_query_parse_fqdn_class_view(&pr, fqdn, sizeof(fqdn), &rclass, view, sizeof(view)))) { log_info("ctrl: zone reload: '%{dnsname}' %{dnsclass}", fqdn, &rclass); zone_desc_s *zone_desc = zone_acquirebydnsname(fqdn); tmp_status = RCODE_REFUSED; if((zone_desc != NULL) && (rclass == zone_desc->qclass) && (view[0] == '\0')) { tmp_status = RCODE_NOTAUTH; if(!ACL_REJECTED(acl_check_access_filter(mesg, &zone_desc->ac.allow_control))) { database_zone_load(fqdn); tmp_status = RCODE_NOERROR; mesg->send_length = mesg->received; } else { log_err("ctrl: zone reload: rejected by ACL"); } zone_release(zone_desc); } } else { log_err("ctrl: zone reload: zone '%{dnsname}' %{dnsclass} not found", fqdn, &rclass); } } if(tmp_status != RCODE_NOERROR) { message_make_error(mesg, tmp_status); } } static void ctrl_query_zonecfgreload(message_data *mesg) { packet_unpack_reader_data pr; u16 cmd_type; u16 cmd_class; u16 rclass; u8 fqdn[MAX_DOMAIN_LENGTH]; char view[32]; packet_reader_init(&pr, mesg->buffer, mesg->received); packet_reader_skip(&pr, DNS_HEADER_LENGTH); packet_reader_skip_fqdn(&pr); packet_reader_read_u16(&pr, &cmd_type); ya_result return_code = packet_reader_read_u16(&pr, &cmd_class); u16 qc = ntohs(MESSAGE_QD(mesg->buffer)); u16 pc = ntohs(MESSAGE_AN(mesg->buffer)); u16 an = ntohs(MESSAGE_NS(mesg->buffer)); u16 tmp_status = RCODE_FORMERR; if(ISOK(return_code) && (qc == 1) && (an == 0) && (cmd_type == TYPE_CTRL_ZONECFGRELOAD) && (cmd_class == CLASS_CTRL)) { if(pc == 1) { if(ISOK(return_code = ctrl_query_parse_fqdn_class_view(&pr, fqdn, sizeof(fqdn), &rclass, view, sizeof(view)))) { log_info("ctrl: zone config reload: '%{dnsname}' %{dnsclass}", fqdn, &rclass); zone_desc_s *zone_desc = zone_acquirebydnsname(fqdn); tmp_status = RCODE_REFUSED; if((zone_desc != NULL) && (rclass == zone_desc->qclass) && (view[0] == '\0')) { tmp_status = RCODE_NOTAUTH; if(!ACL_REJECTED(acl_check_access_filter(mesg, &zone_desc->ac.allow_control))) { tmp_status = RCODE_SERVFAIL; ya_result return_code = yadifad_config_update_zone(g_config->config_file, fqdn); if(ISOK(return_code)) { tmp_status = RCODE_NOERROR; mesg->send_length = mesg->received; zone_release(zone_desc); return; } } else { log_err("ctrl: zone config reload: rejected by ACL"); } zone_release(zone_desc); } } else { log_err("ctrl: zone config reload: zone '%{dnsname}' %{dnsclass} not found", fqdn, &rclass); } } else if(pc == 0) { tmp_status = RCODE_NOTAUTH; if(!ACL_REJECTED(acl_check_access_filter(mesg, &g_config->ac.allow_control))) { tmp_status = RCODE_SERVFAIL; ya_result return_code = yadifad_config_update_zone(g_config->config_file, NULL); if(ISOK(return_code)) { tmp_status = RCODE_NOERROR; return; } } } } if(tmp_status != RCODE_NOERROR) { message_make_error(mesg, tmp_status); } } void ctrl_query_process(message_data *mesg) { log_info("CTRL (%04hx) %{dnsname} %{dnstype}", ntohs(MESSAGE_ID(mesg->buffer)), mesg->qname, &mesg->qtype); if(!ctrl_get_enabled()) { message_make_error(mesg, RCODE_REFUSED); #if HAS_TSIG_SUPPORT if(TSIG_ENABLED(mesg)) /* NOTE: the TSIG information is in mesg */ { tsig_sign_answer(mesg); } #endif return; } if(mesg->qname[0] != '\0') { message_make_error(mesg, RCODE_FORMERR); #if HAS_TSIG_SUPPORT if(TSIG_ENABLED(mesg)) /* NOTE: the TSIG information is in mesg */ { tsig_sign_answer(mesg); } #endif return; } MESSAGE_HIFLAGS(mesg->buffer) |= QR_BITS; mesg->status = RCODE_NOERROR; mesg->send_length = mesg->received; // now can read the command switch(mesg->qtype) { case TYPE_CTRL_SRVSHUTDOWN: { ctrl_query_server_shutdown(mesg); break; } case TYPE_CTRL_SRVLOGREOPEN: { ctrl_query_logger_reopen(mesg); break; } case TYPE_CTRL_SRVCFGRELOAD: { ctrl_query_config_reload(mesg); break; } case TYPE_CTRL_SRVQUERYLOG: { ctrl_query_log_query_enable(mesg); break; } case TYPE_CTRL_SRVLOGLEVEL: { ctrl_query_log_level(mesg); break; } case TYPE_CTRL_ZONEFREEZE: /* freeze */ { ctrl_query_zone_freeze(mesg); break; } case TYPE_CTRL_ZONEUNFREEZE: /* unfreeze */ { ctrl_query_zone_unfreeze(mesg); break; } case TYPE_CTRL_ZONESYNC: /* sync */ { ctrl_query_zone_sync(mesg); break; } case TYPE_CTRL_ZONENOTIFY: { ctrl_query_zonenotify(mesg); break; } case TYPE_CTRL_ZONERELOAD: { ctrl_query_zonereload(mesg); break; } case TYPE_CTRL_ZONECFGRELOAD: { ctrl_query_zonecfgreload(mesg); break; } default: { message_make_error(mesg, RCODE_NOTIMP); /* or do we drop ? */ break; } } /* switch qtype */ #if HAS_TSIG_SUPPORT if(TSIG_ENABLED(mesg)) /* NOTE: the TSIG information is in mesg */ { tsig_sign_answer(mesg); } #endif } #endif // HAS_CTRL /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-download.h0000644000077100007710000000012412650131756025027 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.977344 30 ctime=1454597653.041344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-download.h0000664000077100007710000000403612650131756024637 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #include void database_service_zone_axfr_query(const u8 *origin); void database_service_zone_ixfr_query(const u8 *origin); /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-unmount.c0000644000077100007710000000012412650131756024720 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.057344 30 ctime=1454597653.259344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-unmount.c0000664000077100007710000001150312650131756024525 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup database Routines for database manipulations * @ingroup yadifad * @brief database functions * * Implementation of routines for the database * - add zone file(s) * - clear zone file(s) * - print zone files(s) * - load db * - unload db * - lookup database result of a message * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include #include #include #include #include #include "database-service.h" #include "notify.h" #define MODULE_MSG_HANDLE g_server_logger #define DBLOADQ_TAG 0x5144414f4c4244 void database_service_zone_unmount(zone_desc_s *zone_desc) { ya_result return_value; if(zone_desc == NULL) { log_err("database_service_zone_unmount(NULL)"); return; } log_debug1("database_service_zone_unmount(%{dnsname}@%p=%i)", zone_desc->origin, zone_desc, zone_desc->rc); log_debug1("database_service_zone_unmount: locking zone '%{dnsname}' for unmounting", zone_desc->origin); // locks the descriptor with the loader identity if(FAIL(return_value = zone_lock(zone_desc, ZONE_LOCK_UNMOUNT))) { log_err("database_service_zone_unmount: failed to lock zone settings for '%{dnsname}'", zone_desc->origin); return; } const u8 *origin = zone_desc->origin; log_info("zone unmount: %{dnsname}", origin); zone_desc->status_flags |= ZONE_STATUS_UNMOUNTING; /* * Find the zone * * Invalidate the zone * * Set the zone pointer in the label to NULL * * Queue the zone for unload */ zdb *db; notify_clear(zone_desc->origin); /// @todo signature maintenance clear, ie: dnssec_maintenance_clear(zone_desc->origin); /// @todo retry clearn, ie: retry_clear(zone_desc->origin); /// @todo arm an alarm for refresh zone_desc_log(MODULE_MSG_HANDLE, MSG_DEBUG1, zone_desc, "database_service_zone_unmount"); db = g_config->database; zdb_zone *old_zone = zdb_remove_zone_from_dnsname(db, origin); if(old_zone != NULL) { log_debug2("database_service_zone_unmount: zone %{dnsname} @%p removed from the database", origin, old_zone); database_zone_unload(old_zone); // RC should mostly be one at this point zdb_zone_release(old_zone); // it's now the responsibility of database_zone_unload to drop the zone } else { log_debug2("database_service_zone_unmount: zone %{dnsname} not found in the database", origin); } zone_desc->status_flags &= ~(ZONE_STATUS_STARTING_UP|ZONE_STATUS_UNMOUNTING|ZONE_STATUS_PROCESSING); log_debug1("database_service_zone_unmount: unlocking zone '%{dnsname}' for unmounting", origin); database_fire_zone_unmounted(zone_desc, SUCCESS); zone_unlock(zone_desc, ZONE_LOCK_UNMOUNT); } /** * @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/confs.h0000644000077100007710000000012412654654373020170 xustar000000000000000027 mtime=1454594299.817879 27 atime=1454597463.935344 30 ctime=1454597653.031344534 yadifa-2.1.6-5826/sbin/yadifad/confs.h0000664000077100007710000004156412654654373020007 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup config Configuration handling * @ingroup yadifad * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef CONFS_H_ #define CONFS_H_ #ifdef __cplusplus extern "C" { #endif /* ------------------------------------------------------------ */ #include #include #include #include "config.h" #include #include #include #include "zone.h" #include "database.h" #include "acl.h" /* ------------------------------------------------------------ */ #define PREPROCESSOR_INT2STR(x) #x #define THREAD_POOL_SIZE_MAX 255 /* 8 bits ! */ #define TCP_QUERIES_MIN 0 #define TCP_QUERIES_MAX 512 #define AXFR_PACKET_SIZE_MIN 512 #define AXFR_PACKET_SIZE_MAX 65535 #define AXFR_RECORD_BY_PACKET_MIN 0 #define AXFR_RECORD_BY_PACKET_MAX 65535 #define AXFR_RETRY_DELAY_MIN 60 #define AXFR_RETRY_DELAY_MAX 86400 #define AXFR_RETRY_JITTER_MIN 60 #define AXFR_RETRY_JITTER_MAX "don't use me, use the axfr_retry_delay value instead" #define MAX_CONFIG_STRING 50 #define PRINTARGLEN 10 #define PROGRAM_NAME PACKAGE #define PROGRAM_VERSION PACKAGE_VERSION #define RELEASEDATE "2016-02-04" #define COMPILEDATE __DATE__ /* List of default values for the different configuration parameters */ #define S_CONFIGDIR SYSCONFDIR "/" #define S_CONFIGFILE PACKAGE ".conf" #define S_CONFIGFILEDYNAMIC PACKAGE ".conf.dyn" #define S_DATAPATH LOCALSTATEDIR "/zones/" #define S_XFRPATH LOCALSTATEDIR "/zones/xfr/" #define S_KEYSPATH LOCALSTATEDIR "/zones/keys/" /** Keys should not be in "shared" */ #define S_LOGPATH LOGDIR #define S_PIDFILE LOCALSTATEDIR "/run/" PACKAGE ".pid" #define S_VERSION_CHAOS PACKAGE_VERSION /* limit the size */ #define S_HOSTNAME_CHAOS NULL #define S_SERVERID_CHAOS NULL #define S_DEBUGLEVEL "0" /* default values for SERVER_FL */ #define S_SYSLOG "0" #define S_STATISTICS "1" #define S_STATISTICS_MAX_PERIOD "60" /* 1 -> 31 * 86400 */ #define S_DAEMONRUN "0" #define S_ANSWER_FORMERR_PACKETS "1" #define S_DYNAMIC_PROVISIONING "0" /** \def S_RUNMODE * Run mode of the program */ #define S_RUNMODE RUNMODE_CONTINUE_CLEAN /* */ #define S_CPU_COUNT_OVERRIDE "0" /* max 256 */ #define S_THREAD_COUNT_BY_ADDRESS "-1" /* -1 for auto */ #define S_DNSSEC_THREAD_COUNT "0" /* max 1024 */ #define S_ZONE_LOAD_THREAD_COUNT "1" // disk #define S_ZONE_DOWNLOAD_THREAD_COUNT "4" // network /* Chroot, uid and gid */ #define S_CHROOT "0" #define S_CHROOTPATH "/" #define S_UID "0" #define S_GID "0" /** \def S_LISTEN * Listening to all interfaces */ #define S_LISTEN "0.0.0.0" #define S_TOTALINTERFACES 1 #define S_MAX_TCP_QUERIES "16" /* max 512 */ #define S_TCP_QUERY_MIN_RATE "512" /* bytes per second minimum rate */ #define S_MAX_AXFR "10" #define S_AXFR_MAX_RECORD_BY_PACKET "0" /** No limit. Old applications can only work with this set to 1 */ #define S_AXFR_PACKET_SIZE_MAX "4096" /** plus TSIG */ #define S_AXFR_COMPRESS_PACKETS "1" #define S_AXFR_RETRY_DELAY "600" #define S_AXFR_RETRY_JITTER "180" #define S_XFR_CONNECT_TIMEOUT "5" /* seconds */ #define S_QUERIES_LOG_TYPE "1" /* 0: none, 1: YADIFA, 2: bind 3:both */ #define S_ALLOW_QUERY "any" #define S_ALLOW_UPDATE "none" #define S_ALLOW_TRANSFER "none" #define S_ALLOW_UPDATE_FORWARDING "none" #define S_ALLOW_NOTIFY "any" #define S_ALLOW_CONTROL "none" /** \def S_SERVERPORT * Standard port for listening udp and tcp */ #define S_SERVERPORT "53" /* PREPROCESSOR_INT2STR(DNS_DEFAULT_PORT) */ #define S_TRANSFER_SOURCE "0.0.0.0" /* IP FLAGS */ #define S_IPV4 "1" #define S_IPV6 "1" /* QUERIES FLAGS */ #define S_ADDITIONAL_AUTH "1" #define S_AUTHORITY_AUTH "1" #define S_ADDITIONAL_CACHE "1" #define S_AUTHORITY_CACHE "1" #define S_EDNS0 "1" #define S_EDNS0_MAX_SIZE "4096" #define S_RECURSION "1" #define S_S32_VALUE_NOT_SET NULL #define S_SIG_VALIDITY_INTERVAL "30" /* 30 days in days */ #define S_SIG_VALIDITY_REGENERATION "168" /* 7 days in hours 24->168 */ #define S_SIG_VALIDITY_JITTER "3600" /* 1 hour in seconds */ #define S_SIG_SIGNING_TYPE "65534" #define S_NOTIFY_RETRY_COUNT "5" /* 5 retries */ #define S_NOTIFY_RETRY_PERIOD "1" /* first after 1 minute */ #define S_NOTIFY_RETRY_PERIOD_INCREASE "0" /* period increased by "0" after every try */ #define S_ZONE_NOTIFY_AUTO "1" #define S_ZONE_NO_MASTER_UPDATES "0" #define S_ZONE_FLAG_MAINTAIN_DNSSEC "1" #define S_ZONE_DNSSEC_DNSSEC "off" #define S_JOURNAL_SIZE_KB_DEFAULT "0" #define S_JOURNAL_SIZE_KB_MIN 0 // less than this is asking for trouble #define S_JOURNAL_SIZE_KB_MAX 8388608 // 8*2^20 => 8GB /* ------------------------------------------------------------ */ /* List of cases for adjusting the keys configuration parameters */ #define KC_NAME 1 #define KC_ALGORITHM 2 #define KC_SECRET 3 /* List of cases for adjusting the control configuration parameters */ #define CC_NET 1 #define CC_KEYS 2 #define CONTAINER_MAIN 1 #define CONTAINER_ZONE 2 #define CONTAINER_CHANNELS 3 #define CONTAINER_LOGGERS 4 #define CONTAINER_KEYS 5 #define CONTAINER_CONTROL 6 /* Run modes of the program, * only RUNMODE_DAEMON can be asked via the configuration file */ #define RUNMODE_FLAG 0x0F /* Only one of these can be active */ #define RUNMODE_EXIT_CLEAN 0x01 #define RUNMODE_CONTINUE_CLEAN 0x02 /* normal mode */ #define RUNMODE_DAEMON 0x03 /* daemon mode */ #define RUNMODE_INTERACTIVE 0x04 /* interactive mode */ #define RUNMODE_SWITCH_FLAG 0xF0 /* Server flags */ #define SERVER_FL_CHROOT 0x01 #define SERVER_FL_DAEMON 0x02 #define SERVER_FL_STATISTICS 0x04 #define SERVER_FL_ANSWER_FORMERR 0x08 #define SERVER_FL_DYNAMIC_PROVISIONING 0x10 /* IP flags */ #define IP_FLAGS_IPV4 0x01 #define IP_FLAGS_IPV6 0x02 #define SIGNATURE_VALIDITY_INTERVAL_MIN 7 /* 7 days */ #define SIGNATURE_VALIDITY_INTERVAL_MAX 30 /* 30 days */ #define SIGNATURE_VALIDITY_INTERVAL_S 86400 /* seconds for that unit */ #define SIGNATURE_VALIDITY_REGENERATION_MIN 24 /* 1 day */ #define SIGNATURE_VALIDITY_REGENERATION_MAX 168 /* 7 days */ #define SIGNATURE_VALIDITY_REGENERATION_S 3600 /* seconds for that unit */ #define SIGNATURE_VALIDITY_JITTER_MIN 0 #define SIGNATURE_VALIDITY_JITTER_MAX 86400 #define SIGNATURE_VALIDITY_JITTER_S 1 /* seconds for that unit */ #define NOTIFY_RETRY_COUNT_MIN 0 #define NOTIFY_RETRY_COUNT_MAX 10 #define NOTIFY_RETRY_PERIOD_MIN 1 #define NOTIFY_RETRY_PERIOD_MAX 600 #define NOTIFY_RETRY_PERIOD_INCREASE_MIN 0 #define NOTIFY_RETRY_PERIOD_INCREASE_MAX 600 /* ------------------------------------------------------------ */ typedef struct udp udp; struct udp { struct addrinfo *addr; int sockfd; }; typedef struct tcp tcp; struct tcp { struct addrinfo *addr; int sockfd; }; typedef struct interface interface; struct interface { udp udp; tcp tcp; }; typedef struct scheduler scheduler; struct scheduler { int sockfd; }; #define CONFIG_READER_CONTEXT_MAX_DEPTH 128 typedef struct config_reader_context config_reader_context; struct config_reader_context { s32 top; // -1 bool dynamic; FILE* data[CONFIG_READER_CONTEXT_MAX_DEPTH]; char* file_name[CONFIG_READER_CONTEXT_MAX_DEPTH]; }; /** \struct config_data * Struct with the configuration data. This data can be the default * data, data from a configuration file, or data as arguments on * the command line */ typedef struct config_data config_data; struct config_data { /* Which are the interfaces to listen at */ host_address *listen; /* General variables */ char *data_path; /* zones */ char *xfr_path; /* full and incremental images base ... */ char *chroot_path; /* chroot point */ char *log_path; /* log files */ char *keys_path; /* keys */ char *config_file; /* config */ char *config_file_dynamic; /* dynamic config */ //char *pid_path; /* OBSOLETE: pid file path */ char *pid_file; /* pid file path and name */ char *version_chaos; char *hostname_chaos; char *serverid_chaos; char *server_port; pid_t pid; /* Server variables */ u16 server_flags; int total_interfaces; int cpu_count_override; int thread_count_by_address; int dnssec_thread_count; int zone_load_thread_count; int zone_download_thread_count; int max_tcp_queries; int tcp_query_min_rate; int axfr_max_record_by_packet; int axfr_max_packet_size; int axfr_retry_delay; int axfr_retry_jitter; int xfr_connect_timeout; int statistics_max_period; int edns0_max_size; bool axfr_compress_packets; /**/ access_control ac; /**/ gid_t gid; uid_t uid; u16 process_flags; //u8 ip; /* * The pid of the only child (a.k.a the server) */ struct { pid_t pid; } child; struct { pid_t pid; } parent; interface interfaces[MAX_INTERFACES]; interface *interfaces_limit; zdb *database; u32 queries_log_type; #if HAS_DNSSEC_SUPPORT u32 sig_validity_interval; u32 sig_validity_regeneration; u32 sig_validity_jitter; u16 sig_signing_type; #endif double tcp_query_min_rate_us; bool chrooted; bool reloadable; }; /** * zone_desc filter callback, * The second argument is the proprietary data passed to the * * Must return 1 for accept, 0 for reject, or an error code. * */ typedef ya_result config_section_zone_filter_callback(zone_desc_s *, void *); #ifndef CONFS_MAIN_C_ extern config_data *g_config; #endif #include "zone.h" /** * @brief Tool function printing all the known names in a table. */ /* ------------------------------------------------------------ */ void config_logger_setdefault(); void config_logger_cleardefault(); /* ------------------------------------------------------------ */ ya_result yadifad_config_init(); ya_result yadifad_config_cmdline(int argc, char **argv); ya_result yadifad_config_read(const char *config_file); ya_result yadifad_config_finalise(); ya_result yadifad_config_update(const char *config_file); ya_result yadifad_config_update_zone(const char *config_file, const u8 *fqdn); /* ------------------------------------------------------------ */ ya_result confs_set_dnssec(const char *value, u32 *dest, anytype notused); void config_zone_print(zone_desc_s *zone_desc, output_stream *os); /** * * Enables a callback filter that is called before pushing a zone_desc to the database service. * * @param cb a callback function or NULL to reset to the "accept all" filter. * @param params a pointer that will be passed to the callback */ void config_section_zone_set_filter(config_section_zone_filter_callback *cb, void *params); bool config_check_bounds_s32(s32 minval, s32 maxval, s32 val, const char *name); #ifdef __cplusplus } #endif #endif /* CONFS_H_ */ /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/zone_desc.h0000644000077100007710000000012412650131756021020 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.057344 30 ctime=1454597653.121344534 yadifa-2.1.6-5826/sbin/yadifad/zone_desc.h0000664000077100007710000003656712650131756020646 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef ZONE_DESC_H #define ZONE_DESC_H #include #include #include #include #include #include "acl.h" #ifdef __cplusplus extern "C" { #endif #define ZT_HINT 0 /**< zone file: hint */ #define ZT_MASTER 1 /**< zone file: master */ #define ZT_SLAVE 2 /**< zone file: slave */ #define ZT_STUB 3 /**< zone file: stub */ #define ZT_UNKNOWN 4 /**< zone file: unknown */ #define ZT_STRING_HINT "hint" #define ZT_STRING_MASTER "master" #define ZT_STRING_SLAVE "slave" #define ZT_STRING_STUB "stub" #define ZT_STRING_UNKNOWN "unknown" #define ZONE_DNSSEC_FL_NOSEC 0 #define ZONE_DNSSEC_FL_NSEC 1 #define ZONE_DNSSEC_FL_NSEC3 2 #define ZONE_DNSSEC_FL_NSEC3_OPTOUT 3 #define ZONE_DNSSEC_FL_MASK 7 #define ZONE_CTRL_FLAG_CLONE 1 /* has a parent in the config */ #define ZONE_CTRL_FLAG_EDITED 2 /* has been edited dynamically (it's a dynamic provisioning zone) */ #define ZONE_CTRL_FLAG_READ_FROM_CONF 4 /* has been read from the configuration file */ #define ZONE_CTRL_FLAG_READ_FROM_DIFF 8 /* has been read from the configuration updates file */ #define ZONE_CTRL_FLAG_SAVED_TO_DIFF 16 /* has been saved to the configuration updates file */ #define ZONE_CTRL_FLAG_DYNAMIC 32 // #define ZONE_CTRL_FLAG_GENERATE_ZONE 128 // behavioural flags #define ZONE_FLAG_NOTIFY_AUTO 1 #define ZONE_FLAG_DROP_BEFORE_LOAD 2 #define ZONE_FLAG_NO_MASTER_UPDATES 4 /* so a slave will not ask for updates * edf: I added this so I would not hammer * the root servers when doing tests */ #define ZONE_FLAG_MAINTAIN_DNSSEC 8 // status flags // iIclLMUdDzZaAsSeERxX#---T---ur/! //#define ZONE_STATUS_IDLE 0x00000000 /* i nothing happening at ALL */ #define ZONE_STATUS_STARTING_UP 0x00000001 /* I before we even tried to load it */ #define ZONE_STATUS_MODIFIED 0x00000002 /* c has been updated since last write on/load from disk */ #define ZONE_STATUS_LOAD 0x00000004 /* l loading of the zone queried */ #define ZONE_STATUS_LOADING 0x00000008 /* L in the process of loading the zone */ #define ZONE_STATUS_MOUNTING 0x00000010 /* M loading of the zone queried */ #define ZONE_STATUS_UNMOUNTING 0x00000020 /* U in the process of loading the zone */ #define ZONE_STATUS_DROP 0x00000040 /* d unloading of the zone queried */ #define ZONE_STATUS_DROPPING 0x00000080 /* D in the process of unloading the zone */ #define ZONE_STATUS_SAVETO_ZONE_FILE 0x00000100 /* z dumping to ... queried */ #define ZONE_STATUS_SAVING_ZONE_FILE 0x00000200 /* Z dumping to ... at this moment */ #define ZONE_STATUS_SAVETO_AXFR_FILE 0x00000400 /* a dumping to ... queried */ #define ZONE_STATUS_SAVING_AXFR_FILE 0x00000800 /* A dumping to ... at this moment */ #define ZONE_STATUS_SIGNATURES_UPDATE 0x00001000 /* s needs to update the signatures (?) */ #define ZONE_STATUS_SIGNATURES_UPDATING 0x00002000 /* S updating signatures */ #define ZONE_STATUS_DYNAMIC_UPDATE 0x00004000 /* e needs to update the database (?) */ #define ZONE_STATUS_DYNAMIC_UPDATING 0x00008000 /* E updating the database */ #define ZONE_STATUS_READONLY_______NOT_USED 0x00010000 /* R database updates not allowed */ #define ZONE_STATUS_DOWNLOAD_XFR_FILE 0x00020000 /* x */ #define ZONE_STATUS_DOWNLOADING_XFR_FILE 0x00040000 /* X */ #define ZONE_STATUS_DROP_AFTER_RELOAD 0x00080000 /* # when a config reload occurrs, this flag is set to all zones * when the zone has its config reloaded, it is cleared * all zones with this bit set after the reload are dropped */ #define ZONE_STATUS_FROZEN 0x00100000 /* f zone is read only <-> READONLY ? */ #define ZONE_STATUS_TEMPLATE_SOURCE_FILE 0x00200000 #define ZONE_STATUS_MUST_CLEAR_JOURNAL 0x00400000 #define ZONE_STATUS_RESERVED_01____NOT_USED 0x00800000 #define ZONE_STATUS_DOWNLOADED 0x01000000 /* T the file is on disk, soon to be loaded */ #define ZONE_STATUS_UNREGISTERING 0x10000000 /* u */ #define ZONE_STATUS_REGISTERED 0x20000000 /* r this instance of the zone is registered */ #define ZONE_STATUS_MARKED_FOR_DESTRUCTION 0x40000000 /* / a "destroy" command has been put in the queue */ #define ZONE_STATUS_PROCESSING 0x80000000 /* ! */ #define ZONE_STATUS_BUSY (\ ZONE_STATUS_LOAD|ZONE_STATUS_LOADING |\ ZONE_STATUS_MOUNTING|ZONE_STATUS_UNMOUNTING |\ ZONE_STATUS_DROP|ZONE_STATUS_DROPPING |\ ZONE_STATUS_SAVETO_ZONE_FILE|ZONE_STATUS_SAVING_ZONE_FILE |\ ZONE_STATUS_SAVETO_AXFR_FILE|ZONE_STATUS_SAVING_AXFR_FILE |\ ZONE_STATUS_SIGNATURES_UPDATE|ZONE_STATUS_SIGNATURES_UPDATING |\ ZONE_STATUS_DYNAMIC_UPDATE|ZONE_STATUS_DYNAMIC_UPDATING |\ ZONE_STATUS_DOWNLOAD_XFR_FILE|ZONE_STATUS_DOWNLOADING_XFR_FILE |\ ZONE_STATUS_PROCESSING |\ 0) // locks owners #define ZONE_LOCK_NOBODY 0x00 #define ZONE_LOCK_LOAD 0x81 #define ZONE_LOCK_UNLOAD 0x82 #define ZONE_LOCK_LOAD_DESC 0x83 #define ZONE_LOCK_DESC_UNLOAD 0x84 #define ZONE_LOCK_REPLACE_DESC 0x85 #define ZONE_LOCK_DOWNLOAD_DESC 0x86 #define ZONE_LOCK_MOUNT 0x87 #define ZONE_LOCK_UNMOUNT 0x88 #define ZONE_LOCK_SERVICE 0x89 #define ZONE_LOCK_SIGNATURE 0x8a #define ZONE_LOCK_FREEZE 0x8b #define ZONE_LOCK_UNFREEZE 0x8c #define ZONE_LOCK_SAVE 0x8d #define ZONE_LOCK_DYNUPDATE 0x8e #define ZONE_LOCK_UNREGISTER 0xfe enum zone_type { UNKNOWN = ZT_UNKNOWN, HINT = ZT_HINT, MASTER = ZT_MASTER, SLAVE = ZT_SLAVE, STUB = ZT_STUB, INVALID = MAX_S32 /* ensures the enum is 32 bits (at least) */ }; typedef enum zone_type zone_type; /** * * About slave refresh: * * REFRESH A 32 bit time interval before the zone should be * refreshed. * RETRY A 32 bit time interval that should elapse before a * failed refresh should be retried. * EXPIRE A 32 bit time value that specifies the upper limit on * the time interval that can elapse before the zone is no * longer authoritative. */ typedef struct zone_refresh_s zone_refresh_s; struct zone_refresh_s { /* last successful refresh time */ u32 refreshed_time; /* last time we retried */ u32 retried_time; /* for the sole use of retry.c (updated and used by it) */ u32 zone_update_next_time; }; typedef struct zone_notify_s zone_notify_s; struct zone_notify_s { /* retry count */ u32 retry_count; /* period in minutes */ u32 retry_period; /* increase of the period (in minutes) after each retry */ u32 retry_period_increase; }; #if HAS_RRSIG_MANAGEMENT_SUPPORT && HAS_DNSSEC_SUPPORT #define ZONE_SIGNATURE_INVALID_FIRST_ASSUME_BROKEN 0 typedef struct zone_signature_s zone_signature_s; struct zone_signature_s { // The newly generated signatures will be valid for that amount of days u32 sig_validity_interval; // The amount of time before expiration to update a signature u32 sig_validity_regeneration; // The validity of newly generated signature will be off by at most this u32 sig_validity_jitter; // The first epoch when a signature will become invalid. u32 sig_invalid_first; // The first epoch when a signature will be updated u32 scheduled_sig_invalid_first; }; #endif /// @note HAS_DYNAMIC_PROVISIONING typedef struct dynamic_provisioning_s dynamic_provisioning_s; struct dynamic_provisioning_s { u8 version; u8 padding; u16 flags; u32 timestamp; u32 refresh; u32 retry; u32 expire; u32 timestamp_lo; /* 0 for now */ u32 checksum; /* MUST BE LAST FIELD */ }; /// #define ZONE_DESC_MATCH_ORIGIN 0x00000001 #define ZONE_DESC_MATCH_DOMAIN 0x00000002 #define ZONE_DESC_MATCH_FILE_NAME 0x00000004 #define ZONE_DESC_MATCH_MASTERS 0x00000008 #define ZONE_DESC_MATCH_NOTIFIES 0x00000010 #define ZONE_DESC_MATCH_DYNAMIC 0x00000020 #define ZONE_DESC_MATCH_SLAVES 0x00000040 #define ZONE_DESC_MATCH_REFRESH 0x00000080 #define ZONE_DESC_MATCH_NOTIFY 0x00000100 #define ZONE_DESC_MATCH_DNSSEC_MODE 0x00000200 #define ZONE_DESC_MATCH_TYPE 0x00000400 #define ZONE_DESC_MATCH_ACL 0x00000800 typedef struct zone_desc_s zone_desc_s; struct zone_desc_s { // fqdn u8 *origin; // cannot change // ascii domain name char *domain; // cannot change // name of the file on disk char *file_name; // may change // path where to find the keys char *keys_path; // can be NULL // The list of the masters (for a slave) host_address *masters; // may change // If master which are the servers to notify for updates IXFR or AXFR host_address *notifies; // may change #if ZDB_HAS_ACL_SUPPORT // Restrited list of ip address allowed to query */ access_control ac; // may change (content is made of pointers) #endif // zone notify settings zone_notify_s notify; // may change (3 * 32 bits) #if HAS_DNSSEC_SUPPORT #if HAS_RRSIG_MANAGEMENT_SUPPORT // zone signature settings zone_signature_s signature; // may change (5 * 32 bits) #endif u32 dnssec_mode; // needs to be u32 (config descriptor requirement) #endif // zone refresh status zone_refresh_s refresh; // internal (3 * 32 bits) volatile u32 status_flags; // internal volatile u32 last_processor; // internal, diagnostic u32 flags; // may change ? (notify auto, drop before load, ...) u32 journal_size_kb; // may change, expressed in kb, 0 "choose", 2^32-1 " u32 stored_serial; // serial of the last stored full zone image /* Type of zone file (master, slave, stub, unknown) */ zone_type type; u16 qclass; // cannot change, most likely CLASS_IN // instead of having a priority queue with two levels, two queues will do // the job bpqueue_s commands; // queue of commands /// @note HAS_DYNAMIC_PROVISIONING dynamic_provisioning_s dynamic_provisioning; // proprietary host_address *slaves; // proprietary zdb_zone *loaded_zone; // internal, keeps an RC, has to be increased by users grabbing it (mutex required) /// /* marks */ mutex_t lock; pthread_cond_t lock_cond; volatile s32 rc; volatile s32 lock_wait_count; volatile s32 lock_owner_count; volatile u8 lock_owner; #ifdef DEBUG u64 instance_time_us; u64 instance_id; #endif }; #ifdef __cplusplus } #endif #endif /* ZONE_DESC_H */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/server_context.c0000644000077100007710000000012412650131756022114 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.990344 30 ctime=1454597653.298344534 yadifa-2.1.6-5826/sbin/yadifad/server_context.c0000664000077100007710000003175512650131756021734 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup server Server * @ingroup yadifad * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include #include #include "server_context.h" #include "server.h" #define ITFNAME_TAG 0x454d414e465449 extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger struct itf_name { char* name; u8 name_len; }; static ptr_vector server_context_socket_name = EMPTY_PTR_VECTOR; static bool config_update_network_done = FALSE; static void server_context_socket_name_free_cb(void *p) { struct itf_name* itf = (struct itf_name*)p; if(itf != NULL) { free(itf->name); free(itf); } } static void server_context_socket_name_ensure(u16 s) { ptr_vector_ensures(&server_context_socket_name, s + 1); for(s32 i = ptr_vector_size(&server_context_socket_name); i < ptr_vector_capacity(&server_context_socket_name); i++) { struct itf_name *tmp; MALLOC_OR_DIE(struct itf_name*, tmp, sizeof(struct itf_name), ITFNAME_TAG); tmp->name = NULL; tmp->name_len = 0; ptr_vector_set(&server_context_socket_name, i, tmp); } server_context_socket_name.offset = MAX(s, server_context_socket_name.offset); } static void server_context_set_socket_name_to(u16 s, const char *text) { server_context_socket_name_ensure(s); #ifdef DEBUG log_debug("socket #%d is named '%s'", s, text); #endif struct itf_name *tmp = server_context_socket_name.data[s]; if(tmp->name != NULL) { free(tmp->name); } tmp->name = strdup(text); tmp->name_len = strlen(text); } static void server_context_set_socket_name(u16 s, struct sockaddr *sa) { char buffer[64]; switch(sa->sa_family) { case AF_INET: { struct sockaddr_in *ipv4 = (struct sockaddr_in*)sa; if(inet_ntop(ipv4->sin_family, &ipv4->sin_addr, buffer, sizeof (buffer)) == NULL) { strcpy(buffer, "ipv4?"); // big enough } break; } case AF_INET6: { struct sockaddr_in6 *ipv6 = (struct sockaddr_in6*)sa; if(inet_ntop(ipv6->sin6_family, &ipv6->sin6_addr, buffer, sizeof (buffer)) == NULL) { strcpy(buffer, "ipv6?"); // big enough } break; } default: { strcpy(buffer, "?"); // big enough break; } } server_context_set_socket_name_to(s, buffer); } /** * Appends the name of the socket s to the buffer. * The buffer has to be big enough, no size test is performed. * * @param buffer * @param s * * @return the length of the name */ u32 server_context_append_socket_name(char *buffer, u16 s) { if(s < server_context_socket_name.size) { struct itf_name *tmp = server_context_socket_name.data[s]; memcpy(buffer, tmp->name, tmp->name_len); return tmp->name_len; } else { return 0; } } /*----------------------------------------------------------------------------*/ /** \brief Closes all sockets and remove pid file * * @param[in] config * @param[in] server_context * * @retval OK * @return otherwise log_quit will stop the program */ void server_context_clear(config_data *config) { interface *intf; #ifdef DEBUG log_debug("server_context_clear()"); logger_flush(); #endif /* ------------------------------------------------------------ */ /** * @note It takes too much time to properly release the database for big zones. * All this to release the memory to the system anyway. * It is thus better to skip this. * The database unload should only be used for scripting & debugging (if the database structure is corrupted for any reason, * the unload will crash) * * database_finalize does NOT release the memory of the database, it just destroys threads */ log_info("stopping timed events handler"); /** * @note Stopping the timer will also stop the regular flush of the logger * From now on it will only flush at exit or when calling a logger_flush/flushall */ dnscore_stop_timer(); log_info("closing sockets"); /* Close all TCP & UDP connections */ for(intf = config->interfaces; intf < config->interfaces_limit; intf++) { close_ex(intf->udp.sockfd); close_ex(intf->tcp.sockfd); #if !DNSCORE_HAS_MALLOC_DEBUG_SUPPORT // cannot free the memory this way with debug_malloc on (freeaddrinfo needs a hook) freeaddrinfo(intf->udp.addr); freeaddrinfo(intf->tcp.addr); #endif } config->interfaces_limit = config->interfaces; ptr_vector_free_empties(&server_context_socket_name, server_context_socket_name_free_cb); /* Let the scheduler-bound tasks finish to communicate (else they will block trying) */ #ifdef NEBUG log_debug("cleaning up"); logger_flush(); #endif /* * Remove the pid file */ /// @note DO NOT: logger_finalize() don't, it will be done automatically at exit /** @note: server_context_clear has to free server_context struct */ } /** \brief Initialize sockets and copy the config parameters into server_context_t * * @param[in] config * @param[out] server_context * * @retval OK * @return otherwise log_quit will stop the program */ int config_update_network(config_data *config) { ya_result return_value = SUCCESS; const int on = 1; host_address *tmp_listen = NULL; interface *intf; if(config_update_network_done) { return SUCCESS; } config_update_network_done = TRUE; log_info("setting network up"); /* ------------------------------------------------------------ */ /* Copy stuff from the config file and command line options */ tmp_listen = config->listen; config->interfaces_limit = &config->interfaces[config->total_interfaces]; for(intf = config->interfaces; intf < config->interfaces_limit; intf++) { ZEROMEMORY(intf, sizeof(interface)); host_address2addrinfo(&intf->udp.addr, tmp_listen); host_address2addrinfo(&intf->tcp.addr, tmp_listen); tmp_listen = tmp_listen->next; /* The host_address list has an IPv4/IPv6 address and a port */ /*****************************************************************/ /* Create UDP interfaces and initialise server_context structure */ /*****************************************************************/ if(FAIL(intf->udp.sockfd = socket(intf->udp.addr->ai_family, SOCK_DGRAM, 0))) { return_value = ERRNO_ERROR; ttylog_err("failed to create socket %{sockaddr}: %r", intf->udp.addr->ai_addr, return_value); return return_value; } /** * Associate the name of the interface to the socket */ /** * This is distribution/system dependent. With this we ensure that IPv6 will only listen on IPv6 addresses. */ if(intf->udp.addr->ai_family == AF_INET6) { if(FAIL(setsockopt(intf->udp.sockfd, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&on, sizeof(on)))) { return_value = ERRNO_ERROR; ttylog_err("failed to force IPv6 on %{sockaddr}: %r", intf->udp.addr->ai_addr, return_value); return return_value; } } if(FAIL(setsockopt(intf->udp.sockfd, SOL_SOCKET, SO_REUSEADDR, (void *) &on, sizeof(on)))) { return_value = ERRNO_ERROR; ttylog_err("failed to reuse address %{sockaddr}: %r", intf->udp.addr->ai_addr, return_value); return return_value; } server_context_set_socket_name(intf->udp.sockfd, (struct sockaddr*)intf->udp.addr->ai_addr); if(FAIL(bind(intf->udp.sockfd, (struct sockaddr*)intf->udp.addr->ai_addr, intf->udp.addr->ai_addrlen))) { return_value = ERRNO_ERROR; ttylog_err("failed to bind address %{sockaddr}: %r", intf->udp.addr->ai_addr, return_value); return return_value; } log_info("bound to UDP interface: %{sockaddr}", intf->udp.addr->ai_addr); /*****************************************************************/ /* Create TCP interfaces and initialize server_context structure */ /*****************************************************************/ if(FAIL(intf->tcp.sockfd = socket(intf->tcp.addr->ai_family, SOCK_STREAM, 0))) { return_value = ERRNO_ERROR; ttylog_err("failed to create socket %{sockaddr}: %r", intf->tcp.addr->ai_addr, return_value); return return_value; } if(FAIL(setsockopt(intf->tcp.sockfd, SOL_SOCKET, SO_REUSEADDR, (void *) &on, sizeof(on)))) { return_value = ERRNO_ERROR; ttylog_err("failed to reuse address %{sockaddr}: %r", intf->tcp.addr->ai_addr, return_value); return return_value; } /** * This is distribution/system dependent. With this we ensure that IPv6 will only listen on IPv6 addresses. */ if(intf->tcp.addr->ai_family == AF_INET6) { if(FAIL(setsockopt(intf->tcp.sockfd, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&on, sizeof(on)))) { return_value = ERRNO_ERROR; ttylog_err("failed to force IPv6 on %{sockaddr}:%r", intf->tcp.addr->ai_addr, return_value); return return_value; } } server_context_set_socket_name(intf->tcp.sockfd, (struct sockaddr*)intf->tcp.addr->ai_addr); if(FAIL(bind(intf->tcp.sockfd, (struct sockaddr*)intf->tcp.addr->ai_addr, intf->tcp.addr->ai_addrlen))) { return_value = ERRNO_ERROR; ttylog_err("failed to bind address %{sockaddr}:%r", intf->tcp.addr->ai_addr, return_value); return return_value; } if(FAIL(return_value = fcntl(intf->tcp.sockfd, F_GETFL, 0))) { return_value = ERRNO_ERROR; return return_value; } fcntl(intf->tcp.sockfd, F_SETFL, return_value | O_NONBLOCK); /* For TCP only, listen to it... */ if(FAIL(listen(intf->tcp.sockfd, TCP_LISTENQ))) { return_value = ERRNO_ERROR; ttylog_err("failed to listen to address %{sockaddr}: %r", intf->tcp.addr->ai_addr, return_value); return return_value; } log_info("listening to TCP interface: %{sockaddr}", intf->tcp.addr->ai_addr); } return OK; } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/poll-util.h0000644000077100007710000000012412650131756020770 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.942344 30 ctime=1454597653.090344534 yadifa-2.1.6-5826/sbin/yadifad/poll-util.h0000664000077100007710000000442112650131756020576 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /******************************************************************************************************************* * * TCP USAGE LIMITS * ******************************************************************************************************************/ #pragma once #include /** * This code maintains the limit on the tcp sockets * @todo Portability has to be tested. */ void poll_free(); void poll_alloc(nfds_t count); bool poll_add(int fd); int poll_update(); yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/rrl.c0000644000077100007710000000012412650131756017641 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.014344 30 ctime=1454597653.333344534 yadifa-2.1.6-5826/sbin/yadifad/rrl.c0000664000077100007710000006770012650131756017460 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup yadifad * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include "rrl.h" #include "acl.h" #include "config_acl.h" extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #define EPOCH_PRECISION 6 #define ONE_SECOND_TICKS (1 << EPOCH_PRECISION) #define RRLITEM_TAG 0x4d4554494c5252 struct rrl_settings_s { u32 responses_per_second; // 5 u32 errors_per_second; // 5 u32 window; // 15 u32 slip; // 2 s32 max_table_size; // 10000 s32 min_table_size; // 1000 u32 window_ticks; address_match_set exempted; acl_check_access_filter_callback *exempted_filter; u64 ipv6_prefix_mask_high; u64 ipv6_prefix_mask_low; u32 ipv4_prefix_mask; s32 drop_default; // RRL_DROP except in log_only where it is RRL_PROCEED_DROP u8 ipv4_prefix_length; // 24 u8 ipv6_prefix_length; // bool log_only; // false bool enabled; }; typedef struct rrl_settings_s rrl_settings_s; #define CONFIG_TYPE rrl_settings_s #include "acl.h" CONFIG_BEGIN(config_rrl_desc) CONFIG_U32(responses_per_second, TOSTRING(RRL_RESPONSES_PER_SECOND_DEFAULT)) CONFIG_U32(errors_per_second, TOSTRING(RRL_ERRORS_PER_SECOND_DEFAULT)) CONFIG_U32(window, TOSTRING(RRL_WINDOW_DEFAULT)) CONFIG_U32(slip, TOSTRING(RRL_SLIP_DEFAULT)) CONFIG_U32(max_table_size, TOSTRING(RRL_QUEUE_SIZE_MAX_DEFAULT)) CONFIG_U32(min_table_size, TOSTRING(RRL_QUEUE_SIZE_MIN_DEFAULT)) CONFIG_U8(ipv4_prefix_length, TOSTRING(RRL_IPV4_PREFIX_LENGTH_DEFAULT)) CONFIG_U8(ipv6_prefix_length, TOSTRING(RRL_IPV6_PREFIX_LENGTH_DEFAULT)) CONFIG_BOOL(log_only, TOSTRING(RRL_LOG_ONLY_DEFAULT)) CONFIG_BOOL(enabled, TOSTRING(RRL_ENABLED_DEFAULT)) CONFIG_ACL_FILTER(exempted, RRL_EXEMPTED_DEFAULT) /* alias, aliased */ CONFIG_ALIAS(exempt-clients, exempted) CONFIG_ALIAS(enable, enabled) CONFIG_END(config_rrl_desc) #undef CONFIG_TYPE static mutex_t rrl_mtx; static random_ctx g_rrl_rnd; static struct rrl_settings_s g_rrl_settings; static ptr_vector g_rrl_list = EMPTY_PTR_VECTOR; static u64 g_rrl_start = 0; static u32 g_rrl_slip_bucket = 0; static s8 g_rrl_slip_bucket_bits = 0; static ya_result config_rrl_section_postprocess(struct config_section_descriptor_s *csd) { (void)csd; g_rrl_settings.window_ticks = g_rrl_settings.window * ONE_SECOND_TICKS; g_rrl_settings.exempted_filter = acl_get_check_access_filter(&g_rrl_settings.exempted); if(g_rrl_settings.ipv4_prefix_length == 0) { log_warn("ipv4-prefix-lenght set to 0, setting to recommended value: " TOSTRING(RRL_IPV4_PREFIX_LENGTH_DEFAULT)); g_rrl_settings.ipv4_prefix_length = RRL_IPV4_PREFIX_LENGTH_DEFAULT; } if(g_rrl_settings.ipv4_prefix_length < 32) { u32 mask = MAX_U32 << (32 - g_rrl_settings.ipv4_prefix_length); g_rrl_settings.ipv4_prefix_mask = htonl(mask); } else { log_warn("ipv4-prefix-lenght is wrong, setting to 32"); g_rrl_settings.ipv4_prefix_length = 32; g_rrl_settings.ipv4_prefix_mask = MAX_U32; } u64 mask_h, mask_l; if(g_rrl_settings.ipv6_prefix_length == 0) { log_warn("ipv6-prefix-lenght set to 0, setting to recommended value: " TOSTRING(RRL_IPV6_PREFIX_LENGTH_DEFAULT)); g_rrl_settings.ipv6_prefix_length = RRL_IPV6_PREFIX_LENGTH_DEFAULT; } if(g_rrl_settings.ipv6_prefix_length < 128) // [1;127] { if(g_rrl_settings.ipv6_prefix_length <= 64) // [1;64] { mask_h = MAX_U64 << (64 - g_rrl_settings.ipv6_prefix_length); // shift [63; 0] mask_l = 0; } else // [65;127] { mask_h = MAX_U64; mask_l = MAX_U64 << (128 - g_rrl_settings.ipv6_prefix_length); // shift [63; 1] } } else { log_warn("ipv6-prefix-lenght is wrong, setting to 128"); g_rrl_settings.ipv6_prefix_length = 128; mask_h = MAX_U64; mask_l = MAX_U64; } g_rrl_settings.ipv6_prefix_mask_high = htobe64(mask_h); g_rrl_settings.ipv6_prefix_mask_low = htobe64(mask_l); if(g_rrl_settings.min_table_size < RRL_QUEUE_SIZE_MIN) { log_warn("min-table-size too low, set to %d", g_rrl_settings.min_table_size = RRL_QUEUE_SIZE_MIN); } else if(g_rrl_settings.min_table_size > RRL_QUEUE_SIZE_MAX) { log_warn("min-table-size too high, set to %d", g_rrl_settings.min_table_size = RRL_QUEUE_SIZE_MAX); } if(g_rrl_settings.max_table_size < RRL_QUEUE_SIZE_MIN) { log_warn("max-table-size too low, set to %d", g_rrl_settings.max_table_size = RRL_QUEUE_SIZE_MIN); } else if(g_rrl_settings.max_table_size > RRL_QUEUE_SIZE_MAX) { log_warn("max-table-size too high, set to %d", g_rrl_settings.max_table_size = RRL_QUEUE_SIZE_MAX); } if(g_rrl_settings.min_table_size > g_rrl_settings.max_table_size) { log_warn("min-table-size > max-table-size (%d > %d) setting min-table-size to %d instead", g_rrl_settings.min_table_size, g_rrl_settings.max_table_size, g_rrl_settings.max_table_size); } ptr_vector_resize(&g_rrl_list, g_rrl_settings.min_table_size); g_rrl_settings.drop_default = (g_rrl_settings.log_only)?RRL_PROCEED_DROP:RRL_DROP; return SUCCESS; } ya_result config_register_rrl(s32 priority) { const char *section_name = "rrl"; ya_result return_code = config_register_struct(section_name, config_rrl_desc, &g_rrl_settings, priority); if(ISOK(return_code)) { // hook a new finaliser before the standard one config_section_descriptor_s *section_desc = config_section_get_descriptor(section_name); config_section_descriptor_vtbl_s *vtbl = (config_section_descriptor_vtbl_s *)section_desc->vtbl; vtbl->postprocess = config_rrl_section_postprocess; } return return_code; } /* * The item will be dynamic in size * the key being error_mask_ip_imputed_name, crafter every time for a (fast) memcmp comparison * The key should be a multiple of 8 bytes, padded with 0 (faster memcmp) * * The epoch should cover enough time. * It should have an imprecision lower than the second. * We can have it covering only a few minutes (8: 25.5, 16: 655.35, ...) * There is 32 bits available for a fast structure so I plan to simply use an epoch based on the start-time of the server. * The (currentTime - serverStartTime) >> 4 would give an acceptable precision (1/16 of a second) and cover 3106.89 days or 8.5 years * The (currentTime - serverStartTime) >> 6 would give an acceptable precision (1/64 of a second) and cover 776.72 days or 2.1 years * In the unlikely event the server is not restarted once before the covered time, the table would be flushed out and the serverStartTime reset * to the current time. */ struct rrl_item_s; struct rrl_item_children { struct rrl_item_s *left; struct rrl_item_s *right; }; union rrl_item_children_union { struct rrl_item_children lr; struct rrl_item_s *child[2]; }; /* * error_mask_ip_imputed_name format: * [ 0] : E000IPSZ * E : 1 = error, 0 = ok * IPSZ : number of bytes for the IP * 1 + 4 + name_length * * That was the first idea anyway ... now I settled for: * * [ 0 1 ] native endian 16 bits header * [ 2 .. ? ] IP bytes * [ ? .. n-1 ] NAME bytes * * header: [ E??????S SSSSSSSS ] * E: the msb is used to tell if it's an error or not * S: 9 bits are used to store the total size of the key (so the two first bytes included) * */ struct rrl_item_s { union rrl_item_children_union children; // 128 64 // AVL u32 timestamp; // 160 96 u32 lasttimestamp; // s32 hits; // s8 balance; // // AVL u8 reserved0; // alignment u16 slip_countdown; u8 error_mask_ip_imputed_name[1]; // max 1 + 16 + 255 = 272 }; // max 280 bytes #define RRL_KEY_SIZE_MAX (1+1+16+MAX_DOMAIN_LENGTH) typedef struct rrl_item_s rrl_item_s; static inline u32 rrl_item_key_size(const u8 *key) { u32 size = GET_U16_AT(key[0]) & 0x1ff; return size; } static inline u32 rrl_item_size_for_key(const u8 *key) { u32 size = rrl_item_key_size(key); size += sizeof(rrl_item_s) - 1; // -1 because the key takes originally 1 byte in the struct definition return size; } static inline u32 rrl_item_size(const rrl_item_s* rrl) { u32 size = rrl_item_size_for_key(rrl->error_mask_ip_imputed_name); return size; } static inline bool rrl_key_is_error(const u8 *key) { bool iserror = (GET_U16_AT(key[0]) & 0x8000) != 0; return iserror; } /* * out_key must be at least 1 + 1 + 16 + 255 bytes long * * returns the size of the key */ static inline u32 rrl_make_key(const message_data *mesg, const zdb_query_ex_answer *ans_auth_add, u8 *out_key) { u8 *tgt; const u8 *src; u32 size; u32 flags = 0; if(mesg->other.sa.sa_family == AF_INET) { size = 4; u32 ip = mesg->other.sa4.sin_addr.s_addr; ip &= g_rrl_settings.ipv4_prefix_mask; SET_U32_AT(out_key[2], ip); tgt = &out_key[6]; } else { size = 16; u64 iph = GET_U64_AT(((u64*)&mesg->other.sa6.sin6_addr)[0]); iph &= g_rrl_settings.ipv6_prefix_mask_high; SET_U64_AT(out_key[ 2], iph); u64 ipl = GET_U64_AT(((u64*)&mesg->other.sa6.sin6_addr)[1]); ipl &= g_rrl_settings.ipv6_prefix_mask_low; SET_U64_AT(out_key[10], ipl); tgt = &out_key[18]; flags |= 0x2000; } // note: wildcard names are not handled (yet) switch(mesg->status) { case RCODE_NOERROR: { // take the answer if(ans_auth_add->delegation == 0) { src = mesg->qname; // query name } else { yassert(ans_auth_add->authority != NULL); src = ans_auth_add->authority->name; } break; } case RCODE_NXDOMAIN: { flags |= 0x8000; // note: if we want to have a different key for NXDOMAIN and other errors, we can use 0xc000 instead if(ans_auth_add->authority != NULL) { src = ans_auth_add->authority->name; } else { src = mesg->qname; } break; } // case wildcard name ? default: { flags = 0x8000; src = mesg->qname; // query name } } size += dnsname_copy(tgt, src); size += 2; SET_U16_AT(out_key[0], size | flags); return size; } static inline void rrl_set_key(rrl_item_s *rrl, const u8 *key) { u32 key_size = GET_U16_AT(key[0]); key_size &= 0x01ff; memcpy(rrl->error_mask_ip_imputed_name, key, key_size); } static rrl_item_s* rrl_alloc(const u8 *key) { rrl_item_s *item; ZALLOC_ARRAY_OR_DIE(rrl_item_s*, item, rrl_item_size_for_key(key), RRLITEM_TAG); item->timestamp = 0; item->hits = 0; item->slip_countdown = 0; SET_U16_AT(item->error_mask_ip_imputed_name[0], 0); return item; } static void rrl_free(rrl_item_s *item) { /* * This assert is wrong because this is actually the payload that has just overwritten our node * assert(node->rc == 0 && node->sc == 0 && node->label.owners == NULL && node->star_label.owners == NULL & node->type_bit_maps == NULL); */ ZFREE_ARRAY(item, rrl_item_size(item)); } #ifdef AVL_DOES_NOT_DO_PAYLOAD_COPY_ANYMORE static void rrl_payload_copy(rrl_item_s *a, const rrl_item_s *b) { a->timestamp = b->timestamp; a->lasttimestamp = b->lasttimestamp; a->hits = b->hits; a->slip_countdown = b->slip_countdown; yassert(rrl_item_size(a) == rrl_item_size(b)); memcpy(a->error_mask_ip_imputed_name, b->error_mask_ip_imputed_name, rrl_item_size(a)); } #endif /* * AVL definition part begins here */ /* * The maximum depth of a tree. * 40 is enough for storing 433494436 items (worst case) * * Depth 0 is one node. * * Worst case : N is enough for sum[n = 0,N](Fn) where F is Fibonacci * Best case : N is enough for (2^(N+1))-1 */ #define AVL_MAX_DEPTH 32 /* 9227464 items max */ /* * The previx that will be put in front of each function name */ #define AVL_PREFIX rrl_ /* * The type that hold the node */ #define AVL_NODE_TYPE rrl_item_s /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_TREE_TYPE AVL_NODE_TYPE* typedef AVL_TREE_TYPE rrl_set_s; /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_CONST_TREE_TYPE AVL_NODE_TYPE* const /* * How to find the root in the tree */ #define AVL_TREE_ROOT(__tree__) (*(__tree__)) /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE u8* #define AVL_REFERENCE_IS_POINTER TRUE #define AVL_REFERENCE_IS_CONST FALSE /* * The node has got a pointer to its parent * * 0 : disable * !=0 : enable */ #define AVL_HAS_PARENT_POINTER 0 #include /* * Access to the field that points to the left child * */ #define AVL_LEFT_CHILD(node) ((node)->children.lr.left) /* * Access to the field that points to the right child */ #define AVL_RIGHT_CHILD(node) ((node)->children.lr.right) /* * Access to the field that points to one of the children (0: left, 1: right) */ #define AVL_CHILD(node,id) ((node)->children.child[(id)]) /* * OPTIONAL : Access to the field that points the parent of the node. * * This field is optional but is mandatory if AVL_HAS_PARENT_POINTER is not 0 */ //#define AVL_PARENT(node) ((node)->parent) /* * Access to the field that keeps the balance (a signed byte) */ #define AVL_BALANCE(node) ((node)->balance) /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE u8* /* * */ #define AVL_REFERENCE_FORMAT_STRING "%p" #define AVL_REFERENCE_FORMAT(reference) reference /* * A macro to initialize a node and setting the reference */ #define AVL_INIT_NODE(node,reference) rrl_set_key((node), reference) /* * A macro to allocate a new node */ #define AVL_ALLOC_NODE(node,reference) node = rrl_alloc(reference) /* * A macro to free a node allocated by ALLOC_NODE */ #define AVL_FREE_NODE(node) rrl_free(node) /* * A macro to print the node */ #define AVL_DUMP_NODE(node) format("node@%p",(node)); /* * A macro that returns the reference field of the node. * It must be of type REFERENCE_TYPE */ #define AVL_REFERENCE(node) (node)->error_mask_ip_imputed_name /* * A macro to compare two references * Returns TRUE if and only if the references are equal. */ #define AVL_ISEQUAL(reference_a,reference_b) (memcmp(&(reference_a)[0],&(reference_b)[0],rrl_item_key_size(reference_a))==0) /* * A macro to compare two references * Returns TRUE if and only if the first one is bigger than the second one. */ #define AVL_ISBIGGER(reference_a,reference_b) (memcmp(&(reference_a)[0],&(reference_b)[0],rrl_item_key_size(reference_a))>0) /* * Copies the payload of a node * It MUST NOT copy the "proprietary" node fields : children, parent, balance * * NOTE: this macro is most likely not used anymore */ #define AVL_COPY_PAYLOAD(node_trg,node_src) rrl_payload_copy((node_trg), (node_src)) /* * A macro to preprocess a node before it is preprocessed for a delete (detach) * If there was anything to do BEFORE deleting a node, we would do it here * After this macro is exectuted, the node * _ is detached, then deleted with FREE_NODE * _ has got its content overwritten by the one of another node, then the other * node is deleted with FREE_NODE */ #define AVL_NODE_DELETE_CALLBACK(node) #include static rrl_set_s g_rrl = NULL; static bool rrl_initialised = FALSE; void rrl_init() { if(rrl_initialised) { return; } rrl_initialised = TRUE; mutex_init(&rrl_mtx); rrl_avl_init(&g_rrl); g_rrl_start = timeus(); g_rrl_rnd = random_init_auto(); g_rrl_slip_bucket = random_next(g_rrl_rnd); g_rrl_slip_bucket_bits = 32; /* u32 responses_per_tick = (5 * 1000000) >> (20 - EPOCH_PRECISION); u32 errors_per_tick = (5 * 1000000) >> (20 - EPOCH_PRECISION); u32 window_ticks = (15 * 1000000) >> (20 - EPOCH_PRECISION); */ } void rrl_cull_all(); void rrl_finalize() { rrl_cull_all(); rrl_avl_destroy(&g_rrl); mutex_destroy(&rrl_mtx); random_finalize(g_rrl_rnd); rrl_initialised = FALSE; } /** * * Called when maybe we should slip * * @param mesg * @return */ static inline s32 rrl_slip(message_data *mesg) { s32 return_code = RRL_DROP; // g_rrl_slip_bucket is a global random 32 bits number // for every slip call, its lsb is shifted out and used to ... // 1 : send a truncated answer // 0 : drop the answer // // every 32 calls, fill the bucket again with a random number if((g_rrl_slip_bucket & 1) != 0) { // slip #ifdef DEBUG log_debug("rrl: %{sockaddrip} %{dnsname} %{dnstype} %{dnsclass}: slipping", &mesg->other.sa, mesg->qname, &mesg->qtype, &mesg->qclass); #endif return_code = RRL_SLIP; if(!g_rrl_settings.log_only) { /** * Give a truncated answer */ mesg->send_length = mesg->received; MESSAGE_FLAGS_OR(mesg->buffer, QR_BITS|TC_BITS, mesg->status); MESSAGE_SET_AN(mesg->buffer, 0); MESSAGE_SET_NSAR(mesg->buffer, 0); if(mesg->edns) { /* 00 00 29 SS SS rr vv 80 00 00 00 */ MESSAGE_SET_AR(mesg->buffer, NETWORK_ONE_16); u8 *ednsrecord = &mesg->buffer[mesg->received]; *ednsrecord++ = 0; // fqdn SET_U16_AT(*ednsrecord, TYPE_OPT); // type ednsrecord += 2; SET_U16_AT(*ednsrecord, htons(message_edns0_getmaxsize())); // udp payload size ednsrecord += 2; SET_U32_AT(*ednsrecord, mesg->rcode_ext); // edns flags ednsrecord += 4; SET_U16_AT(*ednsrecord, 0); // rdata size // nsid mesg->send_length += EDNS0_RECORD_SIZE; } } } else { if(g_rrl_settings.log_only) { return_code = RRL_PROCEED_DROP; } } if(--g_rrl_slip_bucket_bits > 0) { g_rrl_slip_bucket >>= 1; } else { g_rrl_slip_bucket_bits = 32; g_rrl_slip_bucket = random_next(g_rrl_rnd); } return return_code; } ya_result rrl_process(message_data *mesg, const zdb_query_ex_answer *ans_auth_add) { s32 return_code = RRL_PROCEED; // if the RRL is enabled and // if the sender is not exempted if(!g_rrl_settings.enabled || (g_rrl_settings.exempted_filter(mesg, &g_rrl_settings.exempted) > 0)) { return return_code; } u64 now = timeus(); u8 key[RRL_KEY_SIZE_MAX]; rrl_make_key(mesg, ans_auth_add, key); now -= g_rrl_start; // it's us so about 20 bits of (im)precision now >>= (20 - EPOCH_PRECISION); // 1 s ~ 61.035 ticks mutex_lock(&rrl_mtx); rrl_item_s *item = rrl_avl_insert(&g_rrl, key); if(item->timestamp > 0) { s32 hits; s32 limit; // ensure no overflow of the 1s bucket if((now - item->lasttimestamp) >= ONE_SECOND_TICKS) { // nothing happened for 1 second, we cannot accumulate so ... // we cut at lasttimestamp, we remove (lasttimestamp - timestamp) * rps u32 tsd = (now - item->timestamp) & ~(ONE_SECOND_TICKS - 1); item->timestamp += tsd; u32 hsd = (tsd >> EPOCH_PRECISION) * g_rrl_settings.responses_per_second; #ifdef DEBUG log_debug("rrl: %{sockaddrip} %{dnsname} %{dnstype} %{dnsclass}: 1s bucket overflow; delta time = %d (%ds); hits adjusted from %i to %i", &mesg->other.sa, mesg->qname, &mesg->qtype, &mesg->qclass, tsd, tsd >> EPOCH_PRECISION, item->hits, MAX(item->hits - hsd, 0)); #endif item->hits -= hsd; if(item->hits < 0) { item->hits = 0; item->timestamp = now - ONE_SECOND_TICKS; } // tsd } item->lasttimestamp = now; u32 ticks = (now - item->timestamp); // 1s + delta time (so we see for 1 second) hits = item->hits + 1; // ensure now overflow of the hits counter if(hits == MAX_U16) { // divide hits by 16 // divide time by 16 // adjust hits >>= 4; item->hits = hits; ticks >>= 4; item->timestamp = now - ticks; } // compute the current limit if(!rrl_key_is_error(key)) { limit = ((g_rrl_settings.responses_per_second * ticks) >> EPOCH_PRECISION); #ifdef DEBUG log_debug("rrl: %{sockaddrip} %{dnsname} %{dnstype} %{dnsclass}: %i responses with a limit of %i in %i ticks, %i/s, %is", &mesg->other.sa, mesg->qname, &mesg->qtype, &mesg->qclass, hits, limit, ticks, g_rrl_settings.responses_per_second, ticks >> EPOCH_PRECISION); #endif } else { limit = ((g_rrl_settings.errors_per_second * ticks) >> EPOCH_PRECISION); #ifdef DEBUG log_debug("rrl: %{sockaddrip} %{dnsname} %{dnstype} %{dnsclass}: %i errors with a limit of %i in %i ticks, %i/s, %is", &mesg->other.sa, mesg->qname, &mesg->qtype, &mesg->qclass, hits, limit, ticks, g_rrl_settings.errors_per_second, ticks >> EPOCH_PRECISION); #endif } mutex_unlock(&rrl_mtx); // test if we are in the allowed rate if(hits <= limit) { item->hits = hits; } else { #ifdef DEBUG log_debug("rrl: %{sockaddrip} %{dnsname} %{dnstype} %{dnsclass}: rate exceeded", &mesg->other.sa, mesg->qname, &mesg->qtype, &mesg->qclass); #endif // rate exceeded, drop ... except if we slip return_code = g_rrl_settings.drop_default; if((g_rrl_settings.slip > 0 ) && (--item->slip_countdown == 0)) { #ifdef DEBUG // pure debug log_debug("rrl: %{sockaddrip} %{dnsname} %{dnstype} %{dnsclass}: testing slip", &mesg->other.sa, mesg->qname, &mesg->qtype, &mesg->qclass); #endif item->slip_countdown = g_rrl_settings.slip; /* * Every 'slip' counts, compute if we slip or drop */ if((return_code = rrl_slip(mesg)) == RRL_SLIP) { // count it item->hits = hits; } } } } else { #ifdef DEBUG // pure debug log_debug("rrl: %{sockaddrip} %{dnsname} %{dnstype} %{dnsclass}: new entry", &mesg->other.sa, mesg->qname, &mesg->qtype, &mesg->qclass); #endif item->timestamp = now - ONE_SECOND_TICKS; item->lasttimestamp = now; item->slip_countdown = g_rrl_settings.slip; if(g_rrl_list.offset + 1 < g_rrl_settings.max_table_size) { // enough room: append ptr_vector_append_restrict_size(&g_rrl_list, item, g_rrl_settings.max_table_size); } else { // full: replace s32 victim = random_next(g_rrl_rnd) % g_rrl_settings.max_table_size; log_info("rrl: table is full (%u), removing entry #%i", g_rrl_settings.max_table_size, victim); rrl_item_s *victim_item = (rrl_item_s *)g_rrl_list.data[victim]; rrl_avl_delete(&g_rrl, victim_item->error_mask_ip_imputed_name); g_rrl_list.data[victim] = item; } mutex_unlock(&rrl_mtx); } return return_code; } void rrl_cull() { u64 now = timeus(); now -= g_rrl_start; // it's us so about 20 bits of (im)precision now >>= (20 - EPOCH_PRECISION); mutex_lock(&rrl_mtx); for(s32 i = 0; i <= g_rrl_list.offset; i++) { rrl_item_s *item = (rrl_item_s *)g_rrl_list.data[i]; if(now - item->lasttimestamp > g_rrl_settings.window_ticks) { // put the end here (i == offset is irrelevant) g_rrl_list.data[i] = g_rrl_list.data[g_rrl_list.offset]; g_rrl_list.offset--; // remove from the tree rrl_avl_delete(&g_rrl, item->error_mask_ip_imputed_name); } } mutex_unlock(&rrl_mtx); } void rrl_cull_all() { u64 now = timeus(); now -= g_rrl_start; // it's us so about 20 bits of (im)precision now >>= (20 - EPOCH_PRECISION); mutex_lock(&rrl_mtx); for(s32 i = 0; i <= g_rrl_list.offset; i++) { rrl_item_s *item = (rrl_item_s *)g_rrl_list.data[i]; g_rrl_list.data[i] = g_rrl_list.data[g_rrl_list.offset]; // remove from the tree rrl_avl_delete(&g_rrl, item->error_mask_ip_imputed_name); } g_rrl_list.offset = -1; mutex_unlock(&rrl_mtx); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/config-nsid.c0000644000077100007710000000012412650131756021242 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.918344 30 ctime=1454597653.309344534 yadifa-2.1.6-5826/sbin/yadifad/config-nsid.c0000664000077100007710000001244712650131756021057 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup config Configuration handling * @ingroup yadifad * @brief * * @{ */ #include "server-config.h" #include #include #include "config.h" #include #include #include #include #include "server-config.h" extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #if HAS_NSID_SUPPORT struct byte_array_s { u8 *bytes; u32 size; }; struct config_nsid_s { struct byte_array_s nsid; }; typedef struct config_nsid_s config_nsid_s; static ya_result config_set_byte_array(struct byte_array_s *dest, const u8 *bytes, u32 size) { if(dest->bytes != NULL) { log_warn("config: NSID has already been set, previous value overwritten"); if(dest->size != size) { free(dest->bytes); dest->bytes = NULL; dest->size = 0; } else // equal sizes { if(memcmp(dest->bytes, bytes, size) != 0) { memcpy(dest->bytes, bytes, size); } return SUCCESS; } } MALLOC_OR_DIE(u8*, dest->bytes, size, GENERIC_TAG); memcpy(dest->bytes, bytes, size); dest->size = size; return SUCCESS; } ya_result config_set_byte_array_from_ascii(const char *value, struct byte_array_s *dest, anytype settings) { ya_result return_code; return_code = config_set_byte_array(dest, (const u8*)value, strlen(value)); return return_code; } ya_result config_set_byte_array_from_hex(const char *value, struct byte_array_s *dest, anytype settings) { ya_result return_code; u32 value_len = strlen(value); u8 tmp[EDNS0_NSID_SIZE_MAX]; if(value_len > EDNS0_NSID_SIZE_MAX * 2) { return ERROR; } return_code = base16_decode(value, value_len, tmp); if(ISOK(return_code)) { return_code = config_set_byte_array(dest, tmp, return_code); } return return_code; } #define CONFIG_TYPE config_nsid_s CONFIG_BEGIN(config_nsid_desc) {"ascii", offsetof(CONFIG_TYPE, nsid), (config_set_field_function*)config_set_byte_array_from_ascii, NULL,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, \ {"hex", offsetof(CONFIG_TYPE, nsid), (config_set_field_function*)config_set_byte_array_from_hex, NULL,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, //{"hostname", offsetof(CONFIG_TYPE, fieldname), (config_set_field_function*)config_set_search_or_domain, NULL,{._u8=RO_DOMAIN}, CONFIG_TABLE_SOURCE_NONE}, CONFIG_END(config_nsid_desc) #undef CONFIG_TYPE static config_nsid_s tmp_config_nsid = {{NULL, 0}}; static ya_result config_nsid_section_postprocess(struct config_section_descriptor_s *csd) { /* here check that the settings are right */ edns0_set_nsid(tmp_config_nsid.nsid.bytes, tmp_config_nsid.nsid.size); return SUCCESS; } ya_result config_register_nsid(s32 priority) { const char *section_name = "nsid"; ya_result return_code = config_register_struct(section_name, config_nsid_desc, &tmp_config_nsid, priority); if(ISOK(return_code)) { // hook a new finaliser before the standard one config_section_descriptor_s *section_desc = config_section_get_descriptor(section_name); config_section_descriptor_vtbl_s *vtbl = (config_section_descriptor_vtbl_s *)section_desc->vtbl; vtbl->postprocess = config_nsid_section_postprocess; } return return_code; } #endif /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/aclocal.m40000644000077100007710000000013212654662540020541 xustar000000000000000030 mtime=1454597472.617344535 30 atime=1454597472.617344535 30 ctime=1454597653.014344534 yadifa-2.1.6-5826/sbin/yadifad/aclocal.m40000664000077100007710000012251712654662540020357 0ustar00yadifayadifa00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file 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. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([../../m4/libtool.m4]) m4_include([../../m4/ltoptions.m4]) m4_include([../../m4/ltsugar.m4]) m4_include([../../m4/ltversion.m4]) m4_include([../../m4/lt~obsolete.m4]) yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/confs.c0000644000077100007710000000012412650131756020152 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.928344 30 ctime=1454597653.224344534 yadifa-2.1.6-5826/sbin/yadifad/confs.c0000664000077100007710000004307312650131756017766 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup config Configuration handling * @ingroup yadifad * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include #include #include #include #include #include #include #include "config.h" #if HAS_DNSSEC_SUPPORT != 0 #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include "buildinfo.h" extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #include "zone.h" #include "config.h" #include "server.h" #include "confs.h" #include "database-service.h" #include "server_error.h" #include "config_error.h" #include "config_acl.h" #define CONFSDSP_TAG 0x50534453464e4f43 #define CONFSPL_TAG 0x4c5053464e4f43 /* * 2011/10/18 : EDF: disabling the debug because it makes the legitimate error output unreadable. */ #undef DEBUGLNF #undef DEBUGF #undef OSDEBUG #undef LDEBUG #undef OSLDEBUG #define DEBUGLNF(...) #define DEBUGF(...) #define OSDEBUG(...) #define LDEBUG(...) #define OSLDEBUG(...) #ifndef NAME_MAX #define NAME_MAX 1024 #endif struct logger_name_handle_s { const char *name; logger_handle **handlep; }; extern logger_handle* g_system_logger; extern logger_handle* g_database_logger; extern logger_handle* g_dnssec_logger; extern logger_handle* g_zone_logger; extern logger_handle* g_server_logger; extern logger_handle* g_statistics_logger; extern logger_handle* g_queries_logger; static const struct logger_name_handle_s logger_name_handles[] = { {"system", &g_system_logger}, {"database", &g_database_logger}, #if HAS_DNSSEC_SUPPORT != 0 {"dnssec", &g_dnssec_logger}, #endif {"zone", &g_zone_logger}, {"server", &g_server_logger}, {"stats", &g_statistics_logger}, {"queries", &g_queries_logger}, {NULL, NULL} }; CMDLINE_BEGIN(yadifad_cmdline) CMDLINE_SECTION("main") CMDLINE_OPT("config",'c',"config_file") CMDLINE_BOOL("daemon", 'd', "daemon") CMDLINE_BOOL_NOT("nodaemon", 0, "daemon") CMDLINE_OPT("uid", 'u', "uid") CMDLINE_OPT("gid", 'g', "gid") CMDLINE_OPT("port", 'P', "server_port") CMDLINE_VERSION_HELP(yadifad_cmdline) CMDLINE_END(yadifad_cmdline) static const char *default_channel = "stdout default"; void config_logger_setdefault() { logger_start(); output_stream stdout_os; logger_channel *stdout_channel; fd_output_stream_attach(&stdout_os, dup(1)); stdout_channel = logger_channel_alloc(); logger_channel_stream_open(&stdout_os, FALSE, stdout_channel); logger_channel_register(default_channel, stdout_channel); for(const struct logger_name_handle_s *name_handle = logger_name_handles; name_handle->name != NULL; name_handle++) { logger_handle_create(name_handle->name, name_handle->handlep); logger_handle_add_channel(name_handle->name, MSG_PROD_MASK, default_channel); } #ifdef DEBUG log_debug("logging to stdout"); #endif } void config_logger_cleardefault() { for(const struct logger_name_handle_s *name_handle = logger_name_handles; name_handle->name != NULL; name_handle++) { logger_handle_remove_channel(name_handle->name, default_channel); } logger_channel_unregister(default_channel); } static void yadifad_print_usage() { print("\n" "\t\toptions:\n" "\t\t--config/-c : load the configuration from \n" "\t\t--daemon/-d : overrides the daemon setting, enables it\n" "\t\t--nodaemon : overrides the daemon setting, disables it\n" "\t\t--uid/-u userid : overrides the uid setting\n" "\t\t--gid/-g groupid : overrides the gid setting\n" "\t\t--port/-P port : overrides the server-port setting\n" "\n" "\n" "\t\t--version/-V : view version\n" "\t\t--help/-h : show this help text\n" ); flushout(); } static void yadifad_print_authors() { print("\n" "\t\tYADIFAD authors:\n" "\t\t---------------\n" "\t\t\n" "\t\tGery Van Emelen\n" "\t\tEric Diaz Fernandez\n" "\n" "\t\tContact: " PACKAGE_BUGREPORT "\n" ); flushout(); } static void yadifad_show_version(u8 level) { switch(level) { case 1: osformatln(termout, "%s %s (%s)\n", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE); break; case 2: osformatln(termout, "%s %s (released %s, compiled %s)\n\nbuild settings: %s\n", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE, COMPILEDATE, BUILD_OPTIONS); break; case 3: osformatln(termout, "%s %s (released %s, compiled %s)\n", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE, COMPILEDATE); yadifad_print_authors(); break; default: osformat(termout, "\nYou want to know too much!\n\n"); break; } flushout(); } /** @brief Initialize the config file with the standard settings * * @param[out] config * * @retval OK */ ya_result config_register_main(s32 priority); #if HAS_ACL_SUPPORT ya_result config_register_acl(const char *null_or_acl_name, s32 priority); #endif ya_result config_register_zone(const char *null_or_key_name, s32 priority); #if HAS_CTRL ya_result config_register_control(s32 priority); #endif #if HAS_RRL_SUPPORT ya_result config_register_rrl(s32 priority); #endif #if HAS_NSID_SUPPORT ya_result config_register_nsid(s32 priority); #endif ya_result yadifad_config_init() { ya_result return_code; for(const struct logger_name_handle_s *name_handle = logger_name_handles; name_handle->name != NULL; name_handle++) { logger_handle_create(name_handle->name, name_handle->handlep); } if(FAIL(return_code = config_init())) { return return_code; } // to handle version & help if(FAIL(return_code = config_register_cmdline(1))) { return return_code; } #if HAS_TSIG_SUPPORT if(FAIL(return_code = config_register_key(NULL, 2))) { return return_code; } #endif #if HAS_ACL_SUPPORT if(FAIL(return_code = config_register_acl(NULL, 3))) { return return_code; } #endif if(FAIL(return_code = config_register_main(4))) { return return_code; } if(FAIL(return_code = config_register_logger(NULL, NULL, 5))) // 5 & 6 { return return_code; } #if HAS_CTRL if(FAIL(return_code = config_register_control(7))) { return return_code; } #endif if(FAIL(return_code = config_register_zone(NULL, 8))) { return return_code; } #if HAS_RRL_SUPPORT if(FAIL(return_code = config_register_rrl(9))) { return return_code; } #endif #if HAS_NSID_SUPPORT if(FAIL(return_code = config_register_nsid(10))) { return return_code; } #endif return return_code; } static ya_result yadifad_config_cmdline_callback(const struct cmdline_desc_s *desc, const char *arg_name, void *callback_owned) { if(strcmp(arg_name, "--") == 0) { return CMDLINE_ARG_STOP_PROCESSING_FLAG_OPTIONS; } return SUCCESS; } /** * There is an issue using buffer as a an input because there is no rewind feature (yet) * So at the second pass, the reader fails with a bogus error message. * * affected: ./sbin/yadifad/yadifad -d * outputs: cmdline: parsing error: command-line: 3: '
': No such file or directory * * @param argc * @param argv * @return */ ya_result yadifad_config_cmdline(int argc, char **argv) { input_stream config_is; config_error_s cfgerr; ya_result return_code; config_set_source(CONFIG_SOURCE_HIGHEST); if(FAIL(return_code = cmdline_parse(yadifad_cmdline, argc, argv, yadifad_config_cmdline_callback, NULL, &config_is))) { formatln("command line: %r", return_code); flushout(); return return_code; } config_set_source(CONFIG_SOURCE_CMDLINE); u32 cmdline_buffer_size = bytearray_input_stream_size(&config_is); u8* cmdline_buffer = bytearray_input_stream_detach(&config_is); input_stream_close(&config_is); if(FAIL(return_code = config_read_from_buffer((const char*)cmdline_buffer, cmdline_buffer_size, "command-line", &cfgerr))) { if(cfgerr.file[0] != '\0') { formatln("command line: '%s': %r", cfgerr.line, return_code); flushout(); } free(cmdline_buffer); return return_code; } free(cmdline_buffer); return_code = 0; if(cmdline_version_get() > 0) { yadifad_show_version(cmdline_version_get()); return_code++; } if(cmdline_help_get()) { yadifad_print_usage(); return_code++; } config_set_source(CONFIG_SOURCE_DEFAULT); if(return_code == 0) { if(ISOK(return_code = config_value_set_to_default("main", "config_file", &cfgerr))) { return_code = 0; } else { if(cfgerr.file[0] != '\0') { formatln("%s: %r", cfgerr.file, return_code); flushout(); } else { // should never happen formatln("error: %r", cfgerr.file, return_code); flushout(); } } } return return_code; } ya_result yadifad_config_read(const char *config_file) { config_error_s cfgerr; ya_result return_code; char configuration_file_path[PATH_MAX]; // if the passed value is a pointer into a configuration structure, // there is a risk that the value is freed and replaced by a different one // => bad // so a copy is done first strncpy(configuration_file_path, config_file, sizeof(configuration_file_path)); struct config_source_s sources[1]; config_source_set_file(&sources[0], configuration_file_path, CONFIG_SOURCE_FILE); database_zone_reconfigure_begin(); return_code = config_read_from_sources(sources, 1, &cfgerr); if(FAIL(return_code)) { if(cfgerr.file[0] != '\0') { formatln("%s: parsing error: %s: %u: '%s': %r", config_file, cfgerr.file, cfgerr.line_number, cfgerr.line, return_code); } } database_zone_reconfigure_end(); return return_code; } ya_result yadifad_config_finalise() { ya_result return_code = SUCCESS; config_set_source(CONFIG_SOURCE_DEFAULT); // disable loggers without any channel output for(const struct logger_name_handle_s *name_handle = logger_name_handles; name_handle->name != NULL; name_handle++) { if(logger_handle_count_channels(name_handle->name) == 0) { logger_handle_close(name_handle->name); } } return return_code; } ya_result config_read_zones() { return ERROR; // not implemented } ya_result yadifad_config_update(const char *config_file) { log_debug("yadifad_config_update(%s) started", config_file); config_error_s cfgerr; ya_result return_code = ERROR; /// @todo apply ZONE_STATUS_DROP_AFTER_RELOAD /// @todo There MUST be an event that clears a "reloading" status, in order /// to block smashing the HUPs if(!database_zone_is_reconfigure_enabled()) { database_zone_reconfigure_begin(); database_set_drop_after_reload(); config_set_source(CONFIG_SOURCE_FILE); #if HAS_TSIG_SUPPORT tsig_serial_next(); #endif if(ISOK(return_code = config_read_section(config_file, &cfgerr, "key"))) { if(ISOK(return_code = config_read_section(config_file, &cfgerr, "zone"))) { database_do_drop_after_reload(); } else { if(cfgerr.file[0] != '\0') { ttylog_err("%s: parsing error: %s: %u: '%s': %r", config_file, cfgerr.file, cfgerr.line_number, cfgerr.line, return_code); } else { ttylog_err("%r", return_code); } } } else { if(cfgerr.file[0] != '\0') { ttylog_err("%s: parsing error: %s: %u: '%s': %r", config_file, cfgerr.file, cfgerr.line_number, cfgerr.line, return_code); } else { ttylog_err("%r", return_code); } } database_zone_reconfigure_end(); } else { ttylog_err("previous reconfigure still running, ignoring this one"); } log_debug("yadifad_config_update(%s): %r", config_file, return_code); return return_code; } static ya_result yadifad_config_update_zone_filter(zone_desc_s *zone_desc, void *params) { u8 *fqdn = (u8*)params; if((fqdn == NULL) || dnsname_equals_ignorecase(zone_desc->origin, fqdn)) { return 1; } else { return 0; } } ya_result yadifad_config_update_zone(const char *config_file, const u8 *fqdn) { if(fqdn != NULL) { log_debug("yadifad_config_update_zone(%s, %{dnsname}) started", config_file, fqdn); } else { log_debug("yadifad_config_update_zone(%s, ALL) started", config_file); } config_error_s cfgerr; ya_result return_code = ERROR; /// @todo apply ZONE_STATUS_DROP_AFTER_RELOAD /// @todo There MUST be an event that clears a "reloading" status, in order /// to block smashing the HUPs if(!database_zone_is_reconfigure_enabled()) { database_zone_reconfigure_begin(); database_set_drop_after_reload(); config_set_source(CONFIG_SOURCE_FILE); #if HAS_TSIG_SUPPORT tsig_serial_next(); #endif if(ISOK(return_code = config_read_section(config_file, &cfgerr, "key"))) { config_section_zone_set_filter(yadifad_config_update_zone_filter, (void*)fqdn); // the filter will not modify the fqdn return_code = config_read_section(config_file, &cfgerr, "zone"); config_section_zone_set_filter(NULL, NULL); if(ISOK(return_code)) { database_do_drop_after_reload(); } else { if(cfgerr.file[0] != '\0') { ttylog_err("%s: parsing error: %s: %u: '%s': %r", config_file, cfgerr.file, cfgerr.line_number, cfgerr.line, return_code); } else { ttylog_err("%r", return_code); } } } else { if(cfgerr.file[0] != '\0') { ttylog_err("%s: parsing error: %s: %u: '%s': %r", config_file, cfgerr.file, cfgerr.line_number, cfgerr.line, return_code); } else { ttylog_err("%r", return_code); } } database_zone_reconfigure_end(); } else { ttylog_err("previous reconfigure still running, ignoring this one"); } log_debug("yadifad_config_update_zone(%s, ...): %r", config_file, return_code); return return_code; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database.h0000644000077100007710000000012412650131756020613 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.049344 30 ctime=1454597653.073344534 yadifa-2.1.6-5826/sbin/yadifad/database.h0000664000077100007710000001033012650131756020415 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef DATABASE_H_ #define DATABASE_H_ #ifdef __cplusplus extern "C" { #endif /*----------------------------------------------------------------------------*/ #include "config.h" #include #include #include #include #include "zone.h" /* List of database type in string form */ #define DB_STRING_NO "no database" #define DATABASE_JOURNAL_MINIMUM_SIZE 65536 void database_init(); void database_finalize(); ya_result database_clear_zones(zdb *database, zone_data_set *dset); ya_result database_startup(zdb **); /** \brief Get dns answer from database * * @param mesg * * @retval OK * @retval NOK * @return status of message is written in mesg->status */ void database_query(zdb *database, message_data *mesg); #if HAS_RRL_SUPPORT /** \brief Get dns answer from database * * Get dns answer from database * * @param mesg * * @return RRL code */ ya_result database_query_with_rrl(zdb *db, message_data *mesg); #endif /** * A task is a function called in the main thread loop * A delegate is a task we are waiting for */ void database_delegate_query(zdb *database, message_data *mesg); finger_print database_update(zdb *database, message_data *mesg); finger_print database_delegate_update(zdb *database, message_data *mesg); ya_result database_print_zones(zone_desc_s *, char *); ya_result database_shutdown(zdb *); /* Slave only */ ya_result database_zone_refresh_maintenance_wih_zone(zdb_zone* zone, u32 next_alarm_epoch); ya_result database_zone_refresh_maintenance(zdb *database, const u8 *origin, u32 next_alarm_epoch); bool database_are_all_zones_saved_to_disk(); void database_wait_all_zones_saved_to_disk(); void database_disable_all_zone_save_to_disk(); /* ------------------------------------------------------------ */ #ifdef __cplusplus } #endif #endif /* DATABASE_H_ */ /* ------------------------------------------------------------ */ /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-freeze.h0000644000077100007710000000012412650131756024500 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.918344 30 ctime=1454597653.045344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-freeze.h0000664000077100007710000000374112650131756024312 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #include "zone_desc.h" void database_service_zone_freeze(zone_desc_s *zone_desc); /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/ltmain.sh0000644000077100007710000000013012473714653020521 xustar000000000000000029 mtime=1424988587.71705841 29 atime=1424988587.71705841 30 ctime=1454597653.203344534 yadifa-2.1.6-5826/sbin/yadifad/ltmain.sh0000644000077100007710000117077112473714653020345 0ustar00yadifayadifa00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.6 package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # 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 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # 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 "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # 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 3 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --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 --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message 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. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # 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= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE 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. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # 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 () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` 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 "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # 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. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # 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 func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # 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= pie_flag= 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) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append 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,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append 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. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; 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 no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock 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 yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; 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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [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: $progname [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 -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler 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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [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 -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -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 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -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 -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -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] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) 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: $progname [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." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" 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 -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # 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 else 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 else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" 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" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; 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. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append 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 -e "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. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_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 test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append 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 func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_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 func_basename "$file" destfile=$func_basename_result 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 func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "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) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # 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/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) 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*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; 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 "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # 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. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd 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 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac 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_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= 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 func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result 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 func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_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've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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. sed_quote_subst='$sed_quote_subst' # Be 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 variables: generated_by_libtool_version='$macro_version' 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 file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ 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 "\ # 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 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # 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 \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} 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 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #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 # define FOPEN_WB "wb" # 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 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ 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]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); 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 = (size_t) (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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } 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 (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" 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 func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" 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 # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir 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 func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework 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*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # 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-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext 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 ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" 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. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'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\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. 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 $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; 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 $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append 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 notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; 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 .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # 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 yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else 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 use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # 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 func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" 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. func_append dlprefiles " $lib $dependency_libs" else func_append 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 func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && 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 func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || 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 *"$absdir:"*) ;; *) func_append 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && 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 built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; 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 lib = "$linkmode" && test yes = "$hardcode_into_libs"; 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 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* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' 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 prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; 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 (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; 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 elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; 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 yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; 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 [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; 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 prog = "$linkmode"; 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 unsupported != "$hardcode_direct"; 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 yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; 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 cannot 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 yes = "$module"; 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 no = "$build_old_libs"; 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 lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # 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 "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=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 "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # 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 func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; 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 test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # 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=$1 number_minor=$2 number_revision=$3 # # 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 # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; esac ;; no) current=$1 revision=$2 age=$3 ;; 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]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" 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 func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result 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 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; 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 no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; 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 | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "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 func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; 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 "*) ;; *) func_append 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 "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-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 yes = "$build_libtool_need_lc"; then func_append 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. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi 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 "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append 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 func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; 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 ;; esac ;; 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 with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; 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 no = "$build_old_libs"; 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 no = "$allow_undefined"; 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 no = "$build_old_libs"; 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 # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append 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 yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append 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 "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append 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 relink = "$opt_mode" || 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 shift realname=$1 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 func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "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" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && 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 : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # 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 func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result 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~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "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 $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } 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\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && 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 fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( 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 relink = "$opt_mode"; then $opt_dry_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 func_show_eval '${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 func_show_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 yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_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= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${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" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append 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 "*) ;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append 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 yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } 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 func_append 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 func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result 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 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # 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 func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$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 eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$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= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; 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 "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; 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) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_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 no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false 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) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; 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 $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where 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 build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database.c0000644000077100007710000000012412650131756020606 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.026344 30 ctime=1454597653.266344534 yadifa-2.1.6-5826/sbin/yadifad/database.c0000664000077100007710000015244512650131756020426 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup server * @ingroup yadifad * @brief database functions * * Implementation of routines for the database * - add zone file(s) * - clear zone file(s) * - print zone files(s) * - load db * - unload db * - lookup database result of a message * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if HAS_DYNUPDATE_SUPPORT #include #endif #include #include #include #include #include #include #include #include #include "server.h" #include "database.h" #include "database-service.h" #include "server_error.h" #include "config_error.h" #include "notify.h" #include "zone.h" #include "zone_desc.h" #if HAS_RRL_SUPPORT #include "rrl.h" #endif #define DBSCHEDP_TAG 0x5044454843534244 #define DBREFALP_TAG 0x504c414645524244 #define MODULE_MSG_HANDLE g_server_logger typedef struct database_zone_refresh_alarm_args database_zone_refresh_alarm_args; struct database_zone_refresh_alarm_args { const u8 *origin; }; /* Zone file variables */ extern zone_data_set database_zone_desc; /*------------------------------------------------------------------------------ * FUNCTIONS */ static zdb_zone_path_provider_callback *database_zone_path_next_provider = NULL; static zdb_zone_info_provider_callback *database_info_next_provider = NULL; /** * The hash function that gives a number from an ASCIIZ string * * @param p ASCIIZ string * * @return the hash */ static u32 database_zone_path_provider_name_hash(const u8 *p) { u32 h = 0; u32 c; u8 s = 0; do { c = toupper(*p++); c &= 0x3f; h += c << (s & 15); h += 97; s += 13; } while(c != 0); return h; } /** * * Returns the hashed folder path for a zone. * * @param data_path the target buffer for the data path * @param data_path_size the target buffer size * @param base_data_path the base folder * @param origin the origin of the zone * * @return */ static ya_result database_zone_path_provider_get_hashed_name(char *data_path, u32 data_path_size, const char *base_data_path, const u8 *origin) { u32 h = database_zone_path_provider_name_hash(origin); return snformat(data_path, data_path_size, "%s/%02x/%02x", base_data_path, h & 0xff, (h >> 8) & 0xff); } static ya_result database_zone_path_provider(const u8* domain_fqdn, char *path_buffer, u32 path_buffer_size, u32 flags) { ya_result ret = ERROR; #ifdef DEBUG char *original_path_buffer = path_buffer; u32 original_flags = flags; original_path_buffer[0] = '\0'; #endif char *suffix = ""; if((flags & ZDB_ZONE_PATH_PROVIDER_RNDSUFFIX) != 0) { flags &= ~ZDB_ZONE_PATH_PROVIDER_RNDSUFFIX; suffix = ".part"; } zone_desc_s *zone_desc = zone_acquirebydnsname(domain_fqdn); if(zone_desc != NULL) { switch(flags & ~ZDB_ZONE_PATH_PROVIDER_MKDIR) { case ZDB_ZONE_PATH_PROVIDER_ZONE_PATH: { if(ISOK(ret = snformat(path_buffer, path_buffer_size, "%s%s", g_config->data_path, zone_desc->file_name))) { int n = ret; while(n > 0) { if(path_buffer[n] == '/') { path_buffer[n] = '\0'; break; } n--; } if((flags & ZDB_ZONE_PATH_PROVIDER_MKDIR) != 0) { ret = mkdir_ex(path_buffer, 0750, 0); flags &= ~ZDB_ZONE_PATH_PROVIDER_MKDIR; } } break; } case ZDB_ZONE_PATH_PROVIDER_ZONE_FILE: { if(ISOK(ret = snformat(path_buffer, path_buffer_size, "%s%s%s", g_config->data_path, zone_desc->file_name, suffix))) { if((flags & ZDB_ZONE_PATH_PROVIDER_MKDIR) != 0) { ret = mkdir_ex(path_buffer, 0750, MKDIR_EX_PATH_TO_FILE); flags &= ~ZDB_ZONE_PATH_PROVIDER_MKDIR; } } break; } case ZDB_ZONE_PATH_PROVIDER_AXFR_PATH: { if(ISOK(ret = database_zone_path_provider_get_hashed_name(path_buffer, path_buffer_size, g_config->xfr_path, domain_fqdn))) { if((flags & ZDB_ZONE_PATH_PROVIDER_MKDIR) != 0) { ret = mkdir_ex(path_buffer, 0750, 0); flags &= ~ZDB_ZONE_PATH_PROVIDER_MKDIR; } } break; } case ZDB_ZONE_PATH_PROVIDER_AXFR_FILE: { if(ISOK(ret = database_zone_path_provider_get_hashed_name(path_buffer, path_buffer_size, g_config->xfr_path, domain_fqdn))) { if((flags & ZDB_ZONE_PATH_PROVIDER_MKDIR) != 0) { ret = mkdir_ex(path_buffer, 0750, 0); flags &= ~ZDB_ZONE_PATH_PROVIDER_MKDIR; } s32 path_size = ret; path_buffer += ret; path_buffer_size -= ret; if(ISOK(ret = snformat(path_buffer, path_buffer_size, "/%{dnsname}.axfr%s", domain_fqdn, suffix))) { ret += path_size; } } break; } case ZDB_ZONE_PATH_PROVIDER_DNSKEY_PATH: { if(zone_desc->keys_path != NULL) { if(zone_desc->keys_path[0] != '/') { ret = snformat(path_buffer, path_buffer_size, "%s/%s", g_config->data_path, zone_desc->keys_path); } else { ret = snformat(path_buffer, path_buffer_size, "%s", zone_desc->keys_path); } } else { ret = snformat(path_buffer, path_buffer_size, "%s/", g_config->keys_path); } break; } default: { ret = database_zone_path_next_provider(domain_fqdn, path_buffer, path_buffer_size, flags); break; } } zone_release(zone_desc); } #ifdef DEBUG log_debug("path-provider: %{dnsname}: %02x: path='%s': %r", domain_fqdn, original_flags, original_path_buffer, ret); #endif return ret; } static ya_result database_info_provider(const u8 *origin, zdb_zone_info_provider_data *data, u32 flags) { ya_result ret = ERROR; switch(flags) { case ZDB_ZONE_INFO_PROVIDER_STORED_SERIAL: { // get the zone desc and check zone_desc_s *zone_desc = zone_acquirebydnsname(origin); if(zone_desc != NULL) { data->_u32 = zone_desc->stored_serial; zone_release(zone_desc); ret = SUCCESS; } break; } case ZDB_ZONE_INFO_PROVIDER_MAX_JOURNAL_SIZE: { // get the zone desc and check zone_desc_s *zone_desc = zone_acquirebydnsname(origin); if(zone_desc != NULL) { yassert(zone_desc->journal_size_kb <= 8388608); u64 max_size = zone_desc->journal_size_kb; if(max_size > 0) { // the size has been set by the admin max_size *= 1024; } else if(data->_u64 != 0) { // the caller gave the half the wire size of the zone max_size = data->_u64; } else { // nothing has been set, we have to look for the current mounted zone for its wire size zone_lock(zone_desc, ZONE_LOCK_LOAD); zdb_zone *zone = zone_get_loaded_zone(zone_desc); zone_unlock(zone_desc, ZONE_LOCK_LOAD); if(zone != NULL) { max_size = zone->wire_size >> 1; zdb_zone_release(zone); } else { // no zone found, return the default size max_size = DATABASE_JOURNAL_MINIMUM_SIZE; } } zone_release(zone_desc); if(max_size < DATABASE_JOURNAL_MINIMUM_SIZE) { max_size = DATABASE_JOURNAL_MINIMUM_SIZE; } if(max_size > MAX_U32) // current limitation { max_size = MAX_U32; } log_debug("database: %{dnsname} journal size set to %uKB", origin, max_size >> 10); data->_u64 = max_size; ret = SUCCESS; } break; } case ZDB_ZONE_INFO_PROVIDER_ZONE_TYPE: { // get the zone desc and check zone_desc_s *zone_desc = zone_acquirebydnsname(origin); if(zone_desc != NULL) { data->_u8 = (u8)zone_desc->type; zone_release(zone_desc); ret = SUCCESS; } break; } case ZDB_ZONE_INFO_PROVIDER_STORE_TRIGGER: { database_zone_save(origin); ret = SUCCESS; break; } case ZDB_ZONE_INFO_PROVIDER_STORE_NOW: { zone_desc_s *zone_desc = zone_acquirebydnsname(origin); if(zone_desc != NULL) { ret = database_service_zone_save_ex(zone_desc, 0, data->_u8, TRUE); } else { ret = ERROR; } break; } default: { ret = database_info_next_provider(origin, data, flags); break; } } return ret; } static dnslib_fingerprint server_getfingerprint() { dnslib_fingerprint ret = (dnslib_fingerprint)(0 #if HAS_TSIG_SUPPORT != 0 | DNSLIB_TSIG #endif #if HAS_ACL_SUPPORT != 0 | DNSLIB_ACL #endif #if HAS_NSEC_SUPPORT != 0 | DNSLIB_NSEC #endif #if HAS_NSEC3_SUPPORT != 0 | DNSLIB_NSEC3 #endif ); return ret; } /** * Initialises the database. * Ensures the libraries features are matched. * */ void database_init() { dnslib_fingerprint dbfp = dnsdb_getfingerprint(); dnslib_fingerprint svrfp = server_getfingerprint(); if(dbfp != svrfp) { fprintf(stderr,"mismatched fingerprint\n"); log_err("mismatched fingerprint"); exit(EXIT_FAILURE); } zdb_init(); dnszone_init(); dnscore_reset_timer(); database_zone_path_next_provider = zdb_zone_path_get_provider(); zdb_zone_path_set_provider(database_zone_path_provider); database_info_next_provider = zdb_zone_info_get_provider(); zdb_zone_info_set_provider(database_info_provider); } void database_finalize() { zdb_zone_path_set_provider(NULL); zdb_zone_info_set_provider(NULL); zdb_finalize(); } /** @brief Remove the zones from the database, * but do not remove the database file * * @param[in] database * @param[in] zone * * @retval OK */ ya_result database_clear_zones(zdb *database, zone_data_set *dset) { dnsname_vector fqdn_vector; zone_set_lock(dset); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&dset->set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s*)zone_node->value; dnsname_to_dnsname_vector(zone_desc->origin, &fqdn_vector); /// @todo edf 20141006 -- verify zone_desc->qclass zdb_zone *myzone = zdb_remove_zone(database, &fqdn_vector); if(myzone != NULL) { zdb_zone_release(myzone); } } zone_set_unlock(dset); return OK; } /** @brief Creates the (IN) database * * Starts to load the content. * * @param[out] database pointer to a pointer to the database * * @return an error code */ /** * @NOTE THIS IS SUPPOSED TO BE RUN BEFORE THE SERVER STARTS ! */ ya_result database_startup(zdb **database) { ya_result return_code; zdb* db; /* ------------------------------------------------------------ */ if(g_config->data_path == NULL) { return CONFIG_ZONE_ERR; } *database = NULL; database_init(); /* Inits the db, starts the threads of the pool, resets the timer */ MALLOC_OR_DIE(zdb*, db, sizeof (zdb), GENERIC_TAG); zdb_create(db); // add all the registered zones as invalid *database = db; database_service_create_invalid_zones(); if(ISOK(return_code = database_service_start())) { database_load_all_zones(); } return return_code; } /****************************************************************************/ /** \brief Get dns answer from database * * Get dns answer from database * CANNOT FAIL * * @param mesg */ void database_query(zdb *db, message_data *mesg) { finger_print query_fp; zdb_query_ex_answer ans_auth_add; /* ------------------------------------------------------------ */ mesg->send_length = mesg->received; zdb_query_ex_answer_create(&ans_auth_add); query_fp = zdb_query_ex(db, mesg, &ans_auth_add, mesg->pool_buffer); /** * @todo : do it when it's true only */ mesg->status = query_fp; mesg->send_length = zdb_query_message_update(mesg, &ans_auth_add); mesg->referral = ans_auth_add.delegation; zdb_query_ex_answer_destroy(&ans_auth_add); #if HAS_TSIG_SUPPORT if(TSIG_ENABLED(mesg)) /* NOTE: the TSIG information is in mesg */ { tsig_sign_answer(mesg); } #endif } #if HAS_RRL_SUPPORT /** \brief Get dns answer from database * * Get dns answer from database * * @param mesg * * @return RRL code */ ya_result database_query_with_rrl(zdb *db, message_data *mesg) { finger_print query_fp; zdb_query_ex_answer ans_auth_add; /* ------------------------------------------------------------ */ mesg->send_length = mesg->received; zdb_query_ex_answer_create(&ans_auth_add); query_fp = zdb_query_ex(db, mesg, &ans_auth_add, mesg->pool_buffer); /** * @todo : do it when it's true only */ mesg->status = query_fp; // RRL should be computed here ya_result rrl = rrl_process(mesg, &ans_auth_add); switch(rrl) { case RRL_PROCEED: { mesg->send_length = zdb_query_message_update(mesg, &ans_auth_add); mesg->referral = ans_auth_add.delegation; break; } case RRL_SLIP: { log_debug("rrl: slip"); mesg->referral = ans_auth_add.delegation; break; } case RRL_DROP: { // DON'T PROCEED AT ALL log_debug("rrl: drop"); break; } } zdb_query_ex_answer_destroy(&ans_auth_add); #if HAS_TSIG_SUPPORT if(TSIG_ENABLED(mesg)) /* NOTE: the TSIG information is in mesg */ { tsig_sign_answer(mesg); } #endif return rrl; } #endif /****************************************************************************/ #if HAS_DYNUPDATE_SUPPORT /** @todo icmtl, checks, fp, soa, ... * - dynupdate_icmtlhook_enable must be called if there are some slave name severs * - check the functions, which is not tested yet * - fingerprint instead of ya_result for return_code * - soa has to be called * - check BUFFER_OVERRUN */ finger_print database_update(zdb *database, message_data *mesg) { ya_result return_code; u16 count; /* u16 qdcount; */ packet_unpack_reader_data reader; dnsname_vector name; zdb_zone *zone; u8 wire[MAX_DOMAIN_LENGTH + 10 + 65535]; return_code = FP_NOZONE_FOUND; mesg->send_length = mesg->received; zone_desc_s *zone_desc = zone_acquirebydnsname(mesg->qname); if(zone_desc != NULL) { zone_lock(zone_desc, ZONE_LOCK_DYNUPDATE); switch(zone_desc->type) { case ZT_MASTER: { /* ------------------------------------------------------------ */ MESSAGE_HIFLAGS(mesg->buffer) |= QR_BITS; /* * Unpack the query */ packet_reader_init(&reader, mesg->buffer, mesg->received); reader.offset = DNS_HEADER_LENGTH; /* qdcount = MESSAGE_QD(mesg->buffer); */ dnsname_to_dnsname_vector(mesg->qname, &name); /// @todo edf 20141006 -- verify class mesg->qclass zone = zdb_acquire_zone_read_double_lock(database, &name, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_DYNUPDATE); if(zone != NULL && !ZDB_ZONE_INVALID(zone)) { /* * If the zone is marked as: * _ frozen * _ updating * _ signing * _ dumping * => don't do it */ if((zone->apex->flags & ZDB_RR_APEX_LABEL_FROZEN) == 0) { #if HAS_ACL_SUPPORT if(ACL_REJECTED(acl_check_access_filter(mesg, &zone_desc->ac.allow_update))) { /* notauth */ zdb_zone_release_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_DYNUPDATE); zone_unlock(zone_desc, ZONE_LOCK_DYNUPDATE); zone_release(zone_desc); log_info("database: update: not authorised"); mesg->status = FP_ACCESS_REJECTED; return (finger_print)ACL_UPDATE_REJECTED; } #endif /* * If the zone is DNSSEC and we don't have all the keys or don't know how to use them : SERVFAIL */ return_code = SUCCESS; if(zdb_zone_is_dnssec(zone)) { if(zone_maintains_dnssec(zone_desc)) { /* * Fetch all private keys */ log_debug("database: update: checking DNSKEY availability"); const zdb_packed_ttlrdata *dnskey = zdb_zone_get_dnskey_rrset(zone); int ksk_count = 0; int zsk_count = 0; if(dnskey != NULL) { char origin[MAX_DOMAIN_LENGTH]; dnsname_to_cstr(origin, zone->origin); do { u16 flags = DNSKEY_FLAGS(*dnskey); //u8 protocol = DNSKEY_PROTOCOL(*dnskey); u8 algorithm = DNSKEY_ALGORITHM(*dnskey); u16 tag = DNSKEY_TAG(*dnskey); // note: expensive dnssec_key *key = NULL; if(FAIL(return_code = dnssec_key_load_private(algorithm, tag, flags, origin, &key))) { log_warn("database: update: unable to load the private key 'K%{dnsname}+%03d+%05d': %r", zone->origin, algorithm, tag, return_code); } if(flags == DNSKEY_FLAGS_KSK) { ++ksk_count; } else if(flags == DNSKEY_FLAGS_ZSK) { ++zsk_count; } else { // the key is of no use } dnskey = dnskey->next; } while(dnskey != NULL); return_code = zsk_count; if(zsk_count == 0) { log_err("database: update: unable to load any of the ZSK private keys of zone %{dnsname}", zone->origin); return_code = DNSSEC_ERROR_RRSIG_NOUSABLEKEYS; } if(ksk_count == 0) { log_warn("database: update: unable to load any of the KSK private keys of zone %{dnsname}", zone->origin); } } else { log_err("database: update: there are no private keys in the zone %{dnsname}", zone->origin); return_code = DNSSEC_ERROR_RRSIG_NOZONEKEYS; } } else { log_warn("database: update: cannot update %{dnsname} because DNSSEC maintenance has been disabled on the zone", zone->origin); return_code = SERVER_ERROR_CODE(RCODE_SERVFAIL); mesg->status = (finger_print)RCODE_SERVFAIL; } } /// @todo edf 20150127 -- if at least one key has been loaded, it should continue if(ISOK(return_code)) /// { /* The reader is positioned after the header : read the QR section */ if(ISOK(return_code = packet_reader_read_zone_record(&reader, wire, sizeof(wire)))) { /* * The zone is known with the previous record. * Since I'm just testing the update per se, I'll ignore this. */ count = ntohs(MESSAGE_PR(mesg->buffer)); /* The reader is positioned after the QR section, read AN section */ /// @todo edf 20141008 -- this lock is too early, it should be moved just before the actual run #if 1 zdb_zone_exchange_locks(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_DYNUPDATE); bool locked = TRUE; #else u64 start = timeus(); u64 now; u64 locktimeout = 2000000; /// @todo edf 20141008 -- 2 seconds, make this configurable bool locked; do { // zone was double-locked, now only locked for dynupdate if((locked = zdb_zone_try_transfer_lock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_DYNUPDATE))) { break; } usleep(1000); now = timeus(); } while(now - start < locktimeout); #endif if(locked) { // from this point, the zone is single-locked bool need_to_notify_slaves = FALSE; log_debug("database: update: processing %d prerequisites", count); if(ISOK(return_code = dynupdate_check_prerequisites(zone, &reader, count))) { count = ntohs(MESSAGE_UP(mesg->buffer)); u32 reader_up_offset = reader.offset; /* * Dry run the update for the section * (so the DB will not be broken if the query is bogus) */ log_debug("database: update: dryrun of %d updates", count); if(ISOK(return_code = dynupdate_update(zone, &reader, count, DYNUPDATE_UPDATE_DRYRUN))) // ARC { /* * Really run the update for the section */ reader.offset = reader_up_offset; /** * @todo At this point it should not fail anymore. */ log_debug("database: update: opening journal page"); zdb_icmtl icmtl; if(ISOK(return_code = zdb_icmtl_begin(&icmtl, zone))) { log_debug("database: update: run of %d updates", count); ya_result len = dynupdate_update(zone, &reader, count, DYNUPDATE_UPDATE_RUN); // ARC if(ISOK(len)) { //mesg->send_length = mesg->received; /** @TODO I have to be able to cancel the icmtl if it failed */ log_info("database: update: update of zone '%{dnsname}' succeeded", zone->origin); } else { log_err("database: update: update of zone '%{dnsname}' failed even if the dryrun succeeded: %r", zone->origin, len); } len = zdb_icmtl_end(&icmtl); if(len > 0) { zone_desc->status_flags |= ZONE_STATUS_MODIFIED; need_to_notify_slaves = TRUE; } log_debug("database: update: closed journal page"); /** * * @todo postponed after 1.0.0 * * The journal file may exceed limits ... * * In that case the server will want to: * * _ disable dynamic updates * _ update the zone file on disk to the current version * _ cut the journal up to the last few serials * _ enable dynamic updates * * How to define limits: * * _ size on disk (easy) * _ number of records (hard to keep track in the current journal format so : no) * _ relative size on disk (proportional to the size of zone axfr/text) (easy too) * _ serial range of the incremental file is too big; too big being at most 2^30 but * practically 2^17 increments of serial is very expensive already. * * These limits must be made available to the server so it can take measures to * fix them. * */ mesg->status = FP_MESG_OK; /* @TODO handle error codes too */ } else { mesg->status = (finger_print)RCODE_SERVFAIL; } } else { /* * ZONE CANNOT BE UPDATED (internal error or rejected) */ mesg->status = (finger_print)RCODE_SERVFAIL; } } else { /* * ZONE CANNOT BE UPDATED (prerequisites not met) */ log_warn("database: update: prerequisites not met updating %{dnsname}", mesg->qname); mesg->status = (finger_print)RCODE_SERVFAIL; } #if 1 zdb_zone_exchange_locks(zone, ZDB_ZONE_MUTEX_DYNUPDATE, ZDB_ZONE_MUTEX_SIMPLEREADER); zdb_zone_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_DYNUPDATE); #else zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_DYNUPDATE); #endif if(need_to_notify_slaves) { notify_slaves(zone->origin); } zdb_zone_release(zone); } // lock timeout else { // we are still double-locked zdb_zone_release_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_DYNUPDATE); log_warn("database: update: timeout trying to lock the zone %{dnsname}", mesg->qname); mesg->status = (finger_print)RCODE_SERVFAIL; } } else { mesg->status = (finger_print)RCODE_FORMERR; zdb_zone_release_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_DYNUPDATE); } } else { /* * ZONE CANNOT BE UPDATED (missing private keys) */ mesg->status = FP_CANNOT_DYNUPDATE; zdb_zone_release_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_DYNUPDATE); } } else { /* * ZONE CANNOT BE UPDATED (frozen) */ mesg->status = FP_CANNOT_DYNUPDATE; zdb_zone_release_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_DYNUPDATE); } } else { // zone is null or invalid // if not null, it is double-locked for ZDB_ZONE_MUTEX_SIMPLEREADER and ZDB_ZONE_MUTEX_DYNUPDATE /** * 2136: * * if any RR's NAME is not * within the zone specified in the Zone Section, signal NOTZONE to the * requestor. * */ if(zone == NULL) { mesg->status = FP_UPDATE_UNKNOWN_ZONE; } else { zdb_zone_release_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_DYNUPDATE); mesg->status = FP_INVALID_ZONE; } } break; } /** * @todo : dynamic update forwarding ... */ case ZT_SLAVE: { /* * UPDATE FORWARDING * * TCP -> TCP * UDP -> TCP or UDP * * So this implementation will always to TCP * * Open a connection to the master. * Create a duplicate of the message changing only the ID * I CANNOT EDIT THE SAME MESSAGE BECAUSE OF THE POSSIBLE TSIG * TSIG if needed. * Send the message. * Wait for the answer and retry if needed. * Forward back the answer to the caller. */ #if HAS_ACL_SUPPORT if(!ACL_REJECTED(acl_check_access_filter(mesg, &zone_desc->ac.allow_update_forwarding))) { random_ctx rndctx = thread_pool_get_random_ctx(); u16 id = (u16)random_next(rndctx); message_data forward; message_make_query(&forward, id, (const u8*)"", 0, 0); /* just initialise a basic query */ memcpy(forward.buffer, mesg->buffer, mesg->received); forward.send_length = mesg->received; // if no TSIG or succeeded in TSIGing the message ... #if HAS_TSIG_SUPPORT if((zone_desc->masters->tsig == NULL) || ISOK(return_code = message_sign_query(&forward, zone_desc->masters->tsig))) { #endif // send a TCP query to the master if(ISOK(return_code = message_query_tcp(&forward, zone_desc->masters))) { memcpy(mesg->buffer, forward.buffer, forward.received); mesg->send_length = forward.received; mesg->status = forward.status; } #if HAS_TSIG_SUPPORT } #endif } else #endif { mesg->status = FP_CANNOT_DYNUPDATE; return_code = FP_CANNOT_DYNUPDATE; message_make_error(mesg, return_code); } break; } default: { mesg->status = FP_CANNOT_DYNUPDATE; return_code = FP_CANNOT_DYNUPDATE; message_make_error(mesg, return_code); break; } } zone_unlock(zone_desc, ZONE_LOCK_DYNUPDATE); zone_release(zone_desc); } else { /* zone is not even known by the configuration */ mesg->status = FP_UPDATE_UNKNOWN_ZONE; } MESSAGE_LOFLAGS(mesg->buffer) = (MESSAGE_LOFLAGS(mesg->buffer)&~RCODE_BITS) | mesg->status; #if HAS_TSIG_SUPPORT if(TSIG_ENABLED(mesg)) { log_debug("database: update: signing reply"); tsig_sign_answer(mesg); } #endif return (finger_print)return_code; } #endif /** @brief Close the database * * @param[in] database * * @retval OK * @retval NOK */ ya_result database_shutdown(zdb *database) { database_service_stop(); #ifdef DEBUG if(database != NULL) { zdb_destroy(database); free(database); } #endif database_finalize(); g_config->database = NULL; return OK; } static ya_result database_zone_refresh_alarm(void *args, bool cancel) { database_zone_refresh_alarm_args *sszra = (database_zone_refresh_alarm_args*)args; if(cancel) { free((char*)sszra->origin); #ifdef DEBUG memset(sszra, 0xff, sizeof(database_zone_refresh_alarm_args)); #endif free(sszra); return SUCCESS; } const u8 *origin = sszra->origin; zdb *db = g_config->database; zdb_zone *zone; ya_result return_value; u32 now = 0; u32 next_alarm_epoch = 0; soa_rdata soa; log_info("database: refresh: zone %{dnsname}", origin); zone_desc_s *zone_desc = zone_acquirebydnsname(origin); if(zone_desc == NULL) { log_err("database: refresh: zone %{dnsname}: not found", origin); free((char*)sszra->origin); free(sszra); return ERROR; } zone = zdb_acquire_zone_read_from_fqdn(db, zone_desc->origin); if(zone != NULL) { /** * check if the zone is locked. postpone if it is */ if(zdb_zone_trylock(zone, ZDB_ZONE_MUTEX_REFRESH)) { if(FAIL(return_value = zdb_zone_getsoa(zone, &soa))) { zdb_zone_release(zone); /* * No SOA ? It's critical */ free(sszra); log_quit("database: refresh: zone %{dnsname}: get soa: %r", origin, return_value); return ERROR; } now = time(NULL); // defines 3 epoch printers (to be used with %w) u32 rf = zone_desc->refresh.refreshed_time; u32 rt = zone_desc->refresh.retried_time; u32 un = zone_desc->refresh.zone_update_next_time; EPOCH_DEF(rf); EPOCH_DEF(rt); EPOCH_DEF(un); log_debug("database: refresh: zone %{dnsname}: refreshed=%w retried=%w next=%w refresh=%i retry=%i expire=%i", origin, EPOCH_REF(rf), EPOCH_REF(rt), EPOCH_REF(un), soa.refresh, soa.retry, soa.expire ); // if the last time refreshed is at or after the last time we retried if(zone_desc->refresh.refreshed_time >= zone_desc->refresh.retried_time) { // then we are not retrying ... // if now is after the last refreshed time + the refresh time if(now >= zone_desc->refresh.refreshed_time + soa.refresh) { // then do a refresh log_info("database: refresh: zone %{dnsname}: refresh", origin); zone_desc->refresh.retried_time = zone_desc->refresh.refreshed_time + 1; // next time we will check for the refresh status will be now + retry ... next_alarm_epoch = now + soa.retry; database_zone_ixfr_query(zone_desc->origin); } else { // next time we will check for the refresh status will be now + refresh ... log_info("database: refresh: zone %{dnsname}: refresh in %d seconds", origin, zone_desc->refresh.refreshed_time + soa.refresh - now); next_alarm_epoch = zone_desc->refresh.refreshed_time + soa.refresh; } } else { // else we are retrying ... if(now < zone_desc->refresh.refreshed_time + soa.expire) { // then we have not expired yet ... // next time we will check for the refresh status will be now + retry ... next_alarm_epoch = now + soa.retry; if(now >= zone_desc->refresh.retried_time + soa.retry) { // then do a retry ... log_info("database: refresh: zone %{dnsname}: retry", origin); database_zone_ixfr_query(zone_desc->origin); } else { log_debug("database: refresh: zone %{dnsname}: not retry time yet", origin); } } else { // else the zone is not authoritative anymore log_warn("database: refresh: zone %{dnsname}: expired", origin); zone->apex->flags |= ZDB_RR_LABEL_INVALID_ZONE; } } zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_REFRESH); } else { log_info("database: refresh: zone %{dnsname}: has already been locked, will retry layer", origin); next_alarm_epoch = time(NULL) + 2; } zdb_zone_release(zone); } else { log_err("database: refresh: zone %{dnsname}: not mounted", origin); } if(next_alarm_epoch != 0) { /* * The alarm rang but nothing has been done */ EPOCH_DEF(next_alarm_epoch); log_warn("database: refresh: zone %{dnsname}: re-arming the alarm for %w", origin, EPOCH_REF(next_alarm_epoch)); database_zone_refresh_maintenance(db, origin, next_alarm_epoch); } else { log_warn("database: refresh: zone %{dnsname}: alarm will not be re-armed", origin); } free((char*)sszra->origin); #ifdef DEBUG memset(sszra, 0xff, sizeof(database_zone_refresh_alarm_args)); #endif free(sszra); zone_release(zone_desc); return SUCCESS; } ya_result database_zone_refresh_maintenance_wih_zone(zdb_zone* zone, u32 next_alarm_epoch) { if((zone != NULL) && ZDB_ZONE_VALID(zone)) { /* * Get the SOA from the zone */ /* * Check the last refresh time * If we need to refresh, then do it * If we failed, check when the next time to do it is * If we failed too much, check if we still are authoritative */ zdb_zone_lock(zone, ZDB_ZONE_MUTEX_REFRESH); /* here ! */ u32 now = time(NULL); ya_result return_value; soa_rdata soa; if(next_alarm_epoch == 0) { if(FAIL(return_value = zdb_zone_getsoa(zone, &soa))) { /* * No SOA ? It's critical */ zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_REFRESH); /* here ! */ log_err("database_zone_refresh_maintenance: get soa: %r", return_value); exit(EXIT_FAILURE); } next_alarm_epoch = now + soa.refresh; } database_zone_refresh_alarm_args *sszra; MALLOC_OR_DIE(database_zone_refresh_alarm_args*, sszra, sizeof(database_zone_refresh_alarm_args), DBREFALP_TAG); sszra->origin = dnsname_dup(zone->origin); alarm_event_node *event = alarm_event_alloc(); event->epoch = next_alarm_epoch; event->function = database_zone_refresh_alarm; event->args = sszra; event->key = ALARM_KEY_ZONE_REFRESH; event->flags = ALARM_DUP_REMOVE_LATEST; event->text = "database_zone_refresh_alarm"; alarm_set(zone->alarm_handle, event); zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_REFRESH); } else { /* * The zone has not been loaded (yet) */ if(zone != NULL) { log_debug("database_zone_refresh_maintenance: called on an invalid zone: %{dnsname}", zone->origin); } else { log_debug("database_zone_refresh_maintenance: called on a NULL zone"); } } return SUCCESS; } ya_result database_zone_refresh_maintenance(zdb *database, const u8 *origin, u32 next_alarm_epoch) { ya_result ret = SUCCESS; // no zone, no issue doing maintenance log_debug("database: refresh: database_zone_refresh_maintenance for zone %{dnsname} at %u", origin, next_alarm_epoch); zdb_zone *zone = zdb_acquire_zone_read_from_fqdn(database, origin); if(zone != NULL) { ret = database_zone_refresh_maintenance_wih_zone(zone, next_alarm_epoch); zdb_zone_release(zone); } return ret; } ya_result database_save_zone_to_disk(zone_desc_s *zone_desc) { database_zone_save(zone_desc->origin); return SUCCESS; } ya_result database_save_all_zones_to_disk() { /* * for all zones * put them in an array * while the array is not empty * for every zone in the array * try to freeze zone (lock) * if it worked, wait that it is frozen, then unfreeze it and remove it from the array * */ ya_result batch_return_value = 0; if(g_config->database == NULL) { return ERROR; } zone_set_lock(&database_zone_desc); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&database_zone_desc.set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s*)zone_node->value; if(zone_is_obsolete(zone_desc)) { continue; } database_save_zone_to_disk(zone_desc); } zone_set_unlock(&database_zone_desc); return batch_return_value; } bool database_are_all_zones_saved_to_disk() { bool can_unload; can_unload = TRUE; zone_set_lock(&database_zone_desc); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&database_zone_desc.set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s*)zone_node->value; if(zone_is_obsolete(zone_desc)) { continue; } if(zone_issavingfile(zone_desc)) { can_unload = FALSE; break; } } zone_set_unlock(&database_zone_desc); return can_unload; } void database_wait_all_zones_saved_to_disk() { while(!database_are_all_zones_saved_to_disk()) { log_info("database: still busy writing zone files: shutdown postponed"); sleep(1); } } void database_disable_all_zone_save_to_disk() { zone_set_lock(&database_zone_desc); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&database_zone_desc.set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s*)zone_node->value; if(zone_is_obsolete(zone_desc)) { continue; } zone_setsavingfile(zone_desc, FALSE); } zone_set_unlock(&database_zone_desc); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/config_main.c0000644000077100007710000000012412650131756021313 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.931344 30 ctime=1454597653.217344534 yadifa-2.1.6-5826/sbin/yadifad/config_main.c0000664000077100007710000004471512650131756021133 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup config Configuration handling * @ingroup yadifad * @brief * * @{ */ #define ZDB_JOURNAL_CODE 1 #include "server-config.h" #include #include #include #include #include #include "config.h" #include #include #include #include #include #include #include #include #include #include "confs.h" #include "config_error.h" #include "config_acl.h" #include "server_error.h" #include "process_class_ch.h" /* * */ #define CONFS_MAIN_C_ config_data *g_config = NULL; /*------------------------------------------------------------------------------ * MACROS */ /* tmp_config->process_flags |= PROCESS_FL_AUTHORITY_AUTH * S_AUTHORITY_AUTH; tmp_config->process_flags |= PROCESS_FL_AUTHORITY_CACHE * S_AUTHORITY_CACHE; */ /* Table with the parameters that can be set in the config file * main container */ #define CONFIG_TYPE config_data CONFIG_BEGIN(config_main_desc) CONFIG_FILE( config_file , S_CONFIGDIR S_CONFIGFILE ) CONFIG_STRING( config_file_dynamic , S_CONFIGDIR S_CONFIGFILEDYNAMIC ) /* Path to chroot, will be used if chroot is on */ CONFIG_CHROOT( chroot_path , S_CHROOTPATH ) /* Path to data which will be used for relative data */ CONFIG_PATH( data_path , S_DATAPATH ) /* Path which will be used for relative logs */ CONFIG_LOGPATH( log_path , S_LOGPATH ) CONFIG_PATH( xfr_path , S_XFRPATH ) /* Path to keys */ CONFIG_PATH( keys_path , S_KEYSPATH ) /* PID file */ CONFIG_STRING( pid_file , S_PIDFILE ) /* Switch for turning chroot, uid & gid off */ CONFIG_FLAG16( daemon , S_DAEMONRUN , server_flags, SERVER_FL_DAEMON ) CONFIG_FLAG16( chroot , S_CHROOT , server_flags, SERVER_FL_CHROOT ) CONFIG_UID( uid , S_UID ) CONFIG_GID( gid , S_GID ) // Above settings probably cannot be changed at run time // Below settings may be changed at runtime /* string used for query of version */ CONFIG_STRING( version_chaos , S_VERSION_CHAOS ) CONFIG_STRING( hostname_chaos , S_HOSTNAME_CHAOS ) CONFIG_STRING( serverid_chaos , S_SERVERID_CHAOS ) #if ZDB_HAS_ACL_SUPPORT CONFIG_ACL( allow_query , S_ALLOW_QUERY ) CONFIG_ACL( allow_update , S_ALLOW_UPDATE ) CONFIG_ACL( allow_transfer , S_ALLOW_TRANSFER ) CONFIG_ACL( allow_update_forwarding , S_ALLOW_UPDATE_FORWARDING ) CONFIG_ACL( allow_notify , S_ALLOW_NOTIFY ) CONFIG_ACL( allow_control , S_ALLOW_CONTROL ) #endif /* Listening to interfaces */ CONFIG_HOST_LIST(listen , S_LISTEN ) /* size of an EDNS0 packet */ CONFIG_U32_RANGE(edns0_max_size , S_EDNS0_MAX_SIZE ,EDNS0_MIN_LENGTH, EDNS0_MAX_LENGTH ) // overrides the cpu detection CONFIG_U32( cpu_count_override , S_CPU_COUNT_OVERRIDE ) // how many threads by address (UDP) CONFIG_U32( thread_count_by_address , S_THREAD_COUNT_BY_ADDRESS ) // how many threads for the dnssec processing) CONFIG_U32( dnssec_thread_count , S_DNSSEC_THREAD_COUNT ) CONFIG_U32( zone_load_thread_count , S_ZONE_LOAD_THREAD_COUNT ) CONFIG_U32( zone_download_thread_count , S_ZONE_DOWNLOAD_THREAD_COUNT ) /* Max number of TCP queries */ CONFIG_U32_RANGE(max_tcp_queries , S_MAX_TCP_QUERIES ,TCP_QUERIES_MIN, TCP_QUERIES_MAX) CONFIG_U32( tcp_query_min_rate , S_TCP_QUERY_MIN_RATE ) /* Ignores messages that would be answered by a FORMERR */ CONFIG_FLAG16( answer_formerr_packets , S_ANSWER_FORMERR_PACKETS , server_flags, SERVER_FL_ANSWER_FORMERR) /* Listen to port (eg 53) */ CONFIG_STRING( server_port , S_SERVERPORT ) /* Switch for cache server or not */ CONFIG_FLAG16( statistics , S_STATISTICS , server_flags, SERVER_FL_STATISTICS) /* Maximum number of seconds between two statistics lines */ CONFIG_U32( statistics_max_period , S_STATISTICS_MAX_PERIOD ) CONFIG_U32( xfr_connect_timeout , S_XFR_CONNECT_TIMEOUT ) CONFIG_U32( queries_log_type , S_QUERIES_LOG_TYPE ) #if HAS_DNSSEC_SUPPORT != 0 CONFIG_U16( sig_signing_type , S_SIG_SIGNING_TYPE ) CONFIG_U32_RANGE(sig_validity_interval , S_SIG_VALIDITY_INTERVAL , SIGNATURE_VALIDITY_INTERVAL_MIN , SIGNATURE_VALIDITY_INTERVAL_MAX ) /* 7 to 365 days = 30 */ CONFIG_U32_RANGE(sig_validity_regeneration , S_SIG_VALIDITY_REGENERATION, SIGNATURE_VALIDITY_REGENERATION_MIN , SIGNATURE_VALIDITY_REGENERATION_MAX) /* 24 hours to 168 hours */ CONFIG_U32_RANGE(sig_validity_jitter , S_SIG_VALIDITY_JITTER , SIGNATURE_VALIDITY_JITTER_MIN , SIGNATURE_VALIDITY_JITTER_MAX ) /* 0 to 86400 = 3600*/ CONFIG_ALIAS(sig_jitter, sig_validity_jitter) #endif CONFIG_U32_RANGE(axfr_max_record_by_packet , S_AXFR_MAX_RECORD_BY_PACKET , AXFR_RECORD_BY_PACKET_MIN , AXFR_RECORD_BY_PACKET_MAX ) CONFIG_U32_RANGE(axfr_max_packet_size , S_AXFR_PACKET_SIZE_MAX , AXFR_PACKET_SIZE_MIN , AXFR_PACKET_SIZE_MAX ) CONFIG_BOOL(axfr_compress_packets , S_AXFR_COMPRESS_PACKETS ) CONFIG_U32( axfr_retry_delay , S_AXFR_RETRY_DELAY ) CONFIG_U32( axfr_retry_jitter , S_AXFR_RETRY_JITTER ) /* alias, aliased */ CONFIG_ALIAS(port, server_port) CONFIG_ALIAS(version, version_chaos) CONFIG_ALIAS(hostname, hostname_chaos) CONFIG_ALIAS(serverid, serverid_chaos) CONFIG_ALIAS(chrootpath, chroot_path) //CONFIG_ALIAS(basepath, chroot_path) CONFIG_ALIAS(configfile, config_file) CONFIG_ALIAS(keyspath, keys_path) CONFIG_ALIAS(datapath, data_path) CONFIG_ALIAS(xfrpath, xfr_path) CONFIG_ALIAS(logpath, log_path) CONFIG_ALIAS(pidpath, pid_path) CONFIG_ALIAS(pidfile, pid_file) CONFIG_ALIAS(daemonize, daemon) CONFIG_ALIAS(axfr_maxrecordbypacket, axfr_max_record_by_packet) CONFIG_ALIAS(axfr_maxpacketsize, axfr_max_packet_size) CONFIG_ALIAS(axfr_compresspackets, axfr_compress_packets) CONFIG_ALIAS(user, uid) CONFIG_ALIAS(group, gid) CONFIG_ALIAS(max_tcp_connections, max_tcp_queries) CONFIG_END(config_main_desc) #undef CONFIG_TYPE static ya_result config_main_verify_and_update_directory(const char *base_path, char **dirp) { char fullpath[PATH_MAX]; char tempfile[PATH_MAX]; if(dirp == NULL) { return ERROR; } char *dir = *dirp; if(dir == NULL) { return ERROR; } ya_result fullpath_len = snprintf(fullpath, sizeof(fullpath),"/%s/%s", base_path, dir); if(FAIL(fullpath_len)) { return fullpath_len; } bool dirsep = TRUE; int j = 1; for(int i = 1; i <= fullpath_len; i++) { char c = fullpath[i]; if(c == '/') { if(!dirsep) { fullpath[j++] = c; } dirsep = TRUE; } else { fullpath[j++] = fullpath[i]; dirsep = FALSE; } } struct stat ds; if(stat(fullpath, &ds) < 0) { osformatln(termerr, "error: '%s': %s", fullpath, strerror(errno)); return ERROR; } if((ds.st_mode & S_IFMT) != S_IFDIR) { osformatln(termerr, "error: '%s' is not a directory", dir); return ERROR; } snformat(tempfile, sizeof(tempfile), "%s/ydf.XXXXXX", fullpath); int tempfd; if((tempfd = mkstemp(tempfile)) < 0) { int return_code = ERRNO_ERROR; osformatln(termerr, "error: '%s' is not writable: %r", fullpath, return_code); return return_code; } unlink(tempfile); close_ex(tempfd); free(dir); *dirp = strdup(fullpath); chroot_manage_path(dirp, fullpath, FALSE); return SUCCESS; } static ya_result config_main_verify_and_update_file(const char *base_path, char **dirp) { if(dirp == NULL) { return ERROR; } char *p = *dirp; if(p == NULL) { return ERROR; } char *e = p + strlen(p) - 1; while((*e != '/') && (e > p)) { e--; } if((*e == '/') || (e == p)) { char filename[PATH_MAX]; if(*e == '/') { *e = '\0'; e++; strncpy(filename, e, sizeof(filename)); *e = '\0'; } else { strncpy(filename, e, sizeof(filename)); *e = '\0'; } if(ISOK(config_main_verify_and_update_directory(base_path, dirp))) { chroot_unmanage_path(dirp); int pathlen = strlen(*dirp); memmove(&filename[pathlen + 1], filename, strlen(filename) + 1); memcpy(filename, *dirp, pathlen); filename[pathlen] = '/'; free(*dirp); *dirp = strdup(filename); chroot_manage_path(dirp, filename, FALSE); return SUCCESS; } return ERROR; } return SUCCESS; } static ya_result config_main_section_postprocess(struct config_section_descriptor_s *csd) { u32 port = 0; char tmp[PATH_MAX]; if((g_config->config_file_dynamic == NULL) || (g_config->config_file_dynamic[0] != '/') ) { osformatln(termerr, "config: main: config-file-dynamic is not absolute"); return ERROR; } if(FAIL(parse_u32_check_range(g_config->server_port, &port, 1, MAX_U16, 10))) { port = DNS_DEFAULT_PORT; osformatln(termerr, "config: main: wrong dns port set in main '%s', defaulted to %d", g_config->server_port, port); } if(g_config->hostname_chaos == NULL) { #if _BSD_SOURCE || _XOPEN_SOURCE >= 500 || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200112L if(gethostname(tmp, sizeof(tmp)) == 0) { g_config->hostname_chaos = strdup(tmp); } else { osformatln(termerr,"config: main: unable to get hostname: %r", ERRNO_ERROR); g_config->hostname_chaos = strdup("not disclosed"); } #else g_config->hostname_chaos = strdup("not disclosed"); #endif } class_ch_set_hostname(g_config->hostname_chaos); class_ch_set_id_server(g_config->serverid_chaos); class_ch_set_version(g_config->version_chaos); host_set_default_port_value(g_config->listen, ntohs(port)); if(g_config->server_flags & SERVER_FL_CHROOT) { uid_t euid = geteuid(); if(euid != 0) { osformatln(termerr, "config: main: chroot has been enabled but euid is not root (%i != 0)", (int)euid); return ERROR; } } else // disables the base-path/chroot-path feature { if(strcmp(g_config->chroot_path, "/") != 0) { free(g_config->chroot_path); g_config->chroot_path = strdup("/"); chroot_set_path(g_config->chroot_path); } } message_edns0_setmaxsize(g_config->edns0_max_size); g_config->total_interfaces = host_address_count(g_config->listen); if(g_config->total_interfaces > MAX_INTERFACES) { osformatln(termerr, "error: more than %d listening addresses defined.", MAX_INTERFACES); return ERROR; } g_config->axfr_retry_jitter = BOUND(AXFR_RETRY_JITTER_MIN, g_config->axfr_retry_jitter, g_config->axfr_retry_delay); g_config->dnssec_thread_count = BOUND(1, g_config->dnssec_thread_count, sys_get_cpu_count()); if(g_config->cpu_count_override > 0) { sys_set_cpu_count(g_config->cpu_count_override); } if(g_config->thread_count_by_address == 0) { osformatln(termerr, "config: single thread engine has been removed, thread-count-by-address set to 1"); g_config->thread_count_by_address = 1; } if(g_config->thread_count_by_address < 0) { g_config->thread_count_by_address = sys_get_cpu_count(); } else if((g_config->thread_count_by_address > sys_get_cpu_count())) { osformatln(termerr,"config: bounding down thread-count-by-address to the number of cpus (%d)", sys_get_cpu_count()); g_config->thread_count_by_address = sys_get_cpu_count(); } g_config->dnssec_thread_count = BOUND(1, g_config->dnssec_thread_count, sys_get_cpu_count()); g_config->tcp_query_min_rate_us = g_config->tcp_query_min_rate * 0.000001; if(!IS_TYPE_PRIVATE(g_config->sig_signing_type)) { osformatln(termerr, "error: signing type is not in the accepted range: %hx", g_config->sig_signing_type); return CONFIG_WRONG_SIG_TYPE; } if(g_config->sig_validity_interval > SIGNATURE_VALIDITY_INTERVAL_MAX) { osformatln(termerr, "error: signature validity interval too high"); return CONFIG_WRONG_SIG_VALIDITY; } if(g_config->sig_validity_regeneration * SIGNATURE_VALIDITY_REGENERATION_S * 2 > g_config->sig_validity_interval * SIGNATURE_VALIDITY_INTERVAL_S) { osformatln(termerr, "error: default signature regeneration is more than half the interval (%ds * 2 > %ds)", g_config->sig_validity_regeneration * SIGNATURE_VALIDITY_REGENERATION_S, g_config->sig_validity_interval * SIGNATURE_VALIDITY_INTERVAL_S); return CONFIG_WRONG_SIG_REGEN; } if(strcmp(g_config->config_file, g_config->config_file_dynamic) == 0) { return ERROR; } /// @note config_main_verify_and_update_directory updates the folder with the base_path /** * * @note All base paths are updated with the chroot variable so it does not * need to be added all the time. * */ const char *base_path = g_config->chroot_path; if(FAIL(config_main_verify_and_update_directory(base_path, &g_config->data_path))) { return ERROR; } if(FAIL(config_main_verify_and_update_directory(base_path, &g_config->keys_path))) { return ERROR; } if(FAIL(config_main_verify_and_update_directory(base_path, &g_config->log_path))) { return ERROR; } #if 0 /* fix */ #else if(FAIL(config_main_verify_and_update_file(base_path, &g_config->pid_file))) { return ERROR; } #endif g_config->reloadable = TRUE; if((g_config->server_flags & SERVER_FL_CHROOT) != 0) { if(FAIL(chroot_manage_path(&g_config->config_file, g_config->config_file, FALSE))) { log_warn("config file '%s' will not be accessible within the chroot jail '%s' : config reload will not work", g_config->config_file, base_path); g_config->reloadable = FALSE; } } if(FAIL(config_main_verify_and_update_directory(base_path, &g_config->xfr_path))) { return ERROR; } dnssec_keystore_setpath(g_config->keys_path); dnssec_set_xfr_path(g_config->xfr_path); journal_set_xfr_path(g_config->xfr_path); if((logger_get_uid() != g_config->uid) || (logger_get_gid() != g_config->gid)) { logger_set_uid(g_config->uid); logger_set_gid(g_config->gid); logger_reopen(); } return SUCCESS; } ya_result config_register_main(s32 priority) { MALLOC_OR_DIE(config_data*, g_config, sizeof(config_data), GENERIC_TAG); ZEROMEMORY(g_config, sizeof (config_data)); g_config->gid = getgid(); g_config->uid = getuid(); const char *section_name = "main"; ya_result return_code = config_register_struct(section_name, config_main_desc, g_config, priority); if(ISOK(return_code)) { // hook a new finaliser before the standard one config_section_descriptor_s *section_desc = config_section_get_descriptor(section_name); config_section_descriptor_vtbl_s *vtbl = (config_section_descriptor_vtbl_s*)section_desc->vtbl; vtbl->postprocess = config_main_section_postprocess; } return return_code; } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service.c0000644000077100007710000000012412650131756022244 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.964344 30 ctime=1454597653.263344534 yadifa-2.1.6-5826/sbin/yadifad/database-service.c0000664000077100007710000015765412650131756022073 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup database Routines for database manipulations * @ingroup yadifad * @brief database functions * * Implementation of routines for the database * - add zone file(s) * - clear zone file(s) * - print zone files(s) * - load db * - unload db * - lookup database result of a message * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #define DATABASE_SERVICE_C 1 #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #include "database-service.h" #include "database-service-zone-desc-load.h" #include "database-service-zone-desc-unload.h" #include "database-service-zone-load.h" #include "database-service-zone-unload.h" #include "database-service-zone-mount.h" #include "database-service-zone-unmount.h" #include "database-service-zone-download.h" #if HAS_RRSIG_MANAGEMENT_SUPPORT #include "database-service-zone-resignature.h" #endif #include "database-service-zone-freeze.h" #include "database-service-zone-unfreeze.h" #include "database-service-zone-save.h" #include "server.h" #include "notify.h" #include "ixfr.h" #if HAS_CTRL #include "ctrl.h" #endif #include "server_error.h" #include "zone_desc.h" #include "config_error.h" #define DBLOADQ_TAG 0x5144414f4c4244 //#define DATABASE_SERVICE_QUEUE_SIZE 0x4000 #define DATABASE_SERVICE_QUEUE_SIZE 0x1000000 #define DATABASE_SERVICE_DOWNLOAD_QUEUE_SIZE 0x10000 #define DATABASE_SERVICE_LOAD_QUEUE_SIZE 0x10000 #define DATABASE_SERVICE_UNLOAD_QUEUE_SIZE 0x10000 #define DATABASE_SERVICE_SAVE_QUEUE_SIZE 0x10000 #define DATABASE_SERVICE_RESIGN_QUEUE_SIZE 0x10000 #if DEBUG #define DATABASE_SERVICE_BENCH_MESSAGES_PER_SECOND 1 #else #define DATABASE_SERVICE_BENCH_MESSAGES_PER_SECOND 0 #endif static struct service_s database_handler = UNINITIALIZED_SERVICE; static async_queue_s database_handler_queue; static bool database_handler_initialised = FALSE; static int database_service(struct service_worker_s *worker); /* Zone file variables */ zone_data_set database_zone_desc = {PTR_SET_DNSNAME_EMPTY, MUTEX_INITIALIZER}; /* Zones meant to be merged with zones */ static struct thread_pool_s *database_zone_load_thread_pool = NULL; static struct thread_pool_s *database_zone_save_thread_pool = NULL; static struct thread_pool_s *database_zone_unload_thread_pool = NULL; static struct thread_pool_s *database_zone_download_thread_pool = NULL; #if HAS_RRSIG_MANAGEMENT_SUPPORT static struct thread_pool_s *database_zone_resignature_thread_pool = NULL; static struct thread_pool_s *database_zone_rrsig_thread_pool = NULL; #endif static const u8 database_all_origins[] = "\003ALL\005ZONES"; static const char* database_service_operation[DATABASE_SERVICE_OPERATION_COUNT]= { "STOP", // messages queue "ZONE-DESC-LOAD", "ZONE-DESC-UNLOAD", "ZONE-DESC-DESTROY", "ZONE-DESC-PROCESS", "ORIGIN-PROCESS", // not used // zone desc queue "ZONE-LOAD", "ZONE-MOUNT", "ZONE-UNMOUNT", "ZONE-UNLOAD", "ZONE-WRITE-TEXT", "ZONE-QUERY-AXFR", "ZONE-QUERY-IXFR", "SET-DROP-AFTER-RELOAD", "DO-DROP-AFTER-RELOAD", "ZONE-MOUNTED-EVENT", "ZONE-LOADED-EVENT", "ZONE-UNLOADED-EVENT", "ZONE-UNMOUNTED-EVENT", "ZONE-DOWNLOADED-EVENT", "ZONE-RECONFIGURE-BEGIN", "ZONE-RECONFIGURE-END", "ZONE-UPDATE-SIGNATURES" }; static volatile bool database_reconfigure_enabled = FALSE; const char* database_service_operation_get_name(u32 id) { if(id < DATABASE_SERVICE_OPERATION_COUNT) { return database_service_operation[id]; } return "?"; } static database_message * database_load_message_alloc(const u8 *origin, u8 type) { database_message *message; MALLOC_OR_DIE(database_message*, message, sizeof(database_message), DBLOADQ_TAG); ZEROMEMORY(message, sizeof(database_message)); message->origin = dnsname_dup(origin); message->payload.type = type; return message; } static void database_load_message_free(database_message *message) { free(message->origin); free(message); } /**********************************************************************************************************************/ ya_result database_service_init() { int err = SUCCESS; if(!database_handler_initialised) { if(database_zone_load_thread_pool == NULL) { database_zone_load_thread_pool = thread_pool_init_ex(g_config->zone_load_thread_count, DATABASE_SERVICE_LOAD_QUEUE_SIZE, "db-zone-load-tp"); /// @todo configure parameters if(database_zone_load_thread_pool == NULL) { return ERROR; } } if(database_zone_save_thread_pool == NULL) { database_zone_save_thread_pool = thread_pool_init_ex(1, DATABASE_SERVICE_SAVE_QUEUE_SIZE, "db-zone-save-tp"); /// @todo configure parameters if(database_zone_save_thread_pool == NULL) { return ERROR; } } if(database_zone_unload_thread_pool == NULL) { database_zone_unload_thread_pool = thread_pool_init_ex(1, DATABASE_SERVICE_UNLOAD_QUEUE_SIZE, "db-zone-unload-tp"); /// @todo configure parameters if(database_zone_unload_thread_pool == NULL) { return ERROR; } } if(database_zone_download_thread_pool == NULL) { database_zone_download_thread_pool = thread_pool_init_ex(g_config->zone_download_thread_count, DATABASE_SERVICE_DOWNLOAD_QUEUE_SIZE, "db-download-tp"); /// @todo configure parameters if(database_zone_download_thread_pool == NULL) { return ERROR; } } #if HAS_RRSIG_MANAGEMENT_SUPPORT if(database_zone_resignature_thread_pool == NULL) { database_zone_resignature_thread_pool = thread_pool_init_ex(1, DATABASE_SERVICE_RESIGN_QUEUE_SIZE, "db-resign-tp"); /// @todo configure parameters if(database_zone_resignature_thread_pool == NULL) { return ERROR; } } if(database_zone_rrsig_thread_pool == NULL) { database_zone_rrsig_thread_pool = thread_pool_init_ex(/*g_config->dnssec_thread_count + 1*/2, 32, "db-rrsig-tp"); /// @todo configure parameters if(database_zone_rrsig_thread_pool == NULL) { return ERROR; } dnssec_process_set_default_pool(database_zone_rrsig_thread_pool); } #endif async_message_pool_init(); if(ISOK(err = service_init_ex(&database_handler, database_service, "database", 1))) { async_queue_init(&database_handler_queue, DATABASE_SERVICE_QUEUE_SIZE, 1, 100000, "database"); database_handler_initialised = TRUE; } } return err; } bool database_service_started() { return database_handler_initialised && !service_stopped(&database_handler); } ya_result database_service_start() { int err = ERROR; if(database_handler_initialised) { if(service_stopped(&database_handler)) { err = service_start(&database_handler); } } return err; } ya_result database_service_stop() { int err = ERROR; if(database_handler_initialised) { if(!service_stopped(&database_handler)) { err = service_stop(&database_handler); service_wait(&database_handler); } } return err; } ya_result database_service_finalise() { int err = SUCCESS; if(database_handler_initialised) { zone_set_lock(&database_zone_desc); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&database_zone_desc.set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s *)zone_node->value; zone_lock(zone_desc, ZONE_LOCK_UNLOAD); zdb_zone *zone = zone_get_loaded_zone(zone_desc); if(zone != NULL) { alarm_close(zone->alarm_handle); zone->alarm_handle = ALARM_HANDLE_INVALID; zdb_zone_release(zone); } zone_unlock(zone_desc, ZONE_LOCK_UNLOAD); } zone_set_unlock(&database_zone_desc); err = database_service_stop(); if(database_zone_load_thread_pool != NULL) { thread_pool_destroy(database_zone_load_thread_pool); database_zone_load_thread_pool = NULL; } if(database_zone_save_thread_pool != NULL) { thread_pool_destroy(database_zone_save_thread_pool); database_zone_save_thread_pool = NULL; } if(database_zone_unload_thread_pool != NULL) { thread_pool_destroy(database_zone_unload_thread_pool); database_zone_unload_thread_pool = NULL; } if(database_zone_download_thread_pool != NULL) { thread_pool_destroy(database_zone_download_thread_pool); database_zone_download_thread_pool = NULL; } #if HAS_RRSIG_MANAGEMENT_SUPPORT if(database_zone_resignature_thread_pool != NULL) { thread_pool_destroy(database_zone_resignature_thread_pool); database_zone_resignature_thread_pool = NULL; } if(database_zone_rrsig_thread_pool != NULL) { dnssec_process_set_default_pool(NULL); thread_pool_destroy(database_zone_rrsig_thread_pool); database_zone_rrsig_thread_pool = NULL; } #endif service_finalize(&database_handler); async_queue_finalize(&database_handler_queue); /// destroy all the descs log_debug("dropping zone settings"); zone_free_all(&database_zone_desc); database_handler_initialised = FALSE; } return err; } /**********************************************************************************************************************/ bool database_origin_is_mounted(const u8 *origin) { // get the zone // look if it is valid or not zdb *db = g_config->database; bool mounted = FALSE; zdb_lock(db, ZDB_MUTEX_READER); zdb_zone_label *zone_label = zdb_zone_label_find_from_dnsname_nolock(db, origin); if(zone_label != NULL) { zdb_zone *zone = zone_label->zone; // OK (ARC) mounted = zdb_zone_isvalid(zone); } zdb_unlock(db, ZDB_MUTEX_READER); return mounted; } bool database_zone_desc_is_mounted(const u8 *origin) { // get the origin // get the zone // look if it is valid or not bool mounted = database_origin_is_mounted(origin); return mounted; } static void database_service_set_drop_after_reload() { zone_set_lock(&database_zone_desc); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&database_zone_desc.set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s *)zone_node->value; zone_desc->status_flags |= ZONE_STATUS_DROP_AFTER_RELOAD; } zone_set_unlock(&database_zone_desc); } static void database_service_do_drop_after_reload() { log_debug1("database_service_do_drop_after_reload()"); zone_set_lock(&database_zone_desc); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&database_zone_desc.set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s *)zone_node->value; if((zone_desc->status_flags & ZONE_STATUS_DROP_AFTER_RELOAD) != 0) { // drop the zone & zone desc log_debug2("database_service_do_drop_after_reload: queuing %{dnsname} for unload", zone_desc->origin); database_zone_desc_unload(zone_desc->origin); } } zone_set_unlock(&database_zone_desc); log_debug1("database_service_do_drop_after_reload() done"); } static void database_service_process_command(zone_desc_s *zone_desc, zone_command_s* command) { switch(command->id) { case DATABASE_SERVICE_ZONE_DESC_UNLOAD: { database_service_zone_desc_unload(zone_desc); break; } case DATABASE_SERVICE_ZONE_LOAD: { database_service_zone_load(zone_desc); break; } case DATABASE_SERVICE_ZONE_MOUNT: { database_service_zone_mount(zone_desc); break; } case DATABASE_SERVICE_ZONE_UNMOUNT: { database_service_zone_unmount(zone_desc); break; } case DATABASE_SERVICE_ZONE_UNLOAD: { database_service_zone_unload(zone_desc, command->parm.zone); break; } #if HAS_RRSIG_MANAGEMENT_SUPPORT case DATABASE_SERVICE_UPDATE_ZONE_SIGNATURES: { database_service_zone_resignature(zone_desc); break; } #endif case DATABASE_SERVICE_ZONE_FREEZE: { database_service_zone_freeze(zone_desc); break; } case DATABASE_SERVICE_ZONE_UNFREEZE: { database_service_zone_unfreeze(zone_desc); break; } case DATABASE_SERVICE_ZONE_SAVE_TEXT: { if(ISOK(zone_lock(zone_desc, ZONE_LOCK_SAVE))) { if(command->parm.ptr != NULL) { zone_desc->status_flags |= ZONE_STATUS_MUST_CLEAR_JOURNAL; } zone_unlock(zone_desc, ZONE_LOCK_SAVE); database_service_zone_save(zone_desc); // text } else { log_err("database_service_zone_save: failed to lock zone settings for '%{dnsname}'", zone_desc->origin); } break; } default: { log_err("unexpected command %d", command->id); } } } static int database_service(struct service_worker_s *worker) { zone_desc_s *zone_desc = NULL; #if DATABASE_SERVICE_BENCH_MESSAGES_PER_SECOND u64 sbmps_epoch_us = timeus(); u32 sbmps_count = 0; #endif /* * while the program is running */ log_debug("database service started"); while(service_shouldrun(worker) || !async_queue_emtpy(&database_handler_queue)) { if(!zdb_zone_garbage_empty()) { // do a zdb_zone_garbage_run in the background if(thread_pool_queue_size(database_zone_unload_thread_pool) == 0) { database_service_run_garbage_collector(); } } /* * dequeue command */ zone_desc = NULL; async_message_s *async = async_message_next(&database_handler_queue); if(async == NULL) { continue; } database_message *message = (database_message*)async->args; if(message == NULL) { log_err("database_service: NULL message"); continue; } #if DATABASE_SERVICE_BENCH_MESSAGES_PER_SECOND { u64 now = timeus(); if(now - sbmps_epoch_us >= 1000000) { double mps = sbmps_count; mps *= 1000000.0; mps /= (now - sbmps_epoch_us); log_info("database_service: %12.3fmsg/s", mps); sbmps_epoch_us = now; sbmps_count = 0; } sbmps_count++; } #endif #ifdef DEBUG if(message->payload.type < DATABASE_SERVICE_OPERATION_COUNT) { log_debug("database-service: dequeued operation %s on %{dnsname}", database_service_operation[message->payload.type], message->origin); } else { log_debug("database-service: dequeued operation %d on %{dnsname}", message->payload.type, message->origin); } #endif /* * NULL => shutdown the thread */ /* * load command ? */ switch(message->payload.type) { case DATABASE_SERVICE_ZONE_DESC_LOAD: { // desc database_load_zone_desc(message->payload.zone_desc_load.zone_desc); zone_release(message->payload.zone_desc_load.zone_desc); break; } // DISPATCH TO THE ZONE DESCRIPTOR case DATABASE_SERVICE_ZONE_DESC_UNLOAD: { // no desc zone_desc = zone_acquirebydnsname(message->origin); if(zone_desc != NULL) { if((zone_desc->status_flags & ZONE_STATUS_UNREGISTERING) == 0) { zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_DESC_UNLOAD, NULL, FALSE); zone_desc->status_flags |= ZONE_STATUS_UNREGISTERING; } else { log_debug("cannot unload configuration for '%{dnsname}': zone already unregistering", message->origin); } } else { log_debug("cannot unload configuration for '%{dnsname}': zone is not registered", message->origin); } break; } case DATABASE_SERVICE_ZONE_LOAD: { // no desc zone_desc = zone_acquirebydnsname(message->origin); if(zone_desc != NULL) { log_debug("load of '%{dnsname}'@%p", message->origin, zone_desc); if((zone_desc->status_flags & (ZONE_STATUS_LOAD|ZONE_STATUS_LOADING)) == 0) { zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_LOAD, NULL, FALSE); } else { log_warn("ignoring load command for %{dnsname}: already loading", message->origin); } } else { log_debug("cannot load '%{dnsname}' (not configured)", message->origin); } break; } /* case DATABASE_SERVICE_ZONE_MOUNT: { zone_desc = zone_acquirebydnsname(message->origin); if(zone_desc != NULL) { zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_MOUNT, NULL, FALSE); } else { log_err("error mounting '%{dnsname}': zone is not configured", message->origin); } break; } case DATABASE_SERVICE_ZONE_UNMOUNT: { zone_desc = zone_acquirebydnsname(message->origin); if(zone_desc != NULL) { zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_UNMOUNT, NULL, FALSE); } else { log_err("error unmounting '%{dnsname}': zone is not configured", message->origin); } break; } */ case DATABASE_SERVICE_ZONE_UNLOAD: { // no desc zone_desc = zone_acquirebydnsname(message->origin); if(zone_desc != NULL) { // zone has been acquired for this call // references are passed to the command zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_UNLOAD, message->payload.zone_unload.zone, TRUE); message->payload.zone_unload.zone = NULL; } else { if(message->payload.zone_unload.zone != NULL) { zdb_zone_release(message->payload.zone_unload.zone); message->payload.zone_unload.zone = NULL; } log_debug("cannot load '%{dnsname}' (not configured)", message->origin); } break; } case DATABASE_SERVICE_ZONE_FREEZE: { // no desc zone_desc = zone_acquirebydnsname(message->origin); if(zone_desc != NULL) { zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_FREEZE, NULL, FALSE); } else { log_err("error freezing '%{dnsname}': zone is not configured", message->origin); } break; } case DATABASE_SERVICE_ZONE_UNFREEZE: { // no desc zone_desc = zone_acquirebydnsname(message->origin); if(zone_desc != NULL) { zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_UNFREEZE, NULL, FALSE); } else { log_err("error unfreezing '%{dnsname}': zone is not configured", message->origin); } break; } case DATABASE_SERVICE_ZONE_SAVE_TEXT: { // no desc zone_desc = zone_acquirebydnsname(message->origin); if(zone_desc != NULL) { zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_SAVE_TEXT, (message->payload.zone_save.clear)?(void*)1:(void*)0, FALSE); } else { log_err("error saving '%{dnsname}': zone is not configured", message->origin); } break; } case DATABASE_SERVICE_QUERY_AXFR: { database_service_zone_axfr_query(message->origin); break; } case DATABASE_SERVICE_QUERY_IXFR: { database_service_zone_ixfr_query(message->origin); break; } case DATABASE_SERVICE_SET_DROP_AFTER_RELOAD: { // ZONE_STATUS_DROP_AFTER_RELOAD database_service_set_drop_after_reload(); break; } case DATABASE_SERVICE_DO_DROP_AFTER_RELOAD: { database_service_do_drop_after_reload(); break; } // case DATABASE_SERVICE_RECONFIGURE_BEGIN: { if(!database_reconfigure_enabled) { log_debug("re-configuration enabled"); database_reconfigure_enabled = TRUE; } else { log_debug("re-configuration already enabled"); } break; } case DATABASE_SERVICE_RECONFIGURE_END: { if(database_reconfigure_enabled) { #ifdef DEBUG zone_dump_allocated(); #endif log_debug("re-configuration disabled"); database_reconfigure_enabled = FALSE; } else { log_debug("re-configuration already disabled"); } break; } #if HAS_RRSIG_MANAGEMENT_SUPPORT case DATABASE_SERVICE_UPDATE_ZONE_SIGNATURES: { // desc zone_desc = zone_acquirebydnsname(message->origin); // current zone desc is the one we wanted to update the signatures on ? if(zone_desc == message->payload.zone_update_signatures.expected_zone_desc) { zone_lock(zone_desc, ZONE_LOCK_SERVICE); zdb_zone *zone = zone_get_loaded_zone(zone_desc); // RC++ zone_unlock(zone_desc, ZONE_LOCK_SERVICE); if(zone != NULL) { // zone is the one we wanted to update the signatures on ? if(zone == message->payload.zone_update_signatures.expected_zone) { log_info("zone signature of '%{dnsname}' triggered", zone_desc->origin); zone_enqueue_command(zone_desc, DATABASE_SERVICE_UPDATE_ZONE_SIGNATURES, NULL, FALSE); } else { log_warn("zone signature of '%{dnsname}' triggered for another instance of the zone, ignoring", zone_desc->origin); zone_release(zone_desc); zone_desc = NULL; } zdb_zone_release(zone); #ifdef DEBUG zone = NULL; #endif } } else { log_warn("zone signature of '%{dnsname}' triggered for another instance of the zone settings, ignoring", zone_desc->origin); zone_release(zone_desc); #ifdef DEBUG zone_desc = NULL; #endif } zdb_zone_release(message->payload.zone_update_signatures.expected_zone); #ifdef DEBUG message->payload.zone_update_signatures.expected_zone = NULL; #endif zone_release(message->payload.zone_update_signatures.expected_zone_desc); #ifdef DEBUG message->payload.zone_update_signatures.expected_zone_desc = NULL; #endif break; } #endif // EVENTS case DATABASE_SERVICE_ZONE_LOADED_EVENT: { // desc zone_desc = message->payload.zone_loaded_event.zone_desc; if(ISOK(message->payload.zone_loaded_event.result_code)) { if(message->payload.zone_loaded_event.result_code == 1) { log_info("successfully loaded the zone for %{dnsname}", message->origin); zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_MOUNT, NULL, FALSE); } else { log_info("there was no need to load the zone for %{dnsname}", message->origin); } } else if((message->payload.zone_loaded_event.result_code == ZRE_NO_VALID_FILE_FOUND) && (zone_desc->type == ZT_SLAVE)) { log_debug("no local copy of the zone for %{dnsname} is available, download required", message->origin); } else { log_err("failed to load the zone for %{dnsname}: %r", message->origin, message->payload.zone_loaded_event.result_code); } if(message->payload.zone_loaded_event.zone != NULL) { zdb_zone_release(message->payload.zone_loaded_event.zone); message->payload.zone_loaded_event.zone = NULL; } /// @todo why ? zone_desc = zone_acquirebydnsname(message->origin); break; } case DATABASE_SERVICE_ZONE_MOUNTED_EVENT: { // desc zone_desc = message->payload.zone_mounted_event.zone_desc; if(ISOK(message->payload.zone_mounted_event.result_code)) { log_info("successfully mounted the zone for %{dnsname}", message->origin); #if HAS_RRSIG_MANAGEMENT_SUPPORT #if HAS_MASTER_SUPPORT if(zone_desc->type == ZT_MASTER) { if(zdb_zone_is_dnssec(message->payload.zone_mounted_event.zone)) { if(zone_maintains_dnssec(zone_desc)) { log_info("signature maintenance initialisation for %{dnsname}", message->origin); database_service_zone_resignature_init( message->payload.zone_mounted_event.zone_desc, message->payload.zone_mounted_event.zone); } else { log_info("signature maintenance disabled for %{dnsname}", message->origin); } } } else #endif #endif if(zone_desc->type == ZT_SLAVE) { database_zone_refresh_maintenance(g_config->database, message->origin, 0); // means next refresh from now // database_zone_refresh_maintenance_wih_zone(zone_desc->loaded_zone, 0); } } else { log_err("failed to mount the zone for %{dnsname}: %r", message->origin, message->payload.zone_mounted_event.result_code); } if(message->payload.zone_mounted_event.zone != NULL) { zdb_zone_release(message->payload.zone_mounted_event.zone); message->payload.zone_mounted_event.zone = NULL; } #ifdef DEBUG //zone_release(message->payload.zone_mounted_event.zone_desc); message->payload.zone_mounted_event.zone_desc = NULL; #endif // do not release zone_desc because we will try to push the event break; } case DATABASE_SERVICE_ZONE_UNMOUNTED_EVENT: { // desc (both) zone_desc = zone_acquirebydnsname(message->origin); if(ISOK(message->payload.zone_unmounted_event.result_code)) { log_info("successfully unmounted zone for %{dnsname}", message->origin); } else { log_err("failed to unmount the zone for %{dnsname}: %r", message->origin, message->payload.zone_unmounted_event.result_code); } zone_release(message->payload.zone_unmounted_event.zone_desc); message->payload.zone_unmounted_event.zone_desc = NULL; break; } case DATABASE_SERVICE_ZONE_UNLOADED_EVENT: { /// @todo WHAT IF THE EVENT FAILED ? WHAT ABOUT THE REMAINING OF THE QUEUE ??? /// WE FORGOT TO TAKE THIS INTO ACCOUNT : THERE IS SOME SORT OF RETRY OR /// CANCEL ALL MECHANISM NEEDED ... // desc (both) zone_desc = zone_acquirebydnsname(message->origin); if(ISOK(message->payload.zone_unmounted_event.result_code)) { log_info("successfully unloaded zone for %{dnsname}", message->origin); } else { log_err("failed to unload the zone for %{dnsname}: %r", message->origin, message->payload.zone_unmounted_event.result_code); } zone_release(message->payload.zone_unloaded_event.zone_desc); message->payload.zone_unloaded_event.zone_desc = NULL; break; } case DATABASE_SERVICE_ZONE_DOWNLOADED_EVENT: { // no desc zone_desc = zone_acquirebydnsname(message->origin); if(ISOK(message->payload.zone_downloaded_event.result_code)) { log_info("database: successfully downloaded the zone for %{dnsname} (%{dnstype})", message->origin, &message->payload.zone_downloaded_event.download_type); if(message->payload.zone_downloaded_event.download_type == TYPE_AXFR) { database_zone_load(message->origin); // the downloaded file can now be loaded } } else { log_err("database: failed to download the zone for %{dnsname}: %r", message->origin, message->payload.zone_downloaded_event.result_code); /// @todo retry ? } break; } default: { break; } } if(zone_desc != NULL) { if(FAIL(zone_lock(zone_desc, ZONE_LOCK_SERVICE))) { log_err("unable to lock zone '%{dnsname}'", message->origin); } while((zone_desc->status_flags & ZONE_STATUS_PROCESSING) == 0) { zone_desc_log(g_server_logger, LOG_DEBUG, zone_desc, "database-service"); zone_command_s* command = zone_dequeue_command(zone_desc); if(command != NULL) { zone_desc->status_flags |= ZONE_STATUS_PROCESSING; zone_desc->last_processor = command->id; log_debug("zone '%{dnsname}'@%p processing (%s)", message->origin, zone_desc, database_service_operation_get_name(zone_desc->last_processor)); zone_unlock(zone_desc, ZONE_LOCK_SERVICE); database_service_process_command(zone_desc, command); if(FAIL(zone_lock(zone_desc, ZONE_LOCK_SERVICE))) { log_err("unable to re-lock zone '%{dnsname}'", message->origin); } zone_command_free(command); } else { if(zone_desc->status_flags & ZONE_STATUS_MARKED_FOR_DESTRUCTION) { log_debug("zone desc '%{dnsname}'@%p is marked for destruction", zone_desc->origin, zone_desc); } if(!(zone_desc->status_flags & ZONE_STATUS_PROCESSING)) { zone_desc->last_processor = 0; } break; } } log_debug7("zone '%{dnsname}' is processed by %s", message->origin, database_service_operation_get_name(zone_desc->last_processor)); zone_unlock(zone_desc, ZONE_LOCK_SERVICE); zone_release(zone_desc); #ifdef DEBUG zone_desc = NULL; #endif } database_load_message_free(message); async_message_release(async); } service_set_stopping(worker); log_debug("database service stopped"); return 0; } void database_load_all_zones() { u8 buffer[4096]; // builds a set of names to load, batch loads the names // iterates the above process until there are no names left to load zone_set_lock(&database_zone_desc); ptr_node *node = ptr_set_avl_get_first(&database_zone_desc.set); for(;;) { u8 *name = buffer; const u8 *last = NULL; for(; node != NULL; node = ptr_set_avl_node_next(node)) { zone_desc_s *zone_desc = (zone_desc_s *)node->value; int name_len = dnsname_len(zone_desc->origin); if(name_len > (&buffer[sizeof(buffer)] - name)) { break; } memcpy(name, zone_desc->origin, name_len); last = name; name += name_len; } zone_set_unlock(&database_zone_desc); if(last == NULL) { // no name has been inserted : nothing more to do break; } name = buffer; for(;;) { database_zone_load(name); if(name == last) { break; } name += dnsname_len(name); } zone_set_lock(&database_zone_desc); // get back the last name node = ptr_set_avl_find(&database_zone_desc.set, last); if(node != NULL) { // and get the one that follows node = ptr_set_avl_node_next(node); } } } void database_zone_load(const u8 *origin) { log_debug("database_load_zone_file: %{dnsname}", origin); log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_LOAD on %{dnsname}", origin); database_message *message = database_load_message_alloc(origin, DATABASE_SERVICE_ZONE_LOAD); async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } #if HAS_RRSIG_MANAGEMENT_SUPPORT void database_zone_update_signatures(const u8 *origin, zone_desc_s *expected_zone_desc, zdb_zone *expected_zone) { log_debug("database_zone_update_signatures: %{dnsname}, %p, %p", origin, expected_zone_desc, expected_zone); log_debug("database_service: enqueue operation DATABASE_SERVICE_UPDATE_ZONE_SIGNATURES on %{dnsname}", origin); database_message *message = database_load_message_alloc(origin, DATABASE_SERVICE_UPDATE_ZONE_SIGNATURES); zone_acquire(expected_zone_desc); zdb_zone_acquire(expected_zone); message->payload.zone_update_signatures.expected_zone_desc = expected_zone_desc; message->payload.zone_update_signatures.expected_zone = expected_zone; async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } #endif void database_zone_unload(zdb_zone *zone) { log_debug("database_load_zone_unload: %{dnsname}", zone->origin); log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_UNLOAD on %{dnsname}@%p", zone->origin, zone); zdb_zone_acquire(zone); database_message *message = database_load_message_alloc(zone->origin, DATABASE_SERVICE_ZONE_UNLOAD); message->payload.zone_unload.zone = zone; async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_zone_freeze(const u8 *origin) { log_debug("database_zone_freeze: %{dnsname}", origin); log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_FREEZE on %{dnsname}", origin); database_message *message = database_load_message_alloc(origin, DATABASE_SERVICE_ZONE_FREEZE); async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_zone_unfreeze(const u8 *origin) { log_debug("database_zone_unfreeze: %{dnsname}", origin); log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_UNFREEZE on %{dnsname}", origin); database_message *message = database_load_message_alloc(origin, DATABASE_SERVICE_ZONE_UNFREEZE); async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_zone_save_ex(const u8 *origin, bool clear) { log_debug("database_zone_save: %{dnsname}", origin); log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_SAVE_TEXT on %{dnsname}", origin); database_message *message = database_load_message_alloc(origin, DATABASE_SERVICE_ZONE_SAVE_TEXT); async_message_s *async = async_message_alloc(); async->id = message->payload.type; message->payload.zone_save.clear = clear; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_zone_save(const u8 *origin) { database_zone_save_ex(origin, FALSE); } void database_zone_desc_load(zone_desc_s *zone_desc) { if(zone_desc != NULL) { log_debug("database_zone_desc_load: %{dnsname}", zone_desc->origin); zone_desc_log(MODULE_MSG_HANDLE, LOG_DEBUG, zone_desc, "database_zone_desc_load"); if(service_started(&database_handler)) { log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_DESC_LOAD on %{dnsname}", zone_desc->origin); database_message *message = database_load_message_alloc(zone_desc->origin, DATABASE_SERVICE_ZONE_DESC_LOAD); zone_acquire(zone_desc); message->payload.zone_desc_load.zone_desc = zone_desc; async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } else { log_debug("database_zone_desc_load: %{dnsname} (offline)", zone_desc->origin); database_load_zone_desc(zone_desc); } } else { log_err("database_load_zone_desc_load: NULL"); } } void database_zone_desc_unload(const u8 *origin) { log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_DESC_UNLOAD on %{dnsname}", origin); database_message *message = database_load_message_alloc(origin, DATABASE_SERVICE_ZONE_DESC_UNLOAD); async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_zone_axfr_query(const u8 *origin) { log_debug("database_service: enqueue operation DATABASE_SERVICE_QUERY_AXFR on %{dnsname}", origin); database_message *message = database_load_message_alloc(origin, DATABASE_SERVICE_QUERY_AXFR); async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_zone_ixfr_query(const u8 *origin) { log_debug("database_service: enqueue operation DATABASE_SERVICE_QUERY_IXFR on %{dnsname}", origin); database_message *message = database_load_message_alloc(origin, DATABASE_SERVICE_QUERY_IXFR); async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_zone_reconfigure_begin() { if(database_service_is_running()) { log_debug("database_service: enqueue operation DATABASE_SERVICE_RECONFIGURE_BEGIN"); database_message *message = database_load_message_alloc(database_all_origins, DATABASE_SERVICE_RECONFIGURE_BEGIN); async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } else { database_reconfigure_enabled = TRUE; } } void database_zone_reconfigure_end() { if(database_service_is_running()) { log_debug("database_service: enqueue operation DATABASE_SERVICE_RECONFIGURE_END"); database_message *message = database_load_message_alloc(database_all_origins, DATABASE_SERVICE_RECONFIGURE_END); async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } else { database_reconfigure_enabled = FALSE; } } bool database_zone_is_reconfigure_enabled() { return database_reconfigure_enabled; } void database_set_drop_after_reload() { log_debug("database_service: enqueue operation DATABASE_SERVICE_SET_DROP_AFTER_RELOAD"); database_message *message = database_load_message_alloc(database_all_origins, DATABASE_SERVICE_SET_DROP_AFTER_RELOAD); async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_do_drop_after_reload() { log_debug("database_service: enqueue operation DATABASE_SERVICE_DO_DROP_AFTER_RELOAD"); database_message *message = database_load_message_alloc(database_all_origins, DATABASE_SERVICE_DO_DROP_AFTER_RELOAD); async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_fire_zone_loaded(zone_desc_s *zone_desc, zdb_zone *zone, ya_result result_code) { log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_LOADED_EVENT on %{dnsname} %p %r", zone_desc->origin, zone, result_code); database_message *message = database_load_message_alloc(zone_desc->origin, DATABASE_SERVICE_ZONE_LOADED_EVENT); zone_acquire(zone_desc); if(zone != NULL) { zdb_zone_acquire(zone); } message->payload.zone_loaded_event.zone_desc = zone_desc; message->payload.zone_loaded_event.zone = zone; message->payload.zone_loaded_event.result_code = result_code; async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_fire_zone_mounted(zone_desc_s *zone_desc, zdb_zone *zone, ya_result result_code) { log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_MOUNTED_EVENT on %{dnsname} %p %r", zone_desc->origin, zone, result_code); database_message *message = database_load_message_alloc(zone_desc->origin, DATABASE_SERVICE_ZONE_MOUNTED_EVENT); zone_acquire(zone_desc); if(zone != NULL) { zdb_zone_acquire(zone); } message->payload.zone_mounted_event.zone_desc = zone_desc; message->payload.zone_mounted_event.zone = zone; message->payload.zone_mounted_event.result_code = result_code; async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_fire_zone_unloaded(zdb_zone *zone, ya_result result_code) { log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_UNLOADED_EVENT on %{dnsname} %p %r", zone->origin, zone, result_code); database_message *message = database_load_message_alloc(zone->origin, DATABASE_SERVICE_ZONE_UNLOADED_EVENT); zdb_zone_acquire(zone); message->payload.zone_unloaded_event.zone = zone; message->payload.zone_unloaded_event.result_code = result_code; async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_fire_zone_unmounted(zone_desc_s *zone_desc, ya_result result_code) { log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_UNMOUNTED_EVENT on %{dnsname} %r", zone_desc->origin, result_code); database_message *message = database_load_message_alloc(zone_desc->origin, DATABASE_SERVICE_ZONE_UNMOUNTED_EVENT); zone_acquire(zone_desc); message->payload.zone_unmounted_event.zone_desc = zone_desc; message->payload.zone_unmounted_event.result_code = result_code; async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_fire_zone_downloaded(const u8 *origin, u16 qtype, u32 serial, ya_result result_code) { if(ISOK(result_code)) { log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_DOWNLOADED_EVENT on %{dnsname} %{dnstype} serial=%u: %r", origin, &qtype, serial, result_code); } else { log_debug("database_service: enqueue operation DATABASE_SERVICE_ZONE_DOWNLOADED_EVENT on %{dnsname}: %r", origin, result_code); } database_message *message = database_load_message_alloc(origin, DATABASE_SERVICE_ZONE_DOWNLOADED_EVENT); message->payload.zone_downloaded_event.download_type = qtype; message->payload.zone_downloaded_event.serial = serial; message->payload.zone_downloaded_event.result_code = result_code; async_message_s *async = async_message_alloc(); async->id = message->payload.type; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(&database_handler_queue, async); } void database_service_zone_load_queue_thread(thread_pool_function func, void *parm, thread_pool_task_counter *counter, const char* categoryname) { thread_pool_enqueue_call(database_zone_load_thread_pool, func, parm, counter, categoryname); } void database_service_zone_save_queue_thread(thread_pool_function func, void *parm, thread_pool_task_counter *counter, const char* categoryname) { thread_pool_enqueue_call(database_zone_save_thread_pool, func, parm, counter, categoryname); } void database_service_zone_unload_queue_thread(thread_pool_function func, void *parm, thread_pool_task_counter *counter, const char* categoryname) { thread_pool_enqueue_call(database_zone_unload_thread_pool, func, parm, counter, categoryname); } static void* database_service_run_garbage_collector_thread(void *parms_) { (void)parms_; zdb_zone_garbage_run(); return NULL; } void database_service_run_garbage_collector() { thread_pool_enqueue_call(database_zone_unload_thread_pool, database_service_run_garbage_collector_thread, NULL, NULL, "garbage"); } void database_service_zone_download_queue_thread(thread_pool_function func, void *parm, thread_pool_task_counter *counter, const char* categoryname) { thread_pool_enqueue_call(database_zone_download_thread_pool, func, parm, counter, categoryname); } #if HAS_RRSIG_MANAGEMENT_SUPPORT void database_service_zone_resignature_queue_thread(thread_pool_function func, void *parm, thread_pool_task_counter *counter, const char* categoryname) { thread_pool_enqueue_call(database_zone_resignature_thread_pool, func, parm, counter, categoryname); } #endif void database_service_create_invalid_zones() { zone_set_lock(&database_zone_desc); if(!ptr_set_avl_isempty(&database_zone_desc.set)) { ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&database_zone_desc.set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s*)zone_node->value; zdb_zone *invalid_zone = zdb_zone_create(zone_desc->origin); // RC = 1 zdb_zone_invalidate(invalid_zone); zdb_zone *old_zone = zdb_set_zone(g_config->database, invalid_zone); // RC ++ yassert(old_zone == NULL); (void)old_zone; zdb_zone_release(invalid_zone); } } zone_set_unlock(&database_zone_desc); } bool database_service_is_running() { return service_started(&database_handler); } /** * @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/VERSION0000644000077100007710000000012412652141712017741 xustar000000000000000027 mtime=1453900746.981001 27 atime=1454597463.922344 30 ctime=1454597653.017344534 yadifa-2.1.6-5826/sbin/yadifad/VERSION0000664000077100007710000000000612652141712017542 0ustar00yadifayadifa000000000000002.1.6 yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/poll-util.c0000644000077100007710000000012412650131756020763 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.939344 30 ctime=1454597653.284344534 yadifa-2.1.6-5826/sbin/yadifad/poll-util.c0000664000077100007710000001077712650131756020604 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "server-config.h" #include "config.h" #include #include #include #include "poll-util.h" #include "server.h" #define MODULE_MSG_HANDLE g_server_logger /******************************************************************************************************************* * * TCP USAGE LIMITS * ******************************************************************************************************************/ /** * This code maintains the limit on the tcp sockets * @todo Portability has to be tested. */ static nfds_t tcp_fds_count = 0; static nfds_t tcp_fds_idx = 0; static struct pollfd *tcp_fds = NULL; void poll_free() { tcp_fds_count = 0; tcp_fds_idx = 0; free(tcp_fds); tcp_fds = NULL; } void poll_alloc(nfds_t count) { if(tcp_fds != NULL) { if(count != tcp_fds_count) { poll_free(); } } struct pollfd* ret; size_t bytes = sizeof(struct pollfd) * count; MALLOC_OR_DIE(struct pollfd*, ret, bytes, POLLFDBF_TAG); ZEROMEMORY(ret, bytes); for(int i = 0; i < count; i++) { ret[i].events = POLLNVAL/*|POLLIN|POLLHUP*/; } tcp_fds = ret; tcp_fds_count = count; } bool poll_add(int fd) { if(tcp_fds_idx < tcp_fds_count) { tcp_fds[tcp_fds_idx].fd = fd; tcp_fds[tcp_fds_idx].revents = 0; tcp_fds_idx++; return TRUE; } else { return FALSE; } } int poll_update() { int n = poll(tcp_fds, tcp_fds_idx, 0); if(n > 0) { /* got hits */ int f = -1; for(int i = 0; i < tcp_fds_idx; i++) { if(tcp_fds[i].revents != 0) { /* disable it * look for a zero one from the end */ tcp_fds[i].fd = -1; if(f < 0) { f = i; } } else /* recompress */ { if(f >= 0) { tcp_fds[f].fd = tcp_fds[i].fd; tcp_fds[f].revents = 0; tcp_fds[i].fd = -1; while(++f <= i) /* will at most stop at i */ { if(tcp_fds[f].fd < 0) { break; } } } } } tcp_fds_idx -= n; return tcp_fds_idx; } else { if(n < 0) { log_info("tcp: poll failed: %r", ERRNO_ERROR); n = 0; } return tcp_fds_idx; } } yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/notify.c0000644000077100007710000000012412650131756020352 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.048344 30 ctime=1454597653.280344534 yadifa-2.1.6-5826/sbin/yadifad/notify.c0000664000077100007710000015726212650131756020174 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup yadifad * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "notify.h" #include "zone.h" #include "database-service.h" #include "server.h" #include "server_error.h" #if HAS_CTRL #include "ctrl.h" #endif #define NOTFYMSG_TAG 0x47534d5946544f4e #define MESGDATA_TAG 0x415441444753454d /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #define NOTIFY_MESSAGE_TYPE_NOTIFY 1 #define NOTIFY_MESSAGE_TYPE_ANSWER 2 #define MESSAGE_QUERY_TIMEOUT 5 #define MESSAGE_QUERY_TRIES 1 #define MESSAGE_QUERY_TIMEOUT_US (MESSAGE_QUERY_TIMEOUT * 1000000) static struct thread_pool_s *notify_thread_pool = NULL; static int send_socket4 = -1; static int send_socket6 = -1; static struct service_s notify_handler = UNINITIALIZED_SERVICE; static async_queue_s notify_handler_queue; static volatile bool notify_service_initialised = FALSE; typedef struct message_query_summary message_query_summary; struct message_query_summary { host_address *host; message_query_summary *next; /* this pointer is used to list the items, ie: for deletion */ // to discard u64 expire_epoch_us; // for answers, id has to be kept u16 id; // for answers, ip/port should be kept but they are already in the host list (sa.sa4,sa.sa6,addrlen) // times we send the udp packet before giving up s8 tries; // for signed answers, these have to be kept u8 mac_size; // mesg->tsig.mac_size; u8 mac[64]; // mesg->tsig.mac; }; static void message_query_summary_init(message_query_summary *mqs, u16 id, host_address *host, const u8 *mac, u8 mac_size) { yassert(mqs != NULL); #if HAS_TSIG_SUPPORT yassert((mac != NULL) || (mac_size == 0)); #else (void)mac; (void)mac_size; #endif // key mqs->host = host_address_copy(host); mqs->next = NULL; mqs->expire_epoch_us = timeus() + MESSAGE_QUERY_TIMEOUT_US; mqs->id = id; // payload mqs->tries = MESSAGE_QUERY_TRIES; #if HAS_TSIG_SUPPORT if(mac_size > 0) { yassert(mac != NULL); mqs->mac_size = mac_size; memcpy(mqs->mac, mac, mac_size); } #endif } static void message_query_summary_clear(message_query_summary *mqs) { #ifdef DEBUG log_debug("notify: clearing query for %{hostaddr}", mqs->host); #endif host_address_delete(mqs->host); #ifdef DEBUG memset(mqs, 0xfe, sizeof(message_query_summary)); #endif } static void message_query_summary_delete(message_query_summary *mqs) { #ifdef DEBUG log_debug("notify: deleting query for %{hostaddr}", mqs->host); #endif message_query_summary_clear(mqs); ZFREE(mqs, message_query_summary); } static s32 message_query_summary_compare(const void* va, const void* vb) { message_query_summary *a = (message_query_summary*)va; message_query_summary *b = (message_query_summary*)vb; s32 d; d = (s32)a->id - (s32)b->id; if(d == 0) { d = host_address_compare(a->host, b->host); } return d; } typedef struct notify_message notify_message; struct notify_message_notify { u8 type; u8 repeat_countdown; u8 repeat_period; u8 repeat_period_increase; u32 epoch; host_address *hosts_list; /* 64 bits aligned */ #if HAS_TSIG_SUPPORT message_tsig tsig; #endif u16 ztype; u16 zclass; }; struct notify_message_answer { u8 type; u8 rcode; bool aa; u8 r2; host_address *host; message_data *message; /* only used if the message is signed */ }; struct notify_message { u8 *origin; union { u8 type; struct notify_message_notify notify; struct notify_message_answer answer; } payload; }; /*------------------------------------------------------------------------------ * STATIC PROTOTYPES */ /*------------------------------------------------------------------------------ * FUNCTIONS */ /** * * Queue a message telling a slave has answered to a notify * * @param origin the domain of the zone * @param sa the address of the source * @param rcode rcode part of the query * @param aa aa flag value in the query */ static void notify_slaveanswer(message_data *mesg) { notify_message *message; if(notify_service_initialised) { u8 *origin = mesg->qname; socketaddress *sa = &mesg->other; u8 rcode = MESSAGE_RCODE(mesg->buffer); bool aa = MESSAGE_AA(mesg->buffer)!=0; ZALLOC_OR_DIE(notify_message*, message, notify_message, NOTFYMSG_TAG); message->origin = dnsname_dup(origin); message->payload.type = NOTIFY_MESSAGE_TYPE_ANSWER; message->payload.answer.rcode = rcode; message->payload.answer.aa = aa; ZALLOC_OR_DIE(host_address*, message->payload.answer.host, host_address, HOSTADDR_TAG); host_address_set_with_sockaddr(message->payload.answer.host, sa); #if HAS_TSIG_SUPPORT // if there is a TSIG ... if(mesg->tsig.tsig != NULL) { message->payload.answer.message = message_dup(mesg); message->payload.answer.host->tsig = mesg->tsig.tsig; } else { message->payload.answer.message = NULL; message->payload.answer.host->tsig = NULL; } #endif async_message_s *async = async_message_alloc(); async->id = 0; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(¬ify_handler_queue, async); } else { log_err("notify: service not initialised"); } } static bool notify_masterquery_read_soa(u8 *origin, packet_unpack_reader_data *reader, u32 *serial) { ya_result return_value; u8 tmp[MAX_DOMAIN_LENGTH]; /* read and expect an SOA */ packet_reader_read_fqdn(reader, tmp, sizeof(tmp)); if(dnsname_equals(tmp, origin)) { struct type_class_ttl_rdlen tctr; if(packet_reader_read(reader, &tctr, 10) == 10) { if((tctr.qtype == TYPE_SOA) && (tctr.qclass == CLASS_IN)) { if(ISOK(return_value = packet_reader_skip_fqdn(reader))) { if(ISOK(return_value = packet_reader_skip_fqdn(reader))) { if(packet_reader_read(reader, tmp, 4) == 4) { *serial = ntohl(GET_U32_AT_P(tmp)); return TRUE; } } } } } } return FALSE; } struct notify_masterquery_thread_args { u8 *origin; u32 serial; bool serial_set; }; typedef struct notify_masterquery_thread_args notify_masterquery_thread_args; static void * notify_masterquery_thread(void *args_) { notify_masterquery_thread_args *args = (notify_masterquery_thread_args*)args_; /* get the zone descriptor for that domain */ zone_desc_s *zone_desc = zone_acquirebydnsname(args->origin); ya_result return_value; if(zone_desc == NULL) { log_err("notify: slave: zone %{dnsname} has been dropped", args->origin); dnsname_zfree(args->origin); ZFREE(args, notify_masterquery_thread_args); return NULL; } /* do an SOA query to the master to retrieve the serial (wait) */ if(!args->serial_set) { if(ISOK(return_value = message_query_serial(args->origin, zone_desc->masters, &args->serial))) { args->serial_set = TRUE; } else { /* we didn't got the serial */ log_debug("notify: slave: %{dnsname} SOA query to the master failed: %r", args->origin, return_value); } } u32 current_serial; /* get the zone of the domain */ zdb_zone *dbzone = zdb_acquire_zone_read_from_fqdn(g_config->database, args->origin); if(dbzone != NULL) { /* lock it for the XFR (it's a writer, so no other writer allowed) */ if(zdb_zone_trylock(dbzone, ZDB_ZONE_MUTEX_XFR)) { /* get the current serial of the zone */ if(ISOK(zdb_zone_getserial(dbzone, ¤t_serial))) { /* * If the serial on the "master" is lower, * nothing has to be done except a note on the log. * * If we didn't got the serial of course, we can only ask to the master. */ if(args->serial_set) { if(serial_lt(args->serial, current_serial)) { /* do nothing at all */ log_warn("notify: slave: serial number on this slave is higher (%u) than on the notifier (%u)", current_serial, args->serial); } else if(serial_gt(args->serial, current_serial)) { /* download (and apply) the incremental change */ log_info("notify: slave: scheduling an IXFR for %{dnsname}", zone_desc->origin); database_zone_ixfr_query(zone_desc->origin); } else { /* nothing to do but mark the zone as being refreshed */ log_info("notify: slave: already the last version"); dbzone->apex->flags &= ~ZDB_RR_LABEL_INVALID_ZONE; zone_desc->refresh.refreshed_time = zone_desc->refresh.retried_time = time(NULL); zdb_zone_release_unlock(dbzone, ZDB_ZONE_MUTEX_XFR); /* MUST be unlocked here because ... */ database_zone_refresh_maintenance(g_config->database, zone_desc->origin, 0); /* ... this will try to lock */ dnsname_zfree(args->origin); ZFREE(args, notify_masterquery_thread_args); zone_release(zone_desc); return NULL; } } else { log_warn("notify: slave: the serial of the master has not been obtained"); database_zone_ixfr_query(zone_desc->origin); } } else // no soa at apex ... zone needs to be downloaded ... { database_zone_axfr_query(zone_desc->origin); } zdb_zone_release_unlock(dbzone, ZDB_ZONE_MUTEX_XFR); } else { /* * The zone has been locked already ? give up ... */ log_info("notify: slave: zone %{dnsname} is locked already (%x)", args->origin, dbzone->lock_owner); zdb_zone_release(dbzone); database_zone_refresh_maintenance(g_config->database, args->origin, time(NULL) + 5); } } else { /* * Ask for an AXFR of the zone */ log_info("notify: slave: scheduling an AXFR for %{dnsname}", zone_desc->origin); database_zone_axfr_query(zone_desc->origin); } /* AXFR */ dnsname_zfree(args->origin); ZFREE(args, notify_masterquery_thread_args); zone_release(zone_desc); return NULL; } /** * The purely network part of the sending of a notify udp packet * * @param ha destination, TSIG supported * @param msgdata a message to be used for message construciton * @param id the message id * @param origin origin * @param ntype type * @param nclass class * @return */ static ya_result notify_send(host_address* ha, message_data *msgdata, u16 id, const u8 *origin, u16 ntype, u16 nclass) { socketaddress sa; ya_result return_code; /** @todo check if adding the SOA helps bind to update faster */ message_make_notify(msgdata, id, origin, ntype, nclass); #if HAS_TSIG_SUPPORT if(ha->tsig != NULL) { if(FAIL(return_code = message_sign_query(msgdata, ha->tsig))) { log_err("notify: unable to sign message for %{sockaddr} with key %{dnsname}: %r", &sa, ha->tsig->name, return_code); return return_code; } } #endif if(ISOK(return_code = host_address2sockaddr(&sa, ha))) { #if HAS_TSIG_SUPPORT if(ha->tsig == NULL) { #endif #ifndef DEBUG log_info("notify: notifying %{sockaddr} about %{dnsname}", &sa.sa, origin); #else log_info("notify: notifying %{sockaddr} about %{dnsname} (%{dnstype} %{dnsclass})", &sa.sa, origin, &ntype, &nclass); #endif #if HAS_TSIG_SUPPORT } else { #ifndef DEBUG log_info("notify: notifying %{sockaddr} (key=%{dnsname}) about %{dnsname}", &sa.sa, ha->tsig->name, origin); #else log_info("notify: notifying %{sockaddr} (key=%{dnsname}) about %{dnsname} (%{dnstype} %{dnsclass})", &sa.sa, ha->tsig->name, origin, &ntype, &nclass); #endif } #endif int s = -1; int addrlen; switch(sa.sa.sa_family) { case AF_INET: { s = send_socket4; addrlen = sizeof(sa.sa4); break; } case AF_INET6: { s = send_socket6; addrlen = sizeof(sa.sa6); break; } } if(s >= 0) { #if DEBUG log_debug("notify_send: sendto(%d, %p, %d, %d, %{sockaddr}, %d)", s, msgdata->buffer, msgdata->send_length, 0, (struct sockaddr*)&sa.sa, addrlen); log_memdump_ex(g_server_logger, MSG_DEBUG5, msgdata->buffer, msgdata->send_length, 16, OSPRINT_DUMP_HEXTEXT); #endif if(ISOK(return_code = sendto(s, msgdata->buffer, msgdata->send_length, 0, &sa.sa, addrlen))) { log_debug("notify: sent %i bytes to %{sockaddr}", msgdata->send_length, &sa.sa); } else { log_err("notify: unable to send notify to %{sockaddr}: %r", &sa.sa, ERRNO_ERROR); } } else { return_code = ERROR; // wrong socket // if we cannot get the reply, no point trying to send the query log_err("notify: no listening interface can receive from %{sockaddr}", &sa.sa); } } else { log_err("notify: unable to convert '%{hostaddr}' to an address", ha); } return return_code; } /** * * Uses a thread to handle the notify from the master (notify_masterquery_thread) * * The message is a NOTIFY SOA IN * The reader points into the buffer of the message and is exactly after the Q section. * * * @param database the database * @param mesg the message * @param reader packet reader into the above message, positioned right after the Q section * * @return an error code */ static ya_result notify_masterquery(zdb *database, message_data *mesg, packet_unpack_reader_data *reader) { ya_result return_value; u32 serial = 0; // to silence gcc : this was not a bug bool serial_set = FALSE; if(MESSAGE_AN(mesg->buffer) != 0) { serial_set = notify_masterquery_read_soa(mesg->qname, reader, &serial); } notify_masterquery_thread_args *args; ZALLOC_OR_DIE(notify_masterquery_thread_args*, args, notify_masterquery_thread_args, GENERIC_TAG); args->origin = dnsname_zdup(mesg->qname); args->serial = serial; args->serial_set = serial_set; return_value = thread_pool_enqueue_call(notify_thread_pool, notify_masterquery_thread, args, NULL, "notify: slave"); return return_value; } static ya_result notify_process_masterquery_in(zdb *database, message_data *mesg, packet_unpack_reader_data *reader) { zone_desc_s *zone_desc; ya_result return_value; zone_desc = zone_acquirebydnsname(mesg->qname); if(zone_desc != NULL) { MESSAGE_HIFLAGS(mesg->buffer) |= QR_BITS|AA_BITS; if(zone_desc->type == ZT_SLAVE) { log_info("notify: notification query for slave zone %{dnsname} %{dnsclass}", mesg->qname, &mesg->qclass); #if ZDB_HAS_ACL_SUPPORT if(ACL_REJECTED(acl_check_access_filter(mesg, &zone_desc->ac.allow_notify))) { /* notauth */ log_warn("notify: not authorised"); mesg->status = FP_NOTIFY_REJECTED; mesg->send_length = mesg->received; zone_release(zone_desc); return ACL_NOTIFY_REJECTED; } #endif if(host_address_list_contains_ip(zone_desc->masters, &mesg->other)) { if(zone_isidle(zone_desc) && !zone_isfrozen(zone_desc) && !zone_is_obsolete(zone_desc)) { return_value = notify_masterquery(database, mesg, reader); // thread-safe zone_release(zone_desc); return return_value; } else { log_info("notify: slave: zone %{dnsname} is busy", zone_desc->origin); /* or not */ database_zone_refresh_maintenance(g_config->database, zone_desc->origin, time(NULL) + 5); // thread-safe zone_release(zone_desc); return SUCCESS; } } else { log_warn("notify: slave: notification from %{sockaddr}: not in the master list for zone %{dnsname}", &mesg->other.sa, mesg->qname); mesg->status = FP_NONMASTER_NOTIFIES_SLAVE; mesg->send_length = mesg->received; return_value = NOTIFY_QUERY_FROM_UNKNOWN; } } /* type = SLAVE */ else { /* type = MASTER ? */ // note: a slave can also be a master ... do not cut this log_warn("notify: notification query for master zone %{dnsname}", mesg->qname); mesg->status = FP_SLAVE_NOTIFIES_MASTER; mesg->send_length = mesg->received; return_value = NOTIFY_QUERY_TO_MASTER; } } else { log_warn("notify: notification query for unknown zone %{dnsname} %{dnsclass}", mesg->qname, &mesg->qclass); MESSAGE_HIFLAGS(mesg->buffer) |= QR_BITS; mesg->status = FP_NOTIFY_UNKNOWN_ZONE; mesg->send_length = mesg->received; return_value = NOTIFY_QUERY_TO_UNKNOWN; } zone_release(zone_desc); return return_value; } /** @brief Handle a notify from the master (or another slave) * * @param database : the database * @param mesg : the input message * * @retval OK * @retval NOK */ ya_result notify_process(zdb *database, message_data *mesg) { ya_result return_value = ERROR; /* rfc1996 * 3.7: * A NOTIFY request has QDCOUNT>0, ANCOUNT>=0, AUCOUNT>=0, * ADCOUNT>=0. If ANCOUNT>0, then the answer section represents an * unsecure hint at the new RRset for this */ if(MESSAGE_QR(mesg->buffer)) { /* * It's an answer from a slave (we are the master) * It works if we are the master for the zone AND we sent a notify. * Else we discard. */ log_debug1("notify: notification answer"); notify_slaveanswer(mesg); // thread-safe return SUCCESS; } else { /* * It's a notification by the "master" ... (or in the case of an AXFR/CTRL a request to be notified of all dynamic zones) * It works if we are a slave for the zone. * Else we discard. */ log_debug1("notify: notification query"); packet_unpack_reader_data reader; packet_reader_init(&reader, mesg->buffer, mesg->received); reader.offset = DNS_HEADER_LENGTH; u8 tmp[MAX_DOMAIN_LENGTH]; if(ISOK(return_value = packet_reader_read_fqdn(&reader, tmp, sizeof(tmp)))) { u16 qtype; if(ISOK(return_value = packet_reader_read_u16(&reader, &qtype))) { u16 qclass; if(ISOK(return_value = packet_reader_read_u16(&reader, &qclass))) { switch(qclass) { case CLASS_IN: { /* * Master sent an notify for the IN class */ notify_process_masterquery_in(database, mesg, &reader); message_transform_to_error(mesg); break; } default: { mesg->status = FP_NOT_SUPP_CLASS; message_make_error(mesg, mesg->status); break; } } } } } #if HAS_TSIG_SUPPORT if(TSIG_ENABLED(mesg)) /* NOTE: the TSIG information is in mseg */ { tsig_sign_answer(mesg); } #endif return return_value; /** @todo give a specific error code */ } } static void notify_message_free(notify_message *msg) { if(msg == NULL) { return; } if(msg->origin != NULL) { free(msg->origin); msg->origin = NULL; } switch(msg->payload.type) { case NOTIFY_MESSAGE_TYPE_NOTIFY: { host_address_delete_list(msg->payload.notify.hosts_list); break; } case NOTIFY_MESSAGE_TYPE_ANSWER: { log_debug("notify_message_free(%p) host_address_delete(%p)", msg, msg->payload.answer.host); debug_log_stacktrace(g_server_logger, MSG_DEBUG7, "notify_message_free:host_address_delete"); host_address_delete(msg->payload.answer.host); if(msg->payload.answer.message != NULL) { free(msg->payload.answer.message); // message_data (free, not ZFREE) } break; } } #ifdef DEBUG memset(msg, 0xff, sizeof(notify_message)); #endif ZFREE(msg, notify_message); } static int notify_process_dnsname_compare(const void *node_a, const void *node_b) { const u8 *m_a = (const u8*)node_a; const u8 *m_b = (const u8*)node_b; return dnsname_compare(m_a, m_b); } static int notify_service(struct service_worker_s *worker) { /* * Resolve the names and replace them by their IP * * Remove the sender * * Remove myself * * Store (merge?) the queue for the current serial, replace an existing one. * * Update the serial on the queue for each answer ? * * */ log_info("notify: notification service started"); message_data *msgdata; MALLOC_OR_DIE(message_data *,msgdata, sizeof(message_data), MESGDATA_TAG); ZEROMEMORY(msgdata, sizeof(message_data)); random_ctx rnd = thread_pool_get_random_ctx(); ptr_set notify_zones = PTR_SET_EMPTY; notify_zones.compare = notify_process_dnsname_compare; ptr_set current_queries = PTR_SET_EMPTY; current_queries.compare = message_query_summary_compare; u32 last_current_queries_cleanup_epoch_us = 0; /** * @todo the idea here is to get the right interface. * This loop breaking at the first result is of course wrong. */ const addressv6 localhost6 = {.bytes = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}}; for(interface *intf = g_config->interfaces; intf < g_config->interfaces_limit; intf++) { if(( send_socket4 < 0) && (intf->udp.addr->ai_family == AF_INET)) { socketaddress *sa = (socketaddress*)intf->udp.addr->ai_addr; u32 ipv4 = (u32)sa->sa4.sin_addr.s_addr; // avoid bad ones if( ((ipv4 & NU32(0xff000000)) != NU32(0x7f000000) ) && // 127.0.0.0/8 ((ipv4 & NU32(0xf0000000)) != NU32(0xe0000000) ) && // 224.0.0.0/4 ((ipv4 & NU32(0xffffffff)) != NU32(0xffffffff) ) ) // 255.255.255.255/32 { send_socket4 = intf->udp.sockfd; } else { log_info("%{sockaddr} cannot be used for notification", sa); } } if(( send_socket6 < 0) && (intf->udp.addr->ai_family == AF_INET6)) { socketaddress *sa = (socketaddress*)intf->udp.addr->ai_addr; addressv6 ipv6; memcpy(&ipv6, &sa->sa6.sin6_addr, 16); if((memcmp(&ipv6, &localhost6, 16) != 0) // ::1/128 ) { send_socket6 = intf->udp.sockfd; } else { log_info("%{sockaddr} cannot be used for notification", sa); } } } if((send_socket4 < 0)) { log_warn("notify: no usable IPv4 socket bound"); } if((send_socket6 < 0)) { log_warn("notify: no usable IPv6 socket bound"); logger_flush(); if(send_socket4 < 0) { log_warn("notify: no usable socket bound"); } } /* */ log_debug("notify: notification service main loop reached"); while(service_shouldrun(worker) || !async_queue_emtpy(¬ify_handler_queue)) { { /* what happens in here should not interfere with the rest of the function */ u64 tus = timeus(); if(!ptr_set_avl_isempty(¤t_queries) && (tus > last_current_queries_cleanup_epoch_us)) { /* create a list of expired message_query_summary */ log_debug("notify: cleaning up expired notifications"); message_query_summary head; head.next = NULL; message_query_summary *current = &head; last_current_queries_cleanup_epoch_us = tus; /* find them using an iterator */ ptr_set_avl_iterator current_queries_iter; ptr_set_avl_iterator_init(¤t_queries, ¤t_queries_iter); while(ptr_set_avl_iterator_hasnext(¤t_queries_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(¤t_queries_iter); message_query_summary* mqs = (message_query_summary*)node->value; if(last_current_queries_cleanup_epoch_us > mqs->expire_epoch_us) { #if DEBUG double expired_since = last_current_queries_cleanup_epoch_us - mqs->expire_epoch_us; expired_since /= 1000000.0; log_debug("notify: query (%hx) to %{hostaddr} expired %f seconds ago", mqs->id, mqs->host, expired_since); #endif if(--mqs->tries <= 0) { current->next = mqs; current = mqs; } else { #if DEBUG log_debug("notify: query (%hx) to %{hostaddr} got %hhi tries left (NOT IMPLEMENTED)", mqs->id, mqs->host, mqs->tries); #endif mqs->expire_epoch_us = tus + MESSAGE_QUERY_TIMEOUT_US; // send the message again // notify_send(mqs->host, msgdata, mqs->id, origin, ztype, zclass); } } } /* once the tree has been scanned, destroy every node listed */ current = head.next; while(current != NULL) { message_query_summary* mqs = current; current = current->next; ptr_set_avl_delete(¤t_queries, mqs); message_query_summary_delete(mqs); } } } for(;;) { /* current_queries tree cleanup */ async_message_s *async = async_message_next(¬ify_handler_queue); if(async == NULL) /* if no message is in the queue, proceed to next step */ { break; } notify_message *message = (notify_message*)async->args; if(message == NULL) /* if no message is in the queue, proceed to next step (probably irrelevant) */ { async_message_release(async); break; } switch(message->payload.type) { case NOTIFY_MESSAGE_TYPE_NOTIFY: { #ifndef DEBUG log_info("notify: notifying slaves for %{dnsname}", message->origin); #else log_info("notify: notifying slaves for %{dnsname} (%{dnstype} %{dnsclass})", message->origin, &message->payload.notify.ztype, &message->payload.notify.zclass); #endif host_address **ha_prev = &message->payload.notify.hosts_list; host_address *ha = *ha_prev; while(ha != NULL) // resolve all domain names in the list, replace them with the resolved address { if(ha->version == HOST_ADDRESS_DNAME) { /* resolve */ char name[MAX_DOMAIN_LENGTH + 1]; dnsname_to_cstr(name, ha->ip.dname.dname); struct hostent *he = gethostbyname(name); if(he != NULL) { host_address_append_hostent(message->payload.notify.hosts_list, he, NU16(DNS_DEFAULT_PORT)); } else { log_warn("notify: unable to resolve %{dnsname}", ha->ip.dname.dname); } *ha_prev = ha->next; host_address_delete(ha); } else { ha_prev = &ha->next; } ha = *ha_prev; } /* * The current queue has been resolved. */ /* * @todo remove myself */ /** * The list has to replace the current one for message->origin (because it's starting again) */ ptr_node *node = ptr_set_avl_insert(¬ify_zones, message->origin); if(node->value != NULL) { notify_message* old_message = (notify_message*)node->value; // get the old value node->key = message->origin; // (same key but the old pointer is about to be deleted) node->value = message; // set the new value notify_message_free(old_message); // destroy the old value. notify_zones does not contains it anymore } else { node->value = message; } message->payload.notify.epoch = time(NULL); break; } case NOTIFY_MESSAGE_TYPE_ANSWER: { log_info("notify: answer from slave %{hostaddr} for %{dnsname}", message->payload.answer.host, message->origin); ptr_node *node = ptr_set_avl_find(¬ify_zones, message->origin); if(node != NULL) { notify_message *msg = (notify_message*)node->value; if(msg != NULL) { /* * Look for the entry and remove it */ /** * @todo VERIFY THE TSIG HERE * * The possible TSIG in the message has to be verified here */ /* message->payload.answer.tsig ... */ /* all's good so remove the notify query from the list */ if(host_address_list_contains_host(msg->payload.notify.hosts_list, message->payload.answer.host)) { host_address *ha; #if HAS_TSIG_SUPPORT ha = message->payload.answer.host; message_query_summary tmp; if(ha->tsig != NULL) { u16 id = MESSAGE_ID(message->payload.answer.message->buffer); message_query_summary_init(&tmp, id, ha, NULL, 0); // try to find the exact match ptr_node *node = ptr_set_avl_find(¤t_queries, &tmp); message_query_summary_clear(&tmp); if(node == NULL) { /* most likely a timeout */ log_err("notify: answer from %{hostaddr} for %{dnsname}: matching query has not been found", message->payload.answer.host, message->origin); // delete message notify_message_free(message); break; } message_query_summary *mqs = (message_query_summary*)node->value; yassert(mqs != NULL); // verify the signature message_data *mesg = message->payload.answer.message; ya_result return_value; if(FAIL(return_value = tsig_verify_answer(mesg, mqs->mac, mqs->mac_size))) { // if everything is good, then proceed log_err("notify: answer from %{hostaddr} for %{dnsname}: signature verification failed: %r", message->payload.answer.host, message->origin, return_value); // delete message notify_message_free(message); break; } free(message->payload.answer.message); // message_data, free, not ZFREE message->payload.answer.message = NULL; ptr_set_avl_delete(¤t_queries, mqs); message_query_summary_delete(mqs); } /* end of TSIG verification, with success*/ #endif ha = host_address_remove_host_address(&msg->payload.notify.hosts_list, message->payload.answer.host); host_address_delete(ha); if(message->payload.answer.rcode == RCODE_OK) { if(!message->payload.answer.aa) { log_err("notify: answer from %{hostaddr} for %{dnsname}: no AA", message->payload.answer.host, message->origin); } } else { log_err("notify: error from %{hostaddr} for %{dnsname}: %r", message->payload.answer.host, message->origin, MAKE_DNSMSG_ERROR(message->payload.answer.rcode)); } } else { log_err("notify: unexpected answer from %{hostaddr} for %{dnsname}", message->payload.answer.host, message->origin); } if(msg->payload.notify.hosts_list == NULL) /// @todo 20150616 edf -- there was a clear NULL dereference. test the fix { ptr_set_avl_delete(¬ify_zones, msg->origin); notify_message_free(msg); } } else // msg = NULL { log_err("notify: unexpected answer by %{hostaddr} for %{dnsname}", message->payload.answer.host, message->origin); ptr_set_avl_delete(¬ify_zones, message->origin); /// @todo 20150616 edf -- there was a clear NULL reference. test the fix } } else { log_err("notify: unexpected answer by %{hostaddr} for %{dnsname}", message->payload.answer.host, message->origin); } // delete message notify_message_free(message); break; } #ifdef DEBUG default: { log_err("notify: unknown message type %i", message->payload.type); break; } #endif } /* switch message type */ async_message_release(async); } // for(;;) /* * For all entries in the queue, send a notify to the ones that need to be repeated */ time_t now = time(NULL); ptr_vector todelete = EMPTY_PTR_VECTOR; ptr_set_avl_iterator zones_iter; ptr_set_avl_iterator_init(¬ify_zones, &zones_iter); while(ptr_set_avl_iterator_hasnext(&zones_iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&zones_iter); notify_message *message = zone_node->value; if(message->payload.notify.epoch > now) { continue; } host_address *ha = message->payload.notify.hosts_list; while(ha != NULL) { /* * Send an UDP packet to the ha */ u16 id = random_next(rnd); ya_result err = notify_send(ha, msgdata, id, message->origin, message->payload.notify.ztype, message->payload.notify.zclass); host_address *ha_next = ha->next; if(ISOK(err)) { message_query_summary* mqs; ZALLOC_OR_DIE(message_query_summary*, mqs, message_query_summary, GENERIC_TAG); #if HAS_TSIG_SUPPORT message_query_summary_init(mqs, id, ha, msgdata->tsig.mac, msgdata->tsig.mac_size); #else message_query_summary_init(mqs, id, ha, NULL, 0); #endif ptr_node *node = ptr_set_avl_insert(¤t_queries, mqs); if(node->value != NULL) { // destroy this mqs #ifdef DEBUG log_debug("notify: node %{hostaddr}[%04x] already exists, replacing", mqs->host, mqs->id); #endif message_query_summary_delete(node->value); node->key = mqs; } node->value = mqs; } else // remove it { host_address *rem_ha = host_address_remove_host_address(&message->payload.notify.hosts_list, ha); if(rem_ha != NULL) { host_address_delete(rem_ha); } } ha = ha_next; } /* decrease the countdown or remove it from the collection */ if(message->payload.notify.repeat_countdown != 0) { message->payload.notify.repeat_countdown--; /* ensure there is no overload */ u16 rp = message->payload.notify.repeat_period + message->payload.notify.repeat_period_increase; if(rp > 255) /* minutes, 8 bits */ { rp = 255; } message->payload.notify.repeat_period = (u8)rp; message->payload.notify.epoch = now + message->payload.notify.repeat_period * 60; // repeat_period is minutes } else { ptr_vector_append(&todelete, message); } } notify_message **msgs = (notify_message**)todelete.data; for(s32 idx = 0; idx <= todelete.offset; idx++) { notify_message *msg = msgs[idx]; ptr_set_avl_delete(¬ify_zones, msg->origin); notify_message_free(msg); } sleep(1); } service_set_stopping(worker); ptr_set_avl_iterator iter; u32 total_count; u32 count; total_count = 0; count = 0; ptr_set_avl_iterator_init(¬ify_zones, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); //host_address *ha = (host_address*)node->key; notify_message* message = (notify_message*)node->value; // get the old value if(message != NULL) { notify_message_free(message); // destroy the message node->key = NULL; // (same key but the old pointer is about to be deleted) node->value = NULL; // set the new value count++; } total_count++; } log_debug("notify: cleared %u messages", count); if(count != total_count) { log_err("notify: %u messages were empty", total_count - count); } ptr_set_avl_destroy(¬ify_zones); total_count = 0; count = 0; ptr_set_avl_iterator_init(¤t_queries, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); message_query_summary* mqs = (message_query_summary*)node->value; if(mqs != NULL) { message_query_summary_delete(mqs); count++; } total_count++; } log_debug("notify: cleared %u summaries", count); if(count != total_count) { log_err("notify: %u summaries were empty", total_count - count); } ptr_set_avl_destroy(¤t_queries); if(msgdata != NULL) { free(msgdata); // message_data } log_info("notify: notification service stopped"); return 0; } /** * Sends a notify to all the slave for a given domain name: * * _ Get the zone * _ Create an empty list * _ If notify-auto, add all the IPs of all the NS at the apex of the zone to the list. * _ Add all the also-notify IPs to the list * _ Queue the list to the notify service * * @param origin */ void notify_slaves(u8 *origin) { if(!notify_service_initialised) { return; } /* * Build a list of IPs to contact * The master in the SOA must not be in this list * The current server must not be in this list * * Once the list is done, launch a thread that will periodically retry anybody in this list until the list is empty * * The list should be mutexed * The list should be in a by-origin collection * The list should be rebuild for each new notification (because the zone could have changed) */ zdb *db = g_config->database; zdb_zone *zone = zdb_acquire_zone_read_from_fqdn(db, origin); // RC++ if((zone == NULL) || ZDB_ZONE_INVALID(zone)) { if(zone != NULL) { zdb_zone_release(zone); } log_debug("notify: zone '%{dnsname}' temporarily unavailable", origin); return; } zone_desc_s *zone_desc = zone_acquirebydnsname(origin); if(zone_desc == NULL) { zdb_zone_release(zone); log_err("notify: zone '%{dnsname}' is not configured", origin); return; } host_address list; #ifdef DEBUG memset(&list, 0xff, sizeof(list)); #endif list.next = NULL; /* no need to set TSIG */ if(zone_ismaster(zone_desc) && zone_is_auto_notify(zone_desc)) { zdb_zone_lock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); // get the SOA zdb_packed_ttlrdata *soa = zdb_record_find(&zone->apex->resource_record_set, TYPE_SOA); // get the NS zdb_packed_ttlrdata *ns = zdb_record_find(&zone->apex->resource_record_set, TYPE_NS); // get the IPs for each NS but the one in the SOA u8 *soa_mname = ZDB_PACKEDRECORD_PTR_RDATAPTR(soa); u32 soa_mname_size = dnsname_len(soa_mname); u8 *soa_rname = soa_mname + soa_mname_size; u8 *serial_ptr = soa_rname + dnsname_len(soa_rname); u32 serial = *((u32*)serial_ptr); serial = ntohl(serial); for(zdb_packed_ttlrdata *nsp = ns; nsp != NULL; nsp = nsp->next) { u32 ns_dname_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(nsp); u8 *ns_dname = ZDB_PACKEDRECORD_PTR_RDATAPTR(nsp); if(ns_dname_size == soa_mname_size) { if(memcmp(ns_dname, soa_mname, soa_mname_size) == 0) { continue; } } /* valid candidate : get its IP, later */ #if 1 if(zdb_append_ip_records(db, ns_dname, &list) <= 0) { // If no IP has been found, they will have to be resolved using the system ... later host_address_append_dname(&list, ns_dname, NU16(DNS_DEFAULT_PORT)); } #else zdb_packed_ttlrdata *a_records = NULL; zdb_packed_ttlrdata *aaaa_records = NULL; zdb_query_ip_records(db, ns_dname, &a_records, &aaaa_records); // If there is any bit set in the returned pointers ... if(((intptr)a_records|(intptr)aaaa_records) != 0) { // Add these IPs to the list. while(a_records != NULL) { host_address_append_ipv4(&list, ZDB_PACKEDRECORD_PTR_RDATAPTR(a_records), NU16(DNS_DEFAULT_PORT)); a_records = a_records->next; } while(aaaa_records != NULL) { host_address_append_ipv6(&list, ZDB_PACKEDRECORD_PTR_RDATAPTR(aaaa_records), NU16(DNS_DEFAULT_PORT)); aaaa_records = aaaa_records->next; } } else { // If no IP has been found, they will have to be resolved using the system ... later host_address_append_dname(&list, ns_dname, NU16(DNS_DEFAULT_PORT)); } #endif } zdb_zone_release_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); } else { zdb_zone_release(zone); } // at this point I have the list of every IP I could find along with names I cannot resolve. // note that we don't need to care about the changes in the database : it would mean a new // notify and this one would be discarded host_address *also_notifies = zone_desc->notifies; while(also_notifies != NULL) { host_address_append_host_address(&list, also_notifies); //copy made also_notifies = also_notifies->next; } // It's separate from the DB push the lot // thread from the pool if(list.next != NULL) { notify_message *message; ZALLOC_OR_DIE(notify_message*, message, notify_message, NOTFYMSG_TAG); message->origin = dnsname_dup(origin); message->payload.type = NOTIFY_MESSAGE_TYPE_NOTIFY; message->payload.notify.hosts_list = list.next; message->payload.notify.repeat_countdown = zone_desc->notify.retry_count; /* 10 times */ message->payload.notify.repeat_period = zone_desc->notify.retry_period; /* 1 minute */ message->payload.notify.repeat_period_increase = zone_desc->notify.retry_period_increase; /* 1 minute */ message->payload.notify.ztype = TYPE_SOA; message->payload.notify.zclass = CLASS_IN; async_message_s *async = async_message_alloc(); async->id = 0; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(¬ify_handler_queue, async); } zone_release(zone_desc); } /** * Stops all notification for zone with origin * * @param origin */ void notify_clear(u8 *origin) { /// @todo IMPLEMENT IT } void notify_host_list(zone_desc_s *zone_desc, host_address *hosts, u16 zclass) { notify_message *message; ZALLOC_OR_DIE(notify_message*, message, notify_message, NOTFYMSG_TAG); message->origin = dnsname_dup(zone_desc->origin); message->payload.type = NOTIFY_MESSAGE_TYPE_NOTIFY; message->payload.notify.hosts_list = hosts; message->payload.notify.repeat_countdown = zone_desc->notify.retry_count; /* 10 times */ message->payload.notify.repeat_period = zone_desc->notify.retry_period; /* 1 minute */ message->payload.notify.repeat_period_increase = zone_desc->notify.retry_period_increase; /* 1 minute */ message->payload.notify.ztype = TYPE_SOA; message->payload.notify.zclass = zclass; async_message_s *async = async_message_alloc(); async->id = 0; async->args = message; async->handler = NULL; async->handler_args = NULL; async_message_call(¬ify_handler_queue, async); } ya_result notify_service_init() { int err = SUCCESS; if(!notify_service_initialised) { if(notify_thread_pool == NULL) { if((notify_thread_pool = thread_pool_init_ex(10, 4096, "notify-tp")) == NULL) { return ERROR; } } if(ISOK(err = service_init_ex(¬ify_handler, notify_service, "yadifad-notify", 1))) { async_queue_init(¬ify_handler_queue, 4096, 1, 1000000, "yadifad-notify"); notify_service_initialised = TRUE; } } return err; } /** * Starts the notify service thread */ ya_result notify_service_start() { int err = ERROR; if(notify_service_initialised) { if(service_stopped(¬ify_handler)) { err = service_start(¬ify_handler); } } return err; } /** * Stops the notify service thread */ ya_result notify_service_stop() { int err = ERROR; if(notify_service_initialised) { if(!service_stopped(¬ify_handler)) { err = service_stop(¬ify_handler); service_wait(¬ify_handler); } } return err; } ya_result notify_service_finalise() { int err = SUCCESS; if(notify_service_initialised) { err = notify_service_stop(); service_finalize(¬ify_handler); async_queue_finalize(¬ify_handler_queue); if(notify_thread_pool != NULL) { thread_pool_destroy(notify_thread_pool); notify_thread_pool = NULL; } notify_service_initialised = FALSE; } return err; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/configure.ac0000644000077100007710000000013212654662532021170 xustar000000000000000030 mtime=1454597466.796344534 30 atime=1454597466.794344534 30 ctime=1454597653.010344534 yadifa-2.1.6-5826/sbin/yadifad/configure.ac0000664000077100007710000001511612654662532021002 0ustar00yadifayadifa00000000000000dnl ############################################################################ dnl dnl Copyright (c) 2011-2016, EURid. All rights reserved. dnl The YADIFA TM software product is provided under the BSD 3-clause license: dnl dnl Redistribution and use in source and binary forms, with or without dnl modification, are permitted provided that the following conditions dnl are met: dnl dnl * Redistributions of source code must retain the above copyright dnl notice, this list of conditions and the following disclaimer. dnl * Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in dnl the documentation and/or other materials provided with the dnl distribution. dnl * Neither the name of EURid nor the names of its contributors may be dnl used to endorse or promote products derived from this software dnl without specific prior written permission. dnl dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN dnl CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE dnl POSSIBILITY OF SUCH DAMAGE. dnl dnl ############################################################################## AC_PREREQ(2.61) AC_REVISION([$Revision: 5826 $]) # 1 # svn log 2> /dev/null|head -2|grep ^r|sed 's/.\([1-9]*\).*/\1/' # 2 # # grep \$Revision: *|sed -e 's/^.*\$Revision: *//' -e 's/\$.*//' -e 's/ *//'|sort -n|tail -1| tr -d '\n')|tr -d '\n' # 3 # # grep -r \$Revision: ../../* |sed -e 's/^.*\$Revision: *//' -e 's/\$.*//' -e 's/ *//'|sort -n|tail -1| tr -d '\n')|tr -d '\n' AC_INIT([yadifad],m4_esyscmd([svn info 2> /dev/null | grep 'Last Changed Rev: ' | sed -re 's/.*: (.*)/Revision: \1 $/' -e 's/^/$/' >> revision.txt;echo $(cat VERSION)-$(grep \$Revision: * | sed -e 's/^.*\$Revision: *//' -e 's/\$.*//' -e 's/ *//' | sort -n | /usr/bin/tail -1 | tr -d '\n') | tr -d '\n']),[bugreport@yadifa.eu]) echo echo echo "YADIFAD START" echo "-------------" echo echo m4_include([../../m4/eurid.m4]) m4_include([../../m4/yadifa.m4]) AC_CONFIG_AUX_DIR([.]) AM_INIT_AUTOMAKE([-Wall -Werror tar-pax]) AC_CONFIG_HEADER([server-config.h]) AC_CONFIG_MACRO_DIR([../../m4]) AC_DEFUN([SYSCONF], [/$prefix/PACKAGE/PACKAGE.conf]) AC_CANONICAL_BUILD # Checks for programs. AC_PROG_CC AM_PROG_CC_C_O LT_INIT([disable-shared]) AC_DARWIN_LIBTOOL AC_PROG_LIBTOOL dnl Checks for libraries. AC_CHECK_LIB([c], [printf]) AC_CHECK_LIB([pthread], [pthread_mutex_init]) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h]) # Check for Darwin or Linux AC_CHECK_HEADERS([linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h]) # Check for Darwin or Linux AC_CHECK_HEADERS([sys/types.h i386/types.h]) # AC_CHECK_HEADERS([sys/socket.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_BIGENDIAN AC_TYPE_MODE_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_STRUCT_TM dnl AC_PROG_RANLIB AC_CHECK_TYPES(uint64_t) AC_CHECK_TYPES(int64_t) AC_CHECK_TYPES(long long) AC_CHECK_TYPES(u_char) dnl Add some defines. AC_DEFINE_UNQUOTED([TCP_LISTENQ], [1024],[TCP queue]) AC_DEFINE_UNQUOTED([MAX_INTERFACES], [16],[max nic interfaces]) dnl Add some macros AH_BOTTOM([ #ifdef DEBUG #define DPRINTF(p) printf p #else #define DPRINTF(p) /* nothing */ #endif /* DEBUG */ ]) AC_SYS_LARGEFILE AC_COMPILER_CHECK AC_PTHREAD_SPINLOCK_CHECK AC_PTHREAD_SETNAME_NP_CHECK AC_YADIFA_FEATURES AC_YADIFA_ENABLE_DNSCORE AC_YADIFA_ENABLE_DNSDB AC_YADIFA_ENABLE_DNSZONE AC_YADIFA_ADD_LIBS AC_CHECK_LTO dnl Checks for library functions. AC_FUNC_FORK dnl AC_FUNC_MALLOC does weird things: dnl http://sources.redhat.com/ml/automake/2003-05/msg00023.html dnl http://www.mail-archive.com/autoconf@gnu.org/msg08935.html dnl AC_FUNC_MALLOC goals: dnl malloc(0) will not return NULL dnl realloc(NULL,x) will not crash (occurs on rare systems) dnl dnl AC_FUNC_MALLOC AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_FUNC_STAT AC_CHECK_FUNCS([bzero memset select socket]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT dnl ---------------------------------------------------------------------------- AC_MAKE_BUILDINFO echo echo "SUMMARY for YADIFAD:" echo "-------------------" echo echo "CC .................................. : $CC" echo "LD .................................. : $LD" echo "AR .................................. : $AR" echo "CFLAGS .............................. : $CFLAGS" echo "CPPFLAGS ............................ : $CPPFLAGS" echo "LDFLAGS ............................. : $LDFLAGS" echo "LIBS ................................ : $LIBS" echo echo "ZALLOC .............................. : $enable_zalloc" echo "ZALLOC STATISTICS ................... : $enable_zalloc_statistics" echo "ZALLOC DEBUG ........................ : $enable_zalloc_debug" echo "ACL ................................. : $enable_acl" echo "TSIG ................................ : $enable_tsig" echo "MASTER .............................. : $enable_master" echo "DYNUPDATE ........................... : $enable_dynupdate" echo "RRSIG MANAGEMENT .................... : $enable_rrsig_management" echo "CTRL ................................ : $enable_ctrl" echo "NSEC ................................ : $enable_nsec" echo "NSEC3 ............................... : $enable_nsec3" echo "RRL ................................. : $enable_rrl" if [[ ! "${OPENSSL}" = "" ]] then echo echo "Using OpenSLL from .................. : ${OPENSSL}" fi dnl if [[ "$with_tcl" = "yes" ]]; then dnl echo dnl echo TCL used ............................ : $tcl_version dnl echo TCL library ......................... : $tcl_libdir dnl echo "TCL includes ........................ : $tcl_includedir" dnl fi case "$enable_mirror" in yes) echo echo "MIRROR............................... : yes" ;; *) ;; esac echo echo "Install prefix ...................... : $prefix" echo "Install sysconf ..................... : $sysconfdir" echo echo echo "YADIFAD DONE" echo "------------" echo echo yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-resignature.h0000644000077100007710000000012412650131756025550 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.968344 30 ctime=1454597653.152344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-resignature.h0000664000077100007710000000453012650131756025357 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #include "server-config.h" #include #if HAS_RRSIG_MANAGEMENT_SUPPORT ya_result database_service_zone_resignature_init(zone_desc_s *zone_desc, zdb_zone *zone); ya_result database_service_zone_resignature_init_db(zdb *db); ya_result database_service_zone_resignature(zone_desc_s *zone_desc); // one thread for all the program #else #error "no RRSIG management support: database-service-zone-resignature.h should not be included" #endif /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/server.h0000644000077100007710000000012412650131756020355 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.050344 30 ctime=1454597653.100344534 yadifa-2.1.6-5826/sbin/yadifad/server.h0000664000077100007710000001123612650131756020165 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup server Server * @ingroup yadifad * @brief Server initialisation and launch * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef SERVER_H_ #define SERVER_H_ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include #include #include "confs.h" #include "server_context.h" #include "server_error.h" #ifndef SERVER_C_ extern logger_handle *g_server_logger; extern volatile int program_mode; #endif #include #define SOA_MIN_REFRESH 60 #define SOA_MIN_RETRY 60 #define SOA_MIN_EXPIRE 60 #define ANCILIARY_BUFFER_SIZE 65536 #define TPROCPRM_TAG 0x4d5250434f525054 #define POLLFDBF_TAG 0x464244464c4c4f50 /* ------------------------------------------------------------ * * PROTOTYPES */ typedef struct server_statistics_t server_statistics_t; /** * volatile is only needed for variables changed by another thread */ #define SERVER_STATISTICS_ERROR_CODES_COUNT 32 struct server_statistics_t { mutex_t mtx; volatile u64 input_loop_count; volatile u64 input_timeout_count; volatile u64 loop_rate_counter; volatile u64 loop_rate_elapsed; /* udp */ volatile u64 udp_input_count; volatile u64 udp_queries_count; volatile u64 udp_notify_input_count; volatile u64 udp_updates_count; volatile u64 udp_dropped_count; volatile u64 udp_output_size_total; volatile u64 udp_undefined_count; #if 1 volatile u64 udp_referrals_count; #endif /* REFERRALS : !AA + NOERROR */ /* tcp */ volatile u64 tcp_input_count; volatile u64 tcp_queries_count; volatile u64 tcp_notify_input_count; volatile u64 tcp_updates_count; volatile u64 tcp_dropped_count; volatile u64 tcp_output_size_total; volatile u64 tcp_undefined_count; #if 1 volatile u64 tcp_referrals_count; #endif volatile u64 tcp_axfr_count; volatile u64 tcp_ixfr_count; volatile u64 tcp_overflow_count; /* rrl */ #if HAS_RRL_SUPPORT volatile u64 rrl_slip; volatile u64 rrl_drop; #endif /* answers */ volatile u64 udp_fp[SERVER_STATISTICS_ERROR_CODES_COUNT]; volatile u64 tcp_fp[SERVER_STATISTICS_ERROR_CODES_COUNT]; }; #define TCPSTATS(__field__) mutex_lock(&server_statistics.mtx);server_statistics. __field__ ;mutex_unlock(&server_statistics.mtx) #ifndef SERVER_C_ extern server_statistics_t server_statistics; #endif ya_result server_run(); void tcp_send_message_data(message_data* mesg); void server_process_tcp(zdb *database, tcp *tcp_itf); void log_msghdr(logger_handle* hndl, u32 level, struct msghdr *hdr); /* ------------------------------------------------------------ */ #endif /* SERVER_H_ */ /* ------------------------------------------------------------ */ /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-resignature.c0000644000077100007710000000012412650131756025543 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.959344 30 ctime=1454597653.340344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-resignature.c0000664000077100007710000005355312650131756025363 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup database Routines for database manipulations * @ingroup yadifad * @brief database functions * * Implementation of routines for the database * - add zone file(s) * - clear zone file(s) * - print zone files(s) * - load db * - unload db * - lookup database result of a message * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include "database-service.h" #if !HAS_RRSIG_MANAGEMENT_SUPPORT #error "RRSIG management support disabled : this file should not be compiled" #endif #define MODULE_MSG_HANDLE g_server_logger #define DBUPSIGP_TAG 0x5047495350554244 extern logger_handle *g_server_logger; extern zone_data_set database_zone_desc; struct database_service_zone_resignature_init_callback_s { zone_desc_s *zone_desc; u64 total_signature_valitity_time; // to compute the mean validity period u32 signature_count; u32 missing_signatures_count; u32 earliest_expiration_epoch; u32 smallest_validity_period; u32 biggest_validity_period; }; struct database_service_zone_resignature_alarm_s { zone_desc_s *zone_desc; zdb_zone *zone; }; typedef struct database_service_zone_resignature_alarm_s database_service_zone_resignature_alarm_s; struct database_service_zone_resignature_parms_s { zone_desc_s *zone_desc; }; typedef struct database_service_zone_resignature_parms_s database_service_zone_resignature_parms_s; static ya_result database_service_zone_resignature_alarm(void *args_, bool cancel) { database_service_zone_resignature_alarm_s *args = (database_service_zone_resignature_alarm_s*)args_; // verify that the keys are valid // generate keys if needs to be // sign the zone, not using the scheduler: // lock for read // (re)compute relevant signatures // unlock for read // lock for write // store signatures // loop until a quota has been reached if(!cancel) { database_zone_update_signatures(args->zone_desc->origin, args->zone_desc, args->zone); } zdb_zone_release(args->zone); zone_release(args->zone_desc); #ifdef DEBUG memset(args, 0xff, sizeof(database_service_zone_resignature_alarm_s)); #endif free(args); return SUCCESS; // could return anything but ALARM_REARM } /** * Arms the trigger for the next resignature of the zone. * * @param zone_desc * @param zone * @return */ static ya_result database_service_zone_resignature_arm(zone_desc_s *zone_desc, zdb_zone *zone) { if(zone_desc->signature.scheduled_sig_invalid_first >= zone_desc->signature.sig_invalid_first) { u32 now = time(NULL); u32 alarm_epoch = MAX(zone_desc->signature.sig_invalid_first - zone_desc->signature.sig_validity_regeneration, now); EPOCH_DEF(alarm_epoch); log_info("database: scheduling a signature update for '%{dnsname}' at %w", zone_desc->origin, EPOCH_REF(alarm_epoch)); database_service_zone_resignature_alarm_s *args; MALLOC_OR_DIE(database_service_zone_resignature_alarm_s*, args, sizeof(database_service_zone_resignature_alarm_s), DBUPSIGP_TAG); zone_acquire(zone_desc); args->zone_desc = zone_desc; zdb_zone_acquire(zone); args->zone = zone; /* * Sets the alarm to be called at the time the first signature will be invalidated * The first time the alarm will be called for the zone is reset to the new, earlier, value */ alarm_event_node *event = alarm_event_alloc(); event->epoch = MAX(zone_desc->signature.sig_invalid_first, time(NULL) - 5); event->function = database_service_zone_resignature_alarm; event->args = args; event->key = ALARM_KEY_ZONE_SIGNATURE_UPDATE; event->flags = ALARM_DUP_REMOVE_LATEST; event->text = "database-service-zone-resignature"; alarm_set(zone->alarm_handle, event); zone_desc->signature.scheduled_sig_invalid_first = zone_desc->signature.sig_invalid_first; return 1; } else { return 0; } } static ya_result database_service_zone_resignature_init_callback(zdb_zone_process_label_callback_parms *parms) { struct database_service_zone_resignature_init_callback_s *args = (struct database_service_zone_resignature_init_callback_s*)parms->args; if(!zdb_rr_label_has_records(parms->rr_label)) // no records on this label { if(!zdb_rr_label_has_records(parms->rr_label)) log_debug("no records", parms->rr_label->resource_record_set); return ZDB_ZONE_PROCESS_CONTINUE; } zdb_packed_ttlrdata* rrsig_rrset = zdb_rr_label_get_rrset(parms->rr_label, TYPE_RRSIG); if(rrsig_rrset != NULL) { // for all types, check there is a valid signature for it // iterate through types // look in the signatures which one are covering them // proceed bool has_DS = zdb_rr_label_get_rrset(parms->rr_label, TYPE_DS) != NULL; btree_iterator types_iter; btree_iterator_init(parms->rr_label->resource_record_set, &types_iter); while(btree_iterator_hasnext(&types_iter)) { btree_node *node = btree_iterator_next_node(&types_iter); u16 type = node->hash; /** @note : NATIVETYPE */ if(type == TYPE_RRSIG) { continue; } // is there a signature covering this ? bool type_is_covered = FALSE; for(zdb_packed_ttlrdata *rrsig_rr = rrsig_rrset; rrsig_rr != NULL; rrsig_rr = rrsig_rr->next) { u16 type_covered = RRSIG_TYPE_COVERED(rrsig_rr); if(type_covered != type) { continue; } type_is_covered = TRUE; u32 expires_on = RRSIG_VALID_UNTIL(rrsig_rr); u32 valid_from = RRSIG_VALID_SINCE(rrsig_rr); u32 validity_period = 0; if(valid_from <= expires_on) { validity_period = expires_on - valid_from; } args->total_signature_valitity_time += validity_period; args->signature_count++; args->earliest_expiration_epoch = MIN(args->earliest_expiration_epoch, expires_on); args->smallest_validity_period = MIN(args->smallest_validity_period, validity_period); args->biggest_validity_period = MAX(args->biggest_validity_period, validity_period); } if(!type_is_covered) // no signature is covering the current type { if(!ZDB_LABEL_ATORUNDERDELEGATION(parms->rr_label)) // we are not at or under a delegation { // a signature is expected on this RRSET args->missing_signatures_count++; } else // we are at or under a delegation ... { if(ZDB_LABEL_ATDELEGATION(parms->rr_label)) { // the presence of a DS calls for a signature (of the DS) if(zdb_zone_is_nsec3_optin(parms->zone) || !(type == TYPE_NS && has_DS)) // if the type is NS and there is a DS (signed or not, not the current problem) the signature is not needed { args->missing_signatures_count++; } } // under a delegation, there should be no signature } } // else it does not matter } // for all types in the label } else // there are no signatures on the label { if(!ZDB_LABEL_ATORUNDERDELEGATION(parms->rr_label)) // we are not at or under a delegation { // a signature is expected args->missing_signatures_count++; } else // we are at or under a delegation { if(ZDB_LABEL_ATDELEGATION(parms->rr_label)) { // opt-in or the presence of a DS calls for a signature if(zdb_zone_is_nsec3_optin(parms->zone) || (zdb_rr_label_get_rrset(parms->rr_label, TYPE_DS) != NULL)) { args->missing_signatures_count++; } } } } return ZDB_ZONE_PROCESS_CONTINUE; } static ya_result database_service_nsec3_zone_resignature_init_callback(zdb_zone_process_label_callback_parms *parms) { struct database_service_zone_resignature_init_callback_s *args = (struct database_service_zone_resignature_init_callback_s*)parms->args; database_service_zone_resignature_init_callback(parms); if(parms->rr_label != NULL && parms->rr_label->nsec.dnssec != NULL) { nsec3_node *item = parms->rr_label->nsec.nsec3->self; if(item != NULL) { zdb_packed_ttlrdata *rrsig_rrset = item->rrsig; if(rrsig_rrset != NULL) { do { u32 expires_on = RRSIG_VALID_UNTIL(rrsig_rrset); u32 valid_from = RRSIG_VALID_SINCE(rrsig_rrset); #ifdef DEBUG u16 type_covered = RRSIG_TYPE_COVERED(rrsig_rrset); #endif u32 validity_period = 0; if(valid_from <= expires_on) { validity_period = expires_on - valid_from; } #ifdef DEBUG yassert(type_covered == TYPE_NSEC3); #endif args->total_signature_valitity_time += validity_period; args->signature_count++; args->earliest_expiration_epoch = MIN(args->earliest_expiration_epoch, expires_on); args->smallest_validity_period = MIN(args->smallest_validity_period, validity_period); args->biggest_validity_period = MAX(args->biggest_validity_period, validity_period); rrsig_rrset = rrsig_rrset->next; } while(rrsig_rrset != NULL); } else { args->missing_signatures_count++; } } } return ZDB_ZONE_PROCESS_CONTINUE; } ya_result database_service_zone_resignature_init(zone_desc_s *zone_desc, zdb_zone *zone) { // both are already locked log_debug("%{dnsname}: initialising signature maintenance", zone_desc->origin); u64 elapsed = timeus(); struct database_service_zone_resignature_init_callback_s args; args.zone_desc = zone_desc; args.total_signature_valitity_time = 0; args.signature_count = 0; args.missing_signatures_count = 0; args.earliest_expiration_epoch = MAX_U32; args.smallest_validity_period = MAX_U32; args.biggest_validity_period = 0; ya_result return_code; if(zdb_zone_is_nsec3(zone)) { return_code = zdb_zone_process_all_labels_from_zone(zone, database_service_nsec3_zone_resignature_init_callback, &args); } else { return_code = zdb_zone_process_all_labels_from_zone(zone, database_service_zone_resignature_init_callback, &args); } u64 now = timeus(); elapsed = now - elapsed; log_debug1("%{dnsname}: signatures: took %.3fs", zone_desc->origin, elapsed / 1000000.0); now /= 1000000; u32 mean_validity_period = 0; if(args.signature_count > 0) { mean_validity_period = (u32)(args.total_signature_valitity_time / args.signature_count); } log_debug("%{dnsname}: signatures: found: %u, missing: %u", zone_desc->origin, args.signature_count, args.missing_signatures_count); log_debug("%{dnsname}: signatures: validity from %.3f days to %.3f days (mean of %.3f days)", zone_desc->origin, args.smallest_validity_period / 86400.0, args.biggest_validity_period / 86400.0, mean_validity_period / 86400.0); u32 next_resignature_epoch = MAX((s32)(args.earliest_expiration_epoch - g_config->sig_validity_regeneration), 0); if((now < next_resignature_epoch) && (args.missing_signatures_count == 0)) { log_debug("%{dnsname}: signatures: next one will be made before the next %.3f days", zone_desc->origin, (next_resignature_epoch - now) / 86400.0); zone_desc->signature.sig_invalid_first = next_resignature_epoch; } else { log_debug("%{dnsname}: signatures: next one will be made as soon as possible", zone_desc->origin); if(args.missing_signatures_count == 0) { zone_desc->signature.sig_invalid_first = now - 1; // do it already } else { zone_desc->signature.sig_invalid_first = ZONE_SIGNATURE_INVALID_FIRST_ASSUME_BROKEN; // missing signatures means we absolutely } // cannot trust the current signatures values } if(ISOK(return_code)) { zone_desc->signature.scheduled_sig_invalid_first = MAX_S32; if(zone_maintains_dnssec(zone_desc)) { return_code = database_service_zone_resignature_arm(zone_desc, zone); } else { log_debug("%{dnsname}: signatures: DNSSEC maintenance is disabled on zone, no signature will be made", zone_desc->origin); } } return return_code; } static database_service_zone_resignature_parms_s* database_service_zone_resignature_parms_alloc(zone_desc_s *zone_desc) { database_service_zone_resignature_parms_s *parm; ZALLOC_OR_DIE(database_service_zone_resignature_parms_s*, parm, database_service_zone_resignature_parms_s, GENERIC_TAG); parm->zone_desc = zone_desc; return parm; } void database_service_zone_resignature_parms_free(database_service_zone_resignature_parms_s *parm) { #ifdef DEBUG memset(parm, 0xff, sizeof(database_service_zone_resignature_parms_s)); #endif ZFREE(parm, database_service_zone_resignature_parms_s); } static void* database_service_zone_resignature_thread(void *parms_) { database_service_zone_resignature_parms_s *parms = (database_service_zone_resignature_parms_s*)parms_; zone_desc_s *zone_desc = parms->zone_desc; ya_result return_code; yassert(zone_desc != NULL); if(!zone_maintains_dnssec(zone_desc)) { log_warn("zone sign: %{dnsname} resignature triggered although the feature was explicitly disabled : ignoring request.", zone_desc->origin); zone_unlock(zone_desc, ZONE_LOCK_SIGNATURE); database_service_zone_resignature_parms_free(parms); zone_release(zone_desc); return NULL; } zone_lock(zone_desc, ZONE_LOCK_SIGNATURE); const u32 must_be_off = ZONE_STATUS_LOAD | ZONE_STATUS_LOADING | \ ZONE_STATUS_DROP | ZONE_STATUS_DROPPING | \ ZONE_STATUS_SAVING_ZONE_FILE | ZONE_STATUS_SAVING_AXFR_FILE | \ ZONE_STATUS_SIGNATURES_UPDATING | ZONE_STATUS_DYNAMIC_UPDATE | \ ZONE_STATUS_DYNAMIC_UPDATING; #ifdef DEBUG log_debug("database_service_zone_resignature_thread(%{dnsname}@%p=%i)", zone_desc->origin, zone_desc, zone_desc->rc); #endif if((zone_desc->status_flags & must_be_off) != 0) { log_err("zone sign: %{dnsname} conflicting status: %08x instead of 0", zone_desc->origin, (zone_desc->status_flags & must_be_off)); zone_unlock(zone_desc, ZONE_LOCK_SIGNATURE); database_service_zone_resignature_parms_free(parms); zone_release(zone_desc); return NULL; } zone_desc->status_flags |= ZONE_STATUS_SIGNATURES_UPDATING; // do a bunch of signatures zdb_zone *zone = zone_get_loaded_zone(zone_desc); // should have a starting point, cylcing trough the nodes // that way there will be no increasingly long scans if(FAIL(return_code = zdb_update_zone_signatures(zone, zone->sig_quota, zone_desc->signature.sig_invalid_first != ZONE_SIGNATURE_INVALID_FIRST_ASSUME_BROKEN))) { switch(return_code) { case ZDB_ERROR_ZONE_IS_NOT_DNSSEC: log_warn("zone sign: unable to sign %{dnsname}, it has not been configured as DNSSEC", zone_desc->origin); break; case ZDB_ERROR_ZONE_IS_ALREADY_BEING_SIGNED: log_warn("zone sign: could not refresh %{dnsname} signatures, it is already being signed", zone_desc->origin); break; case ZDB_ERROR_ZONE_NO_ZSK_PRIVATE_KEY_FILE: log_warn("zone sign: unable to try to refresh %{dnsname} signatures because there are no private keys available", zone_desc->origin); break; case DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM: log_warn("zone sign: unable to refresh %{dnsname} signatures because there is a key with an unsupported algorithm", zone_desc->origin); break; default: log_err("zone sign: signature of %{dnsname} failed: %r", zone_desc->origin, return_code); break; } } else if(return_code == 0) // no signature have been done, let's scan the current status { database_service_zone_resignature_init(zone_desc, zone); } else // let's just restart this asap { zone_desc->status_flags |= ZONE_STATUS_MODIFIED; return_code = database_service_zone_resignature_arm(zone_desc, zone); } zdb_zone_release(zone); // release zone_desc->status_flags &= ~(ZONE_STATUS_SIGNATURES_UPDATE|ZONE_STATUS_SIGNATURES_UPDATING|ZONE_STATUS_PROCESSING); database_service_zone_resignature_parms_free(parms); zone_unlock(zone_desc, ZONE_LOCK_SIGNATURE); zone_release(zone_desc); return NULL; } ya_result database_service_zone_resignature(zone_desc_s *zone_desc) // one thread for all the program { yassert(zone_desc != NULL); log_debug1("database_service_zone_resignature(%{dnsname}@%p=%i)", zone_desc->origin, zone_desc, zone_desc->rc); if(!zone_maintains_dnssec(zone_desc)) { log_debug1("database_service_zone_resignature: %{dnsname} has signature maintenance disabled", zone_desc->origin); return ERROR; } log_debug1("database_service_zone_resignature: locking zone '%{dnsname}' for signing", zone_desc->origin); if(FAIL(zone_lock(zone_desc, ZONE_LOCK_SIGNATURE))) { log_err("zone sign: failed to lock zone settings for '%{dnsname}'", zone_desc->origin); return ERROR; } const u8 *origin = zone_desc->origin; log_info("zone sign: %{dnsname}", origin); if(zone_desc->status_flags & (ZONE_STATUS_SIGNATURES_UPDATE|ZONE_STATUS_SIGNATURES_UPDATING)) { // already loading zone_desc_log(MODULE_MSG_HANDLE, MSG_DEBUG1, zone_desc, "database_service_zone_resignature"); log_err("zone sign: '%{dnsname}' already having its signatures updated", origin); zone_unlock(zone_desc, ZONE_LOCK_SIGNATURE); return ERROR; } zone_desc->status_flags &= ~ZONE_STATUS_STARTING_UP; zone_desc->status_flags |= ZONE_STATUS_SIGNATURES_UPDATE; database_service_zone_resignature_parms_s *database_zone_resignature_parms = database_service_zone_resignature_parms_alloc(zone_desc); zone_acquire(zone_desc); database_service_zone_resignature_queue_thread(database_service_zone_resignature_thread, database_zone_resignature_parms, NULL, "database_zone_resignature_thread"); log_debug1("database_service_zone_resignature: unlocking zone '%{dnsname}' for signing", origin); zone_unlock(zone_desc, ZONE_LOCK_SIGNATURE); return SUCCESS; } /** * @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/config.sub0000644000077100007710000000013212473710127020653 xustar000000000000000030 mtime=1424986199.159058409 30 atime=1424986199.159058409 30 ctime=1454597653.192344534 yadifa-2.1.6-5826/sbin/yadifad/config.sub0000755000077100007710000010622312473710127020466 0ustar00yadifayadifa00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-12-03' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/process_class_ch.c0000644000077100007710000000012412650131756022357 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.998344 30 ctime=1454597653.287344534 yadifa-2.1.6-5826/sbin/yadifad/process_class_ch.c0000664000077100007710000002011312650131756022161 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup server * @ingroup yadifad * @brief server * * Handles queries made in the CH class (ie: version.*) * * @{ */ /*----------------------------------------------------------------------------*/ #include "server-config.h" #include "config.h" #include #include #include #include #include extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #include "process_class_ch.h" #include "confs.h" extern logger_handle* g_server_logger; /* * The TXT CH record wire. Only the first 10 bytes will be taken. */ static u8 chaos_txt_stub[10] = { 0xc0, 0x0c, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00 }; static u8 *version_txt = NULL; static u8 *hostname_txt = NULL; static u8 *id_server_txt = NULL; void class_ch_set_hostname(const char *name) { if(name != NULL) { size_t name_len = MIN(strlen(name), 255); u8* tmp; MALLOC_OR_DIE(u8*, tmp, 13 + name_len, GENERIC_TAG); memcpy(tmp, chaos_txt_stub, 10); SET_U16_AT(tmp[10], htons(name_len + 1)); tmp[12] = (u8)name_len; memcpy(&tmp[13], name, name_len); u8 *old = hostname_txt; hostname_txt = tmp; free(old); } else { u8 *old = hostname_txt; hostname_txt = NULL; free(old); } } void class_ch_set_version(const char *name) { if(name != NULL) { size_t name_len = MIN(strlen(name), 255); u8* tmp; MALLOC_OR_DIE(u8*, tmp, 13 + name_len, GENERIC_TAG); memcpy(tmp, chaos_txt_stub, 10); SET_U16_AT(tmp[10], htons(name_len + 1)); tmp[12] = (u8)name_len; memcpy(&tmp[13], name, name_len); u8 *old = version_txt; version_txt = tmp; free(old); } else { u8 *old = version_txt; version_txt = NULL; free(old); } } void class_ch_set_id_server(const char *name) { if(name != NULL) { size_t name_len = MIN(strlen(name), 255); u8* tmp; MALLOC_OR_DIE(u8*, tmp, 13 + name_len, GENERIC_TAG); memcpy(tmp, chaos_txt_stub, 10); SET_U16_AT(tmp[10], htons(name_len + 1)); tmp[12] = (u8)name_len; memcpy(&tmp[13], name, name_len); u8 *old = id_server_txt; id_server_txt = tmp; free(old); } else { u8 *old = id_server_txt; id_server_txt = NULL; free(old); } } /* * The SOA CH record wire. */ static u8 chaos_soa[5*8 + 7] = { 0xc0, 0x0c, 0x00, 0x06, 0x00, 0x03, 0x00, 0x01, 0x51, 0x80, 0x00, 0x23, 0xc0, 0x0c, 0x0a, 0x68, 0x6f, 0x73, 0x74, 0x6d, 0x61, 0x73, 0x74, 0x65, 0x72, 0xc0, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x00, 0x1c, 0x20, 0x00, 0x09, 0x3a, 0x80, 0x00, 0x01, 0x51, 0x80 }; /* * The NS CH record wire. */ static u8 chaos_ns[1*8 + 6] = { 0xc0, 0x0c, 0x00, 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xc0, 0x0c }; static void chaos_make_message(message_data *mesg, const u8* record_wire, u32 record_wire_len) { u16 t = mesg->qtype; u16 an = 0; u16 au = 0; /* set the flags */ MESSAGE_FLAGS_OR(mesg->buffer, QR_BITS|AA_BITS, 0); MESSAGE_FLAGS_AND(mesg->buffer, QR_BITS|AA_BITS|RD_BITS, 0); u8 *p = &mesg->buffer[mesg->received]; if(t == TYPE_TXT || t == TYPE_ANY) { memcpy(p, record_wire, record_wire_len); p += record_wire_len; an++; } if(t == TYPE_SOA || t == TYPE_ANY) { memcpy(p, chaos_soa, sizeof(chaos_soa)); p += sizeof(chaos_soa); MESSAGE_SET_AN(mesg->buffer, NETWORK_ONE_16); an++; } memcpy(p, chaos_ns, sizeof(chaos_ns)); p += sizeof(chaos_ns); if(t == TYPE_ANY || t == TYPE_NS) { an++; } else { au++; } MESSAGE_SET_AN(mesg->buffer, htons(an)); MESSAGE_SET_NS(mesg->buffer, htons(au)); if(mesg->edns) { u16 edns0_maxsize = g_config->edns0_max_size; u32 rcode_ext = mesg->rcode_ext; p[ 0] = 0; p[ 1] = 0; p[ 2] = 0x29; p[ 3] = edns0_maxsize>>8; p[ 4] = edns0_maxsize; p[ 5] = (mesg->status >> 4); p[ 6] = rcode_ext >> 16; p[ 7] = rcode_ext >> 8; p[ 8] = rcode_ext; #if HAS_NSID_SUPPORT if(!mesg->nsid) { p[ 9] = 0; p[10] = 0; p += EDNS0_RECORD_SIZE; } else { p += EDNS0_RECORD_SIZE - 2; memcpy(p, edns0_rdatasize_nsid_option_wire, edns0_rdatasize_nsid_option_wire_size); p += edns0_rdatasize_nsid_option_wire_size; } #else p[ 9] = 0; p[10] = 0; p += EDNS0_RECORD_SIZE; #endif MESSAGE_SET_AR(mesg->buffer, NETWORK_ONE_16); } mesg->send_length = p - mesg->buffer; } void class_ch_process(message_data *mesg) { ya_result return_value; u8 qname[MAX_DOMAIN_LENGTH]; #if HAS_ACL_SUPPORT if(ACL_REJECTED(acl_check_access_filter(mesg, &g_config->ac.allow_query))) { mesg->status = FP_ACCESS_REJECTED; message_transform_to_error(mesg); return; } #endif packet_unpack_reader_data purd; purd.packet = mesg->buffer; purd.packet_size = mesg->received; purd.offset = DNS_HEADER_LENGTH; if(FAIL(return_value = packet_reader_read_fqdn(&purd, qname, sizeof (qname)))) { /* oops */ log_err("chaos: error reading query: %r", return_value); return; } /* version */ if((id_server_txt != NULL) && dnsname_equals_ignorecase((const u8*)"\002id\006server", qname)) { chaos_make_message(mesg, id_server_txt, 12 + ntohs(GET_U16_AT(id_server_txt[10]))); } else if((hostname_txt != NULL) && dnslabel_equals_ignorecase_left((const u8*)"\010hostname", qname)) { chaos_make_message(mesg, hostname_txt, 12 + ntohs(GET_U16_AT(hostname_txt[10]))); } else if((version_txt != NULL) && dnslabel_equals_ignorecase_left((const u8*)"\007version", qname)) { chaos_make_message(mesg, version_txt, 12 + ntohs(GET_U16_AT(version_txt[10]))); } else { /* REFUSED */ mesg->status = FP_NOZONE_FOUND; message_transform_to_error(mesg); } } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/server_error.h0000644000077100007710000000012412650131756021566 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.069344 30 ctime=1454597653.107344534 yadifa-2.1.6-5826/sbin/yadifad/server_error.h0000664000077100007710000000767612650131756021413 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup server Server * @ingroup yadifad * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef _SERVER_ERROR_H #define _SERVER_ERROR_H #include #include #ifdef __cplusplus extern "C" { #endif /* ------------------------------------------------------------ * * VALUES */ #define YDF_ERROR_BASE 0x80080000 #define YDF_ERROR_CODE(code_) ((s32)(YDF_ERROR_BASE+(code_))) #define YDF_ALREADY_RUNNING YDF_ERROR_CODE(1) #define YDF_PID_PATH_IS_WRONG YDF_ERROR_CODE(2) /* Main errorcodes */ #define ZONE_LOAD_MASTER_TYPE_EXPECTED YDF_ERROR_CODE(30) #define ZONE_LOAD_MASTER_ZONE_FILE_UNDEFINED YDF_ERROR_CODE(31) #define ZONE_LOAD_SLAVE_TYPE_EXPECTED YDF_ERROR_CODE(40) #define ANSWER_NOT_ACCEPTABLE YDF_ERROR_CODE(50) #define ANSWER_UNEXPECTED_EOF YDF_ERROR_CODE(51) #define NOTIFY_QUERY_TO_MASTER YDF_ERROR_CODE(1026) #define NOTIFY_QUERY_TO_UNKNOWN YDF_ERROR_CODE(1027) #define NOTIFY_QUERY_FROM_UNKNOWN YDF_ERROR_CODE(1028) #define EXIT_CONFIG_ERROR 10 #define EXIT_CODE_DATABASE_LOAD_ERROR 11 #define EXIT_CODE_SYSCLEANUP_ERROR 12 #ifndef MODULE_MSG_HANDLE extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #endif static inline void ttylog_err(const char *format, ...) { va_list args; if(logger_is_running()) { va_start(args, format); logger_handle_vmsg(MODULE_MSG_HANDLE, MSG_ERR, format, args); va_end(args); logger_flush(); } // else { flushout(); osprint(termerr, "error: "); va_start(args, format); vosformat(termerr, format, args); va_end(args); osprintln(termerr, ""); flusherr(); } } #ifdef __cplusplus } #endif #endif /* _SERVER_ERROR_H */ /* ------------------------------------------------------------ */ /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-unload.h0000644000077100007710000000012412650131756024502 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.022344 30 ctime=1454597653.062344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-unload.h0000664000077100007710000000376012650131756024315 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #include "zone_desc.h" void database_service_zone_unload(zone_desc_s *zone_desc, zdb_zone *zone); /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/install-sh0000644000077100007710000000013212473710127020674 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597653.199344534 yadifa-2.1.6-5826/sbin/yadifad/install-sh0000755000077100007710000003452312473710127020512 0ustar00yadifayadifa00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # 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. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # 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_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 is_target_a_directory=possibly 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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi 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 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac 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 if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 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 problematic for 'test' and other utilities. 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 # 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 "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` 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-writable 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 oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && 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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-load.h0000644000077100007710000000012412650131756024137 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.012344 30 ctime=1454597653.048344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-load.h0000664000077100007710000000374312650131756023753 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #include "zone_desc.h" ya_result database_service_zone_load(zone_desc_s *zone_desc); /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/config_error.h0000644000077100007710000000012412650131756021525 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.004344 30 ctime=1454597653.027344534 yadifa-2.1.6-5826/sbin/yadifad/config_error.h0000664000077100007710000000577712650131756021352 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup config Configuration handling * @ingroup yadifad * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef _CONFIG_ERROR_H #define _CONFIG_ERROR_H #ifdef __cplusplus extern "C" { #endif #define CFG_ERROR_BASE 0x80070000 #define CFG_ERROR_CODE(code_) ((s32)(CFG_ERROR_BASE+(code_))) /* Config errorcodes */ #define CONFIG_ZONE_ERR CFG_ERROR_CODE(50) /* Error in config file */ /* Zone errorcondes */ #define CONFIG_WRONG_SIG_TYPE CFG_ERROR_CODE(201) #define CONFIG_WRONG_SIG_VALIDITY CFG_ERROR_CODE(202) #define CONFIG_WRONG_SIG_REGEN CFG_ERROR_CODE(203) #define DATABASE_ZONE_MISSING_DOMAIN CFG_ERROR_CODE(301) #define DATABASE_ZONE_MISSING_MASTER CFG_ERROR_CODE(302) #define DATABASE_ZONE_MISSING_TYPE CFG_ERROR_CODE(303) #define DATABASE_ZONE_CONFIG_DUP CFG_ERROR_CODE(304) #define DATABASE_ZONE_CONFIG_CLONE CFG_ERROR_CODE(306) #ifdef __cplusplus } #endif #endif /* _CONFIG_ERROR_H */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/NEWS0000644000077100007710000000012412610121331017355 xustar000000000000000027 mtime=1444979417.160777 27 atime=1454597463.950344 30 ctime=1454597653.177344534 yadifa-2.1.6-5826/sbin/yadifad/NEWS0000664000077100007710000000001312610121331017154 0ustar00yadifayadifa00000000000000see README yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-save.c0000644000077100007710000000012412650131756024151 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.034344 30 ctime=1454597653.249344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-save.c0000664000077100007710000002467412650131756023773 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup database Routines for database manipulations * @ingroup yadifad * @brief database functions * * Implementation of routines for the database * - add zone file(s) * - clear zone file(s) * - print zone files(s) * - load db * - unload db * - lookup database result of a message * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include "config.h" #include #include #include #include #include #define ZDB_JOURNAL_CODE 1 #include #include "zone.h" #include "server.h" #include "database-service.h" #define MODULE_MSG_HANDLE g_server_logger /** * Saves a zone in the current thread using the provided locks (0 meaning: do not try to lock) * Not locking puts the responsibility of the lock to the caller as having this code running * without any lock whatsoever on the descriptor/zone will give undefined results, a.k.a : crash. * * @param zone_desc * @param desclockowner * @param zonelockowner * @return */ ya_result database_service_zone_save_ex(zone_desc_s *zone_desc, u8 desclockowner, u8 zonelockowner, bool save_unmodified) { // not implemented yet log_debug("zone save: %{dnsname}@%p#%i", zone_desc->origin, zone_desc, zone_desc->rc); // for all modified zones descriptors // if the file source is defined AND the source is not a template // if the zone is valid // save the text representation of the zone to the disk //bool must_be_on = ZONE_STATUS_READONLY|ZONE_STATUS_MODIFIED; bool must_be_off = ZONE_STATUS_TEMPLATE_SOURCE_FILE | ZONE_STATUS_STARTING_UP | ZONE_STATUS_LOADING | ZONE_STATUS_MOUNTING | ZONE_STATUS_UNMOUNTING | ZONE_STATUS_DROPPING | ZONE_STATUS_SAVING_ZONE_FILE | ZONE_STATUS_SAVING_AXFR_FILE | ZONE_STATUS_SIGNATURES_UPDATING | ZONE_STATUS_DYNAMIC_UPDATING | ZONE_STATUS_DOWNLOADING_XFR_FILE | ZONE_STATUS_UNREGISTERING; if(desclockowner != 0) { zone_lock(zone_desc, desclockowner); } if(zone_desc->status_flags & ZONE_STATUS_MUST_CLEAR_JOURNAL) { zone_desc->status_flags |= ZONE_STATUS_MODIFIED; } if(!save_unmodified && ((zone_desc->status_flags & ZONE_STATUS_MODIFIED) == 0)) // a "journal" should set modified, or should it be tested here ? { log_debug("zone save: %{dnsname} hasn't been modified", zone_desc->origin); zone_desc->status_flags &= ~(ZONE_STATUS_SAVETO_ZONE_FILE|ZONE_STATUS_SAVING_ZONE_FILE|ZONE_STATUS_PROCESSING); if(desclockowner != 0) { zone_unlock(zone_desc, desclockowner); } zone_release(zone_desc); return SUCCESS; } if(zone_desc->file_name == NULL) { log_debug("zone save: %{dnsname} has no source file set", zone_desc->origin); zone_desc->status_flags &= ~(ZONE_STATUS_SAVETO_ZONE_FILE|ZONE_STATUS_SAVING_ZONE_FILE|ZONE_STATUS_PROCESSING); if(desclockowner != 0) { zone_unlock(zone_desc, desclockowner); } zone_release(zone_desc); return ERROR; } if((zone_desc->status_flags & ZONE_STATUS_TEMPLATE_SOURCE_FILE) != 0) { log_debug("zone save: %{dnsname} source is a template", zone_desc->origin); zone_desc->status_flags &= ~(ZONE_STATUS_SAVETO_ZONE_FILE|ZONE_STATUS_SAVING_ZONE_FILE|ZONE_STATUS_PROCESSING); if(desclockowner != 0) { zone_unlock(zone_desc, desclockowner); } zone_release(zone_desc); return ERROR; } if((zone_desc->status_flags & must_be_off) != 0) { log_debug("zone save: %{dnsname} can't be saved at this time (%08x & %08x = %08x)", zone_desc->origin, zone_desc->status_flags, must_be_off, zone_desc->status_flags & must_be_off); zone_desc->status_flags &= ~(ZONE_STATUS_SAVETO_ZONE_FILE|ZONE_STATUS_SAVING_ZONE_FILE|ZONE_STATUS_PROCESSING); if(desclockowner != 0) { zone_unlock(zone_desc, desclockowner); } zone_release(zone_desc); return ERROR; } zone_desc->status_flags |= ZONE_STATUS_SAVING_ZONE_FILE; zdb *db = g_config->database; zdb_zone *zone; if(zonelockowner != 0) { zone = zdb_acquire_zone_read_lock_from_fqdn(db, zone_desc->origin, zonelockowner); // ACQUIRES & LOCKS } else { zone = zdb_acquire_zone_read_from_fqdn(db, zone_desc->origin); // ACQUIRES } ya_result ret = ERROR; if(zone != NULL) { if(zdb_zone_isvalid(zone)) { char file_name[PATH_MAX]; snformat(file_name, sizeof(file_name), "%s/%s", g_config->data_path, zone_desc->file_name); log_debug("zone save: %{dnsname} saving zone to file '%s'", zone_desc->origin, file_name); ret = zdb_zone_write_text_file(zone, file_name, FALSE); if(ISOK(ret)) { zdb_zone_getserial(zone, &zone_desc->stored_serial); zone_desc->status_flags &= ~ZONE_STATUS_MODIFIED; bool clear_journal = zone_desc->status_flags & ZONE_STATUS_MUST_CLEAR_JOURNAL; if(clear_journal) { journal_truncate(zone_desc->origin); zone_desc->status_flags &= ~ZONE_STATUS_MUST_CLEAR_JOURNAL; } log_debug("zone save: %{dnsname} saved zone to file '%s'", zone_desc->origin, file_name); } else { log_err("zone save: %{dnsname} failed to save as '%s': %r", zone_desc->origin, file_name, ret); } } else { log_err("zone save: %{dnsname} cannot be saved because its current instance in the database is marked as invalid", zone_desc->origin); } if(zonelockowner != 0) { zdb_zone_release_unlock(zone, zonelockowner); } else { zdb_zone_release(zone); } } // zdb_unlock(db, ZDB_MUTEX_READER); zone_desc->status_flags &= ~(ZONE_STATUS_SAVETO_ZONE_FILE|ZONE_STATUS_SAVING_ZONE_FILE|ZONE_STATUS_PROCESSING); if(desclockowner != 0) { zone_unlock(zone_desc, desclockowner); } zone_release(zone_desc); return ret; } static void* database_service_zone_save_thread(void *params) { zone_desc_s *zone_desc = (zone_desc_s*)params; database_service_zone_save_ex(zone_desc, ZONE_LOCK_SAVE, ZDB_ZONE_MUTEX_SIMPLEREADER, FALSE); return NULL; } /** * * Triggers the standard background save of a zone * * @param zone_desc * @return */ ya_result database_service_zone_save(zone_desc_s *zone_desc) { if(zone_desc == NULL) { log_err("database_service_zone_save(NULL)"); return ERROR; } log_debug1("database_service_zone_save(%{dnsname}@%p=%i)", zone_desc->origin, zone_desc, zone_desc->rc); log_debug1("database_service_zone_save: locking zone '%{dnsname}' for saving", zone_desc->origin); if(FAIL(zone_lock(zone_desc, ZONE_LOCK_SAVE))) { log_err("database_service_zone_save: failed to lock zone settings for '%{dnsname}'", zone_desc->origin); return ERROR; } const u8 *origin = zone_desc->origin; log_info("zone save: %{dnsname}", origin); /* * Invalidate the zone * Empty the current zone if any */ /* * If the zone descriptor (config) exists and it can be locked by the saveer ... */ // locks the descriptor with the saveer identity if(zone_desc->status_flags & (ZONE_STATUS_SAVETO_ZONE_FILE|ZONE_STATUS_SAVING_ZONE_FILE)) { // already saving zone_desc_log(MODULE_MSG_HANDLE, MSG_DEBUG1, zone_desc, "database_service_zone_save"); log_err("database_service_zone_save: '%{dnsname}' already saving", origin); zone_unlock(zone_desc, ZONE_LOCK_SAVE); return ERROR; } zone_desc->status_flags |= ZONE_STATUS_SAVETO_ZONE_FILE; zone_acquire(zone_desc); database_service_zone_save_queue_thread(database_service_zone_save_thread, zone_desc, NULL, "database_zone_save_thread"); log_debug1("database_service_zone_save: unlocking zone '%{dnsname}' for saving", origin); zone_unlock(zone_desc, ZONE_LOCK_SAVE); return SUCCESS; } /** * @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-unmount.h0000644000077100007710000000012412650131756024725 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.060344 30 ctime=1454597653.066344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-unmount.h0000664000077100007710000000375012650131756024537 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #include void database_service_zone_unmount(zone_desc_s *zone_desc); /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/config_acl.c0000644000077100007710000000012412650131756021126 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.942344 30 ctime=1454597653.330344534 yadifa-2.1.6-5826/sbin/yadifad/config_acl.c0000664000077100007710000001225212650131756020735 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup config Configuration handling * @ingroup yadifad * @brief * * @{ */ /* * DYNAMIC SECTION */ #include "server-config.h" #include #include #include "config.h" #include #include #if !HAS_ACL_SUPPORT #error "ACL support should not be compiled in" #endif #include "acl.h" #include "config_acl.h" static bool config_section_acl_print_item(output_stream *os, const char *name, void *ptr) { address_match_set* ams = (address_match_set*)ptr; if(ams != NULL) { osformat(os, "%24s", name); acl_address_match_set_to_stream(os, ams); osprintln(os,""); } return TRUE; } /* * ACL is a dynamic section so there is no config_table * * Each processed section will just add acl lines in the named rules set */ static ya_result config_section_acl_init(struct config_section_descriptor_s *csd) { // NOP config_section_struct_register_type_handler((config_set_field_function*)config_set_acl_item, config_section_acl_print_item); return SUCCESS; } static ya_result config_section_acl_start(struct config_section_descriptor_s *csd) { // NOP return SUCCESS; } static ya_result config_section_acl_stop(struct config_section_descriptor_s *csd) { // NOP (void)csd; return SUCCESS; } static ya_result config_section_acl_postprocess(struct config_section_descriptor_s *csd) { return SUCCESS; } static ya_result config_section_acl_finalise(struct config_section_descriptor_s *csd) { return SUCCESS; } static ya_result config_section_acl_set_wild(struct config_section_descriptor_s *csd, const char *key, const char *value) { if((strcasecmp(key, "none") == 0) || strcasecmp(key, "any") == 0) { /** * Reserved keyword */ return ACL_RESERVED_KEYWORD; } ya_result result_code = acl_add_definition(key, value); return result_code; } static ya_result config_section_acl_print_wild(struct config_section_descriptor_s *csd, output_stream *os, const char *key) { return FEATURE_NOT_IMPLEMENTED_ERROR; } static const config_section_descriptor_vtbl_s config_section_acl_descriptor_vtbl = { "acl", NULL, // no table config_section_acl_set_wild, config_section_acl_print_wild, config_section_acl_init, config_section_acl_start, config_section_acl_stop, config_section_acl_postprocess, config_section_acl_finalise }; static const config_section_descriptor_s config_section_acl_descriptor = { NULL, &config_section_acl_descriptor_vtbl }; /// register the acl configuration ya_result config_register_acl(const char *null_or_acl_name, s32 priority) { //null_or_acl_name = "acl"; (void)null_or_acl_name; if(priority < 0) { priority = 0; } ya_result return_code; return_code = config_register(&config_section_acl_descriptor, priority + 0); return return_code; } /** @brief ACL value parser * * @param[in] value * @param[in] config_command * @param[out] config * * @return an error code */ ya_result config_set_acl_item(const char *value, address_match_set *dest, anytype notused) { ya_result return_code = SUCCESS; //if(*dest != NULL) { return_code = acl_build_access_control_item(dest, value); } return return_code; } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/config_zone.c0000644000077100007710000000012412650131756021342 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.018344 30 ctime=1454597653.220344534 yadifa-2.1.6-5826/sbin/yadifad/config_zone.c0000664000077100007710000002411512650131756021152 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup config Configuration handling * @ingroup yadifad * @brief * * @{ */ #include "server-config.h" #include #include #include #include "config.h" #include #include "config_error.h" #include "config_acl.h" #include "confs.h" #include "zone.h" #include "database-service.h" /* * */ extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger extern zone_data_set database_zone_desc; /******************** Zones *************************/ static value_name_table zone_type_enum_table[]= { // {ZT_HINT, ZT_STRING_HINT}, #if HAS_MASTER_SUPPORT {ZT_MASTER, ZT_STRING_MASTER}, #endif {ZT_SLAVE, ZT_STRING_SLAVE}, // {ZT_STUB, ZT_STRING_STUB}, // {ZT_UNKNOWN, ZT_STRING_UNKNOWN}, {0, NULL} }; static value_name_table dnssec_enum[]= { {ZONE_DNSSEC_FL_NOSEC , "none" }, {ZONE_DNSSEC_FL_NOSEC , "no" }, {ZONE_DNSSEC_FL_NOSEC , "off" }, {ZONE_DNSSEC_FL_NOSEC , "0" }, {ZONE_DNSSEC_FL_NSEC , "nsec" }, {ZONE_DNSSEC_FL_NSEC3 , "nsec3" }, {ZONE_DNSSEC_FL_NSEC3_OPTOUT, "nsec3-optout"}, {0, NULL} }; /* Table with the parameters that can be set in the config file * zone containers */ #define CONFIG_TYPE zone_desc_s CONFIG_BEGIN(config_section_zone_desc) CONFIG_STRING(domain, NULL) CONFIG_STRING(file_name, NULL) CONFIG_HOST_LIST(masters, NULL) CONFIG_HOST_LIST(notifies, NULL) CONFIG_ENUM(type, NULL, zone_type_enum_table) #if ZDB_HAS_ACL_SUPPORT CONFIG_ACL(allow_query, NULL) CONFIG_ACL(allow_update, NULL) CONFIG_ACL(allow_transfer, NULL) CONFIG_ACL(allow_update_forwarding, NULL) CONFIG_ACL(allow_notify, NULL) CONFIG_ACL(allow_control, NULL) #endif // master CONFIG_FLAG32(notify_auto , S_ZONE_NOTIFY_AUTO, flags, ZONE_FLAG_NOTIFY_AUTO) CONFIG_FLAG32(no_master_updates , S_ZONE_NO_MASTER_UPDATES, flags, ZONE_FLAG_NO_MASTER_UPDATES) CONFIG_FLAG32(maintain_dnssec, S_ZONE_FLAG_MAINTAIN_DNSSEC, flags, ZONE_FLAG_MAINTAIN_DNSSEC) CONFIG_U32_RANGE(notify.retry_count, S_NOTIFY_RETRY_COUNT, NOTIFY_RETRY_COUNT_MIN, NOTIFY_RETRY_COUNT_MAX) CONFIG_U32_RANGE(notify.retry_period, S_NOTIFY_RETRY_PERIOD, NOTIFY_RETRY_PERIOD_MIN, NOTIFY_RETRY_PERIOD_MAX) CONFIG_U32_RANGE(notify.retry_period_increase, S_NOTIFY_RETRY_PERIOD_INCREASE, NOTIFY_RETRY_PERIOD_INCREASE_MIN, NOTIFY_RETRY_PERIOD_INCREASE_MAX) #if HAS_DNSSEC_SUPPORT #if HAS_RRSIG_MANAGEMENT_SUPPORT CONFIG_U32_RANGE(signature.sig_validity_interval, S_S32_VALUE_NOT_SET, SIGNATURE_VALIDITY_INTERVAL_MIN, SIGNATURE_VALIDITY_INTERVAL_MAX) CONFIG_U32_RANGE(signature.sig_validity_regeneration, S_S32_VALUE_NOT_SET, SIGNATURE_VALIDITY_REGENERATION_MIN, SIGNATURE_VALIDITY_REGENERATION_MAX) CONFIG_U32_RANGE(signature.sig_validity_jitter, S_S32_VALUE_NOT_SET, SIGNATURE_VALIDITY_JITTER_MIN, SIGNATURE_VALIDITY_JITTER_MAX) #endif CONFIG_ENUM(dnssec_mode, S_ZONE_DNSSEC_DNSSEC, dnssec_enum) #if HAS_RRSIG_MANAGEMENT_SUPPORT CONFIG_ALIAS(signature.sig_jitter, sig_validity_jitter) #endif CONFIG_ALIAS(dnssec,dnssec_mode) #endif CONFIG_U32_RANGE(journal_size_kb, S_JOURNAL_SIZE_KB_DEFAULT, S_JOURNAL_SIZE_KB_MIN, S_JOURNAL_SIZE_KB_MAX) #if HAS_CTRL //CONFIG_U8(ctrl_flags, "0") // SHOULD ONLY BE IN THE DYNAMIC CONTEXT CONFIG_BYTES(dynamic_provisioning, "AAA=", sizeof(dynamic_provisioning_s)) CONFIG_HOST_LIST(slaves, NULL) #endif // HAS_CTRL /* CONFIG ALIAS: alias , aliased-real-name */ CONFIG_ALIAS(also_notify,notifies) CONFIG_ALIAS(file,file_name) CONFIG_ALIAS(journal_size,journal_size_kb) CONFIG_ALIAS(master,masters) CONFIG_ALIAS(notify,notifies) CONFIG_END(config_section_zone_desc) #undef CONFIG_TYPE #include #include #include #include "zone_desc.h" static ya_result config_section_zone_init(struct config_section_descriptor_s *csd) { // NOP if(csd->base != NULL) { return ERROR; // base SHOULD be NULL at init } return SUCCESS; } static ya_result config_section_zone_start(struct config_section_descriptor_s *csd) { if(csd->base != NULL) { return ERROR; } zone_desc_s *zone_desc = zone_alloc(); csd->base = zone_desc; #if CONFIG_SETTINGS_DEBUG formatln("config: section: zone: start"); #endif return SUCCESS; } static ya_result config_section_zone_filter_accept(zone_desc_s *unused, void *unused_params) { (void)unused; (void)unused_params; return 1; // ACCEPT } static config_section_zone_filter_callback *config_section_zone_filter = config_section_zone_filter_accept; static void *config_section_zone_filter_params = NULL; void config_section_zone_set_filter(config_section_zone_filter_callback *cb, void *p) { if(cb == NULL) { config_section_zone_filter = config_section_zone_filter_accept; config_section_zone_filter_params = NULL; } else { config_section_zone_filter = cb; config_section_zone_filter_params = p; } } static ya_result config_section_zone_stop(struct config_section_descriptor_s *csd) { #if CONFIG_SETTINGS_DEBUG formatln("config: section: zone: stop"); #endif // NOP zone_desc_s *zone_desc = (zone_desc_s*)csd->base; ya_result return_code; // ensure the descriptor is valid if(ISOK(return_code = zone_complete_settings(zone_desc))) { zone_setdefaults(zone_desc); // load the descriptor (most likely offline) if(config_section_zone_filter(zone_desc, config_section_zone_filter_params) == 1) { database_zone_desc_load(zone_desc); } } else { zone_free(zone_desc); } csd->base = NULL; return return_code; } static ya_result config_section_zone_postprocess(struct config_section_descriptor_s *csd) { return SUCCESS; } static ya_result config_section_zone_finalise(struct config_section_descriptor_s *csd) { if(csd != NULL) { if(csd->base != NULL) { zone_desc_s *zone_desc = (zone_desc_s*)csd->base; zone_free(zone_desc); #ifdef DEBUG csd->base = NULL; #endif } free(csd); } return SUCCESS; } static ya_result config_section_zone_set_wild(struct config_section_descriptor_s *csd, const char *key, const char *value) { return CONFIG_UNKNOWN_SETTING; } static ya_result config_section_zone_print_wild(struct config_section_descriptor_s *csd, output_stream *os, const char *key) { if(key != NULL) { return ERROR; } // for all zones, print table of the zone zone_set_lock(&database_zone_desc); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&database_zone_desc.set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *zone_node = ptr_set_avl_iterator_next_node(&iter); zone_desc_s *zone_desc = (zone_desc_s *)zone_node->value; config_section_struct_print(csd, zone_desc, os); } zone_set_unlock(&database_zone_desc); return SUCCESS; } static const config_section_descriptor_vtbl_s config_section_zone_descriptor_vtbl = { "zone", config_section_zone_desc, // no table config_section_zone_set_wild, config_section_zone_print_wild, config_section_zone_init, config_section_zone_start, config_section_zone_stop, config_section_zone_postprocess, config_section_zone_finalise }; ya_result config_register_zone(const char *null_or_key_name, s32 priority) { //null_or_key_name = "zone"; (void)null_or_key_name; config_section_descriptor_s *desc; MALLOC_OR_DIE(config_section_descriptor_s*, desc, sizeof(config_section_descriptor_s), GENERIC_TAG); desc->base = NULL; desc->vtbl = &config_section_zone_descriptor_vtbl; ya_result return_code = config_register(desc, priority); if(FAIL(return_code)) { free(desc); } return return_code; // scan-build false positive: either it is freed, either it is stored in a global collection } void config_zone_print(zone_desc_s *zone_desc, output_stream *os) { config_section_descriptor_s desc = {zone_desc, &config_section_zone_descriptor_vtbl}; config_section_struct_print(&desc, zone_desc, os); } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/dynupdate_query_service.c0000644000077100007710000000012412650131756024004 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.960344 30 ctime=1454597653.337344534 yadifa-2.1.6-5826/sbin/yadifad/dynupdate_query_service.c0000664000077100007710000002732712650131756023624 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "server-config.h" #include "server-config.h" #if HAS_PTHREAD_SETNAME_NP #ifdef DEBUG #define _GNU_SOURCE 1 #endif #endif #include #include "config.h" #include #include #include #include #include #include "database.h" #include "server.h" /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ #define MODULE_MSG_HANDLE g_server_logger /*------------------------------------------------------------------------------ * STATIC PROTOTYPES */ /*------------------------------------------------------------------------------ * FUNCTIONS */ /** @brief Function ... * * ... * * @param ... * * @retval OK * @retval NOK */ /** * * Move this into YADIFAD * * The dynupdate service loads the next update from the queue and runs it. */ static threaded_queue dynupdate_query_service_queue = THREADED_QUEUE_NULL; static volatile pthread_t dynupdate_query_service_thread_id = 0; static volatile bool dynupdate_query_service_thread_run = FALSE; typedef struct dynupdate_query_service_args dynupdate_query_service_args; struct dynupdate_query_service_args { zdb *db; message_data *mesg; #if UDP_USE_MESSAGES != 0 struct iovec udp_iovec; struct msghdr udp_msghdr; #endif u32 timestamp; }; static void* dynupdate_query_service_thread(void *args) { thread_pool_setup_random_ctx(); log_debug("dynupdate_query_service_thread: service started"); #if HAS_PTHREAD_SETNAME_NP #ifdef DEBUG pthread_setname_np(pthread_self(), "dynupdate-query"); #endif #endif for(;;) { if(dnscore_shuttingdown()) { break; } /** * * Needs all the parameters for UDP answer. * Needs the time of the query. If it's too old (> 3s) forget it. * */ dynupdate_query_service_args* parms = (dynupdate_query_service_args*)threaded_queue_dequeue(&dynupdate_query_service_queue); if(parms == NULL) { log_debug("dynupdate_query_service_thread: stopping (M)"); break; } if(!dynupdate_query_service_thread_run) { log_debug("dynupdate_query_service_thread: stopping (S)"); break; } message_data *mesg = parms->mesg; u32 now = time(NULL); if((now - parms->timestamp) <= 3) /** @todo set this as a configuration parameter (dynupdate-processing-timeout or something) */ { /* process */ zdb *database = parms->db; /* clone the message */ /* use the same scheduling mechanism as for TCP */ log_info("update (%04hx) %{dnsname} %{dnstype} (%{sockaddr})", ntohs(MESSAGE_ID(mesg->buffer)), mesg->qname, &mesg->qtype, &mesg->other.sa); finger_print return_code = database_update(database, mesg); if(FAIL(return_code)) { log_err("update (%04hx) %{dnsname} %{dnstype} failed: %r", ntohs(MESSAGE_ID(mesg->buffer)), mesg->qname, &mesg->qtype, return_code); } //local_statistics->udp_fp[mesg->status]++; #if !HAS_DROPALL_SUPPORT s32 sent; #ifdef DEBUG log_debug("dynupdate_query_service_thread: sendto(%d, %p, %d, %d, %{sockaddr}, %d)", mesg->sockfd, mesg->buffer, mesg->send_length, 0, (struct sockaddr*)&mesg->other.sa, mesg->addr_len); log_memdump_ex(g_server_logger, MSG_DEBUG5, mesg->buffer, mesg->send_length, 16, OSPRINT_DUMP_HEXTEXT); #endif #if UDP_USE_MESSAGES == 0 while((sent = sendto(mesg->sockfd, mesg->buffer, mesg->send_length, 0, (struct sockaddr*)&mesg->other.sa, mesg->addr_len)) < 0) { int error_code = errno; if(error_code != EINTR) { /** @warning server_st_process_udp needs to be modified */ //log_err("sendto: %r", MAKE_ERRNO_ERROR(error_code)); free(parms); free(mesg); return NULL/*ERROR*/; } } #else parms->udp_iovec.iov_len = mesg->send_length; #ifdef DEBUG log_debug("sendmsg(%d, %p, %d", mesg->sockfd, &parms->udp_msghdr, 0); #endif while( (sent = sendmsg(mesg->sockfd, &parms->udp_msghdr, 0)) < 0) { int error_code = errno; if(error_code != EINTR) { /** @warning server_st_process_udp needs to be modified */ log_err("update (%04hx) %{dnsname} %{dnstype} send failed: %r", ntohs(MESSAGE_ID(mesg->buffer)), mesg->qname, &mesg->qtype, MAKE_ERRNO_ERROR(error_code)); free(parms); free(mesg); return NULL/*ERROR*/; } } #endif //local_statistics->udp_output_size_total += sent; if(sent != mesg->send_length) { /** @warning server_st_process_udp needs to be modified */ log_err("short byte count sent (%i instead of %i)", sent, mesg->send_length); /*return ERROR*/; } #else log_debug("dynupdate_query_service_thread: drop all"); #endif } #if UDP_USE_MESSAGES != 0 free(parms->udp_msghdr.msg_control); #endif free(parms); free(mesg); } log_debug("dynupdate_query_service_thread: service stopped"); thread_pool_destroy_random_ctx(); pthread_exit(NULL); /* not from the pool, so it's the way */ return NULL; } ya_result dynupdate_query_service_start() { log_debug("dynupdate_query_service_start: starting service"); if(dynupdate_query_service_thread_id != 0) { log_debug("dynupdate_query_service_start: already running"); return ERROR; } dynupdate_query_service_thread_run = TRUE; threaded_queue_init(&dynupdate_query_service_queue, 256); pthread_t id; if(pthread_create(&id, NULL, dynupdate_query_service_thread, NULL) != 0) { log_crit("failed to start dynamic query service thread"); dynupdate_query_service_thread_run = FALSE; return ERROR; } dynupdate_query_service_thread_id = id; return SUCCESS; } ya_result dynupdate_query_service_stop() { log_debug("dynupdate_query_service_stop: stopping dynamic update service"); if(dynupdate_query_service_thread_id == 0) { return SUCCESS; } dynupdate_query_service_thread_run = FALSE; threaded_queue_enqueue(&dynupdate_query_service_queue, NULL); pthread_join(dynupdate_query_service_thread_id, NULL); log_debug("emptying dynamic update queue"); while(threaded_queue_size(&dynupdate_query_service_queue) > 0) { dynupdate_query_service_args* parms = (dynupdate_query_service_args*)threaded_queue_try_dequeue(&dynupdate_query_service_queue); if(parms != NULL) { free(parms->mesg); free(parms); } } threaded_queue_finalize(&dynupdate_query_service_queue); dynupdate_query_service_thread_id = 0; log_debug("dynamic update service stopped"); return SUCCESS; } ya_result dynupdate_query_service_enqueue(zdb *db, message_data *msg, struct msghdr *udp_msghdr) { if(dynupdate_query_service_thread_id == 0) { return ERROR; } message_data *mesg_clone; MALLOC_OR_DIE(message_data*, mesg_clone, sizeof(message_data), MESGDATA_TAG); memcpy(mesg_clone, msg, sizeof(message_data)); // ensure the original message cannot be used anymore #if HAS_TSIG_SUPPORT msg->tsig.tsig = NULL; #endif msg->received = 0; msg->send_length = 0; struct dynupdate_query_service_args *parms; MALLOC_OR_DIE(struct dynupdate_query_service_args *, parms, sizeof(dynupdate_query_service_args), GENERIC_TAG); parms->db = db; parms->mesg = mesg_clone; #if UDP_USE_MESSAGES != 0 /* * Clone the message parameters. * The iovec points into the buffer * The header uses the cloned iovec, a cloned anciliary buffer and the cloned sender (other) address from the message */ parms->udp_iovec.iov_base = &mesg_clone->buffer[0]; parms->udp_iovec.iov_len = sizeof(mesg_clone->buffer); memcpy(&parms->udp_msghdr, udp_msghdr, sizeof(struct msghdr)); // copy the whole content parms->udp_msghdr.msg_name = &mesg_clone->other.sa; // DO NOT : parms->udp_msghdr.msg_namelen = ... parms->udp_msghdr.msg_iov = &parms->udp_iovec; // DO NOT : parms->udp_msghdr.msg_iovlen = ... MALLOC_OR_DIE(struct msghdr*, parms->udp_msghdr.msg_control, ANCILIARY_BUFFER_SIZE, MSGHDR_TAG); memcpy(parms->udp_msghdr.msg_control, udp_msghdr->msg_control, ANCILIARY_BUFFER_SIZE); // DO NOT : parms->udp_msghdr.msg_controllen = ANCILIARY_BUFFER_SIZE; // DO NOT : parms->udp_msghdr.msg_flags = 0; #endif parms->timestamp = time(NULL); threaded_queue_enqueue(&dynupdate_query_service_queue, parms); return SUCCESS; } /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/main.c0000644000077100007710000000012412650131756017766 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.064344 30 ctime=1454597653.210344534 yadifa-2.1.6-5826/sbin/yadifad/main.c0000664000077100007710000003637612650131756017612 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup yadifad Yet Another DNS Implementation for all * * @brief Yet Another DNS Implementation for all * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #define _POSIX_SOURCES #define __USE_POSIX #include "server-config.h" #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // #include #include #include #include #include #include #include "server_error.h" #include "config_error.h" #include "signals.h" #include "server.h" #include "notify.h" #include "database-service.h" #if HAS_DYNUPDATE_SUPPORT #include "dynupdate_query_service.h" #endif #if HAS_DYNCONF_SUPPORT #include "dynconf.h" #endif #include "buildinfo.h" #define MODULE_MSG_HANDLE g_server_logger /*------------------------------------------------------------------------------ * GO */ static bool server_do_clean_exit = FALSE; int g_yadifa_exitcode = EXIT_SUCCESS; static bool own_pid = FALSE; void config_logger_setdefault(); void config_logger_cleardefault(); int process_command_line(int argc, char **argv, config_data *config); int zalloc_init(); static void server_register_errors() { error_register(CFG_ERROR_BASE,"CFG_ERROR_BASE"); /* Config error codes */ error_register(CONFIG_ZONE_ERR,"Error in config file"); error_register(CONFIG_KEY_INCOMPLETE_KEY,"CONFIG_KEY_INCOMPLETE_KEY"); error_register(CONFIG_KEY_UNSUPPORTED_ALGORITHM,"CONFIG_KEY_UNSUPPORTED_ALGORITHM"); /* error_register(YDF_ERROR_BASE,"YDF_ERROR_BASE"); error_register(YDF_ALREADY_RUNNING,"YDF_ALREADY_RUNNING"); error_register(YDF_PID_PATH_IS_WRONG,"YDF_PID_PATH_IS_WRONG"); */ /* Main error codes */ error_register(ZONE_LOAD_MASTER_TYPE_EXPECTED,"ZONE_LOAD_MASTER_TYPE_EXPECTED"); error_register(ZONE_LOAD_MASTER_ZONE_FILE_UNDEFINED,"ZONE_LOAD_MASTER_ZONE_FILE_UNDEFINED"); error_register(ZONE_LOAD_SLAVE_TYPE_EXPECTED,"ZONE_LOAD_SLAVE_TYPE_EXPECTED"); error_register(ANSWER_NOT_ACCEPTABLE,"ANSWER_NOT_ACCEPTABLE"); error_register(ANSWER_UNEXPECTED_EOF,"ANSWER_UNEXPECTED_EOF"); /* ACL */ error_register(ACL_ERROR_BASE,"ACL_ERROR_BASE"); error_register(ACL_TOKEN_SIZE_ERROR,"ACL_TOKEN_SIZE_ERROR"); error_register(ACL_UNEXPECTED_NEGATION,"ACL_UNEXPECTED_NEGATION"); error_register(ACL_WRONG_V4_MASK,"ACL_WRONG_V4_MASK"); error_register(ACL_WRONG_V6_MASK,"ACL_WRONG_V6_MASK"); error_register(ACL_WRONG_MASK,"ACL_WRONG_MASK"); error_register(ACL_DUPLICATE_ENTRY,"ACL_DUPLICATE_ENTRY"); error_register(ACL_RESERVED_KEYWORD,"ACL_RESERVED_KEYWORD"); error_register(ACL_TOO_MUCH_TOKENS,"ACL_TOO_MUCH_TOKENS"); error_register(ACL_NAME_PARSE_ERROR,"ACL_NAME_PARSE_ERROR"); error_register(ACL_UNKNOWN_TSIG_KEY,"ACL_UNKNOWN_TSIG_KEY"); error_register(ACL_UPDATE_REJECTED,"ACL_UPDATE_REJECTED"); error_register(ACL_NOTIFY_REJECTED,"ACL_NOTIFY_REJECTED"); error_register(ACL_UNDEFINED_TOKEN,"ACL_UNDEFINED_TOKEN"); error_register(CONFIG_WRONG_SIG_TYPE, "CONFIG_WRONG_SIG_TYPE"); error_register(CONFIG_WRONG_SIG_VALIDITY, "CONFIG_WRONG_SIG_VALIDITY"); error_register(CONFIG_WRONG_SIG_REGEN, "CONFIG_WRONG_SIG_REGEN"); error_register(DATABASE_ZONE_MISSING_DOMAIN, "DATABASE_ZONE_MISSING_DOMAIN"); error_register(DATABASE_ZONE_MISSING_MASTER, "DATABASE_ZONE_MISSING_MASTER"); error_register(DATABASE_ZONE_MISSING_TYPE, "DATABASE_ZONE_MISSING_TYPE"); error_register(DATABASE_ZONE_CONFIG_DUP, "DATABASE_ZONE_CONFIG_DUP"); error_register(NOTIFY_QUERY_TO_MASTER, "NOTIFY_QUERY_TO_MASTER"); error_register(NOTIFY_QUERY_TO_UNKNOWN, "NOTIFY_QUERY_TO_UNKNOWN"); error_register(NOTIFY_QUERY_FROM_UNKNOWN, "NOTIFY_QUERY_FROM_UNKNOWN"); } static void main_dump_info() { log_info("starting YADIFA " VERSION); log_info("built with " BUILD_OPTIONS); #if !defined(DEBUG) log_info("release build"); #else log_info("debug build"); #endif log_info("------------------------------------------------"); log_info("YADIFA is maintained by EURid"); log_info("Source code is available at http://www.yadifa.eu"); log_info("------------------------------------------------"); log_info("got %u CPUs", sys_get_cpu_count()); log_info("using %u UDP listeners per interface", g_config->thread_count_by_address); log_info("accepting up to %u TCP queries", g_config->max_tcp_queries); #if DNSCORE_HAS_ZALLOC log_info("self-managed memory enabled"); // ZALLOC #endif } static ya_result yadifad_config_on_section_loggers_read(const char* name, int index) { //formatln("yadifad_config_on_section_main_read(%s,%i)", name, index); ya_result return_code; if(FAIL(return_code = pid_check_running_program(PROGRAM_NAME, g_config->pid_file))) /// @todo needs to add pid_file stuff { return return_code; } /* * From here we have the loggers ready (if any was set) */ if(g_config->server_flags & SERVER_FL_DAEMON) { server_setup_daemon_go(); } logger_start(); if(!config_logger_isconfigured()) { config_logger_setdefault(); } main_dump_info(); if(FAIL(return_code = config_update_network(g_config))) { return return_code; } database_service_init(); /* Initialize signals used for inter process communication and * quitting the program */ if(FAIL(return_code = signal_handler_init())) { log_err("failed to setup the signal handler: %r", return_code); if(!(g_config->server_flags & SERVER_FL_DAEMON)) { osformatln(termerr, "error: failed to setup the signal handler: %r", return_code); flusherr(); } logger_flush(); return return_code; } notify_service_init(); return CONFIG_CALLBACK_RESULT_CONTINUE; } /** * Handles the configuration part of the server. * * @param argc * @param argv * @return 0 if the configuration is successful and the server can start * @return 1 if no error occurred but the server must stop * @return -1 if an error occurred and the server must stop */ int main_config(int argc, char *argv[]) { ya_result return_code; /* * Initialise configuration file and set standard values */ if(FAIL(return_code = yadifad_config_init())) { osformatln(termerr, "error: %r", return_code); flusherr(); return ERROR; } // channels then loggers config_add_on_section_read_callback("loggers", yadifad_config_on_section_loggers_read); if((return_code = yadifad_config_cmdline(argc, argv)) != 0) { if(FAIL(return_code)) { return ERROR; } return 1; } if(FAIL(return_code = yadifad_config_read(g_config->config_file))) { osformatln(termerr, "error: %r", return_code); flusherr(); return ERROR; } if(FAIL(return_code = yadifad_config_finalise())) { osformatln(termerr, "error: %r", return_code); flusherr(); return ERROR; } #if 0 && defined(DEBUG) config_print(termout); osformatln(termout, "starting logging service"); #endif /* * flushes whatever is in the buffers */ flushout(); flusherr(); return 0; } /** * Tries to create a temporary file in a directory. * Deletes the file afterward. * * @param dir * @return true iff the file was created */ static bool main_final_tests_is_directory_writable(const char* dir) { char tempfile[PATH_MAX]; snformat(tempfile, sizeof(tempfile), "%s/ydf.XXXXXX", dir); int tempfd; if((tempfd = mkstemp(tempfile)) < 0) { ttylog_err("error: '%s' is not writable: %r", dir, ERRNO_ERROR); return FALSE; } unlink(tempfile); close_ex(tempfd); return TRUE; } /** * last tests before the real startup (directory writable) */ static ya_result main_final_tests() { if(!main_final_tests_is_directory_writable(g_config->data_path)) { return ERROR; } if(!main_final_tests_is_directory_writable(g_config->keys_path)) { return ERROR; } if(!main_final_tests_is_directory_writable(g_config->log_path)) { return ERROR; } if(!main_final_tests_is_directory_writable(g_config->xfr_path)) { return ERROR; } return SUCCESS; } /** \brief Function executed by atexit * * The atexit() function registers the given function to be called at normal * process termination, either via exit(?) or via return from the program * main(). Functions so registered are called in the reverse order of their * registration; no arguments are passed. */ static void main_exit() { if(own_pid) { log_info("shutting down"); } #if HAS_DYNUPDATE_SUPPORT dynupdate_query_service_stop(); #endif notify_service_stop(); if(own_pid) { log_info("releasing pid file lock"); pid_file_destroy(g_config->pid_file); } logger_flush(); flushout(); flusherr(); signal_handler_finalise(); notify_service_finalise(); database_service_finalise(); logger_flush(); flushout(); flusherr(); if(server_do_clean_exit) { database_shutdown(g_config->database); database_finalize(); #if HAS_ACL_SUPPORT acl_free_definitions(); #endif dnscore_finalize(); } } /** \brief Main function of yadifa * * @param[in] argc number of arguments on the command line * @param[in] argv array of arguments on the command line * * @return EXIT_SUCCESS * @return EXIT_FAILURE * @return exit codes * */ int main(int argc, char *argv[]) { ya_result return_code; /* ------------------------------------------------------------ */ /* Initializes the core library: * _ checks basic architecture settings (endianness, types sizes, random generator, ...) * _ initialises dns types and classes name<->id matching * _ initialises text formatting (format*, log*) * _ initialises standard output streams * _ initialises the logger * _ registers core error codes * _ registers TSIG algorithms * _ registers an exit function * _ resets and start the alarm/timer function */ dnscore_init(); async_message_pool_init(); // registers yadifad error codes server_register_errors(); // arms the exit handling function atexit(main_exit); #if HAS_DYNCONF_SUPPORT //dynconf_service_init(); //dynconf_service_start(); #endif // configures, exit if ordered to (version/help or error) if((return_code = main_config(argc, argv)) != SUCCESS) { return ISOK(return_code)?EXIT_SUCCESS:EXIT_FAILURE; } // This is always 'exit' on failure if(FAIL(return_code = pid_check_running_program(PROGRAM_NAME, g_config->pid_file))) { return return_code; } /* * We are really starting up. After this we may want to do a clean exit. */ server_do_clean_exit = TRUE; /* * Setup the necessary environmental changes: core limits, root change, id change, and creation of pid file */ u32 setup_flags = SETUP_CORE_LIMITS | SETUP_ID_CHANGE | SETUP_CREATE_PID_FILE; if (g_config->server_flags & SERVER_FL_CHROOT) { setup_flags |= SETUP_ROOT_CHANGE; } if(FAIL(return_code = server_setup_env(&g_config->pid, &g_config->pid_file, g_config->uid, g_config->gid, setup_flags))) { log_err("server setup failed: %r", return_code); return EXIT_FAILURE; } own_pid = TRUE; dnssec_keystore_setpath(g_config->keys_path); dnssec_set_xfr_path(g_config->xfr_path); logger_reopen(); /// last tests before the real startup (directory writable) if(FAIL(main_final_tests())) { return EXIT_FAILURE; } // database service // // needs about nobody log_info("loading zones"); if(FAIL(return_code = database_startup(&g_config->database))) { log_err("loading zones: %r", return_code); return EXIT_FAILURE; } /** * @todo only do this if we are master for at least one zone */ log_info("starting notify service"); notify_service_start(); #if HAS_DYNUPDATE_SUPPORT // dynupdate service // // called by the dns server // uses the database dynupdate_query_service_start(); #endif /* * Starts the services, ending with the server. * Waits for the shutdown signal. */ int exit_code; if(ISOK(server_run())) { exit_code = EXIT_SUCCESS; } else { exit_code = EXIT_FAILURE; } /// @note DO NOT: logger_finalize() don't, it will be done automatically at exit return exit_code; } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/config_control.c0000644000077100007710000000012412650131756022047 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.923344 30 ctime=1454597653.312344534 yadifa-2.1.6-5826/sbin/yadifad/config_control.c0000664000077100007710000000641612650131756021663 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup config Configuration handling * @ingroup yadifad * @brief * * @{ */ #include "server-config.h" #include #include #include #include #include "config.h" #include "ctrl.h" extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #if HAS_CTRL static config_control tmp_config_control = { TRUE }; static bool ctrl_registered = FALSE; #define CONFIG_TYPE config_control CONFIG_BEGIN(config_control_desc) CONFIG_BOOL(enabled, "1") CONFIG_END(config_control_desc) #undef CONFIG_TYPE static ya_result config_control_section_postprocess(struct config_section_descriptor_s *csd) { /* here check that the settings are right */ return SUCCESS; } ya_result config_register_control(s32 priority) { if(ctrl_registered) { return SUCCESS; } ctrl_registered = TRUE; const char *section_name = "control"; ya_result return_code = config_register_struct(section_name, config_control_desc, &tmp_config_control, priority); if(ISOK(return_code)) { // hook a new finaliser before the standard one config_section_descriptor_s *section_desc = config_section_get_descriptor(section_name); config_section_descriptor_vtbl_s *vtbl = (config_section_descriptor_vtbl_s *)section_desc->vtbl; vtbl->postprocess = config_control_section_postprocess; } return return_code; } #endif /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/server-mt.c0000644000077100007710000000012412651632654020772 xustar000000000000000027 mtime=1453798828.948622 27 atime=1454597464.068344 30 ctime=1454597653.291344534 yadifa-2.1.6-5826/sbin/yadifad/server-mt.c0000664000077100007710000011741512651632654020610 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup server Server * @ingroup yadifad * @brief Single threaded server. This one has the best performance on all of our setups with kernels <= 2.6.32 * * This is the default and best server available for Yadifa. * It works like this: * A select is made on all network file descriptors with a timeout of 1 second. * Each usable descriptor is then processed. * _ UDP are single threaded (receive, process, send) * _ TCP are multithreaded (accept, thread(process & send)) * Then the scheduler tasks are processed. * * @{ */ /*----------------------------------------------------------------------------*/ #define SERVER_ST_C_ #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include #include #ifdef DEBUG #define ZDB_JOURNAL_CODE 1 #include #endif extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #include "server-mt.h" #include "server_context.h" #include "server_error.h" #include "signals.h" #include "notify.h" #include "process_class_ch.h" #if HAS_CTRL #include "ctrl.h" #endif //#include "database-service.h" #include "log_statistics.h" #include "log_query.h" #include "poll-util.h" #if HAS_DYNUPDATE_SUPPORT #include "dynupdate_query_service.h" #endif #if HAS_RRL_SUPPORT #include "rrl.h" #endif #define MSGHDR_TAG 0x52444847534d #ifdef HAS_MIRROR_SUPPORT #define DUMB_MIRROR 1 #endif #if HAS_MESSAGES_SUPPORT #define UDP_USE_MESSAGES 1 #else #define UDP_USE_MESSAGES 0 #endif /** * This contains the sum of statistics every time they are all summed. */ static server_statistics_t server_statistics_sum; #define SYNCED_THREAD_STATUS_TERMINATED 1 #define PAUSE_ALL_ON_TASK 0 #define SERVER_MAX_UDP_THREADS 255 /** * @note This flag enables the alternative send/rcvd for udp (from 'to' to 'msg') * * The syncs are slow, but it does not matter. */ struct synced_thread_t { interface *intf; pthread_t id; u16 idx; #if PAUSE_ALL_ON_TASK != 0 volatile u32 paused; #endif volatile u8 status; message_data *udp_mesg; #if UDP_USE_MESSAGES struct iovec udp_iovec; struct msghdr udp_msghdr; #endif server_statistics_t statistics; }; typedef struct synced_thread_t synced_thread_t; struct synced_threads_t { synced_thread_t* threads; mutex_t mtx; u32 thread_count; #if PAUSE_ALL_ON_TASK != 0 volatile u32 pause; #endif volatile bool terminate; }; static struct synced_threads_t synced_threads; static void synced_init(u32 count) { yassert(count > 0); ZEROMEMORY(&synced_threads, sizeof(synced_threads)); mutex_init(&synced_threads.mtx); MALLOC_OR_DIE(synced_thread_t*, synced_threads.threads, count * sizeof(synced_thread_t), GENERIC_TAG); ZEROMEMORY(synced_threads.threads, count * sizeof(synced_thread_t)); for(u32 t = 0; t < count; t++) { synced_threads.threads[t].id = 0; #if PAUSE_ALL_ON_TASK != 0 synced_threads.threads[t].paused = 0; #endif synced_threads.threads[t].idx = t; ZEROMEMORY(&synced_threads.threads[t].statistics, sizeof(server_statistics_t)); MALLOC_OR_DIE(message_data*, synced_threads.threads[t].udp_mesg, sizeof(message_data), MESGDATA_TAG); ZEROMEMORY(synced_threads.threads[t].udp_mesg, sizeof(message_data)); } synced_threads.thread_count = count; } static void synced_finalize() { for(u32 t = 0; t < synced_threads.thread_count; t++) { free(synced_threads.threads[t].udp_mesg); } free(synced_threads.threads); ZEROMEMORY(&synced_threads, sizeof(synced_threads)); } static bool synced_shouldpause() { #if PAUSE_ALL_ON_TASK != 0 return (synced_threads.pause & 1) != 0; #else return FALSE; #endif } static void synced_wait(synced_thread_t *st) { #if PAUSE_ALL_ON_TASK != 0 #ifdef DEBUG log_debug("synced_wait: st %d/%d: waiting ... (%x)", st->idx+1, synced_threads.thread_count, st->paused); #endif while(((st->paused = synced_threads.pause) & 1) != 0) { usleep(1000); // 1ms } #ifdef DEBUG log_debug("synced_wait: st %d/%d: resuming ... (%x)", st->idx+1, synced_threads.thread_count, st->paused); #endif #endif } static void synced_set_terminated(synced_thread_t *st) { st->status |= SYNCED_THREAD_STATUS_TERMINATED; } static void synced_stop() { #ifdef DEBUG log_debug("synced_stop: stop request"); #endif /* mark the shutdown */ synced_threads.terminate = TRUE; /* break everybody's reader */ for(u32 i = 0; i < synced_threads.thread_count; i++) { close_ex(synced_threads.threads[i].intf->udp.sockfd); } /* wait everybody has stopped */ for(;;) { u32 pc = 0; for(u32 i = 0; i < synced_threads.thread_count; i++) { /* If terminated ... */ if((synced_threads.threads[i].status & SYNCED_THREAD_STATUS_TERMINATED) != 0) { pc++; } else { if(synced_threads.threads[i].id != 0) { pthread_kill(synced_threads.threads[i].id, SIGUSR2); /* SIGUSR2 is an "unused" signal that does nothing but break a system call with an EINTR */ } } } if(pc == synced_threads.thread_count) { #ifdef DEBUG log_debug("synced_stop: stopped"); #endif break; } #ifdef DEBUG log_debug("synced_stop: stopped %d/%d", pc, synced_threads.thread_count); #endif usleep(1000); } } #if UDP_USE_MESSAGES /* * from: http://www.mombu.com/programming/c/t-how-to-get-udp-destination-address-on-incoming-packets-7784569.html */ #if defined IP_RECVDSTADDR # define DSTADDR_SOCKOPT IP_RECVDSTADDR # define DSTADDR_DATASIZE (CMSG_SPACE(sizeof(struct in_addr))) # define dstaddr(x) (CMSG_DATA(x)) #elif defined IP_PKTINFO # define DSTADDR_SOCKOPT IP_PKTINFO # define DSTADDR_DATASIZE (CMSG_SPACE(sizeof(struct in_pktinfo))) # define dstaddr(x) (&(((struct in_pktinfo *)(CMSG_DATA(x)))->ipi_addr)) #else # error "can't determine socket option" #endif /* union cmsghdr_dstaddr { struct cmsghdr cmsg; u_char data[DSTADDR_DATASIZE]; }; */ #endif /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ /******************************************************************************************************************* * * UDP protocol * ******************************************************************************************************************/ #if HAS_DYNUPDATE_SUPPORT /** * * Update MUST be delegated to the main thread (not an issue on the st model) * BUT the delegation requires all udp threads to stop * So it means that we cannot delegate from inside (else we get a deadlock) * So a thread must be started to handle the remainder of the processing * Said thread will delegate and send answer back to the client * * This implies I have to copy the message so the original structure can be used * for the next query. */ static void server_mt_process_udp_update(zdb *database, synced_thread_t *st) { struct msghdr *msghdr; #if UDP_USE_MESSAGES msghdr = &st->udp_msghdr; #else msghdr = NULL; #endif dynupdate_query_service_enqueue(database, st->udp_mesg, msghdr); } #endif /** \brief Does the udp processing * * When pselect has an UDP request, this function reads the udp packet, * processes dns packet and send reply * * @param[in,out] mesg * * @retval OK * @return status of message is written in mesg->status */ static void server_mt_process_udp(zdb *database, synced_thread_t *st) { int return_code; server_statistics_t *local_statistics = &st->statistics; message_data *mesg = st->udp_mesg; int fd = mesg->sockfd; ssize_t n; for(;;) { while(synced_shouldpause()) { // pause synced_wait(st); } #if !UDP_USE_MESSAGES n = recvfrom(fd, mesg->buffer, sizeof(mesg->buffer), 0, (struct sockaddr*)&mesg->other.sa, &mesg->addr_len); if(n >= 0) { #ifdef DEBUG log_debug("server_mt_process_udp: recvfrom: got %d bytes from %{sockaddr}", n, &mesg->other.sa); log_memdump_ex(g_server_logger, MSG_DEBUG5, mesg->buffer, n, 16, OSPRINT_DUMP_HEXTEXT); #endif break; } /* * errno is not a variable but a macro * */ int err = errno; if(err != EINTR) { /* * EAGAIN * Resource temporarily unavailable (may be the same value as EWOULDBLOCK) (POSIX.1) */ if(err != EAGAIN) { #ifdef DEBUG log_debug("server_mt_process_udp: recvfrom error: %r", MAKE_ERRNO_ERROR(err)); /* most likely: timeout/resource temporarily unavailable */ #endif return; } } #else st->udp_iovec.iov_len = sizeof(st->udp_mesg->buffer); st->udp_msghdr.msg_controllen = ANCILIARY_BUFFER_SIZE; n = recvmsg(fd, &st->udp_msghdr, 0); if(n >= 0) { #ifdef DEBUG log_debug("server_mt_process_udp: recvmsg: got %d bytes", n); #endif break; } int err = errno; if(err != EINTR) { /* * EAGAIN * Resource temporarily unavailable (may be the same value as EWOULDBLOCK) (POSIX.1) */ if(err != EAGAIN) { #ifdef DEBUG log_err("server_mt_process_udp: recvmsg error: %r", MAKE_ERRNO_ERROR(err)); #endif return; } } #endif } mesg->received = n; /** * In case of processing error, message_process will return UNPROCESSABLE_MESSAGE * which means there must be no query/update/... done on it. * If the message status is not "dropped" then the message will be sent back as it is to the client. */ // see if supposed to pause // if yes then pause and tell we are paused // wait until can resume local_statistics->udp_input_count++; switch(MESSAGE_OP(mesg->buffer)) { case OPCODE_QUERY: { if(ISOK(return_code = message_process_query(mesg))) { switch(mesg->qclass) { case CLASS_IN: { local_statistics->udp_queries_count++; log_query(fd, mesg); switch(mesg->qtype) { default: { #if HAS_RRL_SUPPORT ya_result rrl = database_query_with_rrl(database, mesg); local_statistics->udp_referrals_count += mesg->referral; local_statistics->udp_fp[mesg->status]++; switch(rrl) { case RRL_SLIP: { local_statistics->rrl_slip++; break; } case RRL_DROP: { local_statistics->rrl_drop++; return; } case RRL_PROCEED_DROP: { local_statistics->rrl_drop++; break; } } #else database_query(database, mesg); local_statistics->udp_referrals_count += mesg->referral; local_statistics->udp_fp[mesg->status]++; #endif break; } case TYPE_IXFR: { MESSAGE_FLAGS_OR(mesg->buffer, QR_BITS|TC_BITS, 0); /** @todo IXFR UDP */ SET_U32_AT(mesg->buffer[4], 0); SET_U32_AT(mesg->buffer[8], 0); mesg->send_length = DNS_HEADER_LENGTH; local_statistics->udp_fp[FP_IXFR_UDP]++; break; } case TYPE_AXFR: case TYPE_OPT: { message_make_error(mesg, FP_INCORR_PROTO); local_statistics->udp_fp[FP_INCORR_PROTO]++; break; } } // switch query type break; } // query class IN case CLASS_CH: { class_ch_process(mesg); // thread-safe local_statistics->udp_fp[mesg->status]++; break; } // query class CH default: { /// @todo 20140521 edf -- verify unsupported class error handling /* FP_CLASS_NOTFOUND log_warn("query [%04hx] %{dnsname} %{dnstype} %{dnsclass} (%{sockaddrip}) : unsupported class", ntohs(MESSAGE_ID(mesg->buffer)), mesg->qname, &mesg->qtype, &mesg->qclass, &mesg->other.sa); */ /* log_warn("query [%04hx] %{dnsname} %{dnstype} %{dnsclass} (%{sockaddrip}) : unsupported operation", ntohs(MESSAGE_ID(mesg->buffer)), mesg->qname, &mesg->qtype, &mesg->qclass, &mesg->other.sa); */ message_make_error(mesg, FP_NOT_SUPP_CLASS); local_statistics->udp_fp[FP_NOT_SUPP_CLASS]++; break; } } // query class } // if message process succeeded else // an error occurred : no query to be done at all { log_warn("query (%04hx) [%02x|%02x] error %i (%r) (%{sockaddrip})", ntohs(MESSAGE_ID(mesg->buffer)), MESSAGE_HIFLAGS(mesg->buffer),MESSAGE_LOFLAGS(mesg->buffer), mesg->status, return_code, &mesg->other.sa); local_statistics->udp_fp[mesg->status]++; if(return_code == UNPROCESSABLE_MESSAGE) { log_memdump_ex(MODULE_MSG_HANDLE, MSG_ERR, mesg->buffer, mesg->received, 16, OSPRINT_DUMP_ALL); } /* * If not FE, or if we answer FE * * ... && (MESSAGE_QR(mesg->buffer) == 0 ??? and if there the query number is > 0 ??? */ if( (return_code != INVALID_MESSAGE) && ((mesg->status != RCODE_FORMERR) || ((g_config->server_flags & SERVER_FL_ANSWER_FORMERR) != 0))) { if(!MESSAGEP_HAS_TSIG(mesg)) { message_transform_to_error(mesg); } } else { local_statistics->udp_dropped_count++; return; } } break; } // case query case OPCODE_NOTIFY: { if(ISOK(return_code = message_process(mesg))) { switch(mesg->qclass) { case CLASS_IN: { ya_result return_value; local_statistics->udp_notify_input_count++; log_info("notify (%04hx) %{dnsname} (%{sockaddr})", ntohs(MESSAGE_ID(mesg->buffer)), mesg->qname, &mesg->other.sa); bool answer = MESSAGE_QR(mesg->buffer); return_value = notify_process(database, mesg); // thread-safe local_statistics->udp_fp[mesg->status]++; if(FAIL(return_value)) { log_err("notify (%04hx) %{dnsname} failed : %r", ntohs(MESSAGE_ID(mesg->buffer)), mesg->qname, return_value); if(answer) { return; } if(!MESSAGEP_HAS_TSIG(mesg)) { message_transform_to_error(mesg); } break; } else { if(answer) { return; } } break; } // notify class IN default: { /// @todo 20140521 edf -- verify unsupported class error handling /* FP_CLASS_NOTFOUND */ message_make_error(mesg, FP_NOT_SUPP_CLASS); local_statistics->udp_fp[FP_NOT_SUPP_CLASS]++; break; } } // notify class } // if message process succeeded else // an error occurred : no query to be done at all { log_warn("notify (%04hx) [%02x|%02x] error %i (%r) (%{sockaddrip})", ntohs(MESSAGE_ID(mesg->buffer)), MESSAGE_HIFLAGS(mesg->buffer),MESSAGE_LOFLAGS(mesg->buffer), mesg->status, return_code, &mesg->other.sa); local_statistics->udp_fp[mesg->status]++; #ifdef DEBUG log_memdump_ex(MODULE_MSG_HANDLE, MSG_DEBUG5, mesg->buffer, mesg->received, 16, OSPRINT_DUMP_ALL); #endif /* * If not FE, or if we answer FE * * ... && (MESSAGE_QR(mesg->buffer) == 0 ??? and if there the query number is > 0 ??? */ if( (return_code != INVALID_MESSAGE) && ((mesg->status != RCODE_FORMERR) || ((g_config->server_flags & SERVER_FL_ANSWER_FORMERR) != 0))) { if(!MESSAGEP_HAS_TSIG(mesg)) { message_transform_to_error(mesg); } } else { local_statistics->udp_dropped_count++; return; } } break; } // case notify case OPCODE_UPDATE: { if(ISOK(return_code = message_process(mesg))) { switch(mesg->qclass) { case CLASS_IN: { #if HAS_DYNUPDATE_SUPPORT /** * @note It's the responsibility of the called function (or one of its callees) to ensure * this does not take much time and thus to trigger a background task with the * scheduler if needed. */ local_statistics->udp_updates_count++; server_mt_process_udp_update(database, st); return; // NOT break; #else message_make_error(mesg, FP_FEATURE_DISABLED); local_statistics->udp_fp[FP_FEATURE_DISABLED]++; break; #endif } // update class IN default: { /// @todo 20140521 edf -- verify unsupported class error handling /* FP_CLASS_NOTFOUND */ message_make_error(mesg, FP_NOT_SUPP_CLASS); local_statistics->udp_fp[FP_NOT_SUPP_CLASS]++; break; } } // update class } // if message process succeeded else // an error occurred : no query to be done at all { log_warn("update (%04hx) [%02x|%02x] error %i (%r) (%{sockaddrip})", ntohs(MESSAGE_ID(mesg->buffer)), MESSAGE_HIFLAGS(mesg->buffer),MESSAGE_LOFLAGS(mesg->buffer), mesg->status, return_code, &mesg->other.sa); local_statistics->udp_fp[mesg->status]++; #ifdef DEBUG log_memdump_ex(MODULE_MSG_HANDLE, MSG_DEBUG5, mesg->buffer, mesg->received, 16, OSPRINT_DUMP_ALL); #endif /* * If not FE, or if we answer FE * * ... && (MESSAGE_QR(mesg->buffer) == 0 ??? and if there the query number is > 0 ??? */ if( (return_code != INVALID_MESSAGE) && ((mesg->status != RCODE_FORMERR) || ((g_config->server_flags & SERVER_FL_ANSWER_FORMERR) != 0))) { if(!MESSAGEP_HAS_TSIG(mesg)) { message_transform_to_error(mesg); } } else { local_statistics->udp_dropped_count++; return; } } break; } // case update default: { return_code = message_process_query(mesg); mesg->status = RCODE_NOTIMP; log_warn("unknown [%04hx] error: %r", ntohs(MESSAGE_ID(mesg->buffer)), MAKE_DNSMSG_ERROR(mesg->status)); if( (mesg->status != RCODE_FORMERR) || ((g_config->server_flags & SERVER_FL_ANSWER_FORMERR) != 0)) { if(!MESSAGEP_HAS_TSIG(mesg)) { message_transform_to_error(mesg); } } else { local_statistics->udp_dropped_count++; return; } } } // switch operation code /** @todo still needs to verify RCODE */ #ifdef DEBUG if(mesg->send_length < 12) { log_debug("wrong output message of status %i size %i", mesg->status, mesg->send_length); log_memdump_ex(g_server_logger, MSG_DEBUG5, mesg->buffer, mesg->send_length, 16, OSPRINT_DUMP_HEXTEXT); } #endif #if !HAS_DROPALL_SUPPORT ssize_t sent; #if !UDP_USE_MESSAGES #ifdef DEBUG log_debug("server_mt_process_udp: sendto(%d, %p, %d, %d, %{sockaddr}, %d)", mesg->sockfd, mesg->buffer, mesg->send_length, 0, (struct sockaddr*)&mesg->other.sa, mesg->addr_len); log_memdump_ex(g_server_logger, MSG_DEBUG5, mesg->buffer, mesg->send_length, 16, OSPRINT_DUMP_HEXTEXT); #endif while((sent = sendto(mesg->sockfd, mesg->buffer, mesg->send_length, 0, (struct sockaddr*)&mesg->other.sa, mesg->addr_len)) < 0) { int error_code = errno; if(error_code != EINTR) { /** @warning server_st_process_udp needs to be modified */ //log_err("sendto: %r", MAKE_ERRNO_ERROR(error_code)); return /*ERROR*/; } } #else st->udp_iovec.iov_len = mesg->send_length; #ifdef DEBUG log_debug("sendmsg(%d, %p, %d", mesg->sockfd, &st->udp_msghdr, 0); #endif while( (sent = sendmsg(mesg->sockfd, &st->udp_msghdr, 0)) < 0) { int error_code = errno; if(error_code != EINTR) { /** @warning server_st_process_udp needs to be modified */ log_err("query (%04hx) %{dnsname} %{dnstype} send failed: %r", ntohs(MESSAGE_ID(mesg->buffer)), mesg->qname, &mesg->qtype, MAKE_ERRNO_ERROR(error_code)); return /*ERROR*/; } } #endif local_statistics->udp_output_size_total += sent; if(sent != mesg->send_length) { /** @warning server_st_process_udp needs to be modified */ log_err("short byte count sent (%i instead of %i)", sent, mesg->send_length); /*return ERROR*/; } #else log_debug("server_mt_process_udp: drop all"); #endif } /******************************************************************************************************************* * * Server loop * ******************************************************************************************************************/ /** \brief continuous loop waiting for a query * * Each child server runs this function * Waits for a pselect or SA_SHUTDOWN, * if pselect is ready, does the messaging processing and jumps to the * correct function * * @param server_context * * @retval OK */ static u64 server_run_loop_rate_tick = 0; //static u64 server_run_loop_rate_count = 0; static s32 server_run_loop_timeout_countdown = 0; void* server_mt_query_loop_udp(void* parm) { synced_thread_t *st = (synced_thread_t*)parm; st->id = pthread_self(); /* ------------------------------------------------------------ */ /* Clear and initialize mesg */ ZEROMEMORY(st->udp_mesg, sizeof (message_data)); st->udp_mesg->addr_len = sizeof(st->udp_mesg->other); st->udp_mesg->protocol = IPPROTO_UDP; st->udp_mesg->size_limit = UDPPACKET_MAX_LENGTH; st->udp_mesg->process_flags = ~0; /** @todo FIX ME */ st->udp_mesg->sockfd = st->intf->udp.sockfd; tcp_set_recvtimeout(st->udp_mesg->sockfd, 1, 0); #ifdef DEBUG log_debug("server_mt_query_loop_udp: ready with #%d id=%p fd=%d", st->idx, st->id, st->udp_mesg->sockfd); #endif #if UDP_USE_MESSAGES /* UDP messages handling requires more setup */ st->udp_iovec.iov_base = st->udp_mesg->buffer; st->udp_iovec.iov_len = sizeof(st->udp_mesg->buffer); st->udp_msghdr.msg_name = &st->udp_mesg->other.sa; st->udp_msghdr.msg_namelen = st->udp_mesg->addr_len; st->udp_msghdr.msg_iov = &st->udp_iovec; st->udp_msghdr.msg_iovlen = 1; MALLOC_OR_DIE(struct msghdr*, st->udp_msghdr.msg_control, ANCILIARY_BUFFER_SIZE, MSGHDR_TAG); st->udp_msghdr.msg_controllen = ANCILIARY_BUFFER_SIZE; st->udp_msghdr.msg_flags = 0; #endif log_debug("server-mt: reading on %p", st->intf); while(program_mode != SA_SHUTDOWN) { st->statistics.input_loop_count++; server_mt_process_udp(g_config->database, st); } log_debug("server-mt: stop reading on %p", st->intf); synced_set_terminated(st); return NULL; } ya_result server_mt_query_loop() { ya_result return_code; interface *intf; if(g_config->total_interfaces == 0) { return INVALID_STATE_ERROR; } fd_set read_set; fd_set read_set_init; struct timespec timeout; int maxfd; u32 previous_tick = 0; log_query_set_mode(g_config->queries_log_type); server_run_loop_timeout_countdown = g_config->statistics_max_period; bool log_statistics_enabled = (g_statistics_logger != NULL) && (g_config->server_flags & SERVER_FL_STATISTICS) != 0; log_debug("statistics are %s", (log_statistics_enabled)?"enabled":"disabled"); if(log_statistics_enabled) { log_statistics_legend(); } /* There's a timeout each second, for checking the SA_SHUTDOWN flag */ timeout.tv_sec = 1; timeout.tv_nsec = 0; /** * For each interface ... */ /* compute maxfd plus one once and for all : begin */ maxfd = -1; /* Set sockets on a "template" var, so we will copy it * in the one we will use in pselect. This increases * the speed a bit. */ FD_ZERO(&read_set_init); s32 reader_by_fd = g_config->thread_count_by_address; s32 cpu_count = sys_get_cpu_count(); if(reader_by_fd > cpu_count) { log_warn("server-mt: using too many threads per address is counter-productive on highly loaded systems (%d > %d)", reader_by_fd, cpu_count); } /* * */ u32 itf_count = g_config->interfaces_limit - &g_config->interfaces[0]; // ensure the number of udp thread by interface does not goes "too much" beyond a limit // recompute reader_by_fd if it does if(reader_by_fd * itf_count <= SERVER_MAX_UDP_THREADS) { reader_by_fd = MAX(reader_by_fd, 1); } else { reader_by_fd = MAX(SERVER_MAX_UDP_THREADS / itf_count, 1); } synced_init(itf_count * reader_by_fd); u32 tidx = 0; struct thread_pool_s *server_udp_thread_pool = thread_pool_init_ex(itf_count * reader_by_fd, 1, "server-udp-tp"); for(intf = g_config->interfaces; intf < g_config->interfaces_limit; intf++) { for(u32 r = 0; r < reader_by_fd; r++) { synced_threads.threads[tidx].intf = intf; log_debug("server_mt_query_loop: pooling #%d=%d fd=%d", tidx, synced_threads.threads[tidx].idx, intf->udp.sockfd); if(FAIL(return_code = thread_pool_enqueue_call(server_udp_thread_pool, server_mt_query_loop_udp, &synced_threads.threads[tidx], NULL, "server-mt-task"))) { log_err("unable to schedule task : %r", return_code); return return_code; } tidx++; } maxfd = MAX(maxfd, intf->tcp.sockfd); /* * Update the select read set for the current interface (udp + tcp) */ #if UDP_USE_MESSAGES int sockopt_dstaddr = 1; setsockopt(intf->udp.sockfd, IPPROTO_IP, DSTADDR_SOCKOPT, &sockopt_dstaddr, sizeof(sockopt_dstaddr)); #endif FD_SET(intf->tcp.sockfd, &read_set_init); } maxfd++; /* pselect actually requires maxfd + 1 */ /* compute maxfd plus one once and for all : done */ log_info("ready to work"); while(program_mode != SA_SHUTDOWN) { server_statistics.input_loop_count++; /* Reset the pselect read set */ MEMCOPY(&read_set, &read_set_init, sizeof(fd_set)); /* At this moment waits only for READ SET or timeout of x seconds */ /* * @note (p)select has known bugs on Linux & glibc * * @todo See man select about said bugs */ return_code = pselect(maxfd, &read_set, NULL, NULL, &timeout, 0); if(return_code > 0) /* Are any bit sets by pselect ? */ { int sockfd; /* If pselect check for the correct sock file descriptor, * at this moment only READ SET */ /* * This variable will contain the pointer to the processing function. * It has been removed from the mesg structure at the time the latter * has been moved to the core. * * Reasons being: zdb *dependency & server dependency -> dependency loop * * Since the call is only local it should not have side effects. */ for(intf = g_config->interfaces; intf < g_config->interfaces_limit; intf++) { sockfd = intf->tcp.sockfd; if(FD_ISSET(sockfd, &read_set)) { /* Jumps to the correct processing function */ server_process_tcp(g_config->database, &intf->tcp); /* DEBUG static counts */ server_statistics.loop_rate_counter++; /*break;*/ /** @note with multiple listening interfaces, it will probably be better not to break */ } } } else /* return_code <= 0 */ { /** @note Still needs some work on finding out the correct way to let pselect work with signals */ if(return_code == -1) { if(errno != EINTR) { /** * From the man page, what we can expect is EBADF (bug) EINVAL (bug) or ENOMEM (critical) * So I we can kill and notify. */ log_quit("pselect returned a critical error: %r", ERRNO_ERROR); } /* * Instead of looping again (continue) * * so ... * * let's proceed to the scheduler processing. */ } /* return_code == 0 => no fd set at all and no error => timeout */ server_run_loop_timeout_countdown--; server_statistics.input_timeout_count++; } #if HAS_RRL_SUPPORT rrl_cull(); #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT zdb_zone_lock_set_monitor(); #endif /* handles statistics logging */ if(log_statistics_enabled) { u32 tick = dnscore_timer_get_tick(); if((tick - previous_tick) >= g_config->statistics_max_period) { u64 now = timems(); u64 delta = now - server_run_loop_rate_tick; if(delta > 0) { /* log_info specifically targeted to the g_statistics_logger handle */ server_statistics.loop_rate_elapsed = delta; memcpy(&server_statistics_sum, &server_statistics, sizeof(server_statistics_t)); for(u32 i = 0; i < synced_threads.thread_count; i++) { server_statistics_t *stats = &synced_threads.threads[i].statistics; server_statistics_sum.input_loop_count += stats->input_loop_count; /* server_statistics_sum.input_timeout_count += stats->input_timeout_count; */ server_statistics_sum.udp_output_size_total += stats->udp_output_size_total; server_statistics_sum.udp_referrals_count += stats->udp_referrals_count; server_statistics_sum.udp_input_count += stats->udp_input_count; server_statistics_sum.udp_dropped_count += stats->udp_dropped_count; server_statistics_sum.udp_queries_count += stats->udp_queries_count; server_statistics_sum.udp_notify_input_count += stats->udp_notify_input_count; server_statistics_sum.udp_updates_count += stats->udp_updates_count; server_statistics_sum.udp_undefined_count += stats->udp_undefined_count; #if HAS_RRL_SUPPORT server_statistics_sum.rrl_slip += stats->rrl_slip; server_statistics_sum.rrl_drop += stats->rrl_drop; #endif for(u32 j = 0; j < SERVER_STATISTICS_ERROR_CODES_COUNT; j++) { server_statistics_sum.udp_fp[j] += stats->udp_fp[j]; } } log_statistics(&server_statistics_sum); server_run_loop_rate_tick = now; server_run_loop_timeout_countdown = g_config->statistics_max_period; server_statistics.loop_rate_counter = 0; #ifdef DEBUG #if HAS_ZALLOC_STATISTICS_SUPPORT zalloc_print_stats(termout); #endif #if DNSCORE_HAS_MALLOC_DEBUG_SUPPORT debug_stat(FALSE); // do NOT enable the dump #endif journal_log_status(); debug_bench_logdump_all(); #endif } previous_tick = tick; } } } log_info("stopping the threads"); synced_stop(); /* * Close all zone alarm handles * Close database alarm handle */ log_info("shutting down"); synced_finalize(); thread_pool_destroy(server_udp_thread_pool); server_udp_thread_pool = NULL; /** * @todo READ THIS * * At this point, there one or more background readers could still be working. * Destroying the database at this time (they do not expect a writer) will crash them. * So either we don't destroy the database (required to ensure there has been no corruption nor leaks) * Either we wait for them to finish (but signing 3M records takes time) * Either ... * * BTW: the odd "non-reproducible" crash I've got on Yadifa is this ending race happening. * */ log_debug("shutting down (pid = %u)", getpid()); return SUCCESS; } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/acl.h0000644000077100007710000000012412650131756017606 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.965344 30 ctime=1454597653.145344534 yadifa-2.1.6-5826/sbin/yadifad/acl.h0000664000077100007710000002120312650131756017411 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup acl Access Control List * @ingroup yadifad * @brief * * @{ */ #ifndef _ACL_H #define _ACL_H #include #include #include #include #ifdef __cplusplus extern "C" { #endif #define ACL_ERROR_BASE 0x80060000 #define ACL_ERROR_CODE(code_) ((s32)(ACL_ERROR_BASE+(code_))) #define ACL_TOKEN_SIZE_ERROR ACL_ERROR_CODE(1) #define ACL_UNEXPECTED_NEGATION ACL_ERROR_CODE(2) #define ACL_WRONG_V4_MASK ACL_ERROR_CODE(3) #define ACL_WRONG_V6_MASK ACL_ERROR_CODE(4) #define ACL_WRONG_MASK ACL_ERROR_CODE(5) #define ACL_DUPLICATE_ENTRY ACL_ERROR_CODE(6) #define ACL_RESERVED_KEYWORD ACL_ERROR_CODE(7) #define ACL_TOO_MUCH_TOKENS ACL_ERROR_CODE(8) #define ACL_UNDEFINED_TOKEN ACL_ERROR_CODE(9) #define ACL_UPDATE_REJECTED ACL_ERROR_CODE(104) #define ACL_NOTIFY_REJECTED ACL_ERROR_CODE(105) #define ACL_NAME_PARSE_ERROR ACL_ERROR_CODE(201) #define ACL_UNKNOWN_TSIG_KEY ACL_ERROR_CODE(202) /* acl can be identified by * ipv4 (accept/reject) * ipv6 (accept/reject) * TSIG (accept only) * => 3 distinct entry points * Tests will be done first on IP (if any, and by version) then on TSIG (if any) * */ typedef struct ipv4_id ipv4_id; struct ipv4_id { addressv4 address; addressv4 mask; s8 maskbits; // needs to be signed s8 rejects; }; typedef struct ipv6_id ipv6_id; struct ipv6_id { addressv6 address; addressv6 mask; s16 maskbits; // needs to be signed s8 rejects; }; #define TSIG_SECRET_MAX_SIZE 32 typedef struct tsig_id tsig_id; struct tsig_id { u8 secret_size; u8 name_size; u8 mac_algorithm; u8 reserved; u8 *known; u8 *name; }; typedef struct ref_id ref_id; struct ref_id { const char* name; bool mark; }; /* * I've chosen these values to avoid some tests * * Basically, there are 2 tests for ACL: IP & TSIG * * First IP, then, if available in the message, TSIG * * IP will trigger a return in case of reject, but else will worth 0 or -2 * Then TSIG, if available, will worth -2,0,+2 * What we want is: * IAIAIA * RRIIAA * => RRRAAA * * With these values we can simply sum instead of doing tests * 0 +2 0 +2 0 +2 * + -4 -4 0 0 +2 +2 * = -4 -2 0 +2 +2 +4 * then remove 1 * = -3 -1 -1 +1 +1 +3 * => R R R A A A * */ #define AMIM_ACCEPT 2 #define AMIM_SKIP 0 #define AMIM_REJECT -4 // Reject has much more weight, and in theory -2 should be enough ( 1 IPV4/6, 1 TSIG ) #define ACL_SORT_RULES 0 #define ACL_MERGE_RULES 0 #define ACL_DEFAULT_RULE AMIM_REJECT #define ACL_REJECTED(__amim_code__) ((__amim_code__) < 0) #define ACL_ACCEPTED(__amim_code__) ((__amim_code__) > 0) #define ACL_IGNORED(__amim_code__) ((__amim_code__) == 0) /** * Returns: * > 0 : Accept: matched and accepted * < 0 : Reject: matched and rejected * = 0 : Skip : not matched */ struct address_match_item; typedef int address_match_item_matcher(const struct address_match_item*, const void* ); typedef struct address_match_item address_match_item; /* Rules like the ones in the ACL named rules set */ struct address_match_item { address_match_item_matcher *match; union { ipv4_id ipv4; ipv6_id ipv6; tsig_id tsig; ref_id ref; } parameters; s32 rc; }; typedef struct address_match_list address_match_list; struct address_match_list { address_match_item **items; address_match_item ** limit; /* Address limit of the items ( p = items; while(p #include #include "database-service.h" #include "notify.h" #if HAS_CTRL #include "ctrl.h" #endif #define MODULE_MSG_HANDLE g_server_logger extern logger_handle *g_server_logger; extern zone_data_set database_zone_desc; void database_load_zone_desc(zone_desc_s *zone_desc) { yassert(zone_desc != NULL); log_debug1("database_load_zone_desc(%{dnsname}@%p=%i)", zone_desc->origin, zone_desc, zone_desc->rc); /* zone_lock(zone_desc, ZONE_LOCK_LOAD_DESC); if(zone_desc->file_name == NULL) { char tmp[PATH_MAX]; snformat(tmp, sizeof(tmp), "dynamic_%{dnsname}.zone", zone_desc->origin); zone_desc->file_name = strdup(tmp); // } zone_unlock(zone_desc, ZONE_LOCK_LOAD_DESC); */ s32 err = zone_register(&database_zone_desc, zone_desc); if(ISOK(err)) { log_info("zone: the zone %{dnsname} has been registered", zone_desc->origin); zone_lock(zone_desc, ZONE_LOCK_LOAD_DESC); zone_desc->status_flags |= ZONE_STATUS_REGISTERED; zone_desc->status_flags &= ~ZONE_STATUS_DROP_AFTER_RELOAD; zone_unlock(zone_desc, ZONE_LOCK_LOAD_DESC); // newly registered zone // used to be message->origin if(database_service_started()) { database_zone_load(zone_desc->origin); // before this I should set the file name #if HAS_MASTER_SUPPORT if(zone_desc->type == ZT_MASTER) { if(!host_address_empty(zone_desc->slaves)) { log_info("zone load desc: notifying slaves for '%{dnsname}'", zone_desc->origin); host_address *slaves = host_address_copy_list(zone_desc->slaves); notify_host_list(zone_desc, slaves, CLASS_CTRL); } } else #endif { } } } else { switch(err) { case DATABASE_ZONE_MISSING_DOMAIN: { log_err("config: zone: ?: no domain set (not loaded)", zone_desc->domain); if(zone_desc->status_flags & ZONE_STATUS_PROCESSING) { log_err("destroying desc@%p being processed by %s", zone_desc, database_service_operation_get_name(zone_desc->last_processor)); } zone_free(zone_desc); break; } case DATABASE_ZONE_MISSING_MASTER: { log_err("config: zone: %{dnsname} has no master setting (not loaded)", zone_desc->origin); if(zone_desc->status_flags & ZONE_STATUS_PROCESSING) { log_err("destroying desc@%p being processed by %s", zone_desc, database_service_operation_get_name(zone_desc->last_processor)); } zone_free(zone_desc); break; } case DATABASE_ZONE_CONFIG_CLONE: // Exact copy { log_debug("config: zone: the zone %{dnsname} has already been set like this", zone_desc->origin); zone_desc_s* current = zone_acquirebydnsname(zone_desc->origin); zone_lock(current, ZONE_LOCK_REPLACE_DESC); current->status_flags &= ~ZONE_STATUS_DROP_AFTER_RELOAD; zone_unlock(current, ZONE_LOCK_REPLACE_DESC); zone_release(current); // whatever has been decided above, loading the zone file (if it changed) should be queued database_zone_load(zone_desc->origin); zone_free(zone_desc); break; } case DATABASE_ZONE_CONFIG_DUP: // Not an exact copy { log_err("config: zone: the zone %{dnsname} has already been set", zone_desc->origin); // basically, most of the changes require a stop, restart of // any task linked to the zone // so let's make this a rule, whatever changed notify_clear(zone_desc->origin); /// @todo signature maintenance clear /// @todo retry clear zone_desc_s *current = zone_acquirebydnsname(zone_desc->origin); #if HAS_DYNAMIC_PROVISIONING host_address *notify_slaves_then_delete = NULL; host_address *notify_slaves = NULL; #endif if(current != zone_desc) { zone_lock(current, ZONE_LOCK_REPLACE_DESC); if(current->status_flags & ZONE_STATUS_PROCESSING) { log_err("overwriting a desc@%p being processed by %s, with %p", current, database_service_operation_get_name(current->last_processor), zone_desc); } // what happens if the change is on : // domain: impossible /// @todo compare before replace // file_name : try to load the new file (will happen anyway) if((current->file_name != NULL) && (zone_desc->file_name != NULL)) { if(strcmp(current->file_name, zone_desc->file_name) != 0) { current->status_flags |= ZONE_STATUS_MODIFIED; } } else if(current->file_name != zone_desc->file_name) // at least one of them is NULL { current->status_flags |= ZONE_STATUS_MODIFIED; } free(current->file_name); current->file_name = zone_desc->file_name; zone_desc->file_name = NULL; // masters : log_debug7("updating %p (%u) with %p (%u): masters", current, current->lock_owner, zone_desc, zone_desc->lock_owner); if(host_address_list_equals(current->masters, zone_desc->masters)) { host_address_delete_list(zone_desc->masters); } else { host_address_delete_list(current->masters); current->masters = zone_desc->masters; } zone_desc->masters = NULL; // notifies : log_debug7("updating %p (%u) with %p (%u): notifies", current, current->lock_owner, zone_desc, zone_desc->lock_owner); if(host_address_list_equals(current->notifies, zone_desc->notifies)) { host_address_delete_list(zone_desc->notifies); } else { host_address_delete_list(current->notifies); current->notifies = zone_desc->notifies; } zone_desc->notifies = NULL; #if HAS_DYNAMIC_PROVISIONING log_debug7("updating %p (%u) with %p (%u): slaves", current, current->lock_owner, zone_desc, zone_desc->lock_owner); if(host_address_list_equals(current->slaves, zone_desc->slaves)) { #if HAS_MASTER_SUPPORT if((current->type == ZT_MASTER) || (zone_desc->type == ZT_MASTER)) { notify_slaves_then_delete = zone_desc->slaves; } else #endif { host_address_delete_list(zone_desc->slaves); } } else { #if HAS_MASTER_SUPPORT if(current->type == ZT_MASTER) { notify_slaves_then_delete = current->slaves; } else { host_address_delete_list(current->slaves); } if(zone_desc->type == ZT_MASTER) { notify_slaves = zone_desc->slaves; } #else host_address_delete_list(current->slaves); #endif current->slaves = zone_desc->slaves; } zone_desc->slaves = NULL; #endif // type : ? log_debug7("updating %p (%u) with %p (%u): type", current, current->lock_owner, zone_desc, zone_desc->lock_owner); current->type = zone_desc->type; #if HAS_ACL_SUPPORT // ac : apply the new one, update the zone access log_debug7("updating %p (%u) with %p (%u): ac@%p with ac@%p", current, current->lock_owner, zone_desc, zone_desc->lock_owner, ¤t->ac, &zone_desc->ac); #ifdef DEBUG log_debug7("old@%p:", current); log_debug7(" notify@%p",current->ac.allow_notify.ipv4.items); log_debug7(" query@%p",current->ac.allow_query.ipv4.items); log_debug7(" transfer@%p",current->ac.allow_transfer.ipv4.items); log_debug7(" update@%p",current->ac.allow_update.ipv4.items); log_debug7("forwarding@%p",current->ac.allow_update_forwarding.ipv4.items); log_debug7(" control@%p",current->ac.allow_control.ipv4.items); log_debug7("new@%p:", zone_desc); log_debug7(" notify@%p",zone_desc->ac.allow_notify.ipv4.items); log_debug7(" query@%p",zone_desc->ac.allow_query.ipv4.items); log_debug7(" transfer@%p",zone_desc->ac.allow_transfer.ipv4.items); log_debug7(" update@%p",zone_desc->ac.allow_update.ipv4.items); log_debug7("forwarding@%p",zone_desc->ac.allow_update_forwarding.ipv4.items); log_debug7(" control@%p",zone_desc->ac.allow_control.ipv4.items); #endif acl_unmerge_access_control(¤t->ac, &g_config->ac); acl_empties_access_control(¤t->ac); memcpy(¤t->ac, &zone_desc->ac, sizeof(access_control)); ZEROMEMORY(&zone_desc->ac, sizeof(access_control)); #endif // notify : reset, restart log_debug7("updating %p (%u) with %p (%u): notify", current, current->lock_owner, zone_desc, zone_desc->lock_owner); memcpy(¤t->notify, &zone_desc->notify, sizeof(zone_notify_s)); #if HAS_RRSIG_MANAGEMENT_SUPPORT // signature : reset, restart log_debug7("updating %p (%u) with %p (%u): signature", current, current->lock_owner, zone_desc, zone_desc->lock_owner); memcpy(¤t->signature, &zone_desc->signature, sizeof(zone_signature_s)); #endif // dnssec_mode : drop everything related to the zone, load the new config log_debug7("updating %p (%u) with %p (%u): dnssec_mode", current, current->lock_owner, zone_desc, zone_desc->lock_owner); current->dnssec_mode = zone_desc->dnssec_mode; // refresh : update the "alarms" log_debug7("updating %p (%u) with %p (%u): refresh", current, current->lock_owner, zone_desc, zone_desc->lock_owner); memcpy(¤t->refresh, &zone_desc->refresh, sizeof(zone_refresh_s)); // dynamic_provisioning : ? log_debug7("updating %p (%u) with %p (%u): dynamic_provisioning", current, current->lock_owner, zone_desc, zone_desc->lock_owner); memcpy(¤t->dynamic_provisioning, &zone_desc->dynamic_provisioning, sizeof(dynamic_provisioning_s)); // slaves : update the list zone_unlock(current, ZONE_LOCK_REPLACE_DESC); } // whatever has been decided above, loading the zone file should be queued database_zone_load(zone_desc->origin); #if HAS_DYNAMIC_PROVISIONING // if asking for a load of the zone_data on a master should trigger a notify of its slaves log_debug7("handling dynamic provisioning"); if(!host_address_empty(notify_slaves_then_delete)) { log_info("zone load desc: notifying slaves for '%{dnsname}': %{hostaddrlist}", zone_desc->origin, notify_slaves_then_delete); notify_host_list(current, notify_slaves_then_delete, CLASS_CTRL); notify_slaves_then_delete = NULL; } if(!host_address_empty(notify_slaves)) { log_info("zone load desc: notifying slaves for '%{dnsname}': %{hostaddrlist}", zone_desc->origin, notify_slaves); host_address *notify_slaves_copy = host_address_copy_list(notify_slaves); notify_host_list(current, notify_slaves_copy, CLASS_CTRL); notify_slaves = NULL; } #endif if(current != zone_desc) { log_debug7("destroying temporary zone descriptor @%p", zone_desc); zone_free(zone_desc); } current->status_flags &= ~ZONE_STATUS_DROP_AFTER_RELOAD; zone_release(current); break; } // DUP } // switch } log_debug1("database_load_zone_desc(%p) done", zone_desc); } /** * @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-freeze.c0000644000077100007710000000012412650131756024473 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.071344 30 ctime=1454597653.238344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-freeze.c0000664000077100007710000001102412650131756024276 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup database Routines for database manipulations * @ingroup yadifad * @brief database functions * * Implementation of routines for the database * - add zone file(s) * - clear zone file(s) * - print zone files(s) * - load db * - unload db * - lookup database result of a message * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include "config.h" #include #include #include "zone.h" #include "server.h" #define MODULE_MSG_HANDLE g_server_logger #define DBLOADQ_TAG 0x5144414f4c4244 /**********************************************************************************************************************/ void database_service_zone_freeze(zone_desc_s *zone_desc) { ya_result return_value; #ifdef DEBUG log_debug("database_service_zone_freeze(%{dnsname}@%p=%i)", zone_desc->origin, zone_desc, zone_desc->rc); #endif if(zone_desc == NULL) { log_err("zone freeze: NULL zone"); return; } log_debug1("database_service_zone_freeze: locking zone '%{dnsname}' for freezing", zone_desc->origin); if(FAIL(return_value = zone_lock(zone_desc, ZONE_LOCK_FREEZE))) { log_err("database_service_zone_freeze: failed to lock zone settings for '%{dnsname}'", zone_desc->origin); return; } zdb_zone *zone = zone_get_loaded_zone(zone_desc); // ACQUIRES if(zone == NULL) { log_err("zone freeze: no zone loaded for '%{dnsname}'", zone_desc->origin); zone_desc->status_flags &= ~ZONE_STATUS_PROCESSING; log_debug1("database_service_zone_freeze: unlocking zone '%{dnsname}' for freezing", zone_desc->origin); zone_unlock(zone_desc, ZONE_LOCK_FREEZE); return; } // This REALLY is the simple reader lock. This operation does not interfere // with readers, only with writers. There is no point preventing queries // in the database while setting the zone read-only. zdb_zone_lock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); if((zone->apex->flags & ZDB_RR_APEX_LABEL_FROZEN) != 0) { log_warn("zone freeze: %{dnsname} already frozen", zone->origin); } zone->apex->flags |= ZDB_RR_APEX_LABEL_FROZEN; zdb_zone_release_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); log_info("zone freeze: %{dnsname}", zone_desc->origin); zone_desc->status_flags |= ZONE_STATUS_FROZEN; zone_desc->status_flags &= ~ZONE_STATUS_PROCESSING; log_debug1("database_service_zone_freeze: unlocking zone '%{dnsname}' for freezing", zone_desc->origin); zone_unlock(zone_desc, ZONE_LOCK_FREEZE); } /** * @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-unload.c0000644000077100007710000000012412650131756024475 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.012344 30 ctime=1454597653.256344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-unload.c0000664000077100007710000001450012650131756024302 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup database Routines for database manipulations * @ingroup yadifad * @brief database functions * * Implementation of routines for the database * - add zone file(s) * - clear zone file(s) * - print zone files(s) * - load db * - unload db * - lookup database result of a message * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include "config.h" #include #include #include "database-service.h" #define MODULE_MSG_HANDLE g_server_logger #define DBLOADQ_TAG 0x5144414f4c4244 /**********************************************************************************************************************/ struct database_service_zone_unload_parms_s { zone_desc_s *zone_desc; zdb_zone *zone; }; typedef struct database_service_zone_unload_parms_s database_service_zone_unload_parms_s; static void* database_service_zone_unload_thread(void *parms) { database_service_zone_unload_parms_s *database_service_zone_unload_parms = (database_service_zone_unload_parms_s*)parms; zdb_zone *zone = database_service_zone_unload_parms->zone; u8 origin[MAX_DOMAIN_LENGTH]; if(zone->origin != NULL) { dnsname_copy(origin, zone->origin); } else { memcpy(origin, "\004NULL", 6); } log_debug("database-service: %{dnsname}: releasing old instance of zone", origin); log_debug7("database-service: %{dnsname}: rc=%i", origin, zone->rc); zdb_zone_release(zone); zone = NULL; zdb_zone_garbage_run(); zone_release(database_service_zone_unload_parms->zone_desc); free(database_service_zone_unload_parms); return NULL; } /** * Replace a zone by another * The replaced zone will be destroyed as soon as it is not referenced yet * @param zone_desc * @param zone the zone to unload, note that it has been acquired for the call and must be released */ void database_service_zone_unload(zone_desc_s *zone_desc, zdb_zone *zone) { log_debug("database_service_zone_unload(%{dnsname}@%p=%i,%{dnsname})", zone_desc->origin, zone_desc, zone_desc->rc, (zone != NULL)?zone->origin:(const u8*)"\004NULL"); zdb_zone *work_zone = NULL; if(zone != NULL) { work_zone = zone; // zone will be released by the thread zone_lock(zone_desc, ZONE_LOCK_UNLOAD); if(zone == zone_desc->loaded_zone) // UNLOAD { log_warn("database_service_zone_unload: forced unload of %p = loaded_zone", zone); log_debug7("database_service_zone_unload: %{dnsname}@%p: loaded_zone@%p (was %p)", zone_desc->origin, zone_desc, NULL, zone_desc->loaded_zone); // UNLOAD zdb_zone_release(zone_desc->loaded_zone); zone_desc->loaded_zone = NULL; // UNLOAD } // else the zone in the descriptor has changed : don't touch it zone_unlock(zone_desc, ZONE_LOCK_UNLOAD); } else { zone_lock(zone_desc, ZONE_LOCK_UNLOAD); work_zone = zone_desc->loaded_zone; // UNLOAD log_debug7("database_service_zone_unload: %{dnsname}@%p: loaded_zone@%p (was %p)", zone_desc->origin, zone_desc, NULL, zone_desc->loaded_zone); // UNLOAD if(zone_desc->loaded_zone != NULL) { // the zone we are about to unload will be released by the thread //zdb_zone_release(zone_desc->loaded_zone); zone_desc->loaded_zone = NULL; // UNLOAD } zone_unlock(zone_desc, ZONE_LOCK_UNLOAD); } if(work_zone != NULL) { database_service_zone_unload_parms_s *parm; MALLOC_OR_DIE(database_service_zone_unload_parms_s*, parm, sizeof(database_service_zone_unload_parms_s), GENERIC_TAG); parm->zone_desc = zone_desc; parm->zone = work_zone; zone_acquire(zone_desc); database_service_zone_unload_queue_thread(database_service_zone_unload_thread, parm, NULL, "database_service_zone_unload_thread"); } else { log_debug7("database_service_zone_unload: %{dnsname}@%p: nothing to unload", zone_desc->origin, zone_desc); } zone_lock(zone_desc, ZONE_LOCK_UNLOAD); zone_desc->status_flags &= ~ZONE_STATUS_PROCESSING; zone_unlock(zone_desc, ZONE_LOCK_UNLOAD); } /** * @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/axfr.h0000644000077100007710000000012412650131756020007 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.028344 30 ctime=1454597653.021344534 yadifa-2.1.6-5826/sbin/yadifad/axfr.h0000664000077100007710000000475712650131756017631 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #ifndef _AXFR_H #define _AXFR_H #include #include /** * * Handle an AXFR query from a slave. * * If we don't do this many slaves could call with a small interval asking a just-dynupdated snapshot. * If we do it the slaves will be only a few steps behind and the next notification/ixfr will bring them up to date. * */ ya_result axfr_process(message_data *mesg); /** * * Send an AXFR query to a master and handle the answer (loads the zone) * */ ya_result axfr_query(const host_address *servers, const u8 *origin, u32* out_loaded_serial); #endif /* _AXFR_H */ /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service.h0000644000077100007710000000012412650131756022251 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.973344 30 ctime=1454597653.069344534 yadifa-2.1.6-5826/sbin/yadifad/database-service.h0000664000077100007710000003302012650131756022054 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #pragma once #include #include #include #include "server.h" #include "config_error.h" #include "zone.h" #define DATABASE_SERVICE_STOP 0 #define DATABASE_SERVICE_ZONE_DESC_LOAD 1 #define DATABASE_SERVICE_ZONE_DESC_UNLOAD 2 // #define DATABASE_SERVICE_ZONE_DESC_PROCESS 4 // not used // #define DATABASE_SERVICE_ORIGIN_PROCESS 5 // not used #define DATABASE_SERVICE_ZONE_LOAD 6 #define DATABASE_SERVICE_ZONE_MOUNT 7 #define DATABASE_SERVICE_ZONE_UNMOUNT 8 #define DATABASE_SERVICE_ZONE_UNLOAD 9 #define DATABASE_SERVICE_ZONE_SAVE_TEXT 10 #define DATABASE_SERVICE_QUERY_AXFR 11 #define DATABASE_SERVICE_QUERY_IXFR 12 #define DATABASE_SERVICE_SET_DROP_AFTER_RELOAD 13 #define DATABASE_SERVICE_DO_DROP_AFTER_RELOAD 14 #define DATABASE_SERVICE_ZONE_MOUNTED_EVENT 15 #define DATABASE_SERVICE_ZONE_LOADED_EVENT 16 #define DATABASE_SERVICE_ZONE_UNLOADED_EVENT 17 #define DATABASE_SERVICE_ZONE_UNMOUNTED_EVENT 18 #define DATABASE_SERVICE_ZONE_DOWNLOADED_EVENT 19 #define DATABASE_SERVICE_RECONFIGURE_BEGIN 20 #define DATABASE_SERVICE_RECONFIGURE_END 21 #define DATABASE_SERVICE_UPDATE_ZONE_SIGNATURES 22 #define DATABASE_SERVICE_ZONE_FREEZE 23 #define DATABASE_SERVICE_ZONE_UNFREEZE 24 // #define DATABASE_SERVICE_OPERATION_COUNT 25 struct database_message_stop_s { u8 type; }; /// @note HAS_DYNAMIC_PROVISIONING struct database_message_zone_desc_load_s { u8 type; zone_desc_s *zone_desc; }; struct database_message_zone_desc_unload_s { u8 type; }; struct database_message_zone_desc_destroy_s { u8 type; zone_desc_s *zone_desc; }; struct database_message_zone_desc_process_s { u8 type; zone_desc_s *zone_desc; }; struct database_message_origin_process_s { u8 type; zone_desc_s *zone_desc; }; struct database_message_zone_load_s { u8 type; }; struct database_message_zone_save_s { u8 type; bool clear; }; struct database_message_zone_unload_s { u8 type; zdb_zone *zone; // to be destroyed }; struct database_message_zone_update_signatures_s { u8 type; zone_desc_s *expected_zone_desc; zdb_zone *expected_zone; // to be destroyed }; struct database_message_zone_loaded_event_s { u8 type; ya_result result_code; // yes, I meant to put this 32 bits field before the pointers ... zone_desc_s *zone_desc; zdb_zone *zone; // to be mounted }; struct database_message_zone_mounted_event_s { u8 type; ya_result result_code; // yes, I meant to put this 32 bits field before the pointers ... zone_desc_s *zone_desc; zdb_zone *zone; // mounted }; struct database_message_zone_unloaded_event_s { u8 type; ya_result result_code; // yes, I meant to put this 32 bits field before the pointers ... zone_desc_s *zone_desc; zdb_zone *zone; // to be unloaded }; struct database_message_zone_unmounted_event_s { u8 type; ya_result result_code; // yes, I meant to put this 32 bits field before the pointers ... zone_desc_s *zone_desc; // }; struct database_message_zone_downloaded_event_s { u8 type; u16 download_type; // yes, I meant to put this 32 bits field before the 32 bits ones ... u32 serial; ya_result result_code; }; /// typedef struct database_message database_message; struct database_message { u8 *origin; union { u8 type; struct database_message_stop_s stop; /// @note HAS_DYNAMIC_PROVISIONING struct database_message_zone_desc_load_s zone_desc_load; struct database_message_zone_desc_unload_s zone_desc_unload; struct database_message_zone_desc_destroy_s zone_desc_destroy; struct database_message_zone_desc_process_s zone_desc_process; struct database_message_origin_process_s origin_process; struct database_message_zone_load_s zone_load; struct database_message_zone_save_s zone_save; struct database_message_zone_unload_s zone_unload; struct database_message_zone_update_signatures_s zone_update_signatures; /// struct database_message_zone_loaded_event_s zone_loaded_event; struct database_message_zone_mounted_event_s zone_mounted_event; struct database_message_zone_unloaded_event_s zone_unloaded_event; struct database_message_zone_unmounted_event_s zone_unmounted_event; struct database_message_zone_downloaded_event_s zone_downloaded_event; } payload; }; bool database_service_started(); ya_result database_service_init(); ya_result database_service_start(); ya_result database_service_stop(); ya_result database_service_finalise(); void database_load_all_zones(); /** * Loads then mounts a zone in the database. * This is using the registered zone settings (zone_desc_s) to do so. * The task is done in the background. */ void database_zone_load(const u8 *origin); /** * Unloads a zone from memory. If the zone is mounted it will be first be unmounted. * The task is done in the background. */ void database_zone_unload(zdb_zone *zone); void database_zone_freeze(const u8 *origin); void database_zone_unfreeze(const u8 *origin); /** * Enqueues the storage of a zone * * @param origin */ void database_zone_save(const u8 *origin); /** * Enqueues the storage of a zone, optionally clearing its journal * * @param origin */ void database_zone_save_ex(const u8 *origin, bool clear_journal); /** * Saves a zone in the current thread using the provided locks (0 meaning: do not try to lock) * Not locking puts the responsibility of the lock to the caller as having this code running * without any lock whatsoever on the descriptor/zone will give undefined results, a.k.a : crash. * * @param zone_desc * @param desclockowner * @param zonelockowner * @param save_unmodified * @return */ ya_result database_service_zone_save_ex(zone_desc_s *zone_desc, u8 desclockowner, u8 zonelockowner, bool save_unmodified); /// @note HAS_DYNAMIC_PROVISIONING /** * * Loads or updates the zone settings. * * If the service is running, * the task is done in the background, * else * the zone is registered. * Note that direct registration is only meant to be used at program startup. * * @param zone_desc */ void database_zone_desc_load(zone_desc_s *zone_desc); /** * Unloads the zone settings. * The zone will be unmounted and unloaded first. * The task is done in the background. * * @param origin */ void database_zone_desc_unload(const u8 *origin); /** * Returns true if the zone with the origin is mounted * * @param origin * @return */ bool database_zone_desc_is_mounted(const u8* origin); /** * * Does an AXFR query for the origin. * If a new zone is downloaded, its loading is queued. * * @param origin */ void database_zone_axfr_query(const u8 *origin); /** * Does an IXFR query for the origin. * If changes are downloaded, they are loaded into the zone. * * @param origin */ void database_zone_ixfr_query(const u8 *origin); /** * Creates an empty zone setting for the given origin. * * @param origin * @return */ ya_result database_zone_create(const u8 *origin); /** * Updates the file path of a zone setting * * @param origin * @param file_path * @return */ ya_result database_zone_set_file(const u8 *origin, const char *file_path); /** * * Updates the zone type of a zone setting * * @param origin * @param master_slave_etc * @return */ ya_result database_zone_set_type(const u8 *origin, u8 master_slave_etc); /** * Commits the changes to a zone setting. * * @param origin * @return */ ya_result database_zone_apply(const u8* origin); void database_set_drop_after_reload(); void database_do_drop_after_reload(); void database_zone_reconfigure_begin(); void database_zone_reconfigure_end(); bool database_zone_is_reconfigure_enabled(); /** * Queues a function in the thread pool for loading zones * * @param func * @param parm * @param counter * @param categoryname */ void database_service_zone_load_queue_thread(thread_pool_function func, void *parm, thread_pool_task_counter *counter, const char* categoryname); /** * Queues a function in the thread pool for saving zones * * @param func * @param parm * @param counter * @param categoryname */ void database_service_zone_save_queue_thread(thread_pool_function func, void *parm, thread_pool_task_counter *counter, const char* categoryname); /** * Queues a function in the thread pool for unloading zones * * @param func * @param parm * @param counter * @param categoryname */ void database_service_zone_unload_queue_thread(thread_pool_function func, void *parm, thread_pool_task_counter *counter, const char* categoryname); /** * Queues a function in the thread pool for downloading zones * * @param func * @param parm * @param counter * @param categoryname */ void database_service_zone_download_queue_thread(thread_pool_function func, void *parm, thread_pool_task_counter *counter, const char* categoryname); void database_service_zone_resignature_queue_thread(thread_pool_function func, void *parm, thread_pool_task_counter *counter, const char* categoryname); /** * Tells the database service that a zone has been loaded or failed to load. * Meant to be used internally. * * @param zone_desc the descriptor * @param zone the zone structure that contains the zone (may be NULL) * @param result_code the error code */ void database_fire_zone_loaded(zone_desc_s *zone_desc, zdb_zone *zone, ya_result result_code); /** * Tells the database service that a zone has been mounted or failed to mount. * Meant to be used internally. * * @param zone_desc the descriptor * @param zone the zone structure that contains the zone (may be NULL) * @param result_code the error code */ void database_fire_zone_mounted(zone_desc_s *zone_desc, zdb_zone *zone, ya_result result_code); /** * Tells the database service that a zone has been unloaded. * Although there is a result code, it most likely cannot fail with the current implementation. * Meant to be used internally. * * @param zone a zone to mount in its place * @param result_code */ void database_fire_zone_unloaded(zdb_zone *zone, ya_result result_code); /** * Tells the database service that a zone has been unloaded. * Although there is a result code, it most likely cannot fail with the current implementation. * Meant to be used internally. * * @param zone_desc * @param result_code */ void database_fire_zone_unmounted(zone_desc_s *zone_desc, ya_result result_code); /** * Tells the database service that a zone has been downloaded. * Meant to be used internally. * * @param origin * @param qtype AXFR/IXFR * @param serial the last serial of the zone * @param result_code */ void database_fire_zone_downloaded(const u8 *origin, u16 qtype, u32 serial, ya_result result_code); /** * Return the name of a command id. Used for debugging/logging. * * @param id * @return */ const char *database_service_operation_get_name(u32 id); /** * Triggers a re-signature, should only be used by database-service-zone-resignature * * @param origin * @param expected_zone_desc * @param expected_zone */ void database_zone_update_signatures(const u8 *origin, zone_desc_s *expected_zone_desc, zdb_zone *expected_zone); /** * * Creates an empty, invalid zone for every single registered zone descriptor (config) * */ void database_service_create_invalid_zones(); bool database_service_is_running(); void database_service_run_garbage_collector(); /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/config.h0000644000077100007710000000012412650131756020314 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.932344 30 ctime=1454597653.024344534 yadifa-2.1.6-5826/sbin/yadifad/config.h0000664000077100007710000000420712650131756020124 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup config Configuration handling * @ingroup yadifad * @brief * * * * @{ */ #ifndef __CONFIG_H__ /* * Including these two "configuration roots" of the libraries allows to control and prevent "PACKAGE" collision */ #include #include #include "server-config.h" #endif /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/log_statistics.h0000644000077100007710000000012412650131756022102 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.955344 30 ctime=1454597653.083344534 yadifa-2.1.6-5826/sbin/yadifad/log_statistics.h0000664000077100007710000000476212650131756021720 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logging Server logging * @ingroup yadifad * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _LOG_STATISTICS_H #define _LOG_STATISTICS_H /******************************************************************************************************************* * * Statistics logging * ******************************************************************************************************************/ #include "server.h" #ifndef LOG_STATISTICS_C_ extern logger_handle* g_statistics_logger; #endif void log_statistics_legend(); void log_statistics(server_statistics_t *server_statistics); #endif /* _LOG_STATISTICS_H */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/ixfr.h0000644000077100007710000000012412650131756020017 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.055344 30 ctime=1454597653.076344534 yadifa-2.1.6-5826/sbin/yadifad/ixfr.h0000664000077100007710000000560012650131756017625 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #ifndef _IXFR_H #define _IXFR_H #include #include #include "database.h" #ifdef __cplusplus extern "C" { #endif ya_result ixfr_process(message_data *mesg); /** * * Send an IXFR query to a master and handle the answer (loads the zone). * * @TODO: Set the IXFR storage path */ ya_result ixfr_query(const host_address *servers, zdb_zone *zone, u32 *output_loaded_serial); /** * Connects to the server and sends an IXFR query with the given parameters. * In case of success the input and output streams are tcp streams to the server, ready to read the answer * In case of error the streams are undefined * * @param servers * @param origin * @param ttl * @param rdata * @param rdata_size * @param is * @param os * @return */ ya_result ixfr_start_query(const host_address *servers, const u8 *origin, u32 ttl, const u8 *rdata, u16 rdata_size, input_stream *is, output_stream *os, message_data *ixfr_queryp); #ifdef __cplusplus } #endif #endif /* _IXFR_H */ /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-load.c0000644000077100007710000000012412650131756024132 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.010344 30 ctime=1454597653.242344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-load.c0000664000077100007710000015616112650131756023751 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup database Routines for database manipulations * @ingroup yadifad * @brief database functions * * Implementation of routines for the database * - add zone file(s) * - clear zone file(s) * - print zone files(s) * - load db * - unload db * - lookup database result of a message * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #define ZDB_JOURNAL_CODE 1 #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include "database-service.h" #include "ixfr.h" #include "zone-source.h" #if HAS_CTRL #include "ctrl.h" #endif #define MODULE_MSG_HANDLE g_server_logger #define DBLOADQ_TAG 0x5144414f4c4244 /**********************************************************************************************************************/ typedef ya_result database_zone_load_loader(zdb *db, zone_desc_s *zone_desc, zdb_zone **zone); struct database_service_zone_load_parms_s { zdb *db; zone_desc_s *zone_desc; database_zone_load_loader *loader; }; typedef struct database_service_zone_load_parms_s database_service_zone_load_parms_s; static database_service_zone_load_parms_s* database_zone_load_parms_alloc(zdb *db, zone_desc_s *zone_desc, database_zone_load_loader *loader) { database_service_zone_load_parms_s *parm; ZALLOC_OR_DIE(database_service_zone_load_parms_s*, parm, database_service_zone_load_parms_s, GENERIC_TAG); parm->db = db; parm->zone_desc = zone_desc; parm->loader = loader; return parm; } void database_zone_load_parms_free(database_service_zone_load_parms_s *parm) { #ifdef DEBUG memset(parm, 0xff, sizeof(database_service_zone_load_parms_s)); #endif ZFREE(parm, database_service_zone_load_parms_s); } #if HAS_MASTER_SUPPORT /** * Loads a MASTER zone file from disc into memory. * Returns a pointer to the zone structure. * The zone still has to be "mounted" in the database * * @param db a pointer to the database * @param zone_desc the zone configuration * @param zone pointer to a zone pointer that will hold the loaded zone structure * @return */ static ya_result database_load_zone_master(zdb *db, zone_desc_s *zone_desc, zdb_zone **zone) // returns with RC++ { #ifdef DEBUG log_debug("database_load_zone_master(%p,%p,%p)", db, zone_desc, zone); #endif s64 zone_load_begin = (s64)timeus(); zone_lock(zone_desc, ZONE_LOCK_LOAD); if(zone_desc->type != ZT_MASTER) { zone_unlock(zone_desc, ZONE_LOCK_LOAD); log_err("zone load: tried to load a non-master zone as a master"); return ZONE_LOAD_MASTER_TYPE_EXPECTED; } if(zone_desc->file_name == NULL) { zone_unlock(zone_desc, ZONE_LOCK_LOAD); log_err("zone load: no file defined for master zone section (not loaded)"); return ZONE_LOAD_MASTER_ZONE_FILE_UNDEFINED; } if(zone == NULL) { zone_unlock(zone_desc, ZONE_LOCK_LOAD); log_err("zone load: invalid use"); return ERROR; } zone_reader zr; zdb_zone *zone_pointer_out; ya_result return_value; u32 zone_file_soa_serial; u32 zone_desc_dnssec_mode; bool is_drop_before_load; bool zr_opened = FALSE; bool zone_file_soa_serial_set = FALSE; u8 zone_desc_origin[MAX_DOMAIN_LENGTH]; char file_name[PATH_MAX]; char zone_desc_file_name[PATH_MAX]; zone_desc_dnssec_mode = zone_desc->dnssec_mode; is_drop_before_load = zone_is_drop_before_load(zone_desc); dnsname_copy(zone_desc_origin, zone_desc->origin); strncpy(zone_desc_file_name, zone_desc-> file_name, sizeof(zone_desc_file_name)); zone_unlock(zone_desc, ZONE_LOCK_LOAD); /* * _ Open the zone file/source * _ Load the zone * (do the NSEC/NSEC3 pre-processing) * _ Close the zone file/source * _ Apply the ACLs * _ Schedule an NSEC/NSEC3 verify/update. (Here ?) */ /* Avoid cpy & cat : overrun potential */ snformat(file_name, sizeof(file_name), "%s%s", g_config->data_path, zone_desc->file_name); // get the serial number from the file to avoid useless work *zone = zdb_acquire_zone_read_from_fqdn(db, zone_desc_origin); // ACQUIRES if(*zone != NULL) { if(!zdb_zone_isinvalid(*zone)) { log_info("zone load: preparing to load '%s'", file_name); // first, get the serial of the zone file if(ISOK(return_value = zone_file_reader_open(file_name, &zr))) { resource_record rr; zone_file_reader_set_origin(&zr, zone_desc_origin); zr_opened = TRUE; resource_record_init(&rr); if(ISOK(return_value = zone_reader_read_record(&zr, &rr))) { if(dnsname_equals(zone_desc_origin, rr.name)) { if(rr.type == TYPE_SOA) { return_value = rr_soa_get_serial(zone_reader_rdata(rr), zone_reader_rdata_size(rr), &zone_file_soa_serial); if(ISOK(return_value)) { zone_file_soa_serial_set = TRUE; log_debug("zone load: '%s' serial from file is %u", zone_desc->domain, zone_file_soa_serial); } zone_reader_unread_record(&zr, &rr); // no need to open the file/stream again } else { return_value = ZDB_READER_FIRST_RECORD_NOT_SOA; } } else { return_value = ZDB_READER_ANOTHER_DOMAIN_WAS_EXPECTED; } resource_record_freecontent(&rr); /// @todo get rid of the os_rdata } } if(FAIL(return_value)) // if return_value is NOT an error, zone_file_soa_serial is set { zdb_zone_release(*zone); // undo zdb_acquire_zone_read_from_fqdn *zone = NULL; if(zr_opened) { zone_reader_close(&zr); } s64 zone_load_end = (s64)timeus(); double load_time = zone_load_end - zone_load_begin; load_time /= 1000000.; log_err("zone load: cannot read master zone file '%s': %r (%9.6fs)", file_name, return_value, load_time); return return_value; } // at this point the zone reader is opened and zone_file_soa_serial is set // from here, zone_file_soa_serial can only be set u32 zone_serial = ~0; zdb_zone_lock(*zone, ZDB_ZONE_MUTEX_LOAD); if(!zdb_zone_isinvalid(*zone)) { return_value = zdb_zone_getserial(*zone, &zone_serial); zdb_zone_unlock(*zone, ZDB_ZONE_MUTEX_LOAD); if(ISOK(return_value)) { if(serial_ge(zone_serial, zone_file_soa_serial)) /// @note cppcheck false positive on zone_file_soa_serial { zone_reader_close(&zr); s64 zone_load_end = (s64)timeus(); double load_time = zone_load_end - zone_load_begin; load_time /= 1000000.; log_info("zone load: serial of loaded zone %{dnsname} >= serial from file '%s' (%u >= %u): no need to load (%9.6fs)", zone_desc_origin, file_name, zone_serial, zone_file_soa_serial, load_time); return SUCCESS; } } else { log_err("zone load: unable to retrieve the serial of the loaded zone: %r", return_value); } zdb_zone_release(*zone); *zone = NULL; } else { zdb_zone_release_unlock(*zone, ZDB_ZONE_MUTEX_LOAD); log_debug1("zone load: instance of the zone in the database is invalid: %r", return_value); } *zone = NULL; // from this point *zone cannot be read // at this point, the file is about to be loaded. It is the right time to test the drop-before-load flag if(is_drop_before_load) { // the zone is loaded and is valid, we need to drop it // so we unmount it (replacing it by the dummy) // then we ask for loading it again zone_lock(zone_desc, ZONE_LOCK_LOAD); zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_UNMOUNT, NULL, TRUE); zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_LOAD, NULL, TRUE); zone_unlock(zone_desc, ZONE_LOCK_LOAD); zone_reader_close(&zr); s64 zone_load_end = (s64)timeus(); double load_time = zone_load_end - zone_load_begin; load_time /= 1000000.; log_info("zone load: '%s' load requires the zone to be dropped first (%9.6fs)", zone_desc->domain, load_time); return SUCCESS; } } else // zone in db is the invalid placeholder, simply open the file { log_debug1("zone load: '%s' zone@%p in the database is a placeholder", zone_desc->domain, *zone); zdb_zone_release(*zone); *zone = NULL; if(FAIL(return_value = zone_file_reader_open(file_name, &zr))) { s64 zone_load_end = (s64)timeus(); double load_time = zone_load_end - zone_load_begin; load_time /= 1000000.; log_err("zone load: '%s' could not open file '%s': %r (%9.6fs)", zone_desc->domain, file_name, return_value, load_time); return return_value; } } } else { // *zone == NULL, simply open the file if(FAIL(return_value = zone_file_reader_open(file_name, &zr))) { s64 zone_load_end = (s64)timeus(); double load_time = zone_load_end - zone_load_begin; load_time /= 1000000.; log_err("zone load: '%s' could not open file '%s': %r (%9.6fs)", zone_desc->domain, file_name, return_value, load_time); return return_value; } } log_info("zone load: loading '%s'", file_name); /// @note edf: DO NOT USE the flag "MOUNT ON LOAD" HERE zone_file_reader_set_origin(&zr, zone_desc_origin); // the journal MUST be closed, else we way have a situation where // the journal is linked to another instance of the zone if(zone_desc->loaded_zone != NULL) { if(zone_desc->loaded_zone->journal != NULL) { journal_close(zone_desc->loaded_zone->journal); } } return_value = zdb_zone_load(db, &zr, &zone_pointer_out, zone_desc_origin, ZDB_ZONE_REPLAY_JOURNAL|(zone_desc_dnssec_mode << ZDB_ZONE_DNSSEC_SHIFT)); zone_reader_close(&zr); /* If the zone load failed for any reason but "loaded already" ... */ if(!(FAIL(return_value) && (return_value != ZDB_READER_ALREADY_LOADED))) { if(!zone_file_soa_serial_set) { // there is no need to lock, but this is cheap and it silents some error reporting from zdb_zone_getserial zdb_zone_lock(zone_pointer_out, ZDB_ZONE_MUTEX_LOAD); return_value = zdb_zone_getserial(zone_pointer_out, &zone_file_soa_serial); zdb_zone_unlock(zone_pointer_out, ZDB_ZONE_MUTEX_LOAD); if(ISOK(return_value)) { //log_err("zone load: could not get the zone serial from the loaded zone '%s': %r", zone_desc->domain, return_value); zone_file_soa_serial_set = TRUE; log_debug("zone load: '%s' serial from file is %u", zone_desc->domain, zone_file_soa_serial); } else { log_err("zone load: could not get the zone serial from the loaded zone '%s': %r", zone_desc->domain, return_value); zone_file_soa_serial = 0; } } /* * zone_pointer_out must be mounted */ zone_lock(zone_desc, ZONE_LOCK_LOAD); //zdb_zone_getserial(zone_pointer_out, &zone_desc->stored_serial); //zone_desc->status_flags &= ~ZONE_STATUS_MODIFIED; zone_desc->stored_serial = zone_file_soa_serial; #if ZDB_HAS_ACL_SUPPORT /* * Setup the ACL filter function & configuration */ zone_pointer_out->extension = &zone_desc->ac; /* The extension points to the ACL */ zone_pointer_out->query_access_filter = acl_get_query_access_filter(&zone_desc->ac.allow_query); #endif #if HAS_RRSIG_MANAGEMENT_SUPPORT && HAS_DNSSEC_SUPPORT /* * Setup the validity period and the jitter */ zone_pointer_out->sig_validity_regeneration_seconds = zone_desc->signature.sig_validity_regeneration * SIGNATURE_VALIDITY_REGENERATION_S; zone_pointer_out->sig_validity_interval_seconds = zone_desc->signature.sig_validity_interval * SIGNATURE_VALIDITY_INTERVAL_S; zone_pointer_out->sig_validity_jitter_seconds = zone_desc->signature.sig_validity_jitter * SIGNATURE_VALIDITY_JITTER_S; #endif u32 now = time(NULL); zone_desc->refresh.refreshed_time = now; zone_desc->refresh.retried_time = now; // switch back with the invalid (schedule that ST) s64 zone_load_end = (s64)timeus(); double load_time = zone_load_end - zone_load_begin; load_time /= 1000000.; log_info("zone load: '%s' loaded (%9.6fs)", zone_desc->domain, load_time); zone_unlock(zone_desc, ZONE_LOCK_LOAD); *zone = zone_pointer_out; //database_replace_zone(g_config->database, zone_desc, zone_pointer_out); #if defined(DEBUG) && 0 output_stream fos; char tmp_name[PATH_MAX]; snformat(tmp_name, sizeof(tmp_name), "%s.dump.txt", file_name); if(ISOK(file_output_stream_create(tmp_name, 0644, &fos))) { buffer_output_stream_init(&fos, &fos, 4096); zdb_zone_print(zone_pointer_out, &fos); output_stream_close(&fos); } #endif return_value = SUCCESS; } else { s64 zone_load_end = (s64)timeus(); double load_time = zone_load_end - zone_load_begin; load_time /= 1000000.; if(return_value == ZDB_READER_ALREADY_LOADED) { log_info("zone load: '%s' loaded already (%9.6fs)", zone_desc->domain, load_time); } else { log_err("zone load: '%s' not loaded: %r (%9.6fs)", zone_desc->domain, return_value, load_time); } *zone = NULL; } return return_value; } #endif static ya_result database_get_ixfr_answer_type(const u8 *zone_desc_origin, const host_address *zone_desc_masters, u32 ttl, u16 soa_rdata_size, const u8* soa_rdata) { /* * Start an IXFR query */ input_stream is; output_stream os; ya_result return_value; message_data ixfr_query; #ifdef DEBUG memset(&ixfr_query,0x5a,sizeof(ixfr_query)); #endif log_debug("zone load: incremental change query to the master of %{dnsname}", zone_desc_origin); //u16 answer_type[2]; u32 answer_serial[2]; u32 answer_idx = 0; u32 current_serial; #ifdef DEBUG //memset(answer_type,0x5a,sizeof(answer_type)); memset(answer_serial,0x5a,sizeof(answer_serial)); memset(¤t_serial,0x5a,sizeof(current_serial)); #endif if(FAIL(return_value = rr_soa_get_serial(soa_rdata, soa_rdata_size, ¤t_serial))) { return return_value; } if(ISOK(return_value = ixfr_start_query(zone_desc_masters, zone_desc_origin, ttl, soa_rdata, soa_rdata_size, &is, &os, &ixfr_query))) { u8 record_wire[1024]; /* * Read the answer (first message anyway) * Look for the answer type in it. */ u16 query_id = MESSAGE_ID(ixfr_query.buffer); int fd = fd_input_stream_get_filedescriptor(&is); tcp_set_recvtimeout(fd, 3, 0); /* 3 seconds read timeout */ do { // no speed rate limitation from the master ! if(FAIL(return_value = readfully(fd, &ixfr_query.buffer_tcp_len[0], 2))) { break; } if(return_value != 2) { if(answer_idx == 0) { if(return_value == 0) { return_value = ANSWER_UNEXPECTED_EOF; } else { log_warn("zone load: %{hostaddr} answered %i bytes when 2 were expected", zone_desc_masters, return_value); } } else { if(return_value > 0) { log_warn("zone load: %{hostaddr} answered %i bytes when either 2 or none were expected", zone_desc_masters, return_value); } } break; } if(FAIL(return_value = readfully(fd, &ixfr_query.buffer[0], message_get_tcp_length(&ixfr_query)))) { break; } if(return_value < DNS_HEADER_LENGTH + 1 + 4) { return_value = ANSWER_NOT_ACCEPTABLE; log_err("zone load: master answer is too short: %r", return_value); break; } /** * check the ID, check the error code * */ u16 answer_id = MESSAGE_ID(ixfr_query.buffer); if(query_id != answer_id) { return_value = ANSWER_NOT_ACCEPTABLE; log_err("zone load: master answer ID does not match query ID (q:%hd != a:%hd)", query_id, answer_id); break; } if(MESSAGE_RCODE(&ixfr_query.buffer[0]) != RCODE_NOERROR) { return_value = MAKE_DNSMSG_ERROR(MESSAGE_RCODE(&ixfr_query.buffer[0])); log_err("zone load: master answer with error: %r", return_value); break; } u16 answer_count = ntohs(MESSAGE_AN(ixfr_query.buffer)); if(answer_count == 0) { return_value = ANSWER_NOT_ACCEPTABLE; log_err("zone load: master gave empty answer: %r", return_value); break; } u8 error_code = MESSAGE_RCODE(ixfr_query.buffer); if(error_code != RCODE_OK) { return_value = MAKE_DNSMSG_ERROR(error_code); log_err("zone load: master answered with error code: %r", return_value); break; } /* read the query record */ packet_unpack_reader_data reader; packet_reader_init(&reader, &ixfr_query.buffer[0], return_value); reader.offset = DNS_HEADER_LENGTH; u16 query_count = ntohs(MESSAGE_QD(ixfr_query.buffer)); if(query_count == 1) { if(FAIL(return_value = packet_reader_read_zone_record(&reader, record_wire, sizeof(record_wire)))) { break; } } else { return_value = ANSWER_NOT_ACCEPTABLE; //break; } /* read the next answer */ for(;(answer_count > 0) && (answer_idx < 2); answer_count--) { if(FAIL(return_value = packet_reader_read_record(&reader, record_wire, sizeof(record_wire)))) { break; } u8 *p = record_wire + dnsname_len(record_wire); u16 rtype = GET_U16_AT(*p); if(rtype != TYPE_SOA) { if(answer_idx == 0) { // not an XFR log_err("zone load: master did not answer with an XFR", return_value); return_value = ANSWER_NOT_ACCEPTABLE; break; } if(answer_idx == 1) { // not an IXFR (but most likely an AXFR) log_err("zone load: master did not answer with an IXFR", return_value); return_value = ANSWER_NOT_ACCEPTABLE; break; } } p += 8; u16 rdata_size = ntohs(GET_U16_AT(*p)); p += 2; u32 serial; if(FAIL(return_value = rr_soa_get_serial(p, rdata_size, &serial))) { return return_value; } answer_serial[answer_idx] = serial; // p += rdata_size; answer_idx++; } if((answer_idx == 1) && (answer_serial[0] == current_serial)) { break; } } while((answer_idx < 2) && ISOK(return_value)); input_stream_close(&is); output_stream_close(&os); } if(FAIL(return_value)) { log_err("zone load: failed to get update from the master: %r", return_value); answer_idx = 0; } switch(answer_idx) { case 0: { /* no SOA returned */ log_info("zone load: query to the master failed: %r", return_value); break; } case 1: { /* one AXFR returned */ if(serial_gt(answer_serial[0], current_serial)) { log_info("zone load: master offers full zone transfer with serial %u", answer_serial[0]); return_value = TYPE_AXFR; } else { log_info("zone load: master has the same serial %u", answer_serial[0]); return_value = SUCCESS; } break; } case 2: { if(answer_serial[0] != answer_serial[0]) { log_info("zone load: master offers an empty zone with serial %u", answer_serial[0]); return_value = TYPE_AXFR; } else { log_info("zone load: master offers incremental changes from serial %u to serial %u", answer_serial[1], answer_serial[0]); return_value = TYPE_IXFR; } break; } } return return_value; } static ya_result database_load_zone_slave(zdb *db, zone_desc_s *zone_desc, zdb_zone **zone) // returns with RC++ { #ifdef DEBUG log_debug("database_load_zone_slave(%p,%p,%p)", db, zone_desc, zone); #endif zone_lock(zone_desc, ZONE_LOCK_LOAD); if(zone_desc->type != ZT_SLAVE) { zone_unlock(zone_desc, ZONE_LOCK_LOAD); return ZONE_LOAD_SLAVE_TYPE_EXPECTED; } /** * Load only the SOA * ask for an IXFR * If the answer is IXFR store it as an incremental (so it will be loaded later) * If the answer is an AXFR the current files are irrelevant : destroy and load the axfr:w * */ zone_reader zr; zdb_zone *current_zone; zdb_zone *zone_pointer_out; host_address *zone_desc_masters; s64 zone_load_begin = (s64)timeus(); zone_source file_source = ZONE_SOURCE_INIT("file"); zone_source axfr_source = ZONE_SOURCE_INIT("axfr"); zone_source db_source = ZONE_SOURCE_INIT("db"); zone_source master_source = ZONE_SOURCE_INIT("master"); u32 journal_last_serial = 0; //bool journal_available = FALSE; bool file_opened = FALSE; zone_source *best_source = &master_source; ya_result return_value; u32 ttl = 0; u16 rdata_size = 0; bool is_drop_before_load; bool has_file_name; u8 zone_desc_origin[MAX_DOMAIN_LENGTH]; u8 rdata[MAX_SOA_RDATA_LENGTH]; char file_name[PATH_MAX]; char zone_desc_file_name[PATH_MAX]; *zone = NULL; is_drop_before_load = zone_is_drop_before_load(zone_desc); zone_desc_masters = host_address_copy_list(zone_desc->masters); dnsname_copy(zone_desc_origin, zone_desc->origin); log_debug("zone load: '%{dnsname}': loading slave zone", zone_desc_origin); has_file_name = (zone_desc->file_name != NULL); if(has_file_name) { strncpy(zone_desc_file_name, zone_desc->file_name, sizeof(zone_desc_file_name)); } current_zone = zdb_acquire_zone_read_from_fqdn(db, zone_desc_origin); // ACQUIRES zone_unlock(zone_desc, ZONE_LOCK_LOAD); if(current_zone != NULL) { if(!ZDB_ZONE_INVALID(current_zone)) { u32 current_serial; zdb_zone_lock(current_zone, ZDB_ZONE_MUTEX_LOAD); return_value = zdb_zone_getserial(current_zone, ¤t_serial); zdb_zone_unlock(current_zone, ZDB_ZONE_MUTEX_LOAD); if(ISOK(return_value)) { log_debug("zone load: '%{dnsname}': in database with serial %d", zone_desc_origin, current_serial); zone_source_set(&db_source, ZONE_SOURCE_EXISTS|ZONE_SOURCE_LOADED); zone_source_set_serial(&db_source, current_serial); best_source = &db_source; } else { log_err("zone load: unable to get current serial of '%{dnsname}': %r", zone_desc_origin, return_value); zdb_zone_release(current_zone); current_zone = NULL; } } else { log_debug("zone load: '%{dnsname}': invalid in database", zone_desc_origin); zdb_zone_release(current_zone); current_zone = NULL; } } #ifdef DEBUG memset(&zr, 0x5a, sizeof(zr)); memset(rdata, 0x5a, sizeof(rdata)); memset(file_name, 0x5a, sizeof(file_name)); #endif /* * FILE * This part is supposed to see if there is a RELEVANT text file */ if(has_file_name && (zone_desc_file_name[0] != '\0')) { snformat(file_name, sizeof(file_name), "%s%s", g_config->data_path, zone_desc_file_name); log_debug("zone load: '%{dnsname}': zone file is '%s'", zone_desc_origin, file_name); if(ISOK(return_value = zone_file_reader_open(file_name, &zr))) { log_debug("zone load: '%{dnsname}': checking serial in '%s'", zone_desc_origin, file_name); if(ISOK(return_value = zdb_zone_get_soa(&zr, &rdata_size, rdata))) { u32 file_serial; if(ISOK(rr_soa_get_serial(rdata, rdata_size, &file_serial))) { zone_source_set(&file_source, ZONE_SOURCE_EXISTS | ZONE_SOURCE_LOCALE); zone_source_set_serial(&file_source, file_serial); log_debug("zone load: '%{dnsname}': serial in local copy '%s' is %u",zone_desc_origin, file_name, file_serial); // if template_zone, the file CANNOT be written back to disk if(zone_reader_canwriteback(&zr)) { zone_source_set(&file_source, ZONE_SOURCE_TEMPLATE); } } else { log_err("zone load: '%{dnsname}': could not get serial from SOA from '%s': %r", zone_desc_origin, file_name, return_value); } } else { const char *message = zone_reader_get_last_error_message(&zr); if(message == NULL) { log_err("zone load: '%{dnsname}': could not get SOA from '%s': %r", zone_desc_origin, file_name, return_value); } else { log_err("zone load: '%{dnsname}': could not get SOA from '%s': %s: %r", zone_desc_origin, file_name, message, return_value); } } zone_reader_close(&zr); } else { if(zone_desc->type != ZT_SLAVE) { log_err("zone load: '%{dnsname}': could not open zone file '%s': %r", zone_desc_origin, file_name, return_value); } else { log_debug("zone load: '%{dnsname}': could not open zone file '%s': %r", zone_desc_origin, file_name, return_value); } } } else { log_debug("zone load: '%{dnsname}': no file name set for zone file", zone_desc_origin); } /* * AXFR : the serial returned here does not takes the journal into account if the boolean is set to FALSE * This part is supposed to see if there is a RELEVANT axfr file */ if(ISOK(return_value = zone_axfr_reader_open_with_fqdn(&zr, zone_desc_origin))) { log_debug("zone load: '%{dnsname}': found an AXFR image", zone_desc_origin); if(ISOK(return_value = zdb_zone_get_soa(&zr, &rdata_size, rdata))) { u32 axfr_serial; if(ISOK(rr_soa_get_serial(rdata, rdata_size, &axfr_serial))) { zone_source_set(&axfr_source, ZONE_SOURCE_EXISTS | ZONE_SOURCE_LOCALE); zone_source_set_serial(&axfr_source, axfr_serial); log_debug("zone load: '%{dnsname}': serial in AXFR image is %u", zone_desc_origin, axfr_serial); } } else { const char *message = zone_reader_get_last_error_message(&zr); if(message == NULL) { log_err("zone load: '%{dnsname}': could not get SOA from AXFR file: %r", zone_desc_origin, return_value); } else { log_err("zone load: '%{dnsname}': could not get SOA from AXFR file: %s: %r", zone_desc_origin, message, return_value); } } zone_reader_close(&zr); } else { log_debug("zone load: '%{dnsname}': could not open AXFR file: %r", zone_desc_origin, return_value); } /* * check if both types are relevant * * disable the lowest serial or the AXFR one if they are equal * */ if(zone_source_exists(&axfr_source) || zone_source_exists(&file_source)) { /* choose the best one */ best_source = zone_source_get_best(&axfr_source, &file_source); log_debug("zone load: '%{dnsname}': so far, best source is %s", zone_desc_origin, best_source->type_name); log_debug("zone load: '%{dnsname}': parsing journal for last serial", zone_desc_origin); u32 zone_journal_serial = best_source->serial; if(FAIL(return_value = journal_last_soa(zone_desc_origin, g_config->xfr_path, &zone_journal_serial, &ttl, rdata, &rdata_size))) { if(return_value == ZDB_ERROR_ICMTL_NOTFOUND) { log_debug("zone load: '%{dnsname}': no journal found", zone_desc_origin); return_value = SUCCESS; } else { log_err("zone load: '%{dnsname}': an error occurred reading the journal: %r", zone_desc_origin, return_value); } } else { log_debug("zone load: '%{dnsname}': journal ends at serial %d", zone_desc_origin, zone_journal_serial); //journal_available = TRUE; journal_last_serial = zone_journal_serial; // the best source must be local, let's update the serial to what it should reach using the journal best_source->serial = journal_last_serial; } // compare the db with the best source // parameter order is important, if they are equal, the left one is returned best_source = zone_source_get_best(&db_source, best_source); } else { /// @todo edf 20150121 -- clear journal file, if any log_debug("zone load: '%{dnsname}': no local source available", zone_desc_origin); // note: the best_source is pointing to the master } // Retrieve the serial on the master, if we are allowed to if(((zone_desc->flags & ZONE_FLAG_NO_MASTER_UPDATES) == 0) && zone_source_has_flags(best_source, ZONE_SOURCE_LOCALE)) { // a fail here would mean something horribly wrong is going on with the journal ... u32 master_serial; if(ISOK(return_value = message_query_serial(zone_desc_origin, zone_desc_masters, &master_serial))) { log_debug("zone load: '%{dnsname}': master %{hostaddr} has serial %u", zone_desc_origin, zone_desc_masters, master_serial); zone_source_set(&master_source, ZONE_SOURCE_EXISTS | ZONE_SOURCE_REMOTE); zone_source_set_serial(&master_source, master_serial); } else { log_err("zone load: '%{dnsname}': unable to get serial from master %{hostaddr}: %r", zone_desc_origin, zone_desc_masters, return_value); } if(zone_source_compare(best_source, &master_source) >= 0) { // we can reach locally at least what the master is giving us log_debug("zone load: '%{dnsname}': no need to download the zone from the master", zone_desc_origin); } else { // see how the master would give us the incremental changes if(ISOK(return_value = database_get_ixfr_answer_type(zone_desc_origin, zone_desc_masters, ttl, rdata_size, rdata))) { if(return_value == TYPE_AXFR) { // the zone we have is a wrong start log_debug("zone load: '%{dnsname}': the master answered to the IXFR by an AXFR", zone_desc_origin); zone_source_unset(&axfr_source, ZONE_SOURCE_EXISTS); zone_source_unset(&file_source, ZONE_SOURCE_EXISTS); best_source = &master_source; xfr_delete_axfr(zone_desc_origin); journal_truncate(zone_desc_origin); } // else we did got an IXFR. Starting by loading the local zone file + journal should be more efficient. } else { log_err("zone load: '%{dnsname}': IXFR query to %{hostaddr} failed with: %r", zone_desc_origin, zone_desc_masters, return_value); } } } /* * Now ask to the master for an IXFR that we will interrupt. * After a few retries, load the current zone. */ if(best_source == &axfr_source) { log_info("zone load: %{dnsname}: loading AXFR file in '%s'", zone_desc_origin, g_config->xfr_path); file_opened = TRUE; if(FAIL(return_value = zone_axfr_reader_open_with_fqdn(&zr, zone_desc_origin))) { log_err("zone load: %{dnsname}: unexpectedly unable to load AXFR file in '%s'", zone_desc_origin, g_config->xfr_path); zone_source_unset(&axfr_source, ZONE_SOURCE_EXISTS); file_opened = FALSE; // cleanup xfr_delete_axfr(zone_desc_origin); journal_truncate(zone_desc_origin); } } else if(best_source == &file_source) { log_info("zone load: %{dnsname}: loading file '%s'", zone_desc_origin, file_name); file_opened = TRUE; if(FAIL(return_value = zone_file_reader_open(file_name, &zr))) { log_err("zone load: %{dnsname}: unexpectedly unable to load '%s'", zone_desc_origin, file_name); zone_source_unset(&file_source, ZONE_SOURCE_EXISTS); file_opened = FALSE; /// @todo edf 20150121 -- not sure that cleaning is an option (and it could only be done on a slave) } } /* * _ Open the zone file/source * _ Load the zone * (do the NSEC/NSEC3 pre-processing) * _ Close the zone file/source * _ Apply the ACLs * _ Schedule an NSEC/NSEC3 verify/update. (Here ?) */ if(file_opened) { // at this point, the file is about to be loaded. It is the right time to test the drop-before-load flag if(!((current_zone != NULL) && is_drop_before_load)) { /* Avoid cpy & cat : overrun potential */ // the journal MUST be closed, else we way have a situation where // the journal is linked to another instance of the zone if(zone_desc->loaded_zone != NULL) { if(zone_desc->loaded_zone->journal != NULL) { journal_close(zone_desc->loaded_zone->journal); } } return_value = zdb_zone_load(db, &zr, &zone_pointer_out, zone_desc_origin, ZDB_ZONE_REPLAY_JOURNAL|ZDB_ZONE_IS_SLAVE); zone_reader_handle_error(&zr, return_value); zone_reader_close(&zr); u32 now = time(NULL); zone_lock(zone_desc, ZONE_LOCK_LOAD); if(best_source == &axfr_source) { // if we didn't load the zone file, so mark it so a dump will actually dump its content into a text zone file zone_desc->status_flags |= ZONE_STATUS_MODIFIED; } if(zone_source_has_flags(best_source, ZONE_SOURCE_TEMPLATE)) { zone_desc->status_flags |= ZONE_STATUS_TEMPLATE_SOURCE_FILE; } zone_desc->refresh.refreshed_time = now; zone_desc->refresh.retried_time = now; if(ISOK(return_value)) { #if ZDB_HAS_ACL_SUPPORT /* * Setup the ACL filter function & configuration */ zone_pointer_out->extension = &zone_desc->ac; /* The extension points to the ACL */ zone_pointer_out->query_access_filter = acl_get_query_access_filter(&zone_desc->ac.allow_query); #endif #if HAS_DNSSEC_SUPPORT /* * Setup the validity period and the jitter */ zone_pointer_out->sig_validity_interval_seconds = MAX_S32;/*zone->sig_validity_interval * SIGNATURE_VALIDITY_INTERVAL_S */; zone_pointer_out->sig_validity_jitter_seconds = 0;/*zone->sig_validity_jitter * SIGNATURE_VALIDITY_JITTER_S */; #endif *zone = zone_pointer_out; zone_unlock(zone_desc, ZONE_LOCK_LOAD); host_address_delete_list(zone_desc_masters); if(current_zone != NULL) { zdb_zone_release(current_zone); // current_zone = NULL ... } s64 zone_load_end = (s64)timeus(); double load_time = zone_load_end - zone_load_begin; load_time /= 1000000.; log_info("zone load: '%s' loaded: %r (%9.6fs)", zone_desc->domain, return_value, load_time); return return_value; } else { switch(return_value) { case ZDB_READER_ALREADY_LOADED: { log_warn("zone load: '%{dnsname}': failed because it was loaded already", zone_desc_origin); break; } case ZDB_ERROR_ICMTL_NOTFOUND: { log_info("zone load: '%{dnsname}': no journal to replay", zone_desc_origin); return_value = SUCCESS; break; } case UNABLE_TO_COMPLETE_FULL_READ: { log_err("zone load: '%{dnsname}': the zone file or the journal are likely corrupted: %r", zone_desc_origin, return_value); best_source = &master_source; break; } default: { log_err("zone load: '%{dnsname}': an error occurred while loading the zone or journal: %r", zone_desc_origin, return_value); best_source = &master_source; break; } } } zone_unlock(zone_desc, ZONE_LOCK_LOAD); } else { // the zone is loaded and is valid, we need to drop it // so we unmount it (replacing it by the dummy) // then we ask for loading it again zone_reader_close(&zr); zone_lock(zone_desc, ZONE_LOCK_LOAD); zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_UNMOUNT, NULL, TRUE); zone_enqueue_command(zone_desc, DATABASE_SERVICE_ZONE_LOAD, NULL, TRUE); zone_unlock(zone_desc, ZONE_LOCK_LOAD); host_address_delete_list(zone_desc_masters); if(current_zone != NULL) { zdb_zone_release(current_zone); // current_zone = NULL ... } s64 zone_load_end = (s64)timeus(); double load_time = zone_load_end - zone_load_begin; load_time /= 1000000.; log_info("zone load: '%s' load requires the zone to be dropped first (%9.6fs)", zone_desc->domain, load_time); return SUCCESS; } } else if(current_zone != NULL) { zdb_zone_lock(current_zone, ZDB_ZONE_MUTEX_LOAD); #if ZDB_HAS_ACL_SUPPORT /* * Setup the ACL filter function & configuration */ current_zone->extension = &zone_desc->ac; /* The extension points to the ACL */ current_zone->query_access_filter = acl_get_query_access_filter(&zone_desc->ac.allow_query); #endif #if HAS_DNSSEC_SUPPORT /* * Setup the validity period and the jitter */ current_zone->sig_validity_interval_seconds = MAX_S32;/*zone->sig_validity_interval * SIGNATURE_VALIDITY_INTERVAL_S */; current_zone->sig_validity_jitter_seconds = 0;/*zone->sig_validity_jitter * SIGNATURE_VALIDITY_JITTER_S */; #endif zdb_zone_unlock(current_zone, ZDB_ZONE_MUTEX_LOAD); *zone = current_zone; s64 zone_load_end = (s64)timeus(); double load_time = zone_load_end - zone_load_begin; load_time /= 1000000.; log_info("zone load: %s keeping the already loaded zone (%9.6fs)", zone_desc->domain, load_time); return_value = SUCCESS; current_zone = NULL; } if(current_zone != NULL) { zdb_zone_release(current_zone); current_zone = NULL; } if(best_source == &master_source) { /** * Set a placeholder zone. Marked as invalid. * * The AXFR mechanism is as follow: * * There is MUST ALWAYS be a zone for an existing config. * That zone can be a fake one marked as invalid, or a real one that requires some processing. * Here we have a fake one so it will be straightforward: * The fake is set in place. * The AXFR will be tried and made. * When it succeeds, since the zone is invalid, the AXFR will be loaded and will be scheduled for a swap & destroy * On other cases, the AXFR would first be tested for serial THEN ignored and the invalid zone would be scheduled for a swap-back * OR * the invalid zone will be scheduled for a multiple-stage delete (ST) * then the AXFR will be loaded and will be scheduled for a swap & destroy * */ s64 zone_load_end = (s64)timeus(); double load_time = zone_load_end - zone_load_begin; load_time /= 1000000.; if((zone_desc->flags & ZONE_FLAG_NO_MASTER_UPDATES) == 0) { log_debug("zone load: %{dnsname}: asking for an AXFR from %{hostaddr} (%9.6fs)", zone_desc_origin, zone_desc_masters, load_time); database_zone_axfr_query(zone_desc_origin); } else { log_info("zone load: %{dnsname}: prevented by configuration to ask an AXFR from %{hostaddr} (%9.6fs)", zone_desc_origin, zone_desc_masters, load_time); } return_value = ZRE_NO_VALID_FILE_FOUND; if(*zone != NULL) { zdb_zone_release(*zone); *zone = NULL; } } else { s64 zone_load_end = (s64)timeus(); double load_time = zone_load_end - zone_load_begin; load_time /= 1000000.; log_info("zone load: '%s' load done: %r (%9.6fs)", zone_desc->domain, return_value, load_time); } host_address_delete_list(zone_desc_masters); return return_value; } /** * * The thread loads the zone in the background then notifies the service that the zone has been loaded (or failed to load) * * @param parms * @return */ static void* database_service_zone_load_thread(void *parms) { database_service_zone_load_parms_s *database_zone_load_parms = (database_service_zone_load_parms_s *)parms; const u32 must_be_off = ZONE_STATUS_DROP | ZONE_STATUS_DROPPING | \ ZONE_STATUS_SAVING_ZONE_FILE | ZONE_STATUS_SAVING_AXFR_FILE | \ ZONE_STATUS_SIGNATURES_UPDATING | ZONE_STATUS_DYNAMIC_UPDATE | \ ZONE_STATUS_DYNAMIC_UPDATING; zone_desc_s *zone_desc = database_zone_load_parms->zone_desc; #ifdef DEBUG log_debug1("database_service_zone_load_thread(%{dnsname}@%p=%i)", zone_desc->origin, zone_desc, zone_desc->rc); #endif yassert(zone_desc != NULL); zone_lock(zone_desc, ZONE_LOCK_LOAD); if((zone_desc->status_flags & must_be_off) != 0) { log_err("zone load: conflicting status: %08x instead of 0", (zone_desc->status_flags & must_be_off)); database_zone_load_parms_free(database_zone_load_parms); zone_release(zone_desc); return NULL; } zone_desc->status_flags |= ZONE_STATUS_LOADING; zone_unlock(zone_desc, ZONE_LOCK_LOAD); zdb_zone *zone = NULL; ya_result return_code = database_zone_load_parms->loader(database_zone_load_parms->db, zone_desc, &zone); // RC = 1 // notify the fact that the zone has been loaded (or not) if(ISOK(return_code)) { yassert(zone != NULL); // in the zone settings, replace the one in the loaded field by the new one zone_lock(zone_desc, ZONE_LOCK_LOAD); zdb_zone *old_zone = zone_set_loaded_zone(zone_desc, zone); // RC = 1 ++ (2) zone_unlock(zone_desc, ZONE_LOCK_LOAD); if(old_zone == zone) { log_debug7("%{dnsname}@%p: zone@%p was already loaded", zone_desc->origin, zone_desc, zone); return_code = 0; } else { log_debug7("%{dnsname}@%p: loaded zone@%p (was %p)", zone_desc->origin, zone_desc, zone, old_zone); return_code = 1; } if(old_zone != NULL) { zdb_zone_release(old_zone); old_zone = NULL; } database_fire_zone_loaded(zone_desc, zone, return_code); zdb_zone_release(zone); #if DEBUG zone = NULL; #endif } else { if(!((return_code == ZRE_NO_VALID_FILE_FOUND) && (zone_desc->type == ZT_SLAVE))) { log_err("zone load: error loading %{dnsname}: %r", zone_desc->origin, return_code); } else { log_notice("zone load: slave zone %{dnsname} requires download from the master", zone_desc->origin); } if(zone != NULL) { zdb_zone_release(zone); } database_fire_zone_loaded(zone_desc, NULL, return_code); } zone_lock(zone_desc, ZONE_LOCK_LOAD); zone_desc->status_flags &= ~(ZONE_STATUS_LOAD|ZONE_STATUS_LOADING|ZONE_STATUS_DOWNLOADED|ZONE_STATUS_PROCESSING); zone_unlock(zone_desc, ZONE_LOCK_LOAD); database_zone_load_parms_free(database_zone_load_parms); zone_release(zone_desc); return NULL; } ya_result database_service_zone_load(zone_desc_s *zone_desc) { if(zone_desc == NULL) { log_err("database_service_zone_load(NULL)"); return ERROR; } log_debug1("database_service_zone_load(%{dnsname}@%p=%i)", zone_desc->origin, zone_desc, zone_desc->rc); log_debug1("database_service_zone_load: locking zone '%{dnsname}' for loading", zone_desc->origin); if(FAIL(zone_lock(zone_desc, ZONE_LOCK_LOAD))) { log_err("database_service_zone_load: failed to lock zone settings for '%{dnsname}'", zone_desc->origin); return ERROR; } const u8 *origin = zone_desc->origin; log_info("zone load: %{dnsname}", origin); /* * Invalidate the zone * Empty the current zone if any */ /* * If the zone descriptor (config) exists and it can be locked by the loader ... */ // locks the descriptor with the loader identity if(zone_desc->status_flags & (ZONE_STATUS_LOAD|ZONE_STATUS_LOADING)) { // already loading zone_desc_log(MODULE_MSG_HANDLE, MSG_DEBUG1, zone_desc, "database_service_zone_load"); log_err("database_service_zone_load: '%{dnsname}' already loading", origin); zone_unlock(zone_desc, ZONE_LOCK_LOAD); return ERROR; } zdb *db = g_config->database; // wait #if HAS_MASTER_SUPPORT if(zone_desc->type == ZT_MASTER) { /* * load master ? * => load the file * => schedule the xchg with the invalidated zone */ zone_desc->status_flags |= ZONE_STATUS_LOAD; zone_desc->status_flags &= ~ZONE_STATUS_STARTING_UP; zone_acquire(zone_desc); database_service_zone_load_parms_s *database_zone_load_parms = database_zone_load_parms_alloc(db, zone_desc, database_load_zone_master); database_service_zone_load_queue_thread(database_service_zone_load_thread, database_zone_load_parms, NULL, "database_zone_load_thread"); } else #endif if(zone_desc->type == ZT_SLAVE) { /* * load slave * * if no file/axfr is available => axfr (responsible to requeue the load) and continue * * if file/axfr is available => load the file/axfr * * => schedule the xchg with the invalidated zone * */ zone_desc->status_flags |= ZONE_STATUS_LOAD; zone_desc->status_flags &= ~ZONE_STATUS_STARTING_UP; zone_acquire(zone_desc); database_service_zone_load_parms_s *database_zone_load_parms = database_zone_load_parms_alloc(db, zone_desc, database_load_zone_slave); database_service_zone_load_queue_thread(database_service_zone_load_thread, database_zone_load_parms, NULL, "database_zone_load_thread"); } else /* not master nor slave */ { /* other types */ log_err("zone load: unknown zone type"); zone_desc->status_flags &= ~(ZONE_STATUS_LOAD|ZONE_STATUS_LOADING|ZONE_STATUS_DOWNLOADED|ZONE_STATUS_PROCESSING); } log_debug1("database_service_zone_load: unlocking zone '%{dnsname}' for loading", origin); zone_unlock(zone_desc, ZONE_LOCK_LOAD); return SUCCESS; } /** * @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/notify.h0000644000077100007710000000012412650131756020357 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.055344 30 ctime=1454597653.087344534 yadifa-2.1.6-5826/sbin/yadifad/notify.h0000664000077100007710000000666712650131756020203 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup yadifad * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NOTIFY_H #define _NOTIFY_H #include "server-config.h" #if HAS_CTRL #include "ctrl.h" #endif #include #include "database.h" #include /** * @brief Handle a notify from the master (or another slave) * * @param database : the database * @param mesg : the input message * * @retval OK * @retval NOK */ ya_result notify_process(zdb *database, message_data *msg); /** * Sends a notify to all the slave for a given domain name * * @param origin */ void notify_slaves(u8 *origin); /** * Stops all notification for zone with origin * * @param origin */ void notify_clear(u8 *origin); /** * Sends a notify to all the slave in the list for the specified zone and class * * @param zone_desc the zone descriptor * @param hosts the host list that will be destroyed by the callee * @param zclass the class for the query */ void notify_host_list(zone_desc_s *zone_desc, host_address *hosts, u16 zclass); /** * @todo Before a zone is being unloaded, call this. * * @param origin */ // void notify_clear(u8 *origin); ya_result notify_service_init(); /** * Starts the notify service thread */ ya_result notify_service_start(); /** * Stops the notify service thread */ ya_result notify_service_stop(); ya_result notify_service_finalise(); #endif /* _NOTIFY_H */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/config.guess0000644000077100007710000000013212473710127021210 xustar000000000000000030 mtime=1424986199.147058409 30 atime=1424986199.146058409 30 ctime=1454597653.188344534 yadifa-2.1.6-5826/sbin/yadifad/config.guess0000755000077100007710000012367212473710127021032 0ustar00yadifayadifa00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-11-04' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/depcomp0000644000077100007710000000013212473710127020245 xustar000000000000000030 mtime=1424986199.161058409 30 atime=1424986199.161058409 30 ctime=1454597653.195344534 yadifa-2.1.6-5826/sbin/yadifad/depcomp0000755000077100007710000005601612473710127020064 0ustar00yadifayadifa00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # 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, 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, see . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/axfr.c0000644000077100007710000000012412650131756020002 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.022344 30 ctime=1454597653.213344534 yadifa-2.1.6-5826/sbin/yadifad/axfr.c0000664000077100007710000002264412650131756017617 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup yadifad * @brief * * @{ */ #include "server-config.h" #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define ZDB_JOURNAL_CODE 1 #include extern logger_handle *g_server_logger; #define MODULE_MSG_HANDLE g_server_logger #include "axfr.h" #include "confs.h" #include "server.h" extern struct thread_pool_s *server_disk_thread_pool; /** * * Handle an AXFR query from a slave. * * If we don't do this many slaves could call with a small interval asking a just-dynupdated snapshot. * If we do it the slaves will be only a few steps behind and the next notification/ixfr will bring them up to date. */ ya_result axfr_process(message_data *mesg) { /* * Start an AXFR "writer" thread * Give it the tcp fd * It will store the AXFR for the current database snapshot on the disk if it does not exist yet (writers blocked) * It will then open the stored file and stream it to the tcp fd (writers freed) * ACL/TSIG is not taken in account yet. */ zdb_zone *zone; u8 *fqdn = mesg->qname; dnsname_vector fqdn_vector; dnsname_to_dnsname_vector(fqdn, &fqdn_vector); u16 rcode; if( ((zone = zdb_acquire_zone_read(g_config->database, &fqdn_vector)) != NULL) ) { if(ZDB_ZONE_VALID(zone)) { #if HAS_ACL_SUPPORT access_control *ac = (access_control*)zone->extension; if(!ACL_REJECTED(acl_check_access_filter(mesg, &ac->allow_transfer))) { #endif log_info("axfr: %{dnsname}: scheduling axfr answer to %{sockaddr}", mesg->qname, &mesg->other); /* * This is an asynchronous call * * Get the zone AXFR * If not exist create it and start sending back while writing (implies two threads) * else simply send back */ // xfr_path is known, dnssec_set_xfr_path set it // zone is obviously needed // mesg is needed to match query, TSIG, ... // zdb_zone_answer_axfr(zone, mesg, thread_pool, g_config->axfr_max_packet_size, g_config->axfr_max_record_by_packet, g_config->axfr_compress_packets); // this is mostly background, so zdb_zone_answer_axfr(zone, mesg, NULL, server_disk_thread_pool, g_config->axfr_max_packet_size, g_config->axfr_max_record_by_packet, g_config->axfr_compress_packets); zdb_zone_release(zone); return SUCCESS; #if HAS_ACL_SUPPORT } else { /* notauth */ log_info("axfr: %{dnsname}: not authorised", mesg->qname); rcode = FP_XFR_REFUSED; } #endif } else { rcode = FP_INVALID_ZONE; } zdb_zone_release(zone); } else { /* zone not found */ log_err("axfr: %{dnsname}: zone not found", mesg->qname); rcode = FP_NOZONE_FOUND; } message_make_error(mesg, rcode); tcp_send_message_data(mesg); yassert((mesg->sockfd < 0)||(mesg->sockfd >2)); close_ex(mesg->sockfd); return SUCCESS; } /** * * Send an AXFR query to a master and handle the answer (loads the zone). */ ya_result axfr_query(const host_address *servers, const u8 *origin, u32* out_loaded_serial) { /* * Background: * * Build an axfr query message * Send it to the master * Wait for the answer * Copy the answer in a file * Load the zone from the file * * Foreground: * * Attach the zone to the database. */ /* * AXFR query */ ya_result return_value; char data_path[PATH_MAX]; if(FAIL(return_value = zdb_zone_path_get_provider()(origin, data_path, sizeof(data_path), ZDB_ZONE_PATH_PROVIDER_AXFR_PATH|ZDB_ZONE_PATH_PROVIDER_MKDIR))) { log_err("axfr: unable to create directory '%s' for %{dnsname}: %r", data_path, origin, return_value); return return_value; } random_ctx rndctx = thread_pool_get_random_ctx(); /** * Create the AXFR query packet */ message_data axfr_query; message_make_query(&axfr_query, (u16)random_next(rndctx), origin, TYPE_AXFR, CLASS_IN); #if HAS_TSIG_SUPPORT if(servers->tsig != NULL) { log_info("axfr: %{dnsname}: transfer will be signed with key '%{dnsname}'", origin, servers->tsig->name); message_sign_query(&axfr_query, servers->tsig); } #endif message_update_tcp_length(&axfr_query); axfr_query.received = axfr_query.send_length; /* * connect & send */ input_stream is; output_stream os; // connect if(ISOK(return_value = tcp_input_output_stream_connect_host_address(servers, &is, &os, g_config->xfr_connect_timeout))) { // send if(ISOK(return_value = output_stream_write(&os, &axfr_query.buffer_tcp_len[0], axfr_query.send_length + 2))) { output_stream_flush(&os); int fd = fd_input_stream_get_filedescriptor(&is); tcp_set_sendtimeout(fd, 30, 0); tcp_set_recvtimeout(fd, 30, 0); /** @todo: disables updates/ixfr for the zone */ /* delete ix files */ journal_truncate(origin); zdb_zone *zone = zdb_acquire_zone_write_lock_from_fqdn(g_config->database, origin, ZDB_ZONE_MUTEX_XFR); if(zone != NULL) { if(zone->journal != NULL) { journal_close(zone->journal); } zdb_zone_release_unlock(zone, ZDB_ZONE_MUTEX_XFR); } /* xfr_copy_args xfr; xfr.is = &is; xfr.origin = origin; xfr.message = &axfr_query; xfr.current_serial = 0; xfr.flags = XFR_ALLOW_AXFR; */ input_stream xfris; if(ISOK(return_value = xfr_input_stream_init(&xfris, origin, &is, &axfr_query, 0, XFR_ALLOW_AXFR))) { if(ISOK(return_value = xfr_copy(&xfris, g_config->xfr_path))) { if(out_loaded_serial != NULL) { *out_loaded_serial = xfr_input_stream_get_serial(&xfris); } } else { log_debug("axfr: %{dnsname}: AXFR stream copy failed: %r", origin, return_value); } input_stream_close(&xfris); } else { log_debug("axfr: %{dnsname}: AXFR stream copy init failed: %r", origin, return_value); } output_stream_close(&os); output_stream_close(&is); } } return return_value; } /** @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/database-service-zone-unfreeze.c0000644000077100007710000000012412650131756025036 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.983344 30 ctime=1454597653.252344534 yadifa-2.1.6-5826/sbin/yadifad/database-service-zone-unfreeze.c0000664000077100007710000001076512650131756024654 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup database Routines for database manipulations * @ingroup yadifad * @brief database functions * * Implementation of routines for the database * - add zone file(s) * - clear zone file(s) * - print zone files(s) * - load db * - unload db * - lookup database result of a message * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "server-config.h" #include "config.h" #include #include #include "zone.h" #include "server.h" #define MODULE_MSG_HANDLE g_server_logger /**********************************************************************************************************************/ void database_service_zone_unfreeze(zone_desc_s *zone_desc) { ya_result return_value; #ifdef DEBUG log_debug("database_service_zone_unfreeze(%{dnsname}@%p=%i)", zone_desc->origin, zone_desc, zone_desc->rc); #endif if(zone_desc == NULL) { log_err("zone freeze: NULL zone"); return; } log_debug1("database_service_zone_unfreeze: locking zone '%{dnsname}' for unfreezing", zone_desc->origin); if(FAIL(return_value = zone_lock(zone_desc, ZONE_LOCK_UNFREEZE))) { log_err("database_service_zone_unfreeze: failed to lock zone settings for '%{dnsname}'", zone_desc->origin); return; } zdb_zone *zone = zone_get_loaded_zone(zone_desc); // RC++ if(zone == NULL) { log_err("zone freeze: no zone loaded for '%{dnsname}'", zone_desc->origin); zone_desc->status_flags &= ~ZONE_STATUS_PROCESSING; log_debug1("database_service_zone_unfreeze: unlocking zone '%{dnsname}' for unfreezing", zone_desc->origin); zone_unlock(zone_desc, ZONE_LOCK_UNFREEZE); return; } // This REALLY is the simple reader lock. This operation does not interfere // with readers, only with writers. There is no point preventing queries // in the database while setting the zone read-only. zdb_zone_lock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); if((zone->apex->flags & ZDB_RR_APEX_LABEL_FROZEN) == 0) { log_warn("zone freeze: %{dnsname} already unfrozen", zone->origin); } zone->apex->flags &= ~ZDB_RR_APEX_LABEL_FROZEN; zdb_zone_release_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); log_info("zone unfreeze: %{dnsname}", zone_desc->origin); zone_desc->status_flags &= ~(ZONE_STATUS_FROZEN|ZONE_STATUS_PROCESSING); log_debug1("database_service_zone_unfreeze: unlocking zone '%{dnsname}' for unfreezing", zone_desc->origin); zone_unlock(zone_desc, ZONE_LOCK_UNFREEZE); } /** * @} */ yadifa-2.1.6-5826/sbin/yadifad/PaxHeaders.8028/rrl.h0000644000077100007710000000012412650131756017646 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.028344 30 ctime=1454597653.142344534 yadifa-2.1.6-5826/sbin/yadifad/rrl.h0000664000077100007710000000701612650131756017457 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup yadifad * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _RRL_H #define _RRL_H #include #include #include #define RRL_PROCEED 0 #define RRL_SLIP 1 #define RRL_DROP 2 #define RRL_PROCEED_SLIP (RRL_SLIP|4) #define RRL_PROCEED_DROP (RRL_DROP|4) #define RRL_QUEUE_SIZE_MIN 0x00000400 #define RRL_QUEUE_SIZE_MAX 0x01000000 #define RRL_RESPONSES_PER_SECOND_DEFAULT 5 // MUST be stored in base 10 #define RRL_ERRORS_PER_SECOND_DEFAULT 5 // MUST be stored in base 10 #define RRL_WINDOW_DEFAULT 15 // MUST be stored in base 10 #define RRL_SLIP_DEFAULT 2 // MUST be stored in base 10 #define RRL_QUEUE_SIZE_MAX_DEFAULT 16384 // MUST be stored in base 10 #define RRL_QUEUE_SIZE_MIN_DEFAULT 1024 // MUST be stored in base 10 #define RRL_IPV4_PREFIX_LENGTH_DEFAULT 24 // MUST be stored in base 10 #define RRL_IPV6_PREFIX_LENGTH_DEFAULT 56 // MUST be stored in base 10 #define RRL_LOG_ONLY_DEFAULT 0 // MUST be stored in base 10 #define RRL_ENABLED_DEFAULT 0 // MUST be stored in base 10 #define RRL_EXEMPTED_DEFAULT "none" void rrl_init(); void rrl_finalize(); ya_result rrl_process(message_data *mesg, const zdb_query_ex_answer *ans_auth_add); void rrl_cull(); const config_section_descriptor_s *confs_rrl_get_descriptor(); #endif /* _RRL_H */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/PaxHeaders.8028/README0000644000077100007710000000012412654656702015231 xustar000000000000000027 mtime=1454595522.700671 27 atime=1454597464.075344 30 ctime=1454597650.507344534 yadifa-2.1.6-5826/README0000664000077100007710000005773012654656702015052 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ 20160126: YADIFA 2.1.6 Fixes: - fixed an issue where the referral would not be measured for UDP on a optimised build. 20160108: YADIFA 2.1.5 Dynamic updates do not use temporary files anymore which improves their general performance. The statistics now shows the referrals. Fixes: - fixed an issue where getting a huge incremental transfer would prevent the server from answering queries while applying the changes. - fixed an issue serving IXFR that would occur when a incremental change step was bigger than 64KB - fixed an issue for Solaris with the memory alignment fix not active everywhere - fixed an issue on the Solaris build settings - fixed an issue where sometimes yadifad would not find a configuration file given as a parameter with a relative path - fixed an issue where a wild-card would not be properly returned with an AXFR - fixed an issue where dynamically updating a zone at a speed such that the zone file would need to be written multiple times on disk before finishing the previous write could lead to a deadlock 20151026: YADIFA 2.1.4 The zone reader error reporting has been improved. Stacktrace support added for Solaris. Known issue: - Adding and or removing NSEC3PARAM dynamically is not properly handled. Fixes: - fixed an issue where an NSEC3 answer proving a * query would lead to a crash - fixed an issue where a private key may be not recognised as such - fixed an issue where dynamic update prerequisite check would fail a valid match - fixed an issue where zone signature maintenance would only start if all private keys were available. 20150821: YADIFA 2.1.3 Fixes: - fixed an issue that could lead to a crash at startup - fixed an issue where parsing a TYPE#### record would stop the parser prematurely 20150814: YADIFA 2.1.2 The ./configure script has a new option: --enable-full-ascii7 This changes the behaviour of DNS name validation to accept all the ASCII7 characters instead of only the DNS-space ones. Enabling this option is not recommended. Fixes: - fixes an issue where the hmac-shaX identification string sent with a TSIG had the suffix ".sig-alg.reg.int". 20150714: YADIFA 2.1.1 The yadifa command line has a new option: --config|-c file : read the specific configuration file instead of ~/.yadifa.rc Issues detected on the NSEC3 database have now been upgraded from debug to info/warning Fixes: - fixed an issue where, on some cases; the garbage collector for the zones was not triggering for a long time. - fixed an issue in the Makefile (courtesy of DENIC) - fixed an issue where a few bytes could be leaked in some rare cases when failing to unload a zone - fixed an issue in RRL where some values of IPv6 prefix - fixed an issue accepting some answers on IXFR transfers 20150424: YADIFA 2.1.0 New journal file format: This new format addresses a few issues like having maximum journal file and a relatively constant random access time even for very big sizes. The internal messaging queue has been changed to address huge amount of zones. New CHaos queries supported: hostname id.server Known issues: _ building successfully with LTO may require to append both AR=gcc-ar and RANLIB=gcc-ranlib to the ./configure command 20150403: YADIFA 2.0.6 This release is a public release. This minor update's sole purpose is to fix YADIFA builds on OpenBSD. Fixes: - fixed a crash that could occur while sending a massive amount of notifications - OpenBSD builds are fixed. Tested on: OpenBSD 5.6 amd64, standard installation. Configure: ./configure Tested on: OpenBSD 5.6 amd64, with gcc 4.9 installed. Configure: ./configure CC=egcc 20150226: YADIFA 2.0.5 This release is a public release. Fixes: - fixed an issue with huge IXFR transfers as a master - fixed an issue with notifications on slave-slave-master setup - fixed an issue with a potential infinite loop loading an AXFR from a master - fixed missing hmac-sha* from configuration - fixed an issue with TLSA records parsing - fixed an issue with base 16 encoding - fixed an issue parsing * domains - fixed an issue with some RRL motivated answers - increased the maximum number of network interfaces from 5 to 16 - fixed an error in the configuration examples where "statistics" was used instead of "stats" - minor fixes and improvements 20141216: YADIFA 2.0.4 This release is a public release. By popular demand, the default log file directory is now PREFIX/var/log/yadifa. It can be set using --with-logdir=/my/dir Improved build mechanism. It has been tested to work automatically on Linux, FreeBSD, OSX, SunOS. RedHat family builds will use -O2 as maximum optimisations. Note that some optional features are now enabled by default but can be disabled. Fixes: - fixed an issue with the AXFR transfer where the serial number would not be properly taken into account - fixed an issue with the notify mechanism that could occur if the server was only listening to 127.0.0.1 - fixed an issue with bogus DNSKEY records that may potentially lead to a crash in openssl - fixed a reported potential "tmpfile" vulnerability on DEBUG builds (generated with make debug) - fixed an issue with IPv6 connections on some architectures - typos fixes - minor fixes and improvements 20141104: Architecture portability enhancements. On Solaris, if no --enable-force32bits nor --enable-force64bits is set, then 64 bits will be forced (fixes an issue at link-time) ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC3 Extensions Required, dynamically linked, not stripped, no debugging information available PATH=/opt/csw/bin:/usr/ccs/bin:$PATH ./configure --enable-force32bits PATH=/opt/csw/bin:/usr/ccs/bin:$PATH make 20141030: Architecture portability enhancements. FreeBSD 9 FreeBSD dnode3 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 gcc (GCC) 4.2.1 20070831 patched [FreeBSD] ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900044), not stripped Ubuntu Linux dnode10 3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xe3b8601b9b5e59f8c9ce519cacbe9b8ff544ff1d, not stripped OSX Darwin RD-Mac-Mini.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Mach-O 64-bit executable x86_64 20141029: Architecture portability enhancements. uname -a gcc --version file yadifad YellowDog Linux Linux 2.6.29-3.ydl61.4 #1 SMP Mon Sep 7 14:50:27 PDT 2009 ppc64 ppc64 ppc64 GNU/Linux gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available Debian PPC64 Linux 3.2.0-3-powerpc64 #1 SMP Mon Jul 23 08:03:56 UTC 2012 ppc64 GNU/Linux gcc (Debian 4.6.3-8) 4.6.3 ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xedc47c984a4af7eb9a7ecbc0f135e4d064ba08f0, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available 20141016: YADIFA 2.0.2 TCP fallback support on truncation 20140905: YADIFA 2.0.0 This release is a public release Fixes: - fixed a log incorrectly reporting an error when the client didn't close the TCP connection fast enough - fixed an issue with the statistics on TCP queries Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140829: YADIFA 2.0.0-beta3-public This release is a public release - --disable-master feature at configure now builds a slave-only server Fixes: - fixed an issue with TSIG signed queries - fixed an issue with thread pool live resizing - fixed an issue where reading an undeleted obsolete journal ending at the start of a newly transferred zone from the master would incorrectly trigger an error Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140630: YADIFA 2.0.0-beta2-public This release is a public release - basepath disabled - pidpath removed, only pidfile remains - log reopen notification is now timestamped - slave zones no longer complain about missing NSEC/NSEC3 private keys - the error code ZRE_FILE_NOT_FOUND has been replaced by the more accurate code ZRE_NO_VALID_FILE_FOUND - default logging settings no longer output debug Fixes: - fixed issue in flag computation (AD,CD) - fixed an issue with journal truncation sometimes leading to a crash - zone parsing now correctly accepts '#' as a comment marker - zone parsing now rejects wrong fqdn as soon as it reads them, leading to a more accurate error message - removing the last dnskey of a zone no longer crashes the server Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. yadifa remote client commands prototype is now available with the following supported commands: -shutdown shuts down yadifa e.g. ./yadifa -s "192.0.2.1 port 53" -t shutdown -cfgreload reloads the and sections of the yadifad configuration e.g. ./yadifa -s "192.0.2.1 port 53" -t cfgreload -logreopen closes and reopen the log files e.g. ./yadifa -s "192.0.2.1 port 53" -t logreopen -freezeall prevents all zones from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freezeall -freeze prevents a zone from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freeze -q somedomain.eu -unfreezeall enables updates of all zones again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreezeall -unfreeze enables updates of a zone again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreeze -q somedomain.eu In order to work, the allow-control ACL must be defined either in
for the global commands and may also be defined in for the ones targeting a specific zone. e.g. allow-control 127.0.0.1 Note that tsig is not supported in the client yet. 20140528: YADIFA 2.0.0-beta1-public This release is a public release - NSID implemented (enabled at ./configure time with --enable-nsid - generic parser for: - getops - zone file - resolv.conf - configuration - '@' can now be used in a zone file - new binary for controlling 'yadifad' (yadifa) - framework is rewritten for multi core systems - single core server has been removed Fixes: - fixed several minor issues Know issues: - removing all dnskeys from a zone file crashes the server - yadifa has some issues with nodelay, nocork 20130424: YADIFA 1.1.0 _ added DSA signature _ added SHA-256 SHA-384 SHA-512 digest algorithms _ now supports additional DNSSEC algorithms: DSASHA1 DSASHA1_NSEC3 RSASHA256_NSEC3 RSASHA512_NSEC3 _ Respone Rate Limitation implemented (enabled at ./configure time with --enable-rrl) _ --enable-tiny-footprint now reduces the memory usage further by reducing the standard log queue from 2^20 to 2^12 entries _ the general speed has been slightly improved _ dynamic updates pending for more than 3 seconds are now dropped with an error _ dynamic provisioning Fixes: _ fixed a memory leak that could occur at NSEC3 generation when loading the zone failed in a particular way _ fixed a memory leak at ixfr send _ fixed handling of '_' character that was improperly stored in the database _ fixed bandwidth limit settings (tcp stream in and out) not always being taken from the configuration _ fixed TSIG answer verification for notifies _ fixed error codes not being registered and thus logged as unknown hexadecimal error code. _ other minor fixes 20130612: YADIFA 1.0.3 Fixes only (backports from 1.1.0) Fixes: _ fixed an issue preventing YADIFA from being build from another directory _ fixed an issue with OSX systems where gsed has to be used instead of sed _ fixed an issue with the '_' character not being properly handled _ fixed an issue where reading MX record from a zone file would incorrecly be rejected as invalid _ fixed an issue where the OPT record would not be properly written _ fixed an issue where an undefined ACL reference would be silently ignored _ fixed missing code tags for several error codes. From now on unregistered codes are dumped in hexadicimal. _ fixed portability issues with BSD and OSX _ fixed several minor issues 20120921: YADIFA 1.0.2 Fixes only Fixes: _ fixed an issue where the journal file was sometimes not properly closed at the end of a task _ fixed an issue where the TCP usage slots would sometimes wrongly return that they were all being used _ fixed an issue on IXFR processing (slave side) where the type of answer from the master would not be properly detected _ fixed an issue with TSIG on secrets not exactly 16 bytes long (binary form) _ fixed an issue on 32 bits architectures where the sig-validity-* fields would not be properly handled if not set on each zone section. _ slightly improved the replay time of big journal files _ fixed several minor issues Known issues: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120709: YADIFA 1.0.1 _ logging repeat compression is now by channel instead of global Fixes: _ fixed an issue where glibc whould assert if libgcc_s.so (libgcc_s.so.1) and libc.so (libc.so.6) where not available inside the chrooted directory of YADIFA _ fixed an issue in the syslog module Known issues: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120625: YADIFA 1.0.0 _ LTO support can be enabled with --enable-lto but this is not working with clang. LTO does not increase the performance significally _ parallel processing of listening addresses can now be enabled. It can be set using thread-count-by-address in the
section. By default YADIFA will not use parallel processing as this feature has not been as thoroughly tested as the single-thread processing model _ default parameters tuning _ fixes Known issue: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 20120530: YADIFA 1.0.0RC3 _ the configuration parser now ignores undefined logger names and report them with a warning _ syslog messages are now put in the name of "yadifad" instead of the name used for the "syslog" channel _ syslog messages do not print the time from YADIFA anymore _ improved the steps involved in loading a locally cached slave zone _ zones are now loaded in background _ man page yadifad-conf.man5 renamed into yadifad.conf.man5 Fixes: _ AXFR/IXFR answers with the RA bit set are nolonger rejected as invalid _ YADIFA now answers to SIGINT again (shutdown) _ fixed an issue where obsolete AXFR files were not always being deleted _ fixed an issue occurring when both IPv4 and IPv6 were available to handle a notify _ fixed journal replay issue where some RRSIGs records were not properly removed _ fixed an issue occurring with IPv6 queries _ fixed an issue in the generation of a specific NSEC3 error answer _ fixed named query style layout Known issue: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120328: YADIFA 1.0.0RC2 _ fixed logging issue on work file creation error _ fixed an issue where IXFR queries could be rejected as being wrongly formatted _ fixed an issue in the query logging text _ enabled command line options ( -u uid -g gid -d ) 20120319: YADIFA 1.0.0RC1 Is a full functional authoritative name server: - works as primary or secondary name server - AXFR - IXFR - NOTIFY - NSUPDATE - TSIG - CLASSES: - IN - CH (just for version) - TYPES: - AAAA - CNAME - DNSKEY - DS - HINFO - MX - NAPTR - NS - NSEC3 - NSEC3PARAM - NSEC - PTR - RRSIG - SOA - SRV - SSHFP - TXT - Automatic resigning - DNSSEC algorithms: - 5 (RSASHA1) - 7 (RSASHA1-NSEC3 - ACL's KNOWN ISSUES: NSEC3: _ cannot work with multiple NSEC3PARAM chains with mixed OPT-IN/OUT settings _ adding a new NSEC3 chain expects that the master sends the NSEC3PARAM first (it does not seems to be always the case) We have a case where a master starts with 2 thousands NSEC3 opt-out records then adds 6 millions NSEC3 opt-in records but does not give the NSEC3PARAM record first. The slave server rejects them all because it's unable to link them to a chain. (This one has high priority) DNSSEC: _ it is not allowed to change the zone security mode (unsecure, NSEC, or NSEC3). Once the zone is loaded it keeps its security mode. _ dynamic updates of NSEC as well as NSEC3 records are refused QUIT: the server will shutdown on the following conditions: _ detection of an impossible situation or an internal integrity issue (ie: for any reason the SOA has vanished from a zone) _ memory limit reached which prevents any more work _ ipc issue which prevent internal services communication ACL: _ since the access control is set by zone and CHAOS class is not implemented as a configurable zone, it is not possible (yet) to specifically block CHAOS queries. 20111121: YADIFA 0.5.5 - many fixes KNOWN ISSUE: NSEC3 slave zone replay fails. 20110706: YADIFA 0.5.0 - slave mode, AXFR/IXFR (no TSIG yet for the slave-side transfer) - answers to a notify from the master - polls the (first) master on the masters list - maintains the .axfr & .ix files (deletes the obsoletes ones) - TSIG queries are checked - Replays the zone journal on startup after the zone load (journaling) - Answers IXFR queries (journaling) 20110601: YADIFA 0.4.0 Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries with TSIG - nsupdate functionality (journaling) - TSIG on client server side will be transmitted, but not checked - ACL works - The zone has SOA, NS A resource records. 20110524: YADIFA 0.3.0 First release internally of yadifad 20110524115500 GMT+1. Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries - The zone has SOA, NS A resource records. 20091224: YADIFA 0.2.0 _ Answers AXFR queries _ ACL based on IP and TSIG (not all query types are ACL'ed yet) 20091104: YADIFA 0.1.0 YADIFA is a work in progress. The main goal is to have an alternative for BIND or NSD. Version 0.1.0 is an authoritative server only. It has no: - AXFR/IXFR functionality - dynupdate - support for NSEC - support for NSEC3 - caching mechanism - additional tools (eg.dig, dnssectools, drill,...) It has: - a very fast way to give authoritative answer - a very fast method for loading the database and checking the zone files This first release is to have a feeling how it works in an operational environment. TODO Everything what is not implemented, has to be implemented. Most of the code is there, but is not activated. No comformity tests has been done. (This of course is on the todo list) Bug Reports and Mailing Lists Bugs reports should be sent to bugreport@yadifa.eu yadifa-2.1.6-5826/PaxHeaders.8028/doc0000644000077100007710000000013212654663025015034 xustar000000000000000030 mtime=1454597653.572344534 30 atime=1454597653.489344534 30 ctime=1454597653.572344534 yadifa-2.1.6-5826/doc/0000775000077100007710000000000012654663025014717 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/doc/PaxHeaders.8028/Makefile.am0000644000077100007710000000012412650131756017143 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.094344 30 ctime=1454597653.554344534 yadifa-2.1.6-5826/doc/Makefile.am0000664000077100007710000000410612650131756016751 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # YADIFA doc Makefile.am script # ############################################################################## dist_man8_MANS = yadifad.man yadifa.man dist_man5_MANS = yadifad.conf.man yadifa.rc.man ACLOCAL_AMFLAGS = -I m4 doc: . doxygen yadifa.doxygen release: profile: debug: yadifa-2.1.6-5826/doc/PaxHeaders.8028/Makefile.in0000644000077100007710000000013212654662555017165 xustar000000000000000030 mtime=1454597485.980344534 30 atime=1454597485.980344534 30 ctime=1454597653.573344534 yadifa-2.1.6-5826/doc/Makefile.in0000664000077100007710000005111712654662555017000 0ustar00yadifayadifa00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # YADIFA doc Makefile.am script # ############################################################################## VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@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@ subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/eurid.m4 $(top_srcdir)/m4/yadifa.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man5dir = $(mandir)/man5 am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" man8dir = $(mandir)/man8 NROFF = nroff MANS = $(dist_man5_MANS) $(dist_man8_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(dist_man5_MANS) $(dist_man8_MANS) \ $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCOPTIMISATIONFLAGS = @CCOPTIMISATIONFLAGS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAS_ACL_SUPPORT = @HAS_ACL_SUPPORT@ HAS_BFD_DEBUG_SUPPORT = @HAS_BFD_DEBUG_SUPPORT@ HAS_BIG_ENDIAN = @HAS_BIG_ENDIAN@ HAS_CC_ADDRESS_SANITIZER_CHECK = @HAS_CC_ADDRESS_SANITIZER_CHECK@ HAS_CC_ANSI = @HAS_CC_ANSI@ HAS_CC_ANSI_ALIAS = @HAS_CC_ANSI_ALIAS@ HAS_CC_CATCH_UNDEFINED_BEHAVIOR = @HAS_CC_CATCH_UNDEFINED_BEHAVIOR@ HAS_CC_DWARF2 = @HAS_CC_DWARF2@ HAS_CC_DWARF3 = @HAS_CC_DWARF3@ HAS_CC_DWARF4 = @HAS_CC_DWARF4@ HAS_CC_EXCEPTIONS = @HAS_CC_EXCEPTIONS@ HAS_CC_G = @HAS_CC_G@ HAS_CC_G3 = @HAS_CC_G3@ HAS_CC_M32 = @HAS_CC_M32@ HAS_CC_M64 = @HAS_CC_M64@ HAS_CC_MISSING_FIELD_INITIALIZERS = @HAS_CC_MISSING_FIELD_INITIALIZERS@ HAS_CC_NO_IDENT = @HAS_CC_NO_IDENT@ HAS_CC_NO_OMIT_FRAME_POINTER = @HAS_CC_NO_OMIT_FRAME_POINTER@ HAS_CC_PEDANTIC = @HAS_CC_PEDANTIC@ HAS_CC_RDYNAMIC = @HAS_CC_RDYNAMIC@ HAS_CC_SANITIZE_ADDRESS = @HAS_CC_SANITIZE_ADDRESS@ HAS_CC_STACK_PROTECTOR = @HAS_CC_STACK_PROTECTOR@ HAS_CC_STD_C99 = @HAS_CC_STD_C99@ HAS_CC_STD_GNU99 = @HAS_CC_STD_GNU99@ HAS_CC_TUNE_NATIVE = @HAS_CC_TUNE_NATIVE@ HAS_CC_WALL = @HAS_CC_WALL@ HAS_CC_XC99 = @HAS_CC_XC99@ HAS_CTRL = @HAS_CTRL@ HAS_CTRL_DYNAMIC_PROVISIONING = @HAS_CTRL_DYNAMIC_PROVISIONING@ HAS_DYNUPDATE_SUPPORT = @HAS_DYNUPDATE_SUPPORT@ HAS_FULL_ASCII7 = @HAS_FULL_ASCII7@ HAS_LITTLE_ENDIAN = @HAS_LITTLE_ENDIAN@ HAS_LOGDIR = @HAS_LOGDIR@ HAS_LOG_PID_ALWAYS_ON = @HAS_LOG_PID_ALWAYS_ON@ HAS_LOG_THREAD_ID_ALWAYS_ON = @HAS_LOG_THREAD_ID_ALWAYS_ON@ HAS_MALLOC_DEBUG_SUPPORT = @HAS_MALLOC_DEBUG_SUPPORT@ HAS_MASTER_SUPPORT = @HAS_MASTER_SUPPORT@ HAS_MESSAGES_SUPPORT = @HAS_MESSAGES_SUPPORT@ HAS_MUTEX_DEBUG_SUPPORT = @HAS_MUTEX_DEBUG_SUPPORT@ HAS_NON_AA_AXFR_SUPPORT = @HAS_NON_AA_AXFR_SUPPORT@ HAS_NSID_SUPPORT = @HAS_NSID_SUPPORT@ HAS_RRL_SUPPORT = @HAS_RRL_SUPPORT@ HAS_RRSIG_MANAGEMENT_SUPPORT = @HAS_RRSIG_MANAGEMENT_SUPPORT@ HAS_TOOLS = @HAS_TOOLS@ HAS_TSIG_SUPPORT = @HAS_TSIG_SUPPORT@ HAS_ZALLOC_DEBUG_SUPPORT = @HAS_ZALLOC_DEBUG_SUPPORT@ HAS_ZALLOC_STATISTICS_SUPPORT = @HAS_ZALLOC_STATISTICS_SUPPORT@ HAS_ZALLOC_SUPPORT = @HAS_ZALLOC_SUPPORT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IS_BSD_FAMILY = @IS_BSD_FAMILY@ IS_DARWIN_OS = @IS_DARWIN_OS@ IS_LINUX_FAMILY = @IS_LINUX_FAMILY@ IS_SOLARIS_FAMILY = @IS_SOLARIS_FAMILY@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ 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@ logdir = @logdir@ 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@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ dist_man8_MANS = yadifad.man yadifa.man dist_man5_MANS = yadifad.conf.man yadifa.rc.man ACLOCAL_AMFLAGS = -I m4 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man5: $(dist_man5_MANS) @$(NORMAL_INSTALL) @list1='$(dist_man5_MANS)'; \ list2=''; \ test -n "$(man5dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.5[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ done; } uninstall-man5: @$(NORMAL_UNINSTALL) @list='$(dist_man5_MANS)'; test -n "$(man5dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) install-man8: $(dist_man8_MANS) @$(NORMAL_INSTALL) @list1='$(dist_man8_MANS)'; \ list2=''; \ test -n "$(man8dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.8[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ done; } uninstall-man8: @$(NORMAL_UNINSTALL) @list='$(dist_man8_MANS)'; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: 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 "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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 $(MANS) installdirs: for dir in "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man5 install-man8 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am 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-man uninstall-man: uninstall-man5 uninstall-man8 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool 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-man5 install-man8 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-am uninstall \ uninstall-am uninstall-man uninstall-man5 uninstall-man8 .PRECIOUS: Makefile doc: . doxygen yadifa.doxygen release: profile: debug: # 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: yadifa-2.1.6-5826/doc/PaxHeaders.8028/yadifa.rc.man0000644000077100007710000000012412654654373017455 xustar000000000000000027 mtime=1454594299.817879 27 atime=1454597464.098344 30 ctime=1454597653.562344534 yadifa-2.1.6-5826/doc/yadifa.rc.man0000664000077100007710000000572312654654373017271 0ustar00yadifayadifa00000000000000'\" t .\" Manual page created with latex2man on Thu Feb 4 14:25:13 CET 2016 .\" NOTE: This file is generated, DO NOT EDIT. .de Vb .ft CW .nf .. .de Ve .ft R .fi .. .TH "YADIFA\-RC" "5" "2016\-02\-04" "YADIFA " "YADIFA " .SH NAME .PP yadifa.rc is the configuration file for \fIyadifa\fP(8)\&. .PP .SH SYNOPSIS .PP ${HOME}/.yadifa.rc .PP .SH DESCRIPTION .PP The configuration of yadifa has several containers: .PP .TP \fB\fP General container .TP \fB\fP TSIG keys .PP The configuration supports included files. .br example: include /home/yadifa/yadifa\-keys.conf .PP The configuration files can be nested. .PP The configuration consists of: .PP .TP .B * Container, which starts with and ends with .TP .B * Variable name .TP .B * 1 or 2 arguments .TP .B * Arguments can contain 1 or more comma separated values. .PP eg. .PP .Vb # variable argument variable value1 # variable argument1 argument2 variable value1 value2 # variable argument1 variable value1,value2 .Ve .PP .SH EXAMPLES .PP Examples of containers defined for a configuration file. .PP .TP .B * YADIFA, General .RS .TP 1. Config with Key .RS .PP .Vb # start .yadifa.rc server "192.0.2.1 port 53" tsig\-key\-name Admin\-key # end .yadifa.rc .Ve .PP .RE .RE .PP .RE .TP .B * KEY, TSIG\-key configuration .br .PP .RS .TP 1. Admin\-key key definition (the name is arbitrary) .Vb name Admin\-key algorithm hmac\-md5 secret WorthlessKeyForExample== .Ve .RE .RS .PP .RE .PP .SH FILES .PP .RE .TP yadifa The name server remote client. .TP $HOME/.yadifa.rc default rcfile. .PP .TP yadifa.rc.5 This man page. .TP yadifa.8 Man page for yadifa\&. .PP .SH SEE ALSO .PP \fIyadifa\fP(8) .PP .SH NOTES .PP Since unquoted leading whitespace is generally ignored in the \&.yadifa.rc you can indent everything to taste. .PP .SH CHANGES .PP Please check the file README from the sources. .PP .SH VERSION .PP Version: 2.1.6 of 2016-02-04\&. .PP .SH MAILING LISTS .PP There exists a mailinglist for questions relating to any program in the yadifa package: .br .TP .B * \fByadifa\-users@mailinglists.yadifa.eu\fP .br for submitting questions/answers. .PP .TP .B * \fBhttp://www.yadifa.eu/mailing\-list\-users\fP .br for subscription requests. .PP If you would like to stay informed about new versions and official patches send a subscription request to via: .TP .B * \fBhttp://www.yadifa.eu/mailing\-list\-announcements\fP .PP (this is a readonly list). .PP .SH LICENSE AND COPYRIGHT .PP .TP Copyright (C) 2012\-2016, EURid .br B\-1831 Diegem, Belgium .br \fBinfo@yadifa.eu\fP .PP .SH AUTHORS .PP Gery Van Emelen .br Email: \fBGery.VanEmelen@EURid.eu\fP .br Eric Diaz Fernandez .br Email: \fBEric.DiazFernandez@EURid.eu\fP .PP WWW: \fBhttp://www.EURid.eu\fP .PP .\" NOTE: This file is generated, DO NOT EDIT. yadifa-2.1.6-5826/doc/PaxHeaders.8028/yadifad.man0000644000077100007710000000012412654654373017216 xustar000000000000000027 mtime=1454594299.817879 27 atime=1454597464.099344 30 ctime=1454597653.565344534 yadifa-2.1.6-5826/doc/yadifad.man0000664000077100007710000000727312654654373017034 0ustar00yadifayadifa00000000000000'\" t .\" Manual page created with latex2man .\" NOTE: This file is generated, DO NOT EDIT. .de Vb .ft CW .nf .. .de Ve .ft R .fi .. .TH "YADIFAD" "8" "2016\-02\-04" "YADIFA " "YADIFA " .SH NAME yadifad \- an authoritative Internet domain name server. .PP .SH SYNOPSIS .PP yadifad [\fB\-\-config|\-c\fP\fI configfile\fP] [\fB\-\-daemon|\-d\fP] [\fB\-u\fP\fI uid\fP] [\fB\-g\fP\fI gid\fP] [\fB\-V\fP] [\fB\-h\fP] .PP .SH DESCRIPTION yadifad is a Domain Name System (DNS) server, part of the YADIFA distribution from EURid vzw/asbl. The latest version of YADIFA can be found on: .br .ce 100 \fBhttp://www.yadifa.eu/download\fP .ce 0 .PP yadifad reads the zone files from yadifad.conf, and starts up an authoritative name server. It listens to UDP and TCP DNS queries and returns answers from its own database. .PP yadifad knows the main DNS protocols: .TP .B * AXFR .TP .B * IXFR .TP .B * DNSSEC .TP .B * DNS Update .TP .B * NOTIFY .PP .br yadifad works only with 1 CLASS: .nf .ta 3i 4.5i Class Value Definition IN 1 (Internet class) yadifad supports following TYPES: Type Value Defining RFC A 1 1035 AAAA 28 3596 CNAME 5 1035 DNSKEY 48 4034 DS 43 4034 HINFO 12 1035 MX 15 1035 NAPTR 35 3403 NS 2 1035 NSEC 47 4034 NSEC3 50 5155 NSEC3PARAM 51 5155 PTR 12 1035 RRSIG 46 4034 SOA 6 1035 SRV 33 2782 SSHFP 44 4255 TLSA 52 6698 TXT 16 1035 Other tyes and pseudo resource records: * 255 1035 AXFR 252 1035 IXFR 251 1035 OPT 41 6891 .PP .SH OPTIONS .PP .TP [\fB\-\-config|\-c\fP\fI configfile\fP] Another config file will be used. .TP [\fB\-\-daemon|\-d\fP] Starts the name server in daemon mode. .TP [\fB\-\-uid|\-u\fP\fI uid\fP] Starts the name server with the given uid. .TP [\fB\-\-gid|\-g\fP\fI gid\fP] Starts the name server with the given gid. .PP .TP [\fB\-V\fP] Shows version information. .TP [\fB\-\-help|\-h\fP] Shows a help text .PP .SH SIGNALS .PP .TP SIGHUP reloads the zone and key sections in the configuration file and reloads the zone file(s) with incremented serial number, and close all log files and reopens them. .TP SIGINT shuts down the server .TP SIGTERM (see SIGINT) .PP .SH FILES .PP .TP yadifad.conf The YADIFA configuration file. .TP yadifad The name server binary. .TP yadifad.8 This man page. .TP yadifad.conf.5 Configuration man page for YADIFA. .PP .SH SEE ALSO .PP \fIyadifad.conf\fP(5) .PP .SH REQUIREMENTS .PP .TP OpenSSL yadifad requires OpenSSL version 0.9.8 or later. .PP .SH CHANGES Please check the README file from the source code. .PP .SH VERSION .PP Version: 2.1.6 of 2016-02-04\&. .PP .SH MAILING LISTS .PP There is a mailinglist for questions relating to any program in the yadifa package: .br .TP .B * \fByadifa\-users@mailinglists.yadifa.eu\fP .br for submitting questions/answers. .PP .TP .B * \fBhttp://www.yadifa.eu/mailing\-list\-users\fP .br for subscription requests. .PP If you would like to stay informed about new versions and official patches send a subscription request to via: .TP .B * \fBhttp://www.yadifa.eu/mailing\-list\-announcements\fP .PP (this is a read\-only list). .PP .SH LICENSE AND COPYRIGHT .PP .TP Copyright (C) 2011\-2016, EURid vzw/asbl .br B\-1831 Diegem, Belgium .br \fBinfo@yadifa.eu\fP .PP .SH AUTHORS .PP Gery Van Emelen .br Email: \fBGery.VanEmelen@EURid.eu\fP .br Eric Diaz Fernandez .br Email: \fBEric.DiazFernandez@EURid.eu\fP .PP WWW: \fBhttp://www.EURid.eu\fP .PP .\" NOTE: This file is generated, DO NOT EDIT. yadifa-2.1.6-5826/doc/PaxHeaders.8028/yadifad.conf.man0000644000077100007710000000012412654654373020142 xustar000000000000000027 mtime=1454594299.817879 27 atime=1454597464.083344 30 ctime=1454597653.558344534 yadifa-2.1.6-5826/doc/yadifad.conf.man0000664000077100007710000003426212654654373017756 0ustar00yadifayadifa00000000000000'\" t .\" Manual page created with latex2man on Thu Feb 4 12:10:08 CET 2016 .\" NOTE: This file is generated, DO NOT EDIT. .de Vb .ft CW .nf .. .de Ve .ft R .fi .. .TH "YADIFAD\-CONF" "5" "2016\-02\-04" "YADIFA " "YADIFA " .SH NAME .PP yadifad.conf \- configuration file for \fIyadifad\fP(8)\&. .PP .SH SYNOPSIS .PP ${PREFIX}/etc/yadifad.conf .PP .SH DESCRIPTION .PP The configuration of yadifad has several containers: .TP \fB
\fP General container .TP TSIG keys .TP Access lists .TP NameServer IDentifier .TP Response Rate Limiting directives .TP Description of the domain name in specific attributes .TP Description of the logger outputs .TP Description of the loggers. .PP The configuration supports included files. .br example: include /etc/yadifa/conf.d/local.conf .PP The configuration files can be nested. .PP The configuration consists of: .TP .B * Container, which starts with and ends with .TP .B * Variable name .TP .B * 1 or 2 arguments .TP .B * Arguments can contain 1 or more comma separated values. .PP eg. .PP .Vb # variable argument variable value1 # variable argument1 argument2 variable value1 value2 # variable argument1 variable value1,value2 .Ve .PP .SH EXAMPLES .PP Examples of containers defined for a configuration file. .PP .TP .B * Main .RS .TP 1. Config with includes .RS .PP .Vb # start yadifad.conf
container include /etc/yadifa/conf.d/local.conf # end yadifad.conf
container .Ve .PP .RE .TP 2. Main without includes .RS .PP .Vb
# Detach from the console (alias: daemonize) daemon off # Jail the application chroot off # The path of the log files (alias: chroot\-path) chrootpath "/chroot/yadifad" # The path of the log files (alias: log\-path) logpath "/var/log/yadifa" # The location of the pid file (alias: pid\-file) pidfile "/var/run/yadifa/yadifad.pid" # The path of the zone files (alias: data\-path) datapath "/var/lib/yadifa" # The path of the DNSSEC keys (alias: keys\-path) keyspath "/var/lib/yadifa/keys" # The path of the transfer and journaling files (AXFR & IXFR) (alias: xfr\-path) xfrpath "/var/lib/yadifa/xfr" # A string returned by a query of hostname. CH TXT # note: if you leave this out, the real hostname will be given back (alias: hostname\-chaos) hostname "server\-yadifad" # An ID returned by a query to id.server. CH TXT (alias: serverid\-chaos) serverid "yadifad\-01" # The version returned by a query to version.yadifa. CH TXT (alias: version\-chaos) version "2.1.6" # Set the maximum UDP packet size. # note: the packetsize cannot be less than 512 or more than 65535. # Typical choice is 4096. edns0\-max\-size 4096 # The maximum number of parallel TCP queries (max\-tcp\-connections) max\-tcp\-queries 100 # The minimum data rate for a TCP query (in bytes per second) tcp\-query\-min\-rate 512 # The user id to use (alias: user) uid yadifa # The group id to use (alias: group) gid yadifa # The DNS port \- any DNS query will use that port unless a specific value is used (alias: server\-port) port 53 # The interfaces to listen to. # listen 0.0.0.0 listen 127.0.0.1, 192.0.2.2, 192.0.2.130 port 8053, 2001:db8::2 # Type of querylog to use # 0: none # 1: yadifa # 2: bind # 3: both yadifa and bind queries\-log\-type 1 # Enable the collection and logging of statistics statistics on # Maximum number of seconds between two statistics lines statistics\-max\-period 60 # Drop queries with erroneous content # # answer\-formerr\-packets on answer\-formerr\-packets off # Maximum number of records in an AXFR packet. Set to 1 for compatibility # with very old name servers (alias: axfr\-max\-record\-by\-packet) axfr\-maxrecordbypacket 0 # Global Access Control rules # # Rules can be defined on network ranges, TSIG signatures, and ACL rules # simple queries: # # allow\-query any allow\-query !192.0.2.251,any # dynamic update of a zone # # allow\-update none allow\-update admins # dynamic update of a slave (forwarded to the master) # # allow\-update\-forwarding none allow\-update\-forwarding admins,key abroad\-admin\-key # transfer of a zone (AXFR or IXFR) # # allow\-transfer any allow\-transfer transferer # notify of a change in the master # # allow\-notify any allow\-notify master,admins # If YADIFA has the controller enabled, allow control only for these # clients (none by default) allow\-control localhost # overwrite the amount of CPUs detected by yadifad cpu\-count\-override 3 # set the number of threads to serve queries thread\-count\-by\-address 2
.Ve .RE .RE .PP .RE .TP .B * Key .br TSIG\-key configuration .br .PP .RS .TP 1. Admin\-key key definition (the name is arbitrary) .RS .PP .Vb name abroad\-admin\-key algorithm hmac\-md5 secret WorthlessKeyForExample== .Ve .PP .RE .TP 2. Master\-slave key definition .RS .PP .Vb name master\-slave algorithm hmac\-md5 secret MasterAndSlavesTSIGKey== .Ve .RE .RE .PP .RE .TP .B * ACL .br Access Control List definitions .br .PP .RS .TP 1. Master\-slave key use .RS .PP .Vb transferer key master\-slave admins 192.0.2.0/24, 2001:db8::74 master 192.0.2.53 localhost 127.0.0.0/8, ::1 .Ve .PP .RE .RE .PP .RE .TP .B * NSID .br DNS NameServer IDentifier .br .PP .RS .TP 1. Example with ascii .RS .PP .Vb ascii belgium\-brussels\-01 .Ve .PP .RE .TP 2. Example with hex .RS .PP .Vb hex 00320201 .Ve .RE .RE .PP .RE .TP .B * RRL .br Response Rate Limiting .PP .Vb # Number of identical responses per second before responses are being limited responses\-per\-second 5 # Number of errors per second before reponses are being limited errors\-per\-second 5 # Random slip parameter slip 10 # If enabled, the rate limits are only logged and not enforced log\-only off # Mask applied to group the IPv4 clients ipv4\-prefix\-length 24 # Mask applied to group the IPv6 clients ipv6\-prefix\-length 56 # Rate limits are not subject to the following clients (aka whitelist) exempt\-clients none # Enable or disable the rate limit capabilities enabled yes .Ve .PP .TP .B * Zone .PP .RS .TP 1. Master domain zone config .RS .PP .Vb # This server is master for the zone (mandatory) type master # The domain name (mandatory) domain mydomain.eu # The zone file, relative to 'datapath' (mandatory for a master) (alias: file\-name) file master/mydomain.eu # List of servers also notified of a change (beside the ones in the zone file) (alias: notifies, notify) also\-notify 192.0.2.84, 192.0.2.149 # Set the size of the journal file in KB (alias: journal\-size\-kb) journal\-size 8192 # Allow dynupdate for these ACL entries allow\-update admins # Allow AXFR/IXFR for these ACL entries allow\-transfer transferer .Ve .PP .RE .TP 2. Slave domain zone config .RS .PP .Vb # This server is slave for that zone (mandatory) type slave # The domain name (mandatory) domain myotherdomain.eu # The address of the master (mandatory for a slave, forbidden for a master) (alias: master) masters 191.0.2.53 port 4053 key master\-slave # The zone file, relative to 'datapath'. file slaves/myotherdomain.eu # Accept notifes from these ACL entries allow\-notify master .Ve .PP .RE .RE .PP .RE .TP .B * Channels .PP Logging output\-channel configurations: .PP The "name" is arbitrary and is used in the . .br The "stream\-name" defines the output type (ie: a file name or syslog). .br The "arguments" are specific to the output type (ie: unix file access rights or syslog options and facilities). .br .PP .RS .RS .PP .RE .TP 1. Example: YADIFA running as daemon channel definition. .br .RS .PP .Vb # name stream\-name arguments database database.log 0644 dnssec dnssec.log 0644 server server.log 0644 statistics statistics.log 0644 system system.log 0644 queries queries.log 0644 zone zone.log 0644 all all.log 0644 syslog syslog user .Ve .PP .RE .TP 2. Example: YADIFA running in debug mode. .br This example shows the "stderr" and "stdout" which can also be used in the first example, but will output to the console. .RS .PP .Vb # name stream\-name arguments syslog syslog user stderr STDERR stdout STDOUT .Ve .PP .RE .RE .PP .RE .TP .B * Loggers .PP Logging input configurations: .PP The "bundle" name is predifined: database, dnssec, server, statistics, system, zone. .br The "debuglevel" uses the same names as syslog or "*" or "all" to filter the input. .br .PP The "channels" are a comma\-separated list of channels. .PP .RS .TP 1. Example without syslog .RS .PP .Vb # bundle debuglevel channels database ALL database,all dnssec warning dnssec,all server INFO,WARNING,ERR,CRIT,ALERT,EMERG server,all statistics * statistics system * system,all queries * queries zone * zone,all .Ve .PP .RE .TP 2. Example with syslog .RS .PP .Vb # bundle debuglevel channels database ALL database,syslog dnssec warning dnssec,syslog server INFO,WARNING,ERR,CRIT,ALERT,EMERG server,syslog stats * statistics, syslog system * system,syslog queries * queries,syslog zone * zone,syslog .Ve .RE .RE .PP The defined loggers are: .PP .RS .RE .TP system contains low level messages about the system such as memory allocation, threading, IOs, timers and cryptography, \&.\&.\&. .TP database It contains messages about most lower\-level operations in the DNS database. ie: journal, updates, zone loading and sanitization, DNS message query resolution, \&.\&.\&.) .TP dnssec contains messages about lower\-level dnssec operations in the DNS database. ie: status, maintenance, verification, \&.\&.\&. .TP server contains messages about operations in the DNS server. ie: start up, shutdown, configuration, transfers, various services status (database management, network management, DNS notification management, dynamic update management, resource rate limiting, \&.\&.\&.) .TP zone contains messages about the loading of a zone from a source (file parsing, transferred binary zone reading, \&.\&.\&.) .TP stats contains the statistics of the server. .TP queries contains the queries on the server. Queries can be logged with the BIND and/or with the YADIFA format. .br .br \fBBIND format:\fP .br .br client sender\-ip#port: query: fqdn class type +SETDC (listen\-ip) .br .br \fBYADIFA format:\fP .br .br query [ id ] {+SETDC} fqdn class type (sender\-ip#port) .br .br where: .RS .TP id is the query message id .TP + means the message has the Recursion Desired flag set .TP S means the message is signed with a TSIG .TP E means the message is EDNS .TP T means the message was sent using TCP instead of UDP .TP D means the message has the DNSSEC OK flag set .TP C means the message has the Checking Disabled flag set .TP fqdn is the queried FQDN .TP class is the queried class .TP type is the queried type .TP sender\-ip is the IP of the client that sent the query .TP port is the port of the client that sent the query .TP listen\-ip is the listen network interface that received the message .RE .RS .PP Note that on YADIFA any unset flag is replaced by a \&'\-\&', on BIND only the \&'+\&' follows that rule. .RE .RE .PP System operators will mostly be interested in the info and above messages of queries and stats, as well as the error and above messages of the other loggers. .PP .RE .PP .SH SEE ALSO .PP \fIyadifad\fP(8) .PP .SH NOTES .PP Since unquoted leading whitespace is generally ignored in the yadifad.conf you can indent everything to taste. .PP .SH CHANGES .PP Please check the file ChangeLog from the sources. .PP .SH VERSION .PP Version: 2.1.6 of 2016-02-04\&. .PP .SH MAILING LISTS .PP There exists a mailinglist for questions relating to any program in the yadifa package: .br .RE .TP .B * \fByadifa\-users@mailinglists.yadifa.eu\fP .br for submitting questions/answers. .PP .TP .B * \fBhttp://www.yadifa.eu/mailing\-list\-users\fP .br for subscription requests. .PP If you would like to stay informed about new versions and official patches send a subscription request to via: .TP .B * \fBhttp://www.yadifa.eu/mailing\-list\-announcements\fP .PP (this is a readonly list). .PP .SH LICENSE AND COPYRIGHT .PP .TP Copyright (C) 2011\-2016, EURid .br B\-1831 Diegem, Belgium .br \fBinfo@yadifa.eu\fP .PP .SH AUTHORS .PP Gery Van Emelen .br Email: \fBGery.VanEmelen@EURid.eu\fP .br Eric Diaz Fernandez .br Email: \fBEric.DiazFernandez@EURid.eu\fP .PP WWW: \fBhttp://www.EURid.eu\fP .PP .\" NOTE: This file is generated, DO NOT EDIT. yadifa-2.1.6-5826/doc/PaxHeaders.8028/yadifa.man0000644000077100007710000000012412654654373017052 xustar000000000000000027 mtime=1454594299.817879 27 atime=1454597464.093344 30 ctime=1454597653.569344534 yadifa-2.1.6-5826/doc/yadifa.man0000664000077100007710000000710512654654373016662 0ustar00yadifayadifa00000000000000'\" t .\" Manual page created with latex2man on Thu Feb 04 14:26:28 CET 2016 .\" NOTE: This file is generated, DO NOT EDIT. .de Vb .ft CW .nf .. .de Ve .ft R .fi .. .TH "YADIFA" "8" "2016\-02\-04" "YADIFA " "YADIFA " .SH NAME .PP YADIFA is an utility for controlling YADIFAD .PP .SH SYNOPSIS .PP yadifa [\fB\-s\fP\fI host\fP] [\fB\-V\fP] [\fB\-h\fP] [\fB\-t command\fP] [\fB\-q zone\fP] .PP .SH DESCRIPTION yadifa controls the operation of yadifad\&. .PP yadifa communicates with a name server over a TCP connection. The protocol used between client \- server is an extension of the DNS protocol. The authentication is done by a mutual key between client and server. This key has the same format as a TSIG. Authentication is not needed, but provides more secure communication if used. .PP Several algorithms can be used for creating a TSIG: .TP .B * HMAC\-MD5 .TP .B * HMAC\-SHA1 .PP .SH OPTIONS .TP [\fB\-\-config|\-c\fP\fI configfile\fP] Another config file will be used. .TP [\fB\-\-server|\-s\fP\fI host\fP] Host is the remote server to operate. If used with a different port: e.g.: \&./yadifa \-\-server "192.0.2.1 port 5353" .PP .TP [\fB\-V\fP] Show version information. .TP [\fB\-\-help|\-h\fP] Show a help text .PP .SH COMMANDS .TP [\fB\-t freeze \fP[\fI\-q zone\fP]] disables updates to a zone. .TP [\fB\-t freezeall\fP] disables updates to all zones. .TP [\fB\-t unfreeze \fP[\fI\-q zone\fP]] enables updates to a zone. .TP [\fB\-t unfreezeall\fP] enables updates to all zones. .PP .TP [\fB\-t reload \fP[\fI\-q zone\fP]] triggers the loading of the zone file(s) if the serial number is incremented. If no zone is specified, all zones are implied. .TP [\fB\-t cfgreload \fP[\fI\-q zone\fP]] reload the zone and key sections in the configuration file and reload the zone file(s) with increased serial number. If a zone is specified only that zone section is reloaded. .TP [\fB\-t sync \fP[\fI\-q zone\fP]] write the zone to disk and optionally removes the journal. If no zone is specified, all zones are implied. The extra [\-\-clean] option will remove the journal. .TP [\fB\-t querylog \fP\fI\-\-enable|\-\-disable\fP] sets the log for queries on or off. .TP [\fB\-t logreopen\fP] close all log files and reopens them. .TP [\fB\-t shutdown\fP] shuts down the server. .PP .SH FILES .PP .TP yadifa The name server remote client. .TP $HOME/.yadifa.rc default rcfile. .PP .TP yadifa.rc.5 Configuration man page for yadifa\&. .TP yadifa.8 This man page. .PP .SH SEE ALSO .PP \fIyadifa.rc\fP(5) \fIyadifad\fP(8) .PP .SH REQUIREMENTS .PP .TP OpenSSL yadifad requires OpenSSL version 0.9.8 or later. .PP .SH CHANGES Please check the ChangeLog file from the sources code. .PP .SH VERSION .PP Version: 2.1.6 of 2016-02-04\&. .PP .SH MAILINGLIST There is a mailinglist for questions relating to any program in the yadifa package: .br .TP .B * \fByadifa\-users@mailinglists.yadifa.eu\fP .br for submitting questions/answers. .PP .TP .B * \fBhttp://www.yadifa.eu/mailing\-list\-users\fP .br for subscription requests. .PP If you would like to stay informed about new versions and official patches send a subscription request to via: .TP .B * \fBhttp://www.yadifa.eu/mailing\-list\-announcements\fP .PP (this is a read\-only list). .PP .SH LICENSE AND COPYRIGHT .PP .TP Copyright (C) 2011\-2016, EURid .br B\-1831 Diegem, Belgium .br \fBinfo@yadifa.eu\fP .PP .SH AUTHORS .PP Gery Van Emelen .br Email: \fBGery.VanEmelen@EURid.eu\fP .br Eric Diaz Fernandez .br Email: \fBEric.DiazFernandez@EURid.eu\fP .PP WWW: \fBhttp://www.EURid.eu\fP .PP .\" NOTE: This file is generated, DO NOT EDIT. yadifa-2.1.6-5826/PaxHeaders.8028/mk0000644000077100007710000000013212654663023014674 xustar000000000000000030 mtime=1454597651.229344534 30 atime=1454597650.778344534 30 ctime=1454597651.229344534 yadifa-2.1.6-5826/mk/0000775000077100007710000000000012654663023014557 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/mk/PaxHeaders.8028/common-settings.mk0000644000077100007710000000012412650131756020430 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.803344 30 ctime=1454597651.229344534 yadifa-2.1.6-5826/mk/common-settings.mk0000664000077100007710000001304712650131756020242 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # ALL # AM_CFLAGS = -D_THREAD_SAFE -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I$(abs_builddir) -I$(abs_srcdir)/include AM_LDFLAGS = DEBUGFLAGS = LOCALFLAGS = -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)"' -DLOCALSTATEDIR='"$(localstatedir)"' -DDATAROOTDIR='"$(datarootdir)"' -DDATADIR='"$(datadir)"' -DLOCALEDIR='"$(localedir)"' -DLOGDIR='"$(logdir)"' if USES_SUNC DEBUGFLAGS += else DEBUGFLAGS += -O0 endif if HAS_CC_NO_IDENT AM_CFLAGS += -fno-ident endif if HAS_CC_ANSI AM_CFLAGS += -ansi endif if HAS_CC_PEDANTIC AM_CFLAGS += -pedantic endif if HAS_CC_WALL AM_CFLAGS += -Wall -Wno-unknown-pragmas endif if HAS_CC_MISSING_FIELD_INITIALIZERS AM_CFLAGS += -Werror=missing-field-initializers endif if HAS_CC_STD_GNU99 AM_CFLAGS += -std=gnu99 else if HAS_CC_STD_C99 AM_CFLAGS += -std=c99 endif if HAS_CC_XC99 AM_CFLAGS += -xc99 endif endif if HAS_CC_TUNE_NATIVE AM_CFLAGS += -mtune=native endif if FORCE64BITS if HAS_CC_M64 AM_CFLAGS += -m64 AM_LDFLAGS += -m64 endif else if FORCE32BITS if HAS_CC_M32 AM_CFLAGS += -m32 AM_LDFLAGS += -m32 endif endif endif # # DEBUG # if HAS_CC_G3 DEBUGFLAGS += -g3 else if HAS_CC_G DEBUGFLAGS += -g endif endif if HAS_CC_DWARF4 DEBUGFLAGS += -gdwarf-4 else if HAS_CC_DWARF3 DEBUGFLAGS += -gdwarf-3 endif endif # # Intel C Compiler # ############################################################################### if USES_ICC #ICC #IPO= -ipo (need to use the intel xiar instead of ar) if HAS_LTO_SUPPORT AM_CFLAGS += -DLTO -ipo AM_LDFLAGS += -ipo AM_AR = xiar endif AM_LD = ld AM_CFLAGS += -DUSES_ICC if HAS_CC_ANSI_ALIAS AM_CFLAGS += -ansi-alias -U__STRICT_ANSI__ endif DEBUGFLAGS += -DMODE_DEBUG_ICC endif # # LLVM Clang # ############################################################################### if USES_CLANG # CLANG if HAS_LTO_SUPPORT AM_CFLAGS += -DLTO -flto AM_LDFLAGS += -flto AM_AR = llvm-ar AM_LD = ld.gold else AM_AR = ar AM_LD = ld endif AM_CFLAGS += -DUSES_LLVM DEBUGFLAGS += -DMODE_DEBUG_CLANG # Note: add a _d suffix for debug builds ? endif # CLANG # # Gnu C # ############################################################################### if USES_GCC #GCC if HAS_CPU_NIAGARA AM_CFLAGS += -mcpu=niagara endif if HAS_LTO_SUPPORT AM_CFLAGS += -DLTO -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin AM_LDFLAGS += -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin AM_AR = gcc-ar AM_RANLIB = gcc-ranlib else AM_AR = ar AM_LD = ld endif AM_CFLAGS += -DUSES_GCC DEBUGFLAGS += -DMODE_DEBUG_GCC endif # USES_GCC # # Sun C # ############################################################################### if USES_SUNC # SUNC AM_AR = ar AM_LD = ld AM_CFLAGS += -DUSES_SUNC DEBUGFLAGS += -DMODE_DEBUG_SUNC # Note: add a _d suffix for debug builds ? endif # SUNC # # Unknown compiler # ############################################################################### if USES_UNKNOWN # if an unknown compiler is used, it should have its own section AM_CFLAGS += -DUSES_UNKNOWN_COMPILER DEBUGFLAGS += -DMODE_DEBUG_UNKNOWN endif # # Some BSD-based OSes need this # if IS_BSD_FAMILY AM_CFLAGS += -I./include endif if IS_SOLARIS_FAMILY AM_CFLAGS += -D_POSIX_PTHREAD_SEMANTICS endif # # # AM_CFLAGS += $(LOCALFLAGS) YRCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -DCMR YPCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -pg -DCMP YDCFLAGS = -DDEBUG $(DEBUGFLAGS) -DCMD YSCFLAGS = $(YRCFLAGS) YRLDFLAGS = YPLDFLAGS = -pg YDLDFLAGS = -g if HAS_CC_RDYNAMIC YPLDFLAGS += -rdynamic YDLDFLAGS += -rdynamic endif if USES_CLANG # workaround a bug where clang does not handle properly profiling and optimizations YPCFLAGS += -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer endif YSLDFLAGS = $(YRLDFLAGS) AM_CFLAGS += $(YCFLAGS) AM_LDFLAGS += $(YLDFLAGS) AM_MAKEFLAGS=MODE_CFLAGS="$(AM_CFLAGS)" CC=$(CC) AR=$(AM_AR) LD=$(AM_LD) yadifa-2.1.6-5826/mk/PaxHeaders.8028/common-labels.mk0000644000077100007710000000012412650131756020032 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.803344 30 ctime=1454597651.225344534 yadifa-2.1.6-5826/mk/common-labels.mk0000664000077100007710000000511412650131756017640 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ YCFLAGS=$(YSCFLAGS) YLDFLAGS=$(YNLDFLAGS) release: echo YCFLAGS=$(YRCFLAGS) echo YLDFLAGS=$(YRLDFLAGS) $(MAKE) all "YCFLAGS=$(YRCFLAGS)" "YLDFLAGS=$(YRLDFLAGS)" profile: echo YCFLAGS=$(YPCFLAGS) echo YLDFLAGS=$(YPLDFLAGS) $(MAKE) all "YCFLAGS=$(YPCFLAGS)" "YLDFLAGS=$(YPLDFLAGS)" debug: echo YCFLAGS=$(YDCFLAGS) echo YLDFLAGS=$(YDLDFLAGS) $(MAKE) all "YCFLAGS=$(YDCFLAGS)" "YLDFLAGS=$(YDLDFLAGS)" rebuild: clean release release-install: release install profile-install: profile install debug-install: debug install buildinfo.h: config.log echo \#pragma once > buildinfo.h 2> /dev/null echo // generated file, do not modify >> buildinfo.h 2> /dev/null echo \#define BUILD_OPTIONS \"$$(grep "./configure" config.log | head -1 | sed 's/.*\.\/configure *//')\" >> buildinfo.h 2> /dev/null yadifa-2.1.6-5826/PaxHeaders.8028/aclocal.m40000644000077100007710000000013212654662552016210 xustar000000000000000030 mtime=1454597482.863344534 30 atime=1454597482.863344534 30 ctime=1454597650.474344534 yadifa-2.1.6-5826/aclocal.m40000664000077100007710000012246112654662552016024 0ustar00yadifayadifa00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file 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. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) yadifa-2.1.6-5826/PaxHeaders.8028/config.h.in0000644000077100007710000000013212654662554016375 xustar000000000000000030 mtime=1454597484.054344534 30 atime=1454597484.053344534 30 ctime=1454597650.485344534 yadifa-2.1.6-5826/config.h.in0000664000077100007710000001412412654662554016205 0ustar00yadifayadifa00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* number of harware core if the auto-detect fails */ #undef DEFAULT_ASSUMED_CPU_COUNT /* always on */ #undef HAS_ACL_SUPPORT /* bfd debug support disabled. */ #undef HAS_BFD_DEBUG_SUPPORT /* i386, Athlon, Opteron, Core2, i3, i5, i7, ... */ #undef HAS_CPU_AMDINTEL /* T1000 has a Niagara cpu */ #undef HAS_CPU_NIAGARA /* remote control disabled. */ #undef HAS_CTRL /* dynamic provisioning disabled. */ #undef HAS_CTRL_DYNAMIC_PROVISIONING /* always on */ #undef HAS_DNSSEC_SUPPORT /* always off */ #undef HAS_DROPALL_SUPPORT /* dynamic update support disabled. */ #undef HAS_DYNUPDATE_SUPPORT /* YADIFA will now accept ASCII7 characters in DNS names (not recommended) disabled. */ #undef HAS_FULL_ASCII7 /* where to put the log files */ #undef HAS_LOGDIR /* write the pid in each line of log disabled. */ #undef HAS_LOG_PID_ALWAYS_ON /* write the thread id in each line of log disabled. */ #undef HAS_LOG_THREAD_ID_ALWAYS_ON /* malloc debug support disabled. */ #undef HAS_MALLOC_DEBUG_SUPPORT /* DNS master disabled. */ #undef HAS_MASTER_SUPPORT /* Define this to enable slow but safe unaligned memory accesses */ #undef HAS_MEMALIGN_ISSUES /* use messages instead of send (needed if you use more than one IP aliased on the same network interface) disabled. */ #undef HAS_MESSAGES_SUPPORT /* always off */ #undef HAS_MIRROR_SUPPORT /* mutex debug support disabled. */ #undef HAS_MUTEX_DEBUG_SUPPORT /* Allows AXFR answer from master without AA bit set (Microsoft DNS) disabled. */ #undef HAS_NON_AA_AXFR_SUPPORT /* always on */ #undef HAS_NSEC3_SUPPORT /* always on */ #undef HAS_NSEC_SUPPORT /* NSID support disabled. */ #undef HAS_NSID_SUPPORT /* The system supports thread names */ #undef HAS_PTHREAD_SETNAME_NP /* The system supports spinlocks */ #undef HAS_PTHREAD_SPINLOCK /* always off */ #undef HAS_RDTSC /* always off */ #undef HAS_RRCACHE_ENABLED /* DNS Response Rate Limiter disabled. */ #undef HAS_RRL_SUPPORT /* RRSIG verification and generation for zones disabled. */ #undef HAS_RRSIG_MANAGEMENT_SUPPORT /* The sockaddr_in6 struct has an sin6_len field */ #undef HAS_SOCKADDR_IN6_SIN6_LEN /* The sockaddr_in struct has an sin_len field */ #undef HAS_SOCKADDR_IN_SIN_LEN /* The sockaddr struct has an sa_len field */ #undef HAS_SOCKADDR_SA_LEN /* always off */ #undef HAS_TCL /* don't build "build the DNS tools". */ #undef HAS_TOOLS /* always on */ #undef HAS_TSIG_SUPPORT /* where to put the log files */ #undef HAS_WITH_LOGDIR /* zalloc debug support disabled. */ #undef HAS_ZALLOC_DEBUG_SUPPORT /* zalloc statistics support disabled. */ #undef HAS_ZALLOC_STATISTICS_SUPPORT /* zalloc memory system disabled. */ #undef HAS_ZALLOC_SUPPORT /* Define to 1 if you have the header file. */ #undef HAVE_BYTESWAP_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_I386_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_MACHINE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET6_IN6_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_PPC_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BYTEORDER_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSLIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* BSD */ #undef IS_BSD_FAMILY /* OSX */ #undef IS_DARWIN_OS /* LINUX */ #undef IS_LINUX_FAMILY /* SOLARIS */ #undef IS_SOLARIS_FAMILY /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES yadifa-2.1.6-5826/PaxHeaders.8028/ltmain.sh0000644000077100007710000000013012473714653016165 xustar000000000000000029 mtime=1424988587.71705841 29 atime=1424988587.71705841 30 ctime=1454597650.529344534 yadifa-2.1.6-5826/ltmain.sh0000644000077100007710000117077112473714653016011 0ustar00yadifayadifa00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.6 package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # 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 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # 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 "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # 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 3 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --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 --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message 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. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # 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= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE 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. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # 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 () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` 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 "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # 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. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # 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 func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # 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= pie_flag= 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) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append 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,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append 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. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; 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 no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock 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 yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; 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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [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: $progname [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 -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler 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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [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 -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -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 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -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 -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -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] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) 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: $progname [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." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" 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 -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # 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 else 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 else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" 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" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; 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. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append 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 -e "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. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_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 test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append 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 func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_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 func_basename "$file" destfile=$func_basename_result 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 func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "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) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # 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/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) 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*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; 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 "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # 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. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd 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 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac 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_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= 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 func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result 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 func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_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've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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. sed_quote_subst='$sed_quote_subst' # Be 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 variables: generated_by_libtool_version='$macro_version' 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 file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ 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 "\ # 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 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # 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 \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} 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 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #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 # define FOPEN_WB "wb" # 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 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ 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]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); 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 = (size_t) (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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } 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 (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" 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 func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" 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 # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir 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 func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework 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*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # 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-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext 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 ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" 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. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'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\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. 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 $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; 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 $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append 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 notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; 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 .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # 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 yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else 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 use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # 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 func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" 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. func_append dlprefiles " $lib $dependency_libs" else func_append 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 func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && 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 func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || 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 *"$absdir:"*) ;; *) func_append 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && 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 built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; 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 lib = "$linkmode" && test yes = "$hardcode_into_libs"; 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 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* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' 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 prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; 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 (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; 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 elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; 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 yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; 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 [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; 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 prog = "$linkmode"; 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 unsupported != "$hardcode_direct"; 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 yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; 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 cannot 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 yes = "$module"; 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 no = "$build_old_libs"; 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 lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # 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 "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=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 "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # 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 func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; 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 test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # 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=$1 number_minor=$2 number_revision=$3 # # 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 # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; esac ;; no) current=$1 revision=$2 age=$3 ;; 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]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" 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 func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result 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 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; 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 no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; 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 | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "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 func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; 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 "*) ;; *) func_append 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 "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-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 yes = "$build_libtool_need_lc"; then func_append 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. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi 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 "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append 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 func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; 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 ;; esac ;; 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 with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; 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 no = "$build_old_libs"; 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 no = "$allow_undefined"; 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 no = "$build_old_libs"; 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 # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append 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 yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append 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 "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append 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 relink = "$opt_mode" || 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 shift realname=$1 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 func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "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" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && 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 : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # 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 func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result 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~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "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 $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } 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\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && 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 fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( 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 relink = "$opt_mode"; then $opt_dry_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 func_show_eval '${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 func_show_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 yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_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= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${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" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append 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 "*) ;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append 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 yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } 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 func_append 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 func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result 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 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # 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 func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$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 eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$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= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; 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 "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; 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) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_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 no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false 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) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; 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 $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where 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 build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: yadifa-2.1.6-5826/PaxHeaders.8028/VERSION0000644000077100007710000000012412652141712015405 xustar000000000000000027 mtime=1453900746.981001 27 atime=1454597463.908344 30 ctime=1454597650.478344534 yadifa-2.1.6-5826/VERSION0000664000077100007710000000000612652141712015206 0ustar00yadifayadifa000000000000002.1.6 yadifa-2.1.6-5826/PaxHeaders.8028/configure.ac0000644000077100007710000000013212654662532016634 xustar000000000000000030 mtime=1454597466.801344534 30 atime=1454597466.800344534 30 ctime=1454597650.471344534 yadifa-2.1.6-5826/configure.ac0000664000077100007710000000661012654662532016445 0ustar00yadifayadifa00000000000000dnl ############################################################################ dnl dnl Copyright (c) 2011-2016, EURid. All rights reserved. dnl The YADIFA TM software product is provided under the BSD 3-clause license: dnl dnl Redistribution and use in source and binary forms, with or without dnl modification, are permitted provided that the following conditions dnl are met: dnl dnl * Redistributions of source code must retain the above copyright dnl notice, this list of conditions and the following disclaimer. dnl * Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in dnl the documentation and/or other materials provided with the dnl distribution. dnl * Neither the name of EURid nor the names of its contributors may be dnl used to endorse or promote products derived from this software dnl without specific prior written permission. dnl dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN dnl CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE dnl POSSIBILITY OF SUCH DAMAGE. dnl dnl ############################################################################ AC_PREREQ(2.61) AC_REVISION([$Revision: 5826 $]) AC_INIT([yadifa],m4_esyscmd([svn info 2> /dev/null | grep 'Last Changed Rev: ' | sed -re 's/.*: (.*)/Revision: \1 $/' -e 's/^/$/' >> revision.txt;echo $(cat VERSION)-$(grep -r \$Revision: revision.txt configure.ac Makefile.am sbin/* lib/* bin/* doc/* etc/* | sed -e 's/^.*\$Revision: *//' -e 's/\$.*//' -e 's/ *//' | sort -n | /usr/bin/tail -1 | tr -d '\n') | tr -d '\n']),[info@yadifa.eu]) echo echo echo "YADIFA BUNDLE START" echo "-------------------" echo echo m4_include([m4/eurid.m4]) m4_include([m4/yadifa.m4]) AC_CONFIG_AUX_DIR([.]) AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror tar-pax]) AC_CONFIG_HEADER([config.h]) dnl DO THE LIBRARIES dnl AC_CONFIG_SUBDIRS([lib/dnscore lib/dnsdb lib/dnszone]) AC_HAS_WITHOUT(tools, TOOLS, "build the DNS tools",,AC_CONFIG_SUBDIRS([lib/dnslg]),) dnl DO THE BINARIES dnl AC_CONFIG_SUBDIRS([sbin/yadifad]) AC_HAS_WITHOUT(tools, TOOLS, "build the DNS tools",,AC_CONFIG_SUBDIRS([bin/yadifa]),) dnl @todo 20150119 gve -- can be removed dnl AC_CONFIG_HEADERS([yadifa-config.h]) AC_CONFIG_MACRO_DIR([m4]) LT_INIT([disable-shared]) AC_DARWIN_LIBTOOL AC_PROG_LIBTOOL AC_DEFUN([SYSCONF], [/$prefix/PACKAGE/PACKAGE.conf]) AC_CANONICAL_BUILD AC_CONFIG_FILES([Makefile etc/Makefile doc/Makefile var/Makefile]) AC_SYS_LARGEFILE AC_COMPILER_CHECK AC_PTHREAD_SPINLOCK_CHECK AC_PTHREAD_SETNAME_NP_CHECK AC_YADIFA_FEATURES AC_CHECK_LTO AC_EURID_SUMMARY AC_OUTPUT dnl AC_YADIFA_SUMMARY echo echo echo "YADIFA BUNDLE DONE" echo "------------------" echo echo yadifa-2.1.6-5826/PaxHeaders.8028/config.sub0000644000077100007710000000013212473710127016317 xustar000000000000000030 mtime=1424986199.159058409 30 atime=1424986199.159058409 30 ctime=1454597650.521344534 yadifa-2.1.6-5826/config.sub0000755000077100007710000010622312473710127016132 0ustar00yadifayadifa00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-12-03' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/PaxHeaders.8028/m40000644000077100007710000000013212654663022014604 xustar000000000000000030 mtime=1454597650.467344534 30 atime=1454597650.432344534 30 ctime=1454597650.467344534 yadifa-2.1.6-5826/m4/0000775000077100007710000000000012654663022014467 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/m4/PaxHeaders.8028/ltsugar.m40000644000077100007710000000013012473714653016610 xustar000000000000000029 mtime=1424988587.49005841 29 atime=1424988587.49005841 30 ctime=1454597650.453344534 yadifa-2.1.6-5826/m4/ltsugar.m40000644000077100007710000001044012473714653016415 0ustar00yadifayadifa00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) yadifa-2.1.6-5826/m4/PaxHeaders.8028/eurid.m40000644000077100007710000000012412650131756016234 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.889344 30 ctime=1454597650.463344534 yadifa-2.1.6-5826/m4/eurid.m40000664000077100007710000005546512650131756016060 0ustar00yadifayadifa00000000000000dnl ############################################################################ dnl dnl Copyright (c) 2011-2016, EURid. All rights reserved. dnl The YADIFA TM software product is provided under the BSD 3-clause license: dnl dnl Redistribution and use in source and binary forms, with or without dnl modification, are permitted provided that the following conditions dnl are met: dnl dnl * Redistributions of source code must retain the above copyright dnl notice, this list of conditions and the following disclaimer. dnl * Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in dnl the documentation and/or other materials provided with the dnl distribution. dnl * Neither the name of EURid nor the names of its contributors may be dnl used to endorse or promote products derived from this software dnl without specific prior written permission. dnl dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN dnl CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE dnl POSSIBILITY OF SUCH DAMAGE. dnl dnl ############################################################################ dnl Assume it is true cpu_intel_compatible=1 icc_enabled=0 dnl handles Darwin libtoolize -> glibtoolize AC_DEFUN([AC_DARWIN_LIBTOOL], [ case "$(uname -s)" in Darwin) alias libtoolize="glibtoolize" which libtool > /dev/null 2>&1 if [[ $? -ne 0 ]] then which glibtool > /dev/null 2>&1 if [[ $? -eq 0 ]] then alias libtool="glibtool" fi fi echo 'brol' | sed 's/brol/truc/' > /dev/null 2>&1 if [[ $? -ne 0 ]] then alias sed="gsed" fi AC_MSG_RESULT([Darwin workaround]) ;; *) AC_MSG_RESULT([nothing to do]) ;; esac ]) ac_os_workaround_done=0 AC_DEFUN([AC_OS_WORKAROUND], [ if [[ $ac_os_workaround_done -eq 0 ]] then ac_os_workaround_done=1 AC_MSG_CHECKING(what kind of OS this is) is_darwin_os=0 is_bsd_family=0 is_solaris_family=0 is_linux_family=0 case "$(uname -s)" in Darwin) is_darwin_os=1 is_bsd_family=1 AC_MSG_RESULT([OSX]) ;; FreeBSD) is_bsd_family=1 AC_MSG_RESULT([BSD]) ;; Linux) is_linux_family=1 AC_MSG_RESULT([Linux]) ;; SunOS) is_solaris_family=1 AC_MSG_RESULT([SunOS]) ;; *) AC_MSG_RESULT([not specifically supported]) ;; esac if [[ "$is_darwin_os" = "" ]] then echo "OS detection failed to give relevant results" exit 1; fi if [[ $is_darwin_os -ne 0 ]] then AC_DEFINE_UNQUOTED(IS_DARWIN_OS, [1], [OSX]) AM_CONDITIONAL([IS_DARWIN_OS], [true]) else AC_DEFINE_UNQUOTED(IS_DARWIN_OS, [0], [OSX]) AM_CONDITIONAL([IS_DARWIN_OS], [false]) fi AC_SUBST(IS_DARWIN_OS) if [[ $is_bsd_family -ne 0 ]] then AC_DEFINE_UNQUOTED(IS_BSD_FAMILY, [1], [BSD]) AM_CONDITIONAL([IS_BSD_FAMILY], [true]) else AC_DEFINE_UNQUOTED(IS_BSD_FAMILY, [0], [BSD]) AM_CONDITIONAL([IS_BSD_FAMILY], [false]) fi AC_SUBST(IS_BSD_FAMILY) if [[ $is_linux_family -ne 0 ]] then AC_DEFINE_UNQUOTED(IS_LINUX_FAMILY, [1], [LINUX]) AM_CONDITIONAL([IS_LINUX_FAMILY], [true]) else AC_DEFINE_UNQUOTED(IS_LINUX_FAMILY, [0], [LINUX]) AM_CONDITIONAL([IS_LINUX_FAMILY], [false]) fi AC_SUBST(IS_LINUX_FAMILY) if [[ $is_solaris_family -ne 0 ]] then AC_DEFINE_UNQUOTED(IS_SOLARIS_FAMILY, [1], [SOLARIS]) AM_CONDITIONAL([IS_SOLARIS_FAMILY], [true]) else AC_DEFINE_UNQUOTED(IS_SOLARIS_FAMILY, [0], [SOLARIS]) AM_CONDITIONAL([IS_SOLARIS_FAMILY], [false]) fi AC_SUBST(IS_SOLARIS_FAMILY) fi ]) dnl Compiler support dnl #################################################### dnl dnl COMPILER SUPPORT dnl dnl #################################################### AC_DEFUN([AC_COMPILER_SUPPORTS], [ # # AC_COMPILER_SUPPORTS $1 # # CHECKING AC_MSG_CHECKING(if compiler supports [$1]) if [[ "$CC" = "" ]] then AC_MSG_RESULT("[compiler not set yet, fix this]") exit 1 fi cat > test-gcc-$2.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC $1 test-gcc-$2.c -o test-gcc-$2 > /dev/null 2>&1 if [[ $? -ne 0 ]] then AM_CONDITIONAL(HAS_CC_$2, [false]) AC_MSG_RESULT([no]) else AM_CONDITIONAL(HAS_CC_$2, [true]) AC_MSG_RESULT([yes]) fi AC_SUBST(HAS_CC_$2) rm -rf test-gcc-$2* ]) dnl Memory aligment issues (T1000) AC_DEFUN([AC_MEMALIGN_CHECK], [ AC_MSG_CHECKING([checking if memory accesses must be size-aligned]) AM_CONDITIONAL([HAS_MEMALIGN_ISSUES], [false]) cat > memalign_issues_test.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc, char** argv) { char* p = (char*)malloc(8); p++; int* intp= (int*)p; *intp=1; return 0; } _ACEOF ${CC} ${CFLAGS} memalign_issues_test.c -o memalign_issues_test > /dev/null 2>&1 has_memalign_issues=0 ./memalign_issues_test > /dev/null 2>&1 if [[ $? -ne 0 ]]; then has_memalign_issues=1 AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi rm -f memalign_issues_test memalign_issues_test.c AM_CONDITIONAL([HAS_MEMALIGN_ISSUES], [test $has_memalign_issues]) AC_DEFINE_UNQUOTED([HAS_MEMALIGN_ISSUES], [$has_memalign_issues], [Define this to enable slow but safe unaligned memory accesses]) ]) dnl #################################################### dnl Architecture AC_DEFUN([AC_CPU_CHECK], [ AC_DEFINE_UNQUOTED([DEFAULT_ASSUMED_CPU_COUNT], [2], [number of harware core if the auto-detect fails]) cpu_intel_compatible=1 AM_CONDITIONAL([HAS_CPU_NIAGARA], [false]) AM_CONDITIONAL([HAS_CPU_AMDINTEL], [false]) AC_MSG_CHECKING([checking for the CPU options]) CPU_UNKNOWN=1 CFLAGS3264= case "$(uname -i 2>/dev/null)" in SUNW,SPARC-Enterprise-T1000) AC_DEFINE_UNQUOTED([HAS_CPU_NIAGARA], [1], [T1000 has a Niagara cpu]) AM_CONDITIONAL([HAS_CPU_NIAGARA], [true]) AC_MSG_RESULT([UtrasparcT1]) CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=0 ;; *) ;; esac case "$(uname -m)" in x86_64) AC_DEFINE_UNQUOTED([HAS_CPU_AMDINTEL], [1], [i386, Athlon, Opteron, Core2, i3, i5, i7, ...]) AM_CONDITIONAL([HAS_CPU_AMDINTEL], [true]) AC_MSG_RESULT([AMD/Intel]) CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=1 ;; *) ;; esac case "${CPU_UNKNOWN}" in 1) AC_MSG_RESULT([generic]) ;; 0) ;; esac if [[ "$is_solaris_family" = "" ]] then echo "OS must be detected first" exit 1 fi if [[ $is_solaris_family -eq 1 ]] then echo "Solaris ..." AC_MSG_CHECKING([if either force 32 or 64 bits is enabled]) if [[ ! "$enable_force32bits" = "yes" ]] then if [[ ! "$enable_force64bits" = "yes" ]] then AC_MSG_RESULT([no, forcing 64 bits]) enable_force64bits="yes" else AC_MSG_RESULT([yes]) fi else AC_MSG_RESULT([yes]) fi else echo "Not Solaris ..." fi echo "Force ..." dnl Forced 32/64 bits architecture AC_MSG_CHECKING([if force 32 bits is enabled]) AM_CONDITIONAL([FORCE32BITS], [false]) AC_ARG_ENABLE(force32bits, AS_HELP_STRING([--enable-force32bits], [Forces a 32 bits binary compilation]), [enable_force32bits=yes], [enable_force32bits=no]) AC_MSG_RESULT($enable_force32bits) case "$enable_force32bits" in yes) CFLAGS3264=-m32 AM_CONDITIONAL([FORCE32BITS], [test $enable_force32bits = yes]) ;; *) ;; esac AC_MSG_CHECKING([if force 64 bits is enabled]) AM_CONDITIONAL([FORCE64BITS], [false]) AC_ARG_ENABLE(force64bits, AS_HELP_STRING([--enable-force64bits], [Forces a 64 bits binary compilation]), [enable_force64bits=yes], [enable_force64bits=no]) AC_MSG_RESULT($enable_force64bits) case "$enable_force64bits" in yes) CFLAGS3264=-m64 AM_CONDITIONAL([FORCE64BITS], [test $enable_force64bits = yes]) if [[ "$enable_force32" = "yes" ]] then echo "cannot do both --enable-force32bits and --enable-force64bits at the same time" exit 1 fi ;; *) ;; esac ]) dnl Endianness # AC_DEFUN([AC_ENDIANNESS], [ # # AC_ENDIANNESS # # CHECKING AC_MSG_CHECKING([endianness: ]) if [[ "$CC" = "" ]] then AC_MSG_RESULT("[compiler not set yet, fix this]") exit 1 fi cat > test-gcc-endian.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_STDIO_H #include #endif #if defined __FreeBSD__ #if HAVE_SYS_ENDIAN_H #include #endif #elif defined __APPLE__ #if HAVE_MACHINE_ENDIAN_H #include #endif #elif defined __sun #if HAVE_SYS_BYTEORDER_H #include #endif #else #if HAVE_ENDIAN_H #include #endif #if HAVE_BYTESWAP_H #include #endif #endif static int magic = 0x00525545; int main(int argc,char** argv) { (void)argc; (void)argv; int pp = -1; int c = -1; #if defined _BIG_ENDIAN pp = 2; #elif defined _LITTLE_ENDIAN pp = 1; #endif #ifdef __BYTE_ORDER #if __BYTE_ORDER == __LITTLE_ENDIAN pp = 1; #elif __BYTE_ORDER == __BIG_ENDIAN pp = 2; #endif // printf("__BYTE_ORDER=%x\n", __BYTE_ORDER); #endif #ifdef _BYTE_ORDER #if _BYTE_ORDER == _LITTLE_ENDIAN pp = 1; #elif _BYTE_ORDER == _BIG_ENDIAN pp = 2; #endif printf("_BYTE_ORDER=%x\n", _BYTE_ORDER); #endif #ifdef BYTE_ORDER #if BYTE_ORDER == LITTLE_ENDIAN pp = 1; #elif BYTE_ORDER == BIG_ENDIAN pp = 2; #endif // printf("BYTE_ORDER=%x\n", BYTE_ORDER); #endif # #ifdef WORDS_BIGENDIAN // printf("WORDS_BIGENDIAN=%x\n", WORDS_BIGENDIAN); if(pp == 1) // could be -1 or 2 { pp = -2; } else { pp = 2; } #endif char *p = (char*)&magic; if(*p == '\0') { c = 2; } else if(*p == 'E') { c = 1; } if((pp < 0) || (c < 0)) { printf("*** WARNING *** preprocessor says %i, real test says %i *** WARNING ***\n", pp, c); } if(c == pp) { return c; } else { return -1; } } _ACEOF $CC $1 test-gcc-endian.c -o test-gcc-endian > /dev/null 2>&1 if [[ $? -ne 0 ]] then AC_MSG_RESULT("[failed to compile test]") exit 1 fi ./test-gcc-endian if [[ $? -eq 1 ]] then AM_CONDITIONAL(HAS_LITTLE_ENDIAN, [true]) AM_CONDITIONAL(HAS_BIG_ENDIAN, [false]) AC_MSG_RESULT([little]) else AM_CONDITIONAL(HAS_LITTLE_ENDIAN, [false]) AM_CONDITIONAL(HAS_BIG_ENDIAN, [true]) AC_MSG_RESULT([big]) fi AC_SUBST(HAS_LITTLE_ENDIAN) AC_SUBST(HAS_BIG_ENDIAN) rm -f test-gcc-endian.c* test-gcc-endian ]) dnl Compiler AC_DEFUN([AC_COMPILER_CHECK], [ AC_OS_WORKAROUND AC_CPU_CHECK cat /etc/redhat-version > /dev/null 2>&1 if [[ $? -eq 0 ]] then is_redhat_family=1 else is_redhat_family=0 fi CFLAGS= VERSION_OPT=--version $CC --version > /dev/null 2>&1 if [[ $? -ne 0 ]] then $CC -V > /dev/null 2>&1 if [[ $? -ne 0 ]] then CCVER='0.0' CCNAME='unknown' VERSION_OPT='' else VERSION_OPT='-V' fi fi if [[ ! "$VERSION_OPT" = "" ]] then dnl $CC --version 2>&1 dnl $CC $VERSION_OPT 2>&1|head -1 dnl $CC $VERSION_OPT 2>&1|head -1|sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/' dnl $CC $VERSION_OPT 2>&1|head -1|sed -e 's/.*clang.*/clang/' -e 's/.*gcc.*/gcc/' -e 's/.*icc.*/icc/' -e 's/.*Sun C.*/Sun C/'|tr A-Z a-z CCVER=$($CC $VERSION_OPT 2>&1|head -1|sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/') dnl echo $CC $VERSION_OPT "2>&1" |head -1|sed 's/[[^0-9.]]*\([[0-9.]]*\).*/\1/' if [[ "$CCVER" = "" ]] then CCVER='0.0' fi CCNAME=$($CC $VERSION_OPT 2>&1|head -1|sed -e 's/.*clang.*/clang/' -e 's/.*gcc.*/gcc/' -e 's/.*icc.*/icc/' -e 's/.*Sun C.*/Sun C/'|tr A-Z a-z) dnl echo $CC $VERSION_OPT "2>&1"|head -1|sed -e 's/.*clang.*/clang/' -e 's/.*gcc.*/gcc/' -e 's/.*icc.*/icc/' -e 's/.*Sun C.*/Sun C/'|tr A-Z a-z if [[ "$CCNAME" = "" ]] then CCNAME='unknown' fi else CCVER='0.0' CCNAME='unknown' fi # version opt CCMAJOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print @S|@1}') CCMINOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print @S|@2}') dnl echo "$CC $VERSION_OPT : CCNAME='$CCNAME' CCVER='$CCVER' CCMAJOR='$CCMAJOR' CCMINOR='$CCMINOR'" if [[ "$CCMAJOR" = "" ]] then CCMAJOR=0 fi if [[ "$CCMINOR" = "" ]] then CCMINOR=0 fi if [[ "$CCNAME" = "gcc" ]] then CCOPTIMISATIONFLAGS=-O3 if [[ $CCMAJOR -lt 4 ]] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC < 4.0 has optimisations issues with YADIFA." sleep 1 elif [[ $CCMAJOR -eq 4 ]] then if [[ $CCMINOR -lt 6 ]] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC before 4.6 have optimisation issues with YADIFA." sleep 1 elif [[ $CCMINOR -eq 6 ]] then CCOPTIMISATIONFLAGS=-O2 else # hopefully after 4.6 the issue is fixed ... CCOPTIMISATIONFLAGS=-O3 fi fi AM_CONDITIONAL([USES_ICC], [false]) AM_CONDITIONAL([USES_GCC], [true]) AM_CONDITIONAL([USES_CLANG], [false]) AM_CONDITIONAL([USES_SUNC], [false]) AM_CONDITIONAL([USES_UNKNOWN], [false]) elif [[ "$CCNAME" = "icc" ]] then echo "ICC" CCOPTIMISATIONFLAGS=-O3 AM_CONDITIONAL([USES_ICC], [true]) AM_CONDITIONAL([USES_GCC], [false]) AM_CONDITIONAL([USES_CLANG], [false]) AM_CONDITIONAL([USES_SUNC], [false]) AM_CONDITIONAL([USES_UNKNOWN], [false]) AR=xiar elif [[ "$CCNAME" = "clang" ]] then echo "CLANG" CCOPTIMISATIONFLAGS=-O3 AM_CONDITIONAL([USES_ICC], [false]) AM_CONDITIONAL([USES_GCC], [false]) AM_CONDITIONAL([USES_CLANG], [true]) AM_CONDITIONAL([USES_SUNC], [false]) AM_CONDITIONAL([USES_UNKNOWN], [false]) elif [[ "$CCNAME" = "Sun C" ]] then echo "Sun C" CCOPTIMISATIONFLAGS=-xO5 AM_CONDITIONAL([USES_ICC], [false]) AM_CONDITIONAL([USES_GCC], [false]) AM_CONDITIONAL([USES_CLANG], [false]) AM_CONDITIONAL([USES_SUNC], [true]) AM_CONDITIONAL([USES_UNKNOWN], [false]) else echo "unsupported compiler" CCNAME=$CC CCOPTIMISATIONFLAGS=-O2 AM_CONDITIONAL([USES_ICC], [false]) AM_CONDITIONAL([USES_GCC], [false]) AM_CONDITIONAL([USES_CLANG], [false]) AM_CONDITIONAL([USES_SUNC], [false]) AM_CONDITIONAL([USES_UNKNOWN], [true]) fi # # We've been told RedHat does not like -O3 at all, so ... # if [[ $is_redhat_family -ne 0 ]] then if [[ "$CCOPTIMISATIONFLAGS " eq "-O3" ]] then CCOPTIMISATIONFLAGS=-O2 fi fi echo "detected compiler is $CCNAME $CCMAJOR $CCMINOR" AC_SUBST(CCOPTIMISATIONFLAGS, $CCOPTIMISATIONFLAGS) if [[ $cpu_intel_compatible -eq 0 ]] then if [[ $icc_enabled -ne 0 ]] then echo "ERROR: cannot enable ICC with CPU other than x86 or amd64" exit 1 fi fi AC_COMPILER_SUPPORTS([-mtune=native],TUNE_NATIVE) AC_COMPILER_SUPPORTS([-fno-ident],NO_IDENT) AC_COMPILER_SUPPORTS([-ansi],ANSI) AC_COMPILER_SUPPORTS([-ansi-alias],ANSI_ALIAS) AC_COMPILER_SUPPORTS([-pedantic],PEDANTIC) AC_COMPILER_SUPPORTS([-std=gnu99],STD_GNU99) AC_COMPILER_SUPPORTS([-std=c99],STD_C99) AC_COMPILER_SUPPORTS([-xc99],XC99) AC_COMPILER_SUPPORTS([-m32],M32) AC_COMPILER_SUPPORTS([-m64],M64) AC_COMPILER_SUPPORTS([-Wall],WALL) AC_COMPILER_SUPPORTS([-g],G) AC_COMPILER_SUPPORTS([-g3],G3) AC_COMPILER_SUPPORTS([-gdwarf-2],DWARF2) AC_COMPILER_SUPPORTS([-gdwarf-3],DWARF3) AC_COMPILER_SUPPORTS([-gdwarf-4],DWARF4) AC_COMPILER_SUPPORTS([-fstack-protector --param=ssp-buffer-size=4],STACK_PROTECTOR) AC_COMPILER_SUPPORTS([-fexceptions],EXCEPTIONS) AC_COMPILER_SUPPORTS([-Werror=missing-field-initializers],MISSING_FIELD_INITIALIZERS) AC_COMPILER_SUPPORTS([-fsanitize=address],SANITIZE_ADDRESS) AC_COMPILER_SUPPORTS([-fno-omit-frame-pointer],NO_OMIT_FRAME_POINTER) AC_COMPILER_SUPPORTS([-faddress-sanitizer],ADDRESS_SANITIZER_CHECK) AC_COMPILER_SUPPORTS([-fcatch_undefined_behavior],CATCH_UNDEFINED_BEHAVIOR) AC_COMPILER_SUPPORTS([-rdynamic],RDYNAMIC) AC_MEMALIGN_CHECK AC_ENDIANNESS AC_CHECK_HEADERS([stdlib.h]) AC_CHECK_HEADERS([stdio.h]) AC_CHECK_HEADERS([unistd.h]) AC_CHECK_HEADERS([string.h]) AC_CHECK_HEADERS([endian.h]) AC_CHECK_HEADERS([syslog.h]) AC_CHECK_HEADERS([fcntl.h]) AC_CHECK_HEADERS([pthread.h]) AC_CHECK_HEADERS([linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h]) AC_CHECK_HEADERS([byteswap.h]) AC_CHECK_HEADERS([machine/endian.h]) AC_CHECK_HEADERS([sys/time.h]) AC_CHECK_HEADERS([sys/stat.h]) AC_CHECK_HEADERS([sys/endian.h]) AC_CHECK_HEADERS([sys/byteorder.h]) AC_CHECK_HEADERS([sys/socket.h]) AC_CHECK_HEADERS([netinet/in.h]) AC_CHECK_HEADERS([netinet6/in6.h]) ]) dnl timegm support AC_DEFUN([AC_TIMEGM_CHECK], [ AC_MSG_CHECKING([checking for timegm]) AC_TRY_LINK([#include],[struct tm t; timegm(&t);],[AC_DEFINE_UNQUOTED([HAS_TIMEGM], [1], [The system supports timegm]) echo yes],[echo no]); ]) dnl pthread spinlock support AC_DEFUN([AC_PTHREAD_SPINLOCK_CHECK], [ AC_MSG_CHECKING([checking for pthread_spin_init]) AC_TRY_LINK([#include],[pthread_spinlock_t lock; pthread_spin_init(&lock, 0);],[AC_DEFINE_UNQUOTED([HAS_PTHREAD_SPINLOCK], [1], [The system supports spinlocks]) echo yes],[echo no]); ]) dnl pthread_setname_np support AC_DEFUN([AC_PTHREAD_SETNAME_NP_CHECK], [ AC_MSG_CHECKING([checking for pthread_setname_np]) AC_TRY_LINK([#define __USE_GNU #include],[pthread_setname_np(pthread_self(), "myname");],[AC_DEFINE_UNQUOTED([HAS_PTHREAD_SETNAME_NP], [1], [The system supports thread names]) echo yes],[echo no]); ]) dnl gethostbyname inet_pton inet_ntop ... (Solaris requires a lib) AC_DEFUN([AC_GETHOSTBYNAME_CHECK], [ AC_MSG_CHECKING([checking for gethostbyname inet_pton inet_ntop]) AC_MSG_CHECKING([if gethostbyname requires some lib]) AC_TRY_LINK([#include],[struct hostent *host = gethostbyname("www.yadifa.eu.");], [ AC_MSG_RESULT([no]) ], [ AC_MSG_CHECKING([if gethostbyname requires nsl]) OLD_LDFLAGS="$LDFLAGS" LDFLAGS="-lnsl $LDFLAGS" AC_TRY_LINK([#include],[struct hostent *host = gethostbyname("www.yadifa.eu.");], [ AC_MSG_RESULT([yes]) ], [ LDFLAGS="$OLDLDFLAGS" AC_MSG_RESULT([no, and I could not find it ...]) exit 1; ]) ]) ]) dnl pthread_setname_np support AC_DEFUN([AC_PTHREAD_SETNAME_NP_CHECK], [ AC_MSG_CHECKING([checking for pthread_setname_np]) AC_TRY_LINK([#define __USE_GNU #include],[pthread_setname_np(pthread_self(), "myname");],[AC_DEFINE_UNQUOTED([HAS_PTHREAD_SETNAME_NP], [1], [The system supports thread names]) echo yes],[echo no]); ]) dnl LTO AC_DEFUN([AC_CHECK_LTO], [ AC_MSG_CHECKING(if LTO has been enabled) AC_ARG_ENABLE(lto, AS_HELP_STRING([--enable-lto], [Enable LTO support, requires gold linker]), [enable_lto=yes], [enable_lto=no]) AC_MSG_RESULT($enable_lto) case "$enable_lto" in yes) type -p gold if [[ $? -ne 0 ]] then AC_MSG_RESULT([WARNING: 'gold' not found]) sleep 1 fi if [[ ! "$LD" = "" ]] then $LD -v |grep -i gold > /dev/null 2>&1 if [[ $? -ne 0 ]] then AC_MSG_RESULT([WARNING: LTO enabled but LD ($LD) is not gold]) sleep 1 fi else AC_MSG_RESULT([LD not defined]) fi AM_CONDITIONAL(HAS_LTO_SUPPORT, [true]) ;; no|*) AM_CONDITIONAL(HAS_LTO_SUPPORT, [false]) ;; esac ]) AC_DEFUN([AC_SOCKADDR_SA_LEN_CHECK], [ dnl Check for sa_len field AC_MSG_CHECKING([if sockaddr has a sa_len field]) cat > sockaddr_sa_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr sa; sa.sa_len = 4; } _ACEOF has_sockaddr_sa_len=0 ${CC} ${CFLAGS} sockaddr_sa_len.c > /dev/null 2>&1 if [[ $? -eq 0 ]]; then has_sockaddr_sa_len=1; AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi rm -f sockaddr_sa_len.c sockaddr_sa_len AM_CONDITIONAL([HAS_SOCKADDR_SA_LEN], [test $has_sockaddr_sa_len = yes]) AC_DEFINE_UNQUOTED([HAS_SOCKADDR_SA_LEN], [$has_sockaddr_sa_len], [The sockaddr struct has an sa_len field]) ]) AC_DEFUN([AC_SOCKADDR_IN_SIN_LEN_CHECK], [ dnl Check for sin_len field AC_MSG_CHECKING([if sockaddr_in has a sin_len field]) cat > sockaddr_in_sin_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in sa; sa.sin_len = sizeof(struct sockaddr_in); } _ACEOF has_sockaddr_in_sin_len=0 ${CC} ${CFLAGS} sockaddr_in_sin_len.c > /dev/null 2>&1 if [[ $? -eq 0 ]]; then has_sockaddr_in_sin_len=1; AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi rm -f sockaddr_in_sin_len.c sockaddr_in_sin_len AM_CONDITIONAL([HAS_SOCKADDR_IN_SIN_LEN], [test $has_sockaddr_in_sin_len = yes]) AC_DEFINE_UNQUOTED([HAS_SOCKADDR_IN_SIN_LEN], [$has_sockaddr_in_sin_len], [The sockaddr_in struct has an sin_len field]) ]) AC_DEFUN([AC_SOCKADDR_IN6_SIN6_LEN_CHECK], [ dnl Check for sin6_len field AC_MSG_CHECKING([if sockaddr_in6 has a sin6_len field]) cat > sockaddr_in6_sin6_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in6 sa; sa.sin6_len = sizeof(struct sockaddr_in6); } _ACEOF has_sockaddr_in6_sin6_len=0 ${CC} ${CFLAGS} sockaddr_in6_sin6_len.c > /dev/null 2>&1 if [[ $? -eq 0 ]]; then has_sockaddr_in6_sin6_len=1; AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi rm -f sockaddr_in6_sin6_len.c sockaddr_in6_sin6_len AM_CONDITIONAL([HAS_SOCKADDR_IN6_SIN6_LEN], [test $has_sockaddr_in6_sin6_len = yes]) AC_DEFINE_UNQUOTED([HAS_SOCKADDR_IN6_SIN6_LEN], [$has_sockaddr_in6_sin6_len], [The sockaddr_in6 struct has an sin6_len field]) ]) AC_DEFUN([AC_EURID_SUMMARY], [ cat <. ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS yadifa-2.1.6-5826/m4/PaxHeaders.8028/yadifa.m40000644000077100007710000000012412650131756016361 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.891344 30 ctime=1454597650.467344534 yadifa-2.1.6-5826/m4/yadifa.m40000664000077100007710000005360312650131756016175 0ustar00yadifayadifa00000000000000dnl ############################################################################ dnl dnl Copyright (c) 2011-2016, EURid. All rights reserved. dnl The YADIFA TM software product is provided under the BSD 3-clause license: dnl dnl Redistribution and use in source and binary forms, with or without dnl modification, are permitted provided that the following conditions dnl are met: dnl dnl * Redistributions of source code must retain the above copyright dnl notice, this list of conditions and the following disclaimer. dnl * Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in dnl the documentation and/or other materials provided with the dnl distribution. dnl * Neither the name of EURid nor the names of its contributors may be dnl used to endorse or promote products derived from this software dnl without specific prior written permission. dnl dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN dnl CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE dnl POSSIBILITY OF SUCH DAMAGE. dnl dnl ############################################################################ dnl #################################################### dnl dnl AC_HAS_ENABLE(low-case --enable-*, up-case HAS_*, text, config.h text,ifyes,ifno) dnl dnl This macro creates a parameter with dnl _ a shell-variable-name that will be used for --enable-VARIABLENAME dnl '_' of the variable name will be replaced by a '-' in the command dnl dnl _ SOMETHINGSOMETHING that will be transformed into a HAS_SOMETHINGSOMETHING define (both C & Makefile) dnl dnl _ A text to be put next to the --enable-this line in the --help dnl dnl _ An optional text to be put in the config.h output file. If not set or empty, the --help text is used dnl dnl _ A block to execute if the option is enabled (--enable-this) dnl dnl _ A block to execute if the option is disabled (--disable-this or not set) dnl dnl #################################################### AC_DEFUN([AC_HAS_ENABLE], [ # # AC_HAS_ENABLE $1 # AM_CONDITIONAL(HAS_$2, [false]) # CHECKING AC_MSG_CHECKING(if [$2] has been enabled) # ARG ENABLE AC_ARG_ENABLE([$1], AS_HELP_STRING([--enable-[translit($1,[_],[-])]], [Enable $3])) dnl # MSG RESULT dnl AC_MSG_RESULT($enable_[$1]) dnl echo "enabled: '$enable_[$1]'" # CASE case "y$enable_[$1]" in yyes) # DEFINE Y AC_DEFINE_UNQUOTED([HAS_$2], [1], ifelse($4,,[$3 enabled.],$4)) # CONDITIONAL Y AM_CONDITIONAL([HAS_$2], [true]) enable_[$1]="yes" AC_MSG_RESULT([yes]) # IF YES $5 # ENDIF ;; yno|y|*) # DEFINE N AC_DEFINE_UNQUOTED([HAS_$2], [0], ifelse($4,,[$3 disabled.],$4)) # CONDITIONAL N AM_CONDITIONAL([HAS_$2], [false]) enable_[$1]="no" AC_MSG_RESULT([no]) # IF NO $6 # ENDIF ;; esac dnl # CONDITIONAL dnl AM_CONDITIONAL([HAS_$2], [test y$enable_[$1] = yyes]) # SUBST AC_SUBST(HAS_$2) # AC_HAS_ENABLE $1 DONE ]) dnl #################################################### dnl dnl AC_HAS_DISABLE(low-case --disable-*, up-case HAS_*, text, config.h text,ifyes,ifno) dnl dnl This macro creates a parameter with dnl _ a shell-variable-name that will be used for --disable-VARIABLENAME dnl '_' of the variable name will be replaced by a '-' in the command dnl dnl _ SOMETHINGSOMETHING that will be transformed into a HAS_SOMETHINGSOMETHING define (both C & Makefile) dnl dnl _ A text to be put next to the --disable-this line in the --help dnl dnl _ An optional text to be put in the config.h output file. If not set or empty, the --help text is used dnl dnl _ A block to execute if the option is enabled (--enable-this or not set) dnl dnl _ A block to execute if the option is disabled (--disable-this) dnl dnl #################################################### AC_DEFUN([AC_HAS_DISABLE], [ # # AC_HAS_DISABLE $1 # AM_CONDITIONAL(HAS_$2, [true]) # CHECKING AC_MSG_CHECKING(if [$2] has been disabled) # ARG ENABLE AC_ARG_ENABLE([$1], AS_HELP_STRING([--disable-[translit($1,[_],[-])]],[Disable $3])) # MSG RESULT dnl echo "enabled: '$enable_[$1]'" # CASE case "y$enable_[$1]" in yyes|y) # DEFINE Y AC_DEFINE_UNQUOTED([HAS_$2], [1], ifelse($4,,[$3 enabled.],$4)) # CONDITIONAL Y AM_CONDITIONAL([HAS_$2], [true]) enable_[$1]=yes AC_MSG_RESULT([no]) # IF YES $5 # ENDIF ;; yno|*) # DEFINE N AC_DEFINE_UNQUOTED([HAS_$2], [0], ifelse($4,,[$3 disabled.],$4)) # CONDITIONAL N AM_CONDITIONAL([HAS_$2], [false]) enable_[$1]=no AC_MSG_RESULT([yes]) # IF NO $6 # ENDIF ;; esac dnl # CONDITIONAL dnl AM_CONDITIONAL([HAS_$2], [test y$enable_[$1] = yyes]) # SUBST AC_SUBST(HAS_$2) # AC_HAS_DISABLE $1 DONE ]) dnl #################################################### dnl dnl AC_HAS_WITH(low-case --with-*, up-case HAS_*, text, config.h text,ifyes,ifno) dnl dnl This macro creates a parameter with dnl _ a shell-variable-name that will be used for --with-VARIABLENAME dnl '_' of the variable name will be replaced by a '-' in the command dnl dnl _ SOMETHINGSOMETHING that will be transformed into a HAS_SOMETHINGSOMETHING define (both C & Makefile) dnl dnl _ A text to be put next to the --with-this line in the --help dnl dnl _ An optional text to be put in the config.h output file. If not set or empty, the --help text is used dnl dnl _ A block to execute if the option is withd (--with-this) dnl dnl _ A block to execute if the option is withoutd (--without-this or not set) dnl dnl #################################################### AC_DEFUN([AC_HAS_WITH], [ # # AC_HAS_WITH $1 # AM_CONDITIONAL(HAS_$2, [false]) # CHECKING AC_MSG_CHECKING(if [$1] has been given) # ARG WITH AC_ARG_WITH([$1], AS_HELP_STRING([--with-[translit($1,[_],[-])]], [build $3]), [ # DEFINE Y AC_DEFINE_UNQUOTED([HAS_$2], [1], ifelse($4,,[build $3.],$4)) # CONDITIONAL Y AM_CONDITIONAL([HAS_$2], [true]) AC_DEFINE_UNQUOTED([HAS_WITH_$2], "$with_[$1]" // $withval, ifelse($4,,[build $3.],$4)) with_[$1]="yes" AC_MSG_RESULT([yes]) # IF YES $5 # ENDIF ] , [ # DEFINE N AC_DEFINE_UNQUOTED([HAS_$2], [0], ifelse($4,,[don't build $3.],$4)) # CONDITIONAL N AM_CONDITIONAL([HAS_$2], [false]) with_[$1]="no" AC_MSG_RESULT([no]) # IF NO $6 # ENDIF ]) # SUBST AC_SUBST(HAS_$2) # AC_HAS_WITH $1 DONE ]) dnl #################################################### dnl dnl AC_HAS_WITHOUT(low-case --without-*, up-case HAS_*, text, config.h text,ifyes,ifno) dnl dnl This macro creates a parameter with dnl _ a shell-variable-name that will be used for --without-VARIABLENAME dnl '_' of the variable name will be replaced by a '-' in the command dnl dnl _ SOMETHINGSOMETHING that will be transformed into a HAS_SOMETHINGSOMETHING define (both C & Makefile) dnl dnl _ A text to be put next to the --without-this line in the --help dnl dnl _ An optional text to be put in the config.h output file. If not set or empty, the --help text is used dnl dnl _ A block to execute if the option is withd (--with-this or not set) dnl dnl _ A block to execute if the option is withoutd (--without-this) dnl dnl #################################################### AC_DEFUN([AC_HAS_WITHOUT], [ # # AC_HAS_WITHOUT $1 # AM_CONDITIONAL(HAS_$2, [true]) # CHECKING AC_MSG_CHECKING(if [$1] has to be build) # ARG WITH AC_ARG_WITH([$1], AS_HELP_STRING([--without-[translit($1,[_],[-])]],[build $3])) # MSG RESULT case "y$with_[$1]" in yyes|y) # DEFINE Y AC_DEFINE_UNQUOTED([HAS_$2], [1], ifelse($4,,[build $3.],$4)) # CONDITIONAL Y AM_CONDITIONAL([HAS_$2], [true]) with_[$1]=yes AC_MSG_RESULT([yes]) # IF YES $5 # ENDIF ;; yno|*) # DEFINE N AC_DEFINE_UNQUOTED([HAS_$2], [0], ifelse($4,,[don't build $3.],$4)) # CONDITIONAL N AM_CONDITIONAL([HAS_$2], [false]) with_[$1]=no AC_MSG_RESULT([no]) # IF NO $6 # ENDIF ;; esac dnl # CONDITIONAL dnl AM_CONDITIONAL([HAS_$2], [test y$with_[$1] = yyes]) # SUBST AC_SUBST(HAS_$2) # AC_HAS_WITHOUT $1 DONE ]) dnl dnl #################################################### dnl dnl dnl dnl COMPILER SUPPORT dnl dnl dnl dnl #################################################### dnl dnl AC_DEFUN([AC_COMPILER_SUPPORTS], [ dnl # dnl # AC_COMPILER_SUPPORTS $1 dnl # dnl # CHECKING dnl AC_MSG_CHECKING(if compiler supports [$1]) dnl cat > test-gcc-$2.c <<_ACEOF dnl #include dnl int main(int argc,char** argv) dnl { dnl (void)argc; dnl (void)argv; dnl puts("Hello World!"); dnl return 0; dnl } dnl _ACEOF dnl ${CC} $1 test-gcc-$2.c -o test-gcc-$2 dnl if [[ $? -ne 0]] dnl then dnl AM_CONDITIONAL(HAS_CC_$2, [false]) dnl AC_MSG_RESULT([no]) dnl else dnl AM_CONDITIONAL(HAS_CC_$2, [true]) dnl AC_MSG_RESULT([yes]) dnl fi dnl AC_SUBST(HAS_CC_$2) dnl rm -f test-gcc-$2.c dnl dnl ]) dnl dnl dnl #################################################### dnl CTRL class dnl AC_DEFUN([AC_CHECK_ENABLE_CTRL], [ AC_HAS_ENABLE(ctrl,CTRL,[remote control]) ]) dnl DYNAMIC_PROVISIONING AC_DEFUN([AC_CHECK_ENABLE_CTRL_DYNAMIC_PROVISIONING], [ AC_HAS_ENABLE(ctrl_dynamic_provisioning,CTRL_DYNAMIC_PROVISIONING,[dynamic provisioning],, AM_CONDITIONAL([HAS_CTRL], [true]) , ) ]) dnl DNS_RRL AC_DEFUN([AC_CHECK_ENABLE_RRL], [ AC_HAS_DISABLE(rrl,RRL_SUPPORT,[DNS Response Rate Limiter]) ]) dnl SSL DNSCORE DNSDB DNSZONE (all defaulted to FALSE) requires_tcl=0 requires_ssl=0 requires_dnscore=0 requires_dnsdb=0 requires_dnszone=0 requires_dnslg=0 requires_dnstcl=0 AC_DEFUN([AC_YADIFA_ENABLE_TCL], [ requires_tcl=1 ]) AC_DEFUN([AC_YADIFA_ENABLE_SSL], [ requires_ssl=1 ]) AC_DEFUN([AC_YADIFA_ENABLE_DNSCORE], [ requires_dnscore=1 ]) AC_DEFUN([AC_YADIFA_ENABLE_DNSDB], [ requires_dnsdb=1 requires_dnscore=1 ]) AC_DEFUN([AC_YADIFA_ENABLE_DNSZONE], [ requires_dnszone=1 requires_dnsdb=1 requires_dnscore=1 ]) AC_DEFUN([AC_YADIFA_ENABLE_DNSLG], [ requires_dnslg=1 requires_dnscore=1 ]) AC_DEFUN([AC_YADIFA_ADD_LIBS], [ LDDYN="-Wl,-Bdynamic" LDSTAT="-Wl,-Bstatic" echo -n "checking if -Bstatic & -Bdynamic are supported ... " $CC -Wl,-Bstatic 2>&1|grep Bstatic > /dev/null if [[ $? -eq 0 ]] then echo "not supported"; LDDYN="" LDSTAT="" else echo "supported"; fi LIBS="$LDDYN $LIBS" AC_SEARCH_LIBS([gethostbyname],[nsl],,[exit 1]) AC_SEARCH_LIBS([socket],[socket],,[exit 1]) AC_SEARCH_LIBS([dlopen],[dl],,[exit 1]) dnl AC_GETHOSTBYNAME_CHECK if [[ $requires_tcl -eq 1 ]] then echo "TCL is required by this setup ..." CFLAGS="$CFLAGS -DWITHTCLINCLUDED -I${tcl_includedir}" LDFLAGS="-L${tcl_libdir} $LDFLAGS" AC_SEARCH_LIBS(Tcl_Main, [${tcl_version}], ,[echo "could not find ${tcl_version} :: tcl_includedir=${tcl_includedir} :: tcl_libdir=${tcl_libdir}"; exit 1]) fi dnl SSL if [[ $requires_ssl -eq 1 ]] then echo "SSL is required by this setup ..." SSLDEPS="" echo "Finding the SSL dependencies" AC_SEARCH_LIBS([deflate],[z]) echo "SSLDEPS=${SSLDEPS}" AC_MSG_CHECKING(if SSL is available) ac_check_lib_ssl=0 AC_ARG_WITH(openssl_lib, AS_HELP_STRING([--with-openssl-lib=DIR], [Use the openssl library from directory DIR]), [ AC_MSG_RESULT([yes]) LDFLAGS="-L$with_openssl_lib $SSLDEPS $LDFLAGS" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 ]) AC_ARG_WITH(openssl_include, AS_HELP_STRING([--with-openssl-include=DIR], [Use the openssl headers from directory DIR]), [ AC_MSG_RESULT([yes]) CFLAGS="-I$with_openssl_include $CFLAGS $CFLAGS3264" echo "CFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 ]) AC_ARG_WITH(openssl, AS_HELP_STRING([--with-openssl=DIR], [Use the openssl from directory DIR]), [ echo "yes" OPENSSL="${withval}" CFLAGS="-I$with_openssl/include $CFLAGS $CFLAGS3264" LDFLAGS="-L$with_openssl/lib $SSLDEPS $LDFLAGS" echo "CFLAGS=$CFLAGS" echo "LDFLAGS=$LDFLAGS" ac_check_lib_ssl=1 ], [ echo "no" CFLAGS="$CFLAGS $CFLAGS3264" LDFLAGS="$SSLDEPS $LDFLAGS" echo "CFLAGS=${CFLAGS}" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 ]) if [[ $ac_check_lib_ssl -eq 1 ]] then dnl AC_CHECK_LIB([crypto], [RSA_new],,,[$SSLDEPS]) dnl AC_CHECK_LIB([ssl], [SSL_library_init],,[exit],[$SSLDEPS]) AC_SEARCH_LIBS([RSA_new],[crypto],,[exit 1],) AC_SEARCH_LIBS([SSL_library_init],[ssl],,[exit 1]) fi AC_SUBST(OPENSSL) else echo "SSL is not required by this setup" fi dnl DNSCORE if [[ $requires_dnscore -eq 1 ]] then AC_SEARCH_LIBS([clock_gettime],[rt]) AC_MSG_CHECKING(for the DNS Core library) AC_ARG_WITH(dnscore, AS_HELP_STRING([--with-dnscore=DIR], [Use the dnscore from directory DIR/lib (devs only)]), [ CFLAGS="-I$with_dnscore/include $CFLAGS" LDFLAGS="-L$with_dnscore/lib $LDFLAGS"; AC_CHECK_LIB([dnscore], [dnscore_init],,[exit],[$LDSTAT -ldnscore $LDDYN -lssl]) ], [ if [[ ! -d ${srcdir}/../../lib/dnscore ]] then AC_CHECK_LIB([dnscore], [dnscore_init],,[exit],[$LDSTAT -ldnscore $LDDYN -lssl]) else CFLAGS="-I${srcdir}/../../lib/dnscore/include $CFLAGS" LDFLAGS="-L../../lib/dnscore/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnscore $LDDYN" fi ]) AC_SUBST(DNSCORE) fi dnl DNSDB if [[ $requires_dnsdb -eq 1 ]] then AC_MSG_CHECKING(for the DNS Database library) AC_ARG_WITH(dnsdb, AS_HELP_STRING([--with-dnsdb=DIR], [Use the dnsdb from directory DIR/lib (devs only)]), [ CFLAGS="-I$with_dnsdb/include $CFLAGS" LDFLAGS="-L$with_dnsdb/lib $LDFLAGS"; AC_CHECK_LIB([dnsdb], [zdb_init],,[exit],[$LDSTAT -ldnscore $LDDYN -lssl]) ], [ if [[ ! -d ${srcdir}/../../lib/dnsdb ]] then AC_CHECK_LIB([dnsdb], [zdb_init],,[exit],[$LDSTAT -ldnscore $LDDYN -lssl]) else echo "embedded" CFLAGS="-I${srcdir}/../../lib/dnsdb/include $CFLAGS" LDFLAGS="-L../../lib/dnsdb/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnsdb $LDDYN" fi ]) AC_SUBST(DNSDB) fi dnl DNSZONE if [[ $requires_dnszone -eq 1 ]] then AC_MSG_CHECKING(for the DNS Zone library) AC_ARG_WITH(dnszone, AS_HELP_STRING([--with-dnszone=DIR], [Use the dnszone from directory DIR/lib (devs only)]), [ CFLAGS="-I$with_dnszone/include $CFLAGS" LDFLAGS="-L$with_dnszone/lib $LDFLAGS"; AC_CHECK_LIB([dnszone], [dnszone_init],,[exit],[$LDSTAT -ldnsdb -ldnscore $LDDYN -lssl]) ], [ if [[ ! -d ${srcdir}/../../lib/dnszone ]] then AC_CHECK_LIB([dnszone], [dnszone_init],,[exit],[$LDSTAT -ldnsdb -ldnscore $LDDYN -lssl]) else CFLAGS="-I${srcdir}/../../lib/dnszone/include $CFLAGS" LDFLAGS="-L../../lib/dnszone/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnszone $LDDYN" fi ]) AC_SUBST(DNSZONE) fi dnl DNSLG if [[ $requires_dnslg -eq 1 ]] then AC_MSG_CHECKING(for the DNS Looking Glass library) AC_ARG_WITH(dnslg, AS_HELP_STRING([--with-dnslg=DIR], [Use the dnslg from directory DIR/lib (devs only)]), [ CFLAGS="-I$with_dnslg/include $CFLAGS" LDFLAGS="-L$with_dnslg/lib $LDFLAGS"; AC_CHECK_LIB([dnslg], [dnslg_init],,[exit],[$LDSTAT -ldnscore $LDDYN -lssl]) ], [ if [[ ! -d ${srcdir}/../../lib/dnslg ]] then AC_CHECK_LIB([dnslg], [dnslg_init],,[exit],[$LDSTAT -ldnscore $LDDYN ]) else CFLAGS="-I${srcdir}/../../lib/dnslg/include $CFLAGS" LDFLAGS="-L../../lib/dnslg/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnslg $LDDYN" fi ]) AC_SUBST(DNSLG) fi LDFLAGS="$LDFLAGS $LDDYN" LIBS="$LDDYN $LIBS" ]) dnl Features AC_DEFUN([AC_YADIFA_FEATURES], [ AC_CHECK_ENABLE_CTRL_DYNAMIC_PROVISIONING AC_CHECK_ENABLE_RRL dnl SENDMSG / SENDTO : send messages with sendmsg instead of sendto dnl ========================================================================== AC_HAS_ENABLE(messages,MESSAGES_SUPPORT,[use messages instead of send (needed if you use more than one IP aliased on the same network interface)]) dnl MASTER dnl ========================================================================== dnl NOTE: Putting the empty optional text (,,) is mandatory AC_HAS_DISABLE(master,MASTER_SUPPORT,[DNS master],, AC_YADIFA_ENABLE_SSL , enable_dynupdate='no' enable_rrsig_management='no') dnl CTRL class dnl ========================================================================== AC_HAS_ENABLE(ctrl,CTRL,[remote control]) dnl NSID dnl ========================================================================== AC_HAS_DISABLE(nsid,NSID_SUPPORT,[NSID support]) dnl ACL dnl ========================================================================== AC_HAS_DISABLE(acl,ACL_SUPPORT,[ACL support],, AC_YADIFA_ENABLE_SSL , enable_tsig='no' ) dnl TSIG dnl ========================================================================== AC_HAS_DISABLE(tsig,TSIG_SUPPORT,[TSIG support],, AC_YADIFA_ENABLE_SSL , ) dnl DYNUPDATE dnl ========================================================================== AC_HAS_DISABLE(dynupdate,DYNUPDATE_SUPPORT,[dynamic update support]) dnl RRSIG_MANAGEMENT dnl ========================================================================== AC_HAS_DISABLE(rrsig_management,RRSIG_MANAGEMENT_SUPPORT,[RRSIG verification and generation for zones],, AC_YADIFA_ENABLE_SSL , ) dnl ZALLOC dnl ========================================================================== AC_HAS_DISABLE(zalloc,ZALLOC_SUPPORT,[zalloc memory system]) dnl ZALLOC STATISTICS dnl ================= AC_HAS_ENABLE(zalloc_statistics,ZALLOC_STATISTICS_SUPPORT,[zalloc statistics support]) dnl ZALLOC DEBUG dnl ============ AC_HAS_ENABLE(zalloc_debug,ZALLOC_DEBUG_SUPPORT,[zalloc debug support]) dnl MALLOC DEBUG dnl ============ AC_HAS_ENABLE(malloc_debug,MALLOC_DEBUG_SUPPORT,[malloc debug support]) dnl BFD STACKTRACE DEBUG dnl ==================== AC_HAS_ENABLE(bfd_debug,BFD_DEBUG_SUPPORT,[bfd debug support]) case "$enable_bfd_debug" in yes) AC_SEARCH_LIBS([dlinfo],[dl],[],[echo no dl],) AC_SEARCH_LIBS([sha1_init_ctx],[iberty],[],[echo iberty],) AC_SEARCH_LIBS([bfd_init],[bfd],[],[echo no bfd;exit 1],) ;; no|*) ;; esac dnl MUTEX STACKTRACE DEBUG dnl ====================== AC_HAS_ENABLE(mutex_debug,MUTEX_DEBUG_SUPPORT,[mutex debug support]) dnl LOG THREAD ID dnl ============= AC_HAS_ENABLE(log_thread_id,LOG_THREAD_ID_ALWAYS_ON,[write the thread id in each line of log]) dnl LOG PID dnl dnl === AC_HAS_ENABLE(log_pid,LOG_PID_ALWAYS_ON,[write the pid in each line of log]) dnl ASCII 7 dnl dnl ======= AC_HAS_ENABLE(full_ascii7,FULL_ASCII7,[YADIFA will now accept ASCII7 characters in DNS names (not recommended)]) dnl NON-AA AXFR (non-AA AXFR as sent by MS DNS) dnl ========================================================================== AC_HAS_ENABLE(non_aa_axfr_support,NON_AA_AXFR_SUPPORT,[Allows AXFR answer from master without AA bit set (Microsoft DNS)]) dnl logdir dnl ========================================================================== AC_HAS_WITH(logdir, LOGDIR, [sets the directory where to put the log files], [where to put the log files], logdir="$withval" , logdir=${localstatedir}/log/yadifa ) AC_SUBST(logdir) AC_SOCKADDR_SA_LEN_CHECK AC_SOCKADDR_IN_SIN_LEN_CHECK AC_SOCKADDR_IN6_SIN6_LEN_CHECK AM_CONDITIONAL([HAS_ACL_SUPPORT], [true]) AC_DEFINE_UNQUOTED([HAS_ACL_SUPPORT], [1], [always on]) AM_CONDITIONAL([HAS_TSIG_SUPPORT], [true]) AC_DEFINE_UNQUOTED([HAS_TSIG_SUPPORT], [1], [always on]) AM_CONDITIONAL([HAS_DNSSEC_SUPPORT], [true]) AC_DEFINE_UNQUOTED([HAS_DNSSEC_SUPPORT], [1], [always on]) AM_CONDITIONAL([HAS_NSEC3_SUPPORT], [true]) AC_DEFINE_UNQUOTED([HAS_NSEC3_SUPPORT], [1], [always on]) AM_CONDITIONAL([HAS_NSEC_SUPPORT], [true]) AC_DEFINE_UNQUOTED([HAS_NSEC_SUPPORT], [1], [always on]) AM_CONDITIONAL([HAS_MIRROR_SUPPORT], [false]) AC_DEFINE_UNQUOTED([HAS_MIRROR_SUPPORT], [0], [always off]) AM_CONDITIONAL([HAS_DROPALL_SUPPORT], [false]) AC_DEFINE_UNQUOTED([HAS_DROPALL_SUPPORT], [0], [always off]) AM_CONDITIONAL([HAS_TCL], [false]) AC_DEFINE_UNQUOTED([HAS_TCL], [0], [always off]) AM_CONDITIONAL([HAS_RDTSC], [false]) AC_DEFINE_UNQUOTED([HAS_RDTSC], [0], [always off]) AM_CONDITIONAL([HAS_RRCACHE_ENABLED], [false]) AC_DEFINE_UNQUOTED([HAS_RRCACHE_ENABLED], [0], [always off]) ]) AC_DEFUN([AC_YADIFA_SUMMARY], [ if [[ "$disable_acl" = "yes" ]]; then enable_acl="no"; else enable_acl="yes";fi if [[ "$disable_tsig" = "yes" ]]; then enable_tsig="no"; else enable_tsig="yes";fi echo echo SUMMARY echo _____________________ echo echo CC ................ : $CC echo LD ................ : $LD echo AR ................ : $AR echo CFLAGS ............ : $CFLAGS echo CXXFLAGS .......... : $CXXFLAGS echo CPPFLAGS .......... : $CPPFLAGS echo LDFLAGS ........... : $LDFLAGS echo LIBS .............. : $LIBS echo echo ZALLOC ............ : $enable_zalloc echo ZALLOC STATISTICS . : $enable_zalloc_statistics echo ZALLOC DEBUG ...... : $enable_zalloc_debug echo ACL ............... : $enable_acl echo TSIG .............. : $enable_tsig echo MASTER ............ : $enable_master echo DYNUPDATE ......... : $enable_dynupdate echo RRSIG MANAGEMENT .. : $enable_rrsig_management echo CTRL .............. : $enable_ctrl echo NSEC .............. : $enable_nsec echo NSEC3 ............. : $enable_nsec3 echo RRL ............... : $enable_rrl echo echo TCL ............... : $with_tcl if [[ "$with_tcl" = "yes" ]]; then echo TCL used ............................ : $tcl_version echo TCL library ......................... : $tcl_libdir echo "TCL includes ........................ : $tcl_includedir" fi echo ]) yadifa-2.1.6-5826/m4/PaxHeaders.8028/ltoptions.m40000644000077100007710000000013012473714653017162 xustar000000000000000029 mtime=1424988587.46805841 29 atime=1424988587.46805841 30 ctime=1454597650.449344534 yadifa-2.1.6-5826/m4/ltoptions.m40000644000077100007710000003426212473714653016777 0ustar00yadifayadifa00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) yadifa-2.1.6-5826/m4/PaxHeaders.8028/lt~obsolete.m40000644000077100007710000000013012473714653017501 xustar000000000000000029 mtime=1424988587.53205841 29 atime=1424988587.53205841 30 ctime=1454597650.460344534 yadifa-2.1.6-5826/m4/lt~obsolete.m40000644000077100007710000001377412473714653017323 0ustar00yadifayadifa00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) yadifa-2.1.6-5826/PaxHeaders.8028/install-sh0000644000077100007710000000013212473710127016340 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597650.525344534 yadifa-2.1.6-5826/install-sh0000755000077100007710000003452312473710127016156 0ustar00yadifayadifa00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # 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. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # 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_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 is_target_a_directory=possibly 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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi 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 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac 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 if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 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 problematic for 'test' and other utilities. 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 # 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 "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` 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-writable 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 oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && 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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/PaxHeaders.8028/NEWS0000644000077100007710000000012412610121331015021 xustar000000000000000027 mtime=1444979417.160777 27 atime=1454597464.840344 30 ctime=1454597650.503344534 yadifa-2.1.6-5826/NEWS0000664000077100007710000000001312610121331014620 0ustar00yadifayadifa00000000000000see README yadifa-2.1.6-5826/PaxHeaders.8028/var0000644000077100007710000000013212654663025015057 xustar000000000000000030 mtime=1454597653.674344534 30 atime=1454597653.579344534 30 ctime=1454597653.674344534 yadifa-2.1.6-5826/var/0000775000077100007710000000000012654663025014742 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/var/PaxHeaders.8028/Makefile.am0000644000077100007710000000012412650131756017166 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597463.909344 30 ctime=1454597653.653344534 yadifa-2.1.6-5826/var/Makefile.am0000664000077100007710000000504112650131756016773 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # YADIFA data Makefile.am script # ############################################################################## ACLOCAL_AMFLAGS = -I m4 zonesmastersdir = $(localstatedir)/zones/masters dist_zonesmasters_DATA = zones/masters/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.0.0.0.ip6.arpa.zone zones/masters/0.0.127.in-addr.arpa.zone zones/masters/localhost6.zone zones/masters/localhost.zone zones/masters/somedomain.eu.zone all: release: profile: debug: install-data-hook: @for d in zones/masters zones/slaves zones/xfr zones/keys run log; \ do \ mkdir -p "$(DESTDIR)/$(localstatedir)/$$d"; \ chmod 755 "$(DESTDIR)/$(localstatedir)/$$d"; \ done mkdir -p "$(DESTDIR)/$(logdir)" chmod 755 "$(DESTDIR)/$(logdir)" yadifa-2.1.6-5826/var/PaxHeaders.8028/zones0000644000077100007710000000013212654663025016215 xustar000000000000000030 mtime=1454597653.650344534 30 atime=1454597653.650344534 30 ctime=1454597653.650344534 yadifa-2.1.6-5826/var/zones/0000775000077100007710000000000012654663025016100 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/var/zones/PaxHeaders.8028/masters0000644000077100007710000000013212654663025017673 xustar000000000000000030 mtime=1454597653.671344534 30 atime=1454597653.650344534 30 ctime=1454597653.671344534 yadifa-2.1.6-5826/var/zones/masters/0000775000077100007710000000000012654663025017556 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/var/zones/masters/PaxHeaders.8028/0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0000644000077100007710000000031511732025737024273 xustar0000000000000000121 path=yadifa-2.1.6-5826/var/zones/masters/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.0.0.0.ip6.arpa.zone 27 mtime=1332227039.999231 27 atime=1454597463.914344 30 ctime=1454597653.657344534 yadifa-2.1.6-5826/var/zones/masters/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.0.0.0.ip0000664000077100007710000000107211732025737025651 0ustar00yadifayadifa00000000000000$TTL 86400 ; 24 hours $ORIGIN 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.0.0.0.ip6.arpa. 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.0.0.0.ip6.arpa. 86400 IN SOA localhost. root.localhost. ( 20120201 ; Serial 3h ; Refresh 15 ; Retry 1w ; Expire 3h ; Minimum ) 86400 IN NS localhost. 1 86400 IN PTR localhost. yadifa-2.1.6-5826/var/zones/masters/PaxHeaders.8028/localhost.zone0000644000077100007710000000012412331653346022633 xustar000000000000000027 mtime=1399281382.897329 27 atime=1454597463.913344 30 ctime=1454597653.667344534 yadifa-2.1.6-5826/var/zones/masters/localhost.zone0000664000077100007710000000070212331653346022437 0ustar00yadifayadifa00000000000000$TTL 86400 ; 24 hours $ORIGIN localhost. localhost. 86400 IN SOA localhost. root.localhost. ( 20120201 ; serial 3H ; refresh 15 ; retry 1w ; expire 3h ; minimum ) 86400 IN NS localhost. 86400 IN A 127.0.0.1 yadifa-2.1.6-5826/var/zones/masters/PaxHeaders.8028/somedomain.eu.zone0000644000077100007710000000012411732025737023407 xustar000000000000000027 mtime=1332227039.999231 27 atime=1454597463.914344 30 ctime=1454597653.671344534 yadifa-2.1.6-5826/var/zones/masters/somedomain.eu.zone0000664000077100007710000000064711732025737023223 0ustar00yadifayadifa00000000000000;; Example domain $TTL 86400 ; 24 hours $ORIGIN somedomain.eu. somedomain.eu. 86400 IN SOA ns1.somedomain.eu. info.somedomain.eu. 1 3600 1800 3600000 600 86400 IN MX 10 mail.somedomain.eu. 86400 IN NS ns1.somedomain.eu. ns1.somedomain.eu. 86400 IN A 192.0.2.2 mail.somedomain.eu. 86400 IN A 192.0.2.3 www.somedomain.eu. 86400 IN A 192.0.2.4 yadifa-2.1.6-5826/var/zones/masters/PaxHeaders.8028/localhost6.zone0000644000077100007710000000012411732025737022722 xustar000000000000000027 mtime=1332227039.999231 27 atime=1454597463.914344 30 ctime=1454597653.664344534 yadifa-2.1.6-5826/var/zones/masters/localhost6.zone0000664000077100007710000000072511732025737022533 0ustar00yadifayadifa00000000000000$TTL 86400 ; 24 hours $ORIGIN localhost6. localhost6. 86400 IN SOA localhost6. root.localhost6. ( 20120201 ; serial 3H ; refresh 15 ; retry 1w ; expire 3h ; minimum ) 86400 IN NS localhost6. 86400 IN AAAA ::1 yadifa-2.1.6-5826/var/zones/masters/PaxHeaders.8028/0.0.127.in-addr.arpa.zone0000644000077100007710000000012411732025737023710 xustar000000000000000027 mtime=1332227039.999231 27 atime=1454597463.914344 30 ctime=1454597653.660344534 yadifa-2.1.6-5826/var/zones/masters/0.0.127.in-addr.arpa.zone0000664000077100007710000000110311732025737023510 0ustar00yadifayadifa00000000000000$TTL 86400 ; 24 hours $ORIGIN 0.0.127.IN-ADDR.ARPA. 0.0.127.IN-ADDR.ARPA. 86400 IN SOA localhost. root.localhost. ( 20120201 ; Serial 3h ; Refresh 15 ; Retry 1w ; Expire 3h ; Minimum ) 86400 IN NS localhost. 1 86400 IN PTR localhost. yadifa-2.1.6-5826/var/PaxHeaders.8028/Makefile.in0000644000077100007710000000013212654662556017211 xustar000000000000000030 mtime=1454597486.147344534 30 atime=1454597486.146344534 30 ctime=1454597653.674344534 yadifa-2.1.6-5826/var/Makefile.in0000664000077100007710000004550512654662556017030 0ustar00yadifayadifa00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # YADIFA data Makefile.am script # ############################################################################## VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@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@ subdir = var ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/eurid.m4 $(top_srcdir)/m4/yadifa.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(dist_zonesmasters_DATA) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(zonesmastersdir)" DATA = $(dist_zonesmasters_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCOPTIMISATIONFLAGS = @CCOPTIMISATIONFLAGS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAS_ACL_SUPPORT = @HAS_ACL_SUPPORT@ HAS_BFD_DEBUG_SUPPORT = @HAS_BFD_DEBUG_SUPPORT@ HAS_BIG_ENDIAN = @HAS_BIG_ENDIAN@ HAS_CC_ADDRESS_SANITIZER_CHECK = @HAS_CC_ADDRESS_SANITIZER_CHECK@ HAS_CC_ANSI = @HAS_CC_ANSI@ HAS_CC_ANSI_ALIAS = @HAS_CC_ANSI_ALIAS@ HAS_CC_CATCH_UNDEFINED_BEHAVIOR = @HAS_CC_CATCH_UNDEFINED_BEHAVIOR@ HAS_CC_DWARF2 = @HAS_CC_DWARF2@ HAS_CC_DWARF3 = @HAS_CC_DWARF3@ HAS_CC_DWARF4 = @HAS_CC_DWARF4@ HAS_CC_EXCEPTIONS = @HAS_CC_EXCEPTIONS@ HAS_CC_G = @HAS_CC_G@ HAS_CC_G3 = @HAS_CC_G3@ HAS_CC_M32 = @HAS_CC_M32@ HAS_CC_M64 = @HAS_CC_M64@ HAS_CC_MISSING_FIELD_INITIALIZERS = @HAS_CC_MISSING_FIELD_INITIALIZERS@ HAS_CC_NO_IDENT = @HAS_CC_NO_IDENT@ HAS_CC_NO_OMIT_FRAME_POINTER = @HAS_CC_NO_OMIT_FRAME_POINTER@ HAS_CC_PEDANTIC = @HAS_CC_PEDANTIC@ HAS_CC_RDYNAMIC = @HAS_CC_RDYNAMIC@ HAS_CC_SANITIZE_ADDRESS = @HAS_CC_SANITIZE_ADDRESS@ HAS_CC_STACK_PROTECTOR = @HAS_CC_STACK_PROTECTOR@ HAS_CC_STD_C99 = @HAS_CC_STD_C99@ HAS_CC_STD_GNU99 = @HAS_CC_STD_GNU99@ HAS_CC_TUNE_NATIVE = @HAS_CC_TUNE_NATIVE@ HAS_CC_WALL = @HAS_CC_WALL@ HAS_CC_XC99 = @HAS_CC_XC99@ HAS_CTRL = @HAS_CTRL@ HAS_CTRL_DYNAMIC_PROVISIONING = @HAS_CTRL_DYNAMIC_PROVISIONING@ HAS_DYNUPDATE_SUPPORT = @HAS_DYNUPDATE_SUPPORT@ HAS_FULL_ASCII7 = @HAS_FULL_ASCII7@ HAS_LITTLE_ENDIAN = @HAS_LITTLE_ENDIAN@ HAS_LOGDIR = @HAS_LOGDIR@ HAS_LOG_PID_ALWAYS_ON = @HAS_LOG_PID_ALWAYS_ON@ HAS_LOG_THREAD_ID_ALWAYS_ON = @HAS_LOG_THREAD_ID_ALWAYS_ON@ HAS_MALLOC_DEBUG_SUPPORT = @HAS_MALLOC_DEBUG_SUPPORT@ HAS_MASTER_SUPPORT = @HAS_MASTER_SUPPORT@ HAS_MESSAGES_SUPPORT = @HAS_MESSAGES_SUPPORT@ HAS_MUTEX_DEBUG_SUPPORT = @HAS_MUTEX_DEBUG_SUPPORT@ HAS_NON_AA_AXFR_SUPPORT = @HAS_NON_AA_AXFR_SUPPORT@ HAS_NSID_SUPPORT = @HAS_NSID_SUPPORT@ HAS_RRL_SUPPORT = @HAS_RRL_SUPPORT@ HAS_RRSIG_MANAGEMENT_SUPPORT = @HAS_RRSIG_MANAGEMENT_SUPPORT@ HAS_TOOLS = @HAS_TOOLS@ HAS_TSIG_SUPPORT = @HAS_TSIG_SUPPORT@ HAS_ZALLOC_DEBUG_SUPPORT = @HAS_ZALLOC_DEBUG_SUPPORT@ HAS_ZALLOC_STATISTICS_SUPPORT = @HAS_ZALLOC_STATISTICS_SUPPORT@ HAS_ZALLOC_SUPPORT = @HAS_ZALLOC_SUPPORT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IS_BSD_FAMILY = @IS_BSD_FAMILY@ IS_DARWIN_OS = @IS_DARWIN_OS@ IS_LINUX_FAMILY = @IS_LINUX_FAMILY@ IS_SOLARIS_FAMILY = @IS_SOLARIS_FAMILY@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ 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@ logdir = @logdir@ 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@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 zonesmastersdir = $(localstatedir)/zones/masters dist_zonesmasters_DATA = zones/masters/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.0.0.0.ip6.arpa.zone zones/masters/0.0.127.in-addr.arpa.zone zones/masters/localhost6.zone zones/masters/localhost.zone zones/masters/somedomain.eu.zone all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu var/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu var/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-dist_zonesmastersDATA: $(dist_zonesmasters_DATA) @$(NORMAL_INSTALL) @list='$(dist_zonesmasters_DATA)'; test -n "$(zonesmastersdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(zonesmastersdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(zonesmastersdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(zonesmastersdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(zonesmastersdir)" || exit $$?; \ done uninstall-dist_zonesmastersDATA: @$(NORMAL_UNINSTALL) @list='$(dist_zonesmasters_DATA)'; test -n "$(zonesmastersdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(zonesmastersdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: 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 "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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 $(DATA) installdirs: for dir in "$(DESTDIR)$(zonesmastersdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 html-am: info: info-am info-am: install-data-am: install-dist_zonesmastersDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am 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-dist_zonesmastersDATA .MAKE: install-am install-data-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am 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-hook install-dist_zonesmastersDATA 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-am uninstall uninstall-am uninstall-dist_zonesmastersDATA .PRECIOUS: Makefile all: release: profile: debug: install-data-hook: @for d in zones/masters zones/slaves zones/xfr zones/keys run log; \ do \ mkdir -p "$(DESTDIR)/$(localstatedir)/$$d"; \ chmod 755 "$(DESTDIR)/$(localstatedir)/$$d"; \ done mkdir -p "$(DESTDIR)/$(logdir)" chmod 755 "$(DESTDIR)/$(logdir)" # 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: yadifa-2.1.6-5826/PaxHeaders.8028/lib0000644000077100007710000000013212654663025015035 xustar000000000000000030 mtime=1454597653.681344534 30 atime=1454597650.541344534 30 ctime=1454597653.681344534 yadifa-2.1.6-5826/lib/0000775000077100007710000000000012654663025014720 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/PaxHeaders.8028/dnslg0000644000077100007710000000013212654663025016144 xustar000000000000000030 mtime=1454597653.978344534 30 atime=1454597653.681344534 30 ctime=1454597653.978344534 yadifa-2.1.6-5826/lib/dnslg/0000775000077100007710000000000012654663025016027 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/Makefile.am0000644000077100007710000000012412650131756020253 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.153344 30 ctime=1454597653.870344534 yadifa-2.1.6-5826/lib/dnslg/Makefile.am0000664000077100007710000001011312650131756020054 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ srcdir = @srcdir@ libdir = @libdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ ACLOCAL_AMFLAGS = -I m4 dist_noinst_DATA = VERSION I=include/dnslg FEATURESFILE=dnslg-config-features.h FEATURES=$(I)/$(FEATURESFILE) lib_LTLIBRARIES= libdnslg.la pkginclude_HEADERS = $(FEATURES) include/dnslg/config-resolver.h include/dnslg/resolv-conf.h include/dnslg/dns.h include/dnslg/config-load.h # NOTE: the first one on this list must always be the one used to trigger $(FEATURES) libdnslg_la_SOURCES = src/config-resolver.c src/dns.c src/resolv-conf.c src/config-load.c libdnslg_la_LDFLAGS = -version-info 2:0:0 include ../../mk/common-settings.mk include ../../mk/common-labels.mk all: REVISION REVISION: (svn info 2>/dev/null;if [ $$? -ne 0 ];then echo "Revision: 0";fi)|grep Revision:|sed 's/^Revision: *//' > REVISION src/config-resolver.c: $(FEATURES) $(FEATURES): config.log REVISION VERSION echo "#pragma once" > $(FEATURES) VP=DNSLG which printf > /dev/null 2>&1 if [ $$? -eq 0 ];then \ printf '// version %i.%i.%i.%i-%i\n' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ printf '#define $(VP)_VERSION 0x%02x%02x%02x%02x%04xLL' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ else \ echo "#define $(VP)_VERSION_(vmain_,vsub_,vminor_,vpatch_,vrevision_) ((vmain_)<<40)|((vsub_)<<32)|((vminor_)<<24)|((vpatch_)<<16)|(vrevision_)" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMAIN_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VSUB_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMINOR_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VPATCH_ 0 >> $(FEATURES)" ; \ echo "#define $(VP)_VERSION_VREVISION_ $$(cat REVISION)" >> $(FEATURES) ; \ echo '#define $(VP)_VERSION $(VP)_VERSION_($(VP)_VERSION_VMAIN_,$(VP)_VERSION_VSUB_,$(VP)_VERSION_VMINOR_,$(VP)_VERSION_VPATCH_,$(VP)_VERSION_VREVISION_)' >> $(FEATURES) ; \ fi echo "// $(FEATURES)" >> $(FEATURES) echo >> $(FEATURES) yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/ar-lib0000644000077100007710000000013212473710127017305 xustar000000000000000030 mtime=1424986199.162058409 30 atime=1424986199.162058409 30 ctime=1454597653.953344534 yadifa-2.1.6-5826/lib/dnslg/ar-lib0000755000077100007710000001330212473710127017113 0ustar00yadifayadifa00000000000000#! /bin/sh # Wrapper for Microsoft lib.exe me=ar-lib scriptversion=2012-03-01.08; # UTC # Copyright (C) 2010-2014 Free Software Foundation, Inc. # Written by Peter Rosin . # # 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, 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . # func_error message func_error () { echo "$me: $1" 1>&2 exit 1 } file_conv= # func_file_conv build_file # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv in mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin) file=`cygpath -m "$file" || echo "$file"` ;; wine) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_at_file at_file operation archive # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE # for each of them. # When interpreting the content of the @FILE, do NOT use func_file_conv, # since the user would need to supply preconverted file names to # binutils ar, at least for MinGW. func_at_file () { operation=$2 archive=$3 at_file_contents=`cat "$1"` eval set x "$at_file_contents" shift for member do $AR -NOLOGO $operation:"$member" "$archive" || exit $? done } case $1 in '') func_error "no command. Try '$0 --help' for more information." ;; -h | --h*) cat < Eric Diaz Fernandez yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/Makefile.in0000644000077100007710000000013212654662570020272 xustar000000000000000030 mtime=1454597496.161344534 30 atime=1454597496.161344534 30 ctime=1454597653.925344534 yadifa-2.1.6-5826/lib/dnslg/Makefile.in0000664000077100007710000013125112654662570020103 0ustar00yadifayadifa00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # ALL # ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@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@ @USES_SUNC_TRUE@am__append_1 = @USES_SUNC_FALSE@am__append_2 = -O0 @HAS_CC_NO_IDENT_TRUE@am__append_3 = -fno-ident @HAS_CC_ANSI_TRUE@am__append_4 = -ansi @HAS_CC_PEDANTIC_TRUE@am__append_5 = -pedantic @HAS_CC_WALL_TRUE@am__append_6 = -Wall -Wno-unknown-pragmas @HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE@am__append_7 = -Werror=missing-field-initializers @HAS_CC_STD_GNU99_TRUE@am__append_8 = -std=gnu99 @HAS_CC_STD_C99_TRUE@@HAS_CC_STD_GNU99_FALSE@am__append_9 = -std=c99 @HAS_CC_STD_GNU99_FALSE@@HAS_CC_XC99_TRUE@am__append_10 = -xc99 @HAS_CC_TUNE_NATIVE_TRUE@am__append_11 = -mtune=native @FORCE64BITS_TRUE@@HAS_CC_M64_TRUE@am__append_12 = -m64 @FORCE64BITS_TRUE@@HAS_CC_M64_TRUE@am__append_13 = -m64 @FORCE32BITS_TRUE@@FORCE64BITS_FALSE@@HAS_CC_M32_TRUE@am__append_14 = -m32 @FORCE32BITS_TRUE@@FORCE64BITS_FALSE@@HAS_CC_M32_TRUE@am__append_15 = -m32 # # DEBUG # @HAS_CC_G3_TRUE@am__append_16 = -g3 @HAS_CC_G3_FALSE@@HAS_CC_G_TRUE@am__append_17 = -g @HAS_CC_DWARF4_TRUE@am__append_18 = -gdwarf-4 @HAS_CC_DWARF3_TRUE@@HAS_CC_DWARF4_FALSE@am__append_19 = -gdwarf-3 # # Intel C Compiler # ############################################################################### #ICC #IPO= -ipo (need to use the intel xiar instead of ar) @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@am__append_20 = -DLTO -ipo @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@am__append_21 = -ipo @USES_ICC_TRUE@am__append_22 = -DUSES_ICC @HAS_CC_ANSI_ALIAS_TRUE@@USES_ICC_TRUE@am__append_23 = -ansi-alias -U__STRICT_ANSI__ @USES_ICC_TRUE@am__append_24 = -DMODE_DEBUG_ICC # # LLVM Clang # ############################################################################### # CLANG @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@am__append_25 = -DLTO -flto @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@am__append_26 = -flto @USES_CLANG_TRUE@am__append_27 = -DUSES_LLVM @USES_CLANG_TRUE@am__append_28 = -DMODE_DEBUG_CLANG # Note: add a _d suffix for debug builds ? # # Gnu C # ############################################################################### #GCC @HAS_CPU_NIAGARA_TRUE@@USES_GCC_TRUE@am__append_29 = -mcpu=niagara @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@am__append_30 = -DLTO -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@am__append_31 = -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin @USES_GCC_TRUE@am__append_32 = -DUSES_GCC @USES_GCC_TRUE@am__append_33 = -DMODE_DEBUG_GCC @USES_SUNC_TRUE@am__append_34 = -DUSES_SUNC @USES_SUNC_TRUE@am__append_35 = -DMODE_DEBUG_SUNC # Note: add a _d suffix for debug builds ? # # Unknown compiler # ############################################################################### # if an unknown compiler is used, it should have its own section @USES_UNKNOWN_TRUE@am__append_36 = -DUSES_UNKNOWN_COMPILER @USES_UNKNOWN_TRUE@am__append_37 = -DMODE_DEBUG_UNKNOWN # # Some BSD-based OSes need this # @IS_BSD_FAMILY_TRUE@am__append_38 = -I./include @IS_SOLARIS_FAMILY_TRUE@am__append_39 = -D_POSIX_PTHREAD_SEMANTICS @HAS_CC_RDYNAMIC_TRUE@am__append_40 = -rdynamic @HAS_CC_RDYNAMIC_TRUE@am__append_41 = -rdynamic # workaround a bug where clang does not handle properly profiling and optimizations @USES_CLANG_TRUE@am__append_42 = -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/../../m4/eurid.m4 \ $(top_srcdir)/../../m4/yadifa.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(dist_noinst_DATA) \ $(pkginclude_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/dnslg/dnslg-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libdnslg_la_LIBADD = am__dirstamp = $(am__leading_dot)dirstamp am_libdnslg_la_OBJECTS = src/config-resolver.lo src/dns.lo \ src/resolv-conf.lo src/config-load.lo libdnslg_la_OBJECTS = $(am_libdnslg_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdnslg_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libdnslg_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/dnslg depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdnslg_la_SOURCES) DIST_SOURCES = $(libdnslg_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dist_noinst_DATA) HEADERS = $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope am__DIST_COMMON = $(srcdir)/../../mk/common-labels.mk \ $(srcdir)/../../mk/common-settings.mk $(srcdir)/Makefile.in \ $(top_srcdir)/include/dnslg/dnslg-config.h.in AUTHORS COPYING \ ChangeLog INSTALL NEWS README ar-lib compile config.guess \ config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print VPATH = @srcdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCOPTIMISATIONFLAGS = @CCOPTIMISATIONFLAGS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DNSCORE = @DNSCORE@ DNSDB = @DNSDB@ DNSLG = @DNSLG@ DNSZONE = @DNSZONE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAS_ACL_SUPPORT = @HAS_ACL_SUPPORT@ HAS_BFD_DEBUG_SUPPORT = @HAS_BFD_DEBUG_SUPPORT@ HAS_BIG_ENDIAN = @HAS_BIG_ENDIAN@ HAS_CC_ADDRESS_SANITIZER_CHECK = @HAS_CC_ADDRESS_SANITIZER_CHECK@ HAS_CC_ANSI = @HAS_CC_ANSI@ HAS_CC_ANSI_ALIAS = @HAS_CC_ANSI_ALIAS@ HAS_CC_CATCH_UNDEFINED_BEHAVIOR = @HAS_CC_CATCH_UNDEFINED_BEHAVIOR@ HAS_CC_DWARF2 = @HAS_CC_DWARF2@ HAS_CC_DWARF3 = @HAS_CC_DWARF3@ HAS_CC_DWARF4 = @HAS_CC_DWARF4@ HAS_CC_EXCEPTIONS = @HAS_CC_EXCEPTIONS@ HAS_CC_G = @HAS_CC_G@ HAS_CC_G3 = @HAS_CC_G3@ HAS_CC_M32 = @HAS_CC_M32@ HAS_CC_M64 = @HAS_CC_M64@ HAS_CC_MISSING_FIELD_INITIALIZERS = @HAS_CC_MISSING_FIELD_INITIALIZERS@ HAS_CC_NO_IDENT = @HAS_CC_NO_IDENT@ HAS_CC_NO_OMIT_FRAME_POINTER = @HAS_CC_NO_OMIT_FRAME_POINTER@ HAS_CC_PEDANTIC = @HAS_CC_PEDANTIC@ HAS_CC_RDYNAMIC = @HAS_CC_RDYNAMIC@ HAS_CC_SANITIZE_ADDRESS = @HAS_CC_SANITIZE_ADDRESS@ HAS_CC_STACK_PROTECTOR = @HAS_CC_STACK_PROTECTOR@ HAS_CC_STD_C99 = @HAS_CC_STD_C99@ HAS_CC_STD_GNU99 = @HAS_CC_STD_GNU99@ HAS_CC_TUNE_NATIVE = @HAS_CC_TUNE_NATIVE@ HAS_CC_WALL = @HAS_CC_WALL@ HAS_CC_XC99 = @HAS_CC_XC99@ HAS_CTRL = @HAS_CTRL@ HAS_CTRL_DYNAMIC_PROVISIONING = @HAS_CTRL_DYNAMIC_PROVISIONING@ HAS_DYNUPDATE_SUPPORT = @HAS_DYNUPDATE_SUPPORT@ HAS_FULL_ASCII7 = @HAS_FULL_ASCII7@ HAS_LITTLE_ENDIAN = @HAS_LITTLE_ENDIAN@ HAS_LOGDIR = @HAS_LOGDIR@ HAS_LOG_PID_ALWAYS_ON = @HAS_LOG_PID_ALWAYS_ON@ HAS_LOG_THREAD_ID_ALWAYS_ON = @HAS_LOG_THREAD_ID_ALWAYS_ON@ HAS_MALLOC_DEBUG_SUPPORT = @HAS_MALLOC_DEBUG_SUPPORT@ HAS_MASTER_SUPPORT = @HAS_MASTER_SUPPORT@ HAS_MESSAGES_SUPPORT = @HAS_MESSAGES_SUPPORT@ HAS_MUTEX_DEBUG_SUPPORT = @HAS_MUTEX_DEBUG_SUPPORT@ HAS_NON_AA_AXFR_SUPPORT = @HAS_NON_AA_AXFR_SUPPORT@ HAS_NSID_SUPPORT = @HAS_NSID_SUPPORT@ HAS_RRL_SUPPORT = @HAS_RRL_SUPPORT@ HAS_RRSIG_MANAGEMENT_SUPPORT = @HAS_RRSIG_MANAGEMENT_SUPPORT@ HAS_TSIG_SUPPORT = @HAS_TSIG_SUPPORT@ HAS_ZALLOC_DEBUG_SUPPORT = @HAS_ZALLOC_DEBUG_SUPPORT@ HAS_ZALLOC_STATISTICS_SUPPORT = @HAS_ZALLOC_STATISTICS_SUPPORT@ HAS_ZALLOC_SUPPORT = @HAS_ZALLOC_SUPPORT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IS_BSD_FAMILY = @IS_BSD_FAMILY@ IS_DARWIN_OS = @IS_DARWIN_OS@ IS_LINUX_FAMILY = @IS_LINUX_FAMILY@ IS_SOLARIS_FAMILY = @IS_SOLARIS_FAMILY@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL = @OPENSSL@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ 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@ logdir = @logdir@ 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_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 dist_noinst_DATA = VERSION I = include/dnslg FEATURESFILE = dnslg-config-features.h FEATURES = $(I)/$(FEATURESFILE) lib_LTLIBRARIES = libdnslg.la pkginclude_HEADERS = $(FEATURES) include/dnslg/config-resolver.h include/dnslg/resolv-conf.h include/dnslg/dns.h include/dnslg/config-load.h # NOTE: the first one on this list must always be the one used to trigger $(FEATURES) libdnslg_la_SOURCES = src/config-resolver.c src/dns.c src/resolv-conf.c src/config-load.c libdnslg_la_LDFLAGS = -version-info 2:0:0 # # # AM_CFLAGS = -D_THREAD_SAFE -D_REENTRANT -D_FILE_OFFSET_BITS=64 \ -I$(abs_builddir) -I$(abs_srcdir)/include $(am__append_3) \ $(am__append_4) $(am__append_5) $(am__append_6) \ $(am__append_7) $(am__append_8) $(am__append_9) \ $(am__append_10) $(am__append_11) $(am__append_12) \ $(am__append_14) $(am__append_20) $(am__append_22) \ $(am__append_23) $(am__append_25) $(am__append_27) \ $(am__append_29) $(am__append_30) $(am__append_32) \ $(am__append_34) $(am__append_36) $(am__append_38) \ $(am__append_39) $(LOCALFLAGS) $(YCFLAGS) AM_LDFLAGS = $(am__append_13) $(am__append_15) $(am__append_21) \ $(am__append_26) $(am__append_31) $(YLDFLAGS) DEBUGFLAGS = $(am__append_1) $(am__append_2) $(am__append_16) \ $(am__append_17) $(am__append_18) $(am__append_19) \ $(am__append_24) $(am__append_28) $(am__append_33) \ $(am__append_35) $(am__append_37) LOCALFLAGS = -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)"' -DLOCALSTATEDIR='"$(localstatedir)"' -DDATAROOTDIR='"$(datarootdir)"' -DDATADIR='"$(datadir)"' -DLOCALEDIR='"$(localedir)"' -DLOGDIR='"$(logdir)"' @HAS_LTO_SUPPORT_FALSE@@USES_CLANG_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_FALSE@@USES_GCC_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@AM_AR = llvm-ar @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@AM_AR = gcc-ar @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@AM_AR = xiar # # Sun C # ############################################################################### # SUNC @USES_SUNC_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_FALSE@@USES_CLANG_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_FALSE@@USES_GCC_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@AM_LD = ld.gold @USES_ICC_TRUE@AM_LD = ld @USES_SUNC_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@AM_RANLIB = gcc-ranlib YRCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -DCMR YPCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -pg -DCMP $(am__append_42) YDCFLAGS = -DDEBUG $(DEBUGFLAGS) -DCMD YSCFLAGS = $(YRCFLAGS) YRLDFLAGS = YPLDFLAGS = -pg $(am__append_40) YDLDFLAGS = -g $(am__append_41) YSLDFLAGS = $(YRLDFLAGS) AM_MAKEFLAGS = MODE_CFLAGS="$(AM_CFLAGS)" CC=$(CC) AR=$(AM_AR) LD=$(AM_LD) YCFLAGS = $(YSCFLAGS) YLDFLAGS = $(YNLDFLAGS) VP = DNSLG all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../mk/common-settings.mk $(srcdir)/../../mk/common-labels.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu 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; $(srcdir)/../../mk/common-settings.mk $(srcdir)/../../mk/common-labels.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): include/dnslg/dnslg-config.h: include/dnslg/stamp-h1 @test -f $@ || rm -f include/dnslg/stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/dnslg/stamp-h1 include/dnslg/stamp-h1: $(top_srcdir)/include/dnslg/dnslg-config.h.in $(top_builddir)/config.status @rm -f include/dnslg/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/dnslg/dnslg-config.h $(top_srcdir)/include/dnslg/dnslg-config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f include/dnslg/stamp-h1 touch $@ distclean-hdr: -rm -f include/dnslg/dnslg-config.h include/dnslg/stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/$(DEPDIR) @: > src/$(DEPDIR)/$(am__dirstamp) src/config-resolver.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/dns.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/resolv-conf.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/config-load.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) libdnslg.la: $(libdnslg_la_OBJECTS) $(libdnslg_la_DEPENDENCIES) $(EXTRA_libdnslg_la_DEPENDENCIES) $(AM_V_CCLD)$(libdnslg_la_LINK) -rpath $(libdir) $(libdnslg_la_OBJECTS) $(libdnslg_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f src/*.$(OBJEXT) -rm -f src/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/config-load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/config-resolver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/resolv-conf.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf src/.libs src/_libs distclean-libtool: -rm -f libtool config.lt install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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 "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -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__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(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 \ && cd "$$am__cwd" \ || exit 1 $(am__post_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: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { 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-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f src/$(DEPDIR)/$(am__dirstamp) -rm -f src/$(am__dirstamp) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf src/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf src/$(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-libLTLIBRARIES uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-compile 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-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS 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 tags-am uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS .PRECIOUS: Makefile release: echo YCFLAGS=$(YRCFLAGS) echo YLDFLAGS=$(YRLDFLAGS) $(MAKE) all "YCFLAGS=$(YRCFLAGS)" "YLDFLAGS=$(YRLDFLAGS)" profile: echo YCFLAGS=$(YPCFLAGS) echo YLDFLAGS=$(YPLDFLAGS) $(MAKE) all "YCFLAGS=$(YPCFLAGS)" "YLDFLAGS=$(YPLDFLAGS)" debug: echo YCFLAGS=$(YDCFLAGS) echo YLDFLAGS=$(YDLDFLAGS) $(MAKE) all "YCFLAGS=$(YDCFLAGS)" "YLDFLAGS=$(YDLDFLAGS)" rebuild: clean release release-install: release install profile-install: profile install debug-install: debug install buildinfo.h: config.log echo \#pragma once > buildinfo.h 2> /dev/null echo // generated file, do not modify >> buildinfo.h 2> /dev/null echo \#define BUILD_OPTIONS \"$$(grep "./configure" config.log | head -1 | sed 's/.*\.\/configure *//')\" >> buildinfo.h 2> /dev/null all: REVISION REVISION: (svn info 2>/dev/null;if [ $$? -ne 0 ];then echo "Revision: 0";fi)|grep Revision:|sed 's/^Revision: *//' > REVISION src/config-resolver.c: $(FEATURES) $(FEATURES): config.log REVISION VERSION echo "#pragma once" > $(FEATURES) which printf > /dev/null 2>&1 if [ $$? -eq 0 ];then \ printf '// version %i.%i.%i.%i-%i\n' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ printf '#define $(VP)_VERSION 0x%02x%02x%02x%02x%04xLL' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ else \ echo "#define $(VP)_VERSION_(vmain_,vsub_,vminor_,vpatch_,vrevision_) ((vmain_)<<40)|((vsub_)<<32)|((vminor_)<<24)|((vpatch_)<<16)|(vrevision_)" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMAIN_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VSUB_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMINOR_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VPATCH_ 0 >> $(FEATURES)" ; \ echo "#define $(VP)_VERSION_VREVISION_ $$(cat REVISION)" >> $(FEATURES) ; \ echo '#define $(VP)_VERSION $(VP)_VERSION_($(VP)_VERSION_VMAIN_,$(VP)_VERSION_VSUB_,$(VP)_VERSION_VMINOR_,$(VP)_VERSION_VPATCH_,$(VP)_VERSION_VREVISION_)' >> $(FEATURES) ; \ fi echo "// $(FEATURES)" >> $(FEATURES) echo >> $(FEATURES) # 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: yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/INSTALL0000644000077100007710000000012411734354534017253 xustar000000000000000027 mtime=1332861276.075564 27 atime=1454597464.145344 30 ctime=1454597653.943344534 yadifa-2.1.6-5826/lib/dnslg/INSTALL0000664000077100007710000003736011734354534017071 0ustar00yadifayadifa00000000000000Quick installation ****************** You will need the most up-to-date aclocal, autoheader, libtoolize, automaken autoconf, make and gcc installed dnscore needs to be installed dnsdb needs to be installed rm -f config.sub config.guess ltmain.sh aclocal autoheader libtoolize automake --add-missing autoconf ./configure make sudo make install Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `--with-dnscore=DIR' Use the dnscore from directory DIR (where DIR is the PREFIX for dnscore) `--with-dnsdb=DIR' Use the dnsdb from directory DIR (where DIR is the PREFIX for dnsdb) `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/compile0000644000077100007710000000013212473710127017567 xustar000000000000000030 mtime=1424986199.162058409 30 atime=1424986199.162058409 30 ctime=1454597653.957344534 yadifa-2.1.6-5826/lib/dnslg/compile0000755000077100007710000001624512473710127017406 0ustar00yadifayadifa00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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, 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/configure0000644000077100007710000000013212654662571020132 xustar000000000000000030 mtime=1454597497.169344535 30 atime=1454597496.646344535 30 ctime=1454597653.875344534 yadifa-2.1.6-5826/lib/dnslg/configure0000775000077100007710000240653512654662571017762 0ustar00yadifayadifa00000000000000#! /bin/sh # From configure.ac Revision: 5826 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for dnslg 2.1.6-5826. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: bugreport@yadifa.eu about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dnslg' PACKAGE_TARNAME='dnslg' PACKAGE_VERSION='2.1.6-5826' PACKAGE_STRING='dnslg 2.1.6-5826' PACKAGE_BUGREPORT='bugreport@yadifa.eu' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS HAS_LTO_SUPPORT_FALSE HAS_LTO_SUPPORT_TRUE DNSLG DNSZONE DNSDB DNSCORE OPENSSL HAS_RRCACHE_ENABLED_FALSE HAS_RRCACHE_ENABLED_TRUE HAS_RDTSC_FALSE HAS_RDTSC_TRUE HAS_TCL_FALSE HAS_TCL_TRUE HAS_DROPALL_SUPPORT_FALSE HAS_DROPALL_SUPPORT_TRUE HAS_MIRROR_SUPPORT_FALSE HAS_MIRROR_SUPPORT_TRUE HAS_NSEC_SUPPORT_FALSE HAS_NSEC_SUPPORT_TRUE HAS_NSEC3_SUPPORT_FALSE HAS_NSEC3_SUPPORT_TRUE HAS_DNSSEC_SUPPORT_FALSE HAS_DNSSEC_SUPPORT_TRUE HAS_SOCKADDR_IN6_SIN6_LEN_FALSE HAS_SOCKADDR_IN6_SIN6_LEN_TRUE HAS_SOCKADDR_IN_SIN_LEN_FALSE HAS_SOCKADDR_IN_SIN_LEN_TRUE HAS_SOCKADDR_SA_LEN_FALSE HAS_SOCKADDR_SA_LEN_TRUE logdir HAS_LOGDIR HAS_LOGDIR_FALSE HAS_LOGDIR_TRUE HAS_NON_AA_AXFR_SUPPORT HAS_NON_AA_AXFR_SUPPORT_FALSE HAS_NON_AA_AXFR_SUPPORT_TRUE HAS_FULL_ASCII7 HAS_FULL_ASCII7_FALSE HAS_FULL_ASCII7_TRUE HAS_LOG_PID_ALWAYS_ON HAS_LOG_PID_ALWAYS_ON_FALSE HAS_LOG_PID_ALWAYS_ON_TRUE HAS_LOG_THREAD_ID_ALWAYS_ON HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE HAS_MUTEX_DEBUG_SUPPORT HAS_MUTEX_DEBUG_SUPPORT_FALSE HAS_MUTEX_DEBUG_SUPPORT_TRUE HAS_BFD_DEBUG_SUPPORT HAS_BFD_DEBUG_SUPPORT_FALSE HAS_BFD_DEBUG_SUPPORT_TRUE HAS_MALLOC_DEBUG_SUPPORT HAS_MALLOC_DEBUG_SUPPORT_FALSE HAS_MALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_DEBUG_SUPPORT HAS_ZALLOC_DEBUG_SUPPORT_FALSE HAS_ZALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_STATISTICS_SUPPORT HAS_ZALLOC_STATISTICS_SUPPORT_FALSE HAS_ZALLOC_STATISTICS_SUPPORT_TRUE HAS_ZALLOC_SUPPORT HAS_ZALLOC_SUPPORT_FALSE HAS_ZALLOC_SUPPORT_TRUE HAS_RRSIG_MANAGEMENT_SUPPORT HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE HAS_DYNUPDATE_SUPPORT HAS_DYNUPDATE_SUPPORT_FALSE HAS_DYNUPDATE_SUPPORT_TRUE HAS_TSIG_SUPPORT HAS_TSIG_SUPPORT_FALSE HAS_TSIG_SUPPORT_TRUE HAS_ACL_SUPPORT HAS_ACL_SUPPORT_FALSE HAS_ACL_SUPPORT_TRUE HAS_NSID_SUPPORT HAS_NSID_SUPPORT_FALSE HAS_NSID_SUPPORT_TRUE HAS_CTRL HAS_MASTER_SUPPORT HAS_MASTER_SUPPORT_FALSE HAS_MASTER_SUPPORT_TRUE HAS_MESSAGES_SUPPORT HAS_MESSAGES_SUPPORT_FALSE HAS_MESSAGES_SUPPORT_TRUE HAS_RRL_SUPPORT HAS_RRL_SUPPORT_FALSE HAS_RRL_SUPPORT_TRUE HAS_CTRL_DYNAMIC_PROVISIONING HAS_CTRL_DYNAMIC_PROVISIONING_FALSE HAS_CTRL_DYNAMIC_PROVISIONING_TRUE HAS_CTRL_FALSE HAS_CTRL_TRUE HAS_BIG_ENDIAN HAS_LITTLE_ENDIAN HAS_BIG_ENDIAN_FALSE HAS_BIG_ENDIAN_TRUE HAS_LITTLE_ENDIAN_FALSE HAS_LITTLE_ENDIAN_TRUE HAS_MEMALIGN_ISSUES_FALSE HAS_MEMALIGN_ISSUES_TRUE HAS_CC_RDYNAMIC HAS_CC_RDYNAMIC_FALSE HAS_CC_RDYNAMIC_TRUE HAS_CC_CATCH_UNDEFINED_BEHAVIOR HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE HAS_CC_ADDRESS_SANITIZER_CHECK HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE HAS_CC_NO_OMIT_FRAME_POINTER HAS_CC_NO_OMIT_FRAME_POINTER_FALSE HAS_CC_NO_OMIT_FRAME_POINTER_TRUE HAS_CC_SANITIZE_ADDRESS HAS_CC_SANITIZE_ADDRESS_FALSE HAS_CC_SANITIZE_ADDRESS_TRUE HAS_CC_MISSING_FIELD_INITIALIZERS HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE HAS_CC_EXCEPTIONS HAS_CC_EXCEPTIONS_FALSE HAS_CC_EXCEPTIONS_TRUE HAS_CC_STACK_PROTECTOR HAS_CC_STACK_PROTECTOR_FALSE HAS_CC_STACK_PROTECTOR_TRUE HAS_CC_DWARF4 HAS_CC_DWARF4_FALSE HAS_CC_DWARF4_TRUE HAS_CC_DWARF3 HAS_CC_DWARF3_FALSE HAS_CC_DWARF3_TRUE HAS_CC_DWARF2 HAS_CC_DWARF2_FALSE HAS_CC_DWARF2_TRUE HAS_CC_G3 HAS_CC_G3_FALSE HAS_CC_G3_TRUE HAS_CC_G HAS_CC_G_FALSE HAS_CC_G_TRUE HAS_CC_WALL HAS_CC_WALL_FALSE HAS_CC_WALL_TRUE HAS_CC_M64 HAS_CC_M64_FALSE HAS_CC_M64_TRUE HAS_CC_M32 HAS_CC_M32_FALSE HAS_CC_M32_TRUE HAS_CC_XC99 HAS_CC_XC99_FALSE HAS_CC_XC99_TRUE HAS_CC_STD_C99 HAS_CC_STD_C99_FALSE HAS_CC_STD_C99_TRUE HAS_CC_STD_GNU99 HAS_CC_STD_GNU99_FALSE HAS_CC_STD_GNU99_TRUE HAS_CC_PEDANTIC HAS_CC_PEDANTIC_FALSE HAS_CC_PEDANTIC_TRUE HAS_CC_ANSI_ALIAS HAS_CC_ANSI_ALIAS_FALSE HAS_CC_ANSI_ALIAS_TRUE HAS_CC_ANSI HAS_CC_ANSI_FALSE HAS_CC_ANSI_TRUE HAS_CC_NO_IDENT HAS_CC_NO_IDENT_FALSE HAS_CC_NO_IDENT_TRUE HAS_CC_TUNE_NATIVE HAS_CC_TUNE_NATIVE_FALSE HAS_CC_TUNE_NATIVE_TRUE CCOPTIMISATIONFLAGS USES_UNKNOWN_FALSE USES_UNKNOWN_TRUE USES_SUNC_FALSE USES_SUNC_TRUE USES_CLANG_FALSE USES_CLANG_TRUE USES_GCC_FALSE USES_GCC_TRUE USES_ICC_FALSE USES_ICC_TRUE FORCE64BITS_FALSE FORCE64BITS_TRUE FORCE32BITS_FALSE FORCE32BITS_TRUE HAS_CPU_AMDINTEL_FALSE HAS_CPU_AMDINTEL_TRUE HAS_CPU_NIAGARA_FALSE HAS_CPU_NIAGARA_TRUE IS_SOLARIS_FAMILY IS_SOLARIS_FAMILY_FALSE IS_SOLARIS_FAMILY_TRUE IS_LINUX_FAMILY IS_LINUX_FAMILY_FALSE IS_LINUX_FAMILY_TRUE IS_BSD_FAMILY IS_BSD_FAMILY_FALSE IS_BSD_FAMILY_TRUE IS_DARWIN_OS IS_DARWIN_OS_FALSE IS_DARWIN_OS_TRUE CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC ac_ct_AR AR build_os build_vendor build_cpu build AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_largefile enable_force32bits enable_force64bits enable_ctrl_dynamic_provisioning enable_rrl enable_messages enable_master enable_ctrl enable_nsid enable_acl enable_tsig enable_dynupdate enable_rrsig_management enable_zalloc enable_zalloc_statistics enable_zalloc_debug enable_malloc_debug enable_bfd_debug enable_mutex_debug enable_log_thread_id enable_log_pid enable_full_ascii7 enable_non_aa_axfr_support with_logdir with_openssl_lib with_openssl_include with_openssl with_dnscore with_dnsdb with_dnszone with_dnslg enable_lto ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures dnslg 2.1.6-5826 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/dnslg] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of dnslg 2.1.6-5826:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=no] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --enable-force32bits Forces a 32 bits binary compilation --enable-force64bits Forces a 64 bits binary compilation --enable-ctrl-dynamic-provisioning Enable dynamic provisioning --disable-rrl Disable DNS Response Rate Limiter --enable-messages Enable use messages instead of send (needed if you use more than one IP aliased on the same network interface) --disable-master Disable DNS master --enable-ctrl Enable remote control --disable-nsid Disable NSID support --disable-acl Disable ACL support --disable-tsig Disable TSIG support --disable-dynupdate Disable dynamic update support --disable-rrsig-management Disable RRSIG verification and generation for zones --disable-zalloc Disable zalloc memory system --enable-zalloc-statistics Enable zalloc statistics support --enable-zalloc-debug Enable zalloc debug support --enable-malloc-debug Enable malloc debug support --enable-bfd-debug Enable bfd debug support --enable-mutex-debug Enable mutex debug support --enable-log-thread-id Enable write the thread id in each line of log --enable-log-pid Enable write the pid in each line of log --enable-full-ascii7 Enable YADIFA will now accept ASCII7 characters in DNS names (not recommended) --enable-non-aa-axfr-support Enable Allows AXFR answer from master without AA bit set (Microsoft DNS) --enable-lto Enable LTO support, requires gold linker Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-logdir build sets the directory where to put the log files --with-openssl-lib=DIR Use the openssl library from directory DIR --with-openssl-include=DIR Use the openssl headers from directory DIR --with-openssl=DIR Use the openssl from directory DIR --with-dnscore=DIR Use the dnscore from directory DIR/lib (devs only) --with-dnsdb=DIR Use the dnsdb from directory DIR/lib (devs only) --with-dnszone=DIR Use the dnszone from directory DIR/lib (devs only) --with-dnslg=DIR Use the dnslg from directory DIR/lib (devs only) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF dnslg configure 2.1.6-5826 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------------- ## ## Report this to bugreport@yadifa.eu ## ## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by dnslg $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo echo echo "DNSLG START" echo "-----------" echo echo cpu_intel_compatible=1 icc_enabled=0 ac_os_workaround_done=0 # requires_tcl=0 requires_ssl=0 requires_dnscore=0 requires_dnsdb=0 requires_dnszone=0 requires_dnslg=0 requires_dnstcl=0 ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='dnslg' VERSION='2.1.6-5826' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 $as_echo_n "checking how to create a pax tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_pax-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' am__tar_="$_am_tar --format=posix -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x pax -w "$$tardir"' am__tar_='pax -L -x pax -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H pax -L' am__tar_='find "$tardir" -print | cpio -o -H pax -L' am__untar='cpio -i -H pax -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_pax}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_pax+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_pax=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 $as_echo "$am_cv_prog_tar_pax" >&6; } # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers include/dnslg/dnslg-config.h" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -n "$ac_tool_prefix"; then for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 $as_echo_n "checking the archiver ($AR) interface... " >&6; } if ${am_cv_ar_interface+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 $as_echo "$am_cv_ar_interface" >&6; } case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) as_fn_error $? "could not determine $AR interface" "$LINENO" 5 ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=no fi enable_dlopen=no enable_win32_dll=no # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: case "$(uname -s)" in Darwin) alias libtoolize="glibtoolize" which libtool > /dev/null 2>&1 if [ $? -ne 0 ] then which glibtool > /dev/null 2>&1 if [ $? -eq 0 ] then alias libtool="glibtool" fi fi echo 'brol' | sed 's/brol/truc/' > /dev/null 2>&1 if [ $? -ne 0 ] then alias sed="gsed" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin workaround" >&5 $as_echo "Darwin workaround" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: nothing to do" >&5 $as_echo "nothing to do" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf in -lc" >&5 $as_echo_n "checking for printf in -lc... " >&6; } if ${ac_cv_lib_c_printf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char printf (); int main () { return printf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_printf=yes else ac_cv_lib_c_printf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_printf" >&5 $as_echo "$ac_cv_lib_c_printf" >&6; } if test "x$ac_cv_lib_c_printf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBC 1 _ACEOF LIBS="-lc $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/types.h i386/types.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default" if test "x$ac_cv_type_uint64_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UINT64_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default" if test "x$ac_cv_type_int64_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INT64_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" if test "x$ac_cv_type_long_long" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LONG_LONG 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "$ac_includes_default" if test "x$ac_cv_type_u_char" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_U_CHAR 1 _ACEOF fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi if [ $ac_os_workaround_done -eq 0 ] then ac_os_workaround_done=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of OS this is" >&5 $as_echo_n "checking what kind of OS this is... " >&6; } is_darwin_os=0 is_bsd_family=0 is_solaris_family=0 is_linux_family=0 case "$(uname -s)" in Darwin) is_darwin_os=1 is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OSX" >&5 $as_echo "OSX" >&6; } ;; FreeBSD) is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: BSD" >&5 $as_echo "BSD" >&6; } ;; Linux) is_linux_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 $as_echo "Linux" >&6; } ;; SunOS) is_solaris_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SunOS" >&5 $as_echo "SunOS" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: not specifically supported" >&5 $as_echo "not specifically supported" >&6; } ;; esac if [ "$is_darwin_os" = "" ] then echo "OS detection failed to give relevant results" exit 1; fi if [ $is_darwin_os -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 1 _ACEOF if true; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 0 _ACEOF if false; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi fi if [ $is_bsd_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 1 _ACEOF if true; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 0 _ACEOF if false; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi fi if [ $is_linux_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 1 _ACEOF if true; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 0 _ACEOF if false; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi fi if [ $is_solaris_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 1 _ACEOF if true; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 0 _ACEOF if false; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi fi fi cat >>confdefs.h <<_ACEOF #define DEFAULT_ASSUMED_CPU_COUNT 2 _ACEOF cpu_intel_compatible=1 if false; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi if false; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for the CPU options" >&5 $as_echo_n "checking checking for the CPU options... " >&6; } CPU_UNKNOWN=1 CFLAGS3264= case "$(uname -i 2>/dev/null)" in SUNW,SPARC-Enterprise-T1000) cat >>confdefs.h <<_ACEOF #define HAS_CPU_NIAGARA 1 _ACEOF if true; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: UtrasparcT1" >&5 $as_echo "UtrasparcT1" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=0 ;; *) ;; esac case "$(uname -m)" in x86_64) cat >>confdefs.h <<_ACEOF #define HAS_CPU_AMDINTEL 1 _ACEOF if true; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: AMD/Intel" >&5 $as_echo "AMD/Intel" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=1 ;; *) ;; esac case "${CPU_UNKNOWN}" in 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: generic" >&5 $as_echo "generic" >&6; } ;; 0) ;; esac if [ "$is_solaris_family" = "" ] then echo "OS must be detected first" exit 1 fi if [ $is_solaris_family -eq 1 ] then echo "Solaris ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if either force 32 or 64 bits is enabled" >&5 $as_echo_n "checking if either force 32 or 64 bits is enabled... " >&6; } if [ ! "$enable_force32bits" = "yes" ] then if [ ! "$enable_force64bits" = "yes" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forcing 64 bits" >&5 $as_echo "no, forcing 64 bits" >&6; } enable_force64bits="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else echo "Not Solaris ..." fi echo "Force ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 32 bits is enabled" >&5 $as_echo_n "checking if force 32 bits is enabled... " >&6; } if false; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi # Check whether --enable-force32bits was given. if test "${enable_force32bits+set}" = set; then : enableval=$enable_force32bits; enable_force32bits=yes else enable_force32bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force32bits" >&5 $as_echo "$enable_force32bits" >&6; } case "$enable_force32bits" in yes) CFLAGS3264=-m32 if test $enable_force32bits = yes; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 64 bits is enabled" >&5 $as_echo_n "checking if force 64 bits is enabled... " >&6; } if false; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi # Check whether --enable-force64bits was given. if test "${enable_force64bits+set}" = set; then : enableval=$enable_force64bits; enable_force64bits=yes else enable_force64bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force64bits" >&5 $as_echo "$enable_force64bits" >&6; } case "$enable_force64bits" in yes) CFLAGS3264=-m64 if test $enable_force64bits = yes; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi if [ "$enable_force32" = "yes" ] then echo "cannot do both --enable-force32bits and --enable-force64bits at the same time" exit 1 fi ;; *) ;; esac cat /etc/redhat-version > /dev/null 2>&1 if [ $? -eq 0 ] then is_redhat_family=1 else is_redhat_family=0 fi CFLAGS= VERSION_OPT=--version $CC --version > /dev/null 2>&1 if [ $? -ne 0 ] then $CC -V > /dev/null 2>&1 if [ $? -ne 0 ] then CCVER='0.0' CCNAME='unknown' VERSION_OPT='' else VERSION_OPT='-V' fi fi if [ ! "$VERSION_OPT" = "" ] then CCVER=$($CC $VERSION_OPT 2>&1|head -1|sed 's/[^0-9.]*\([0-9.]*\).*/\1/') if [ "$CCVER" = "" ] then CCVER='0.0' fi CCNAME=$($CC $VERSION_OPT 2>&1|head -1|sed -e 's/.*clang.*/clang/' -e 's/.*gcc.*/gcc/' -e 's/.*icc.*/icc/' -e 's/.*Sun C.*/Sun C/'|tr A-Z a-z) if [ "$CCNAME" = "" ] then CCNAME='unknown' fi else CCVER='0.0' CCNAME='unknown' fi # version opt CCMAJOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $1}') CCMINOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $2}') if [ "$CCMAJOR" = "" ] then CCMAJOR=0 fi if [ "$CCMINOR" = "" ] then CCMINOR=0 fi if [ "$CCNAME" = "gcc" ] then CCOPTIMISATIONFLAGS=-O3 if [ $CCMAJOR -lt 4 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC < 4.0 has optimisations issues with YADIFA." sleep 1 elif [ $CCMAJOR -eq 4 ] then if [ $CCMINOR -lt 6 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC before 4.6 have optimisation issues with YADIFA." sleep 1 elif [ $CCMINOR -eq 6 ] then CCOPTIMISATIONFLAGS=-O2 else # hopefully after 4.6 the issue is fixed ... CCOPTIMISATIONFLAGS=-O3 fi fi if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if true; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "icc" ] then echo "ICC" CCOPTIMISATIONFLAGS=-O3 if true; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi AR=xiar elif [ "$CCNAME" = "clang" ] then echo "CLANG" CCOPTIMISATIONFLAGS=-O3 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if true; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "Sun C" ] then echo "Sun C" CCOPTIMISATIONFLAGS=-xO5 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if true; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi else echo "unsupported compiler" CCNAME=$CC CCOPTIMISATIONFLAGS=-O2 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if true; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi fi # # We've been told RedHat does not like -O3 at all, so ... # if [ $is_redhat_family -ne 0 ] then if [ "$CCOPTIMISATIONFLAGS " eq "-O3" ] then CCOPTIMISATIONFLAGS=-O2 fi fi echo "detected compiler is $CCNAME $CCMAJOR $CCMINOR" CCOPTIMISATIONFLAGS=$CCOPTIMISATIONFLAGS if [ $cpu_intel_compatible -eq 0 ] then if [ $icc_enabled -ne 0 ] then echo "ERROR: cannot enable ICC with CPU other than x86 or amd64" exit 1 fi fi # # AC_COMPILER_SUPPORTS -mtune=native # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mtune=native" >&5 $as_echo_n "checking if compiler supports -mtune=native... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-TUNE_NATIVE.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -mtune=native test-gcc-TUNE_NATIVE.c -o test-gcc-TUNE_NATIVE > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-TUNE_NATIVE* # # AC_COMPILER_SUPPORTS -fno-ident # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-ident" >&5 $as_echo_n "checking if compiler supports -fno-ident... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_IDENT.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-ident test-gcc-NO_IDENT.c -o test-gcc-NO_IDENT > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_IDENT* # # AC_COMPILER_SUPPORTS -ansi # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi" >&5 $as_echo_n "checking if compiler supports -ansi... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi test-gcc-ANSI.c -o test-gcc-ANSI > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI* # # AC_COMPILER_SUPPORTS -ansi-alias # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi-alias" >&5 $as_echo_n "checking if compiler supports -ansi-alias... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI_ALIAS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi-alias test-gcc-ANSI_ALIAS.c -o test-gcc-ANSI_ALIAS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI_ALIAS* # # AC_COMPILER_SUPPORTS -pedantic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -pedantic" >&5 $as_echo_n "checking if compiler supports -pedantic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-PEDANTIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -pedantic test-gcc-PEDANTIC.c -o test-gcc-PEDANTIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-PEDANTIC* # # AC_COMPILER_SUPPORTS -std=gnu99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=gnu99" >&5 $as_echo_n "checking if compiler supports -std=gnu99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_GNU99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=gnu99 test-gcc-STD_GNU99.c -o test-gcc-STD_GNU99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_GNU99* # # AC_COMPILER_SUPPORTS -std=c99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=c99" >&5 $as_echo_n "checking if compiler supports -std=c99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_C99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=c99 test-gcc-STD_C99.c -o test-gcc-STD_C99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_C99* # # AC_COMPILER_SUPPORTS -xc99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -xc99" >&5 $as_echo_n "checking if compiler supports -xc99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-XC99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -xc99 test-gcc-XC99.c -o test-gcc-XC99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-XC99* # # AC_COMPILER_SUPPORTS -m32 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m32" >&5 $as_echo_n "checking if compiler supports -m32... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M32.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m32 test-gcc-M32.c -o test-gcc-M32 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M32* # # AC_COMPILER_SUPPORTS -m64 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m64" >&5 $as_echo_n "checking if compiler supports -m64... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M64.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m64 test-gcc-M64.c -o test-gcc-M64 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M64* # # AC_COMPILER_SUPPORTS -Wall # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Wall" >&5 $as_echo_n "checking if compiler supports -Wall... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-WALL.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Wall test-gcc-WALL.c -o test-gcc-WALL > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-WALL* # # AC_COMPILER_SUPPORTS -g # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g" >&5 $as_echo_n "checking if compiler supports -g... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g test-gcc-G.c -o test-gcc-G > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G* # # AC_COMPILER_SUPPORTS -g3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g3" >&5 $as_echo_n "checking if compiler supports -g3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g3 test-gcc-G3.c -o test-gcc-G3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G3* # # AC_COMPILER_SUPPORTS -gdwarf-2 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-2" >&5 $as_echo_n "checking if compiler supports -gdwarf-2... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF2.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-2 test-gcc-DWARF2.c -o test-gcc-DWARF2 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF2* # # AC_COMPILER_SUPPORTS -gdwarf-3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-3" >&5 $as_echo_n "checking if compiler supports -gdwarf-3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-3 test-gcc-DWARF3.c -o test-gcc-DWARF3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF3* # # AC_COMPILER_SUPPORTS -gdwarf-4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-4" >&5 $as_echo_n "checking if compiler supports -gdwarf-4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF4.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-4 test-gcc-DWARF4.c -o test-gcc-DWARF4 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF4* # # AC_COMPILER_SUPPORTS -fstack-protector --param=ssp-buffer-size=4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fstack-protector --param=ssp-buffer-size=4" >&5 $as_echo_n "checking if compiler supports -fstack-protector --param=ssp-buffer-size=4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STACK_PROTECTOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fstack-protector --param=ssp-buffer-size=4 test-gcc-STACK_PROTECTOR.c -o test-gcc-STACK_PROTECTOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STACK_PROTECTOR* # # AC_COMPILER_SUPPORTS -fexceptions # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fexceptions" >&5 $as_echo_n "checking if compiler supports -fexceptions... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-EXCEPTIONS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fexceptions test-gcc-EXCEPTIONS.c -o test-gcc-EXCEPTIONS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-EXCEPTIONS* # # AC_COMPILER_SUPPORTS -Werror=missing-field-initializers # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=missing-field-initializers" >&5 $as_echo_n "checking if compiler supports -Werror=missing-field-initializers... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-MISSING_FIELD_INITIALIZERS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Werror=missing-field-initializers test-gcc-MISSING_FIELD_INITIALIZERS.c -o test-gcc-MISSING_FIELD_INITIALIZERS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-MISSING_FIELD_INITIALIZERS* # # AC_COMPILER_SUPPORTS -fsanitize=address # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fsanitize=address" >&5 $as_echo_n "checking if compiler supports -fsanitize=address... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-SANITIZE_ADDRESS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fsanitize=address test-gcc-SANITIZE_ADDRESS.c -o test-gcc-SANITIZE_ADDRESS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-SANITIZE_ADDRESS* # # AC_COMPILER_SUPPORTS -fno-omit-frame-pointer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-omit-frame-pointer" >&5 $as_echo_n "checking if compiler supports -fno-omit-frame-pointer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_OMIT_FRAME_POINTER.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-omit-frame-pointer test-gcc-NO_OMIT_FRAME_POINTER.c -o test-gcc-NO_OMIT_FRAME_POINTER > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_OMIT_FRAME_POINTER* # # AC_COMPILER_SUPPORTS -faddress-sanitizer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -faddress-sanitizer" >&5 $as_echo_n "checking if compiler supports -faddress-sanitizer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ADDRESS_SANITIZER_CHECK.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -faddress-sanitizer test-gcc-ADDRESS_SANITIZER_CHECK.c -o test-gcc-ADDRESS_SANITIZER_CHECK > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ADDRESS_SANITIZER_CHECK* # # AC_COMPILER_SUPPORTS -fcatch_undefined_behavior # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fcatch_undefined_behavior" >&5 $as_echo_n "checking if compiler supports -fcatch_undefined_behavior... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-CATCH_UNDEFINED_BEHAVIOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fcatch_undefined_behavior test-gcc-CATCH_UNDEFINED_BEHAVIOR.c -o test-gcc-CATCH_UNDEFINED_BEHAVIOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-CATCH_UNDEFINED_BEHAVIOR* # # AC_COMPILER_SUPPORTS -rdynamic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -rdynamic" >&5 $as_echo_n "checking if compiler supports -rdynamic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-RDYNAMIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -rdynamic test-gcc-RDYNAMIC.c -o test-gcc-RDYNAMIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-RDYNAMIC* { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking if memory accesses must be size-aligned" >&5 $as_echo_n "checking checking if memory accesses must be size-aligned... " >&6; } if false; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat > memalign_issues_test.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc, char** argv) { char* p = (char*)malloc(8); p++; int* intp= (int*)p; *intp=1; return 0; } _ACEOF ${CC} ${CFLAGS} memalign_issues_test.c -o memalign_issues_test > /dev/null 2>&1 has_memalign_issues=0 ./memalign_issues_test > /dev/null 2>&1 if [ $? -ne 0 ]; then has_memalign_issues=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f memalign_issues_test memalign_issues_test.c if test $has_memalign_issues; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MEMALIGN_ISSUES $has_memalign_issues _ACEOF # # AC_ENDIANNESS # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking endianness: " >&5 $as_echo_n "checking endianness: ... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-endian.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_STDIO_H #include #endif #if defined __FreeBSD__ #if HAVE_SYS_ENDIAN_H #include #endif #elif defined __APPLE__ #if HAVE_MACHINE_ENDIAN_H #include #endif #elif defined __sun #if HAVE_SYS_BYTEORDER_H #include #endif #else #if HAVE_ENDIAN_H #include #endif #if HAVE_BYTESWAP_H #include #endif #endif static int magic = 0x00525545; int main(int argc,char** argv) { (void)argc; (void)argv; int pp = -1; int c = -1; #if defined _BIG_ENDIAN pp = 2; #elif defined _LITTLE_ENDIAN pp = 1; #endif #ifdef __BYTE_ORDER #if __BYTE_ORDER == __LITTLE_ENDIAN pp = 1; #elif __BYTE_ORDER == __BIG_ENDIAN pp = 2; #endif // printf("__BYTE_ORDER=%x\n", __BYTE_ORDER); #endif #ifdef _BYTE_ORDER #if _BYTE_ORDER == _LITTLE_ENDIAN pp = 1; #elif _BYTE_ORDER == _BIG_ENDIAN pp = 2; #endif printf("_BYTE_ORDER=%x\n", _BYTE_ORDER); #endif #ifdef BYTE_ORDER #if BYTE_ORDER == LITTLE_ENDIAN pp = 1; #elif BYTE_ORDER == BIG_ENDIAN pp = 2; #endif // printf("BYTE_ORDER=%x\n", BYTE_ORDER); #endif # #ifdef WORDS_BIGENDIAN // printf("WORDS_BIGENDIAN=%x\n", WORDS_BIGENDIAN); if(pp == 1) // could be -1 or 2 { pp = -2; } else { pp = 2; } #endif char *p = (char*)&magic; if(*p == '\0') { c = 2; } else if(*p == 'E') { c = 1; } if((pp < 0) || (c < 0)) { printf("*** WARNING *** preprocessor says %i, real test says %i *** WARNING ***\n", pp, c); } if(c == pp) { return c; } else { return -1; } } _ACEOF $CC test-gcc-endian.c -o test-gcc-endian > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"failed to compile test\"" >&5 $as_echo "\"failed to compile test\"" >&6; } exit 1 fi ./test-gcc-endian if [ $? -eq 1 ] then if true; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if false; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: little" >&5 $as_echo "little" >&6; } else if false; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if true; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: big" >&5 $as_echo "big" >&6; } fi rm -f test-gcc-endian.c* test-gcc-endian for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done for ac_header in stdio.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDIO_H 1 _ACEOF fi done for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRING_H 1 _ACEOF fi done for ac_header in endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default" if test "x$ac_cv_header_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ENDIAN_H 1 _ACEOF fi done for ac_header in syslog.h do : ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYSLOG_H 1 _ACEOF fi done for ac_header in fcntl.h do : ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FCNTL_H 1 _ACEOF fi done for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF fi done for ac_header in linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in byteswap.h do : ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" if test "x$ac_cv_header_byteswap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BYTESWAP_H 1 _ACEOF fi done for ac_header in machine/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "machine/endian.h" "ac_cv_header_machine_endian_h" "$ac_includes_default" if test "x$ac_cv_header_machine_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACHINE_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/time.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIME_H 1 _ACEOF fi done for ac_header in sys/stat.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_stat_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_STAT_H 1 _ACEOF fi done for ac_header in sys/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" if test "x$ac_cv_header_sys_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/byteorder.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/byteorder.h" "ac_cv_header_sys_byteorder_h" "$ac_includes_default" if test "x$ac_cv_header_sys_byteorder_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_BYTEORDER_H 1 _ACEOF fi done for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done for ac_header in netinet/in.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET_IN_H 1 _ACEOF fi done for ac_header in netinet6/in6.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet6/in6.h" "ac_cv_header_netinet6_in6_h" "$ac_includes_default" if test "x$ac_cv_header_netinet6_in6_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET6_IN6_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_spin_init" >&5 $as_echo_n "checking checking for pthread_spin_init... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_spinlock_t lock; pthread_spin_init(&lock, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SPINLOCK 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_setname_np" >&5 $as_echo_n "checking checking for pthread_setname_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __USE_GNU #include int main () { pthread_setname_np(pthread_self(), "myname"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SETNAME_NP 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # # AC_HAS_ENABLE ctrl_dynamic_provisioning # if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL_DYNAMIC_PROVISIONING has been enabled" >&5 $as_echo_n "checking if CTRL_DYNAMIC_PROVISIONING has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl_dynamic_provisioning was given. if test "${enable_ctrl_dynamic_provisioning+set}" = set; then : enableval=$enable_ctrl_dynamic_provisioning; fi # CASE case "y$enable_ctrl_dynamic_provisioning" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl_dynamic_provisioning DONE # # AC_HAS_DISABLE rrl # if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRL_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrl was given. if test "${enable_rrl+set}" = set; then : enableval=$enable_rrl; fi # MSG RESULT # CASE case "y$enable_rrl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrl DONE # # AC_HAS_ENABLE messages # if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MESSAGES_SUPPORT has been enabled" >&5 $as_echo_n "checking if MESSAGES_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-messages was given. if test "${enable_messages+set}" = set; then : enableval=$enable_messages; fi # CASE case "y$enable_messages" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE messages DONE # # AC_HAS_DISABLE master # if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MASTER_SUPPORT has been disabled" >&5 $as_echo_n "checking if MASTER_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-master was given. if test "${enable_master+set}" = set; then : enableval=$enable_master; fi # MSG RESULT # CASE case "y$enable_master" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_dynupdate='no' enable_rrsig_management='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE master DONE # # AC_HAS_ENABLE ctrl # if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL has been enabled" >&5 $as_echo_n "checking if CTRL has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl was given. if test "${enable_ctrl+set}" = set; then : enableval=$enable_ctrl; fi # CASE case "y$enable_ctrl" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl DONE # # AC_HAS_DISABLE nsid # if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NSID_SUPPORT has been disabled" >&5 $as_echo_n "checking if NSID_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-nsid was given. if test "${enable_nsid+set}" = set; then : enableval=$enable_nsid; fi # MSG RESULT # CASE case "y$enable_nsid" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE nsid DONE # # AC_HAS_DISABLE acl # if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ACL_SUPPORT has been disabled" >&5 $as_echo_n "checking if ACL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-acl was given. if test "${enable_acl+set}" = set; then : enableval=$enable_acl; fi # MSG RESULT # CASE case "y$enable_acl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_tsig='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE acl DONE # # AC_HAS_DISABLE tsig # if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if TSIG_SUPPORT has been disabled" >&5 $as_echo_n "checking if TSIG_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-tsig was given. if test "${enable_tsig+set}" = set; then : enableval=$enable_tsig; fi # MSG RESULT # CASE case "y$enable_tsig" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE tsig DONE # # AC_HAS_DISABLE dynupdate # if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if DYNUPDATE_SUPPORT has been disabled" >&5 $as_echo_n "checking if DYNUPDATE_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-dynupdate was given. if test "${enable_dynupdate+set}" = set; then : enableval=$enable_dynupdate; fi # MSG RESULT # CASE case "y$enable_dynupdate" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE dynupdate DONE # # AC_HAS_DISABLE rrsig_management # if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRSIG_MANAGEMENT_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRSIG_MANAGEMENT_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrsig_management was given. if test "${enable_rrsig_management+set}" = set; then : enableval=$enable_rrsig_management; fi # MSG RESULT # CASE case "y$enable_rrsig_management" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrsig_management DONE # # AC_HAS_DISABLE zalloc # if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_SUPPORT has been disabled" >&5 $as_echo_n "checking if ZALLOC_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc was given. if test "${enable_zalloc+set}" = set; then : enableval=$enable_zalloc; fi # MSG RESULT # CASE case "y$enable_zalloc" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE zalloc DONE # # AC_HAS_ENABLE zalloc_statistics # if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_STATISTICS_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_STATISTICS_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_statistics was given. if test "${enable_zalloc_statistics+set}" = set; then : enableval=$enable_zalloc_statistics; fi # CASE case "y$enable_zalloc_statistics" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_statistics DONE # # AC_HAS_ENABLE zalloc_debug # if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_debug was given. if test "${enable_zalloc_debug+set}" = set; then : enableval=$enable_zalloc_debug; fi # CASE case "y$enable_zalloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_debug DONE # # AC_HAS_ENABLE malloc_debug # if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-malloc_debug was given. if test "${enable_malloc_debug+set}" = set; then : enableval=$enable_malloc_debug; fi # CASE case "y$enable_malloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE malloc_debug DONE # # AC_HAS_ENABLE bfd_debug # if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if BFD_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if BFD_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-bfd_debug was given. if test "${enable_bfd_debug+set}" = set; then : enableval=$enable_bfd_debug; fi # CASE case "y$enable_bfd_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE bfd_debug DONE case "$enable_bfd_debug" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlinfo" >&5 $as_echo_n "checking for library containing dlinfo... " >&6; } if ${ac_cv_search_dlinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlinfo (); int main () { return dlinfo (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlinfo+:} false; then : break fi done if ${ac_cv_search_dlinfo+:} false; then : else ac_cv_search_dlinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlinfo" >&5 $as_echo "$ac_cv_search_dlinfo" >&6; } ac_res=$ac_cv_search_dlinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no dl fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sha1_init_ctx" >&5 $as_echo_n "checking for library containing sha1_init_ctx... " >&6; } if ${ac_cv_search_sha1_init_ctx+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sha1_init_ctx (); int main () { return sha1_init_ctx (); ; return 0; } _ACEOF for ac_lib in '' iberty; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sha1_init_ctx=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sha1_init_ctx+:} false; then : break fi done if ${ac_cv_search_sha1_init_ctx+:} false; then : else ac_cv_search_sha1_init_ctx=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sha1_init_ctx" >&5 $as_echo "$ac_cv_search_sha1_init_ctx" >&6; } ac_res=$ac_cv_search_sha1_init_ctx if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo iberty fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bfd_init" >&5 $as_echo_n "checking for library containing bfd_init... " >&6; } if ${ac_cv_search_bfd_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bfd_init (); int main () { return bfd_init (); ; return 0; } _ACEOF for ac_lib in '' bfd; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bfd_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bfd_init+:} false; then : break fi done if ${ac_cv_search_bfd_init+:} false; then : else ac_cv_search_bfd_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bfd_init" >&5 $as_echo "$ac_cv_search_bfd_init" >&6; } ac_res=$ac_cv_search_bfd_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no bfd;exit 1 fi ;; no|*) ;; esac # # AC_HAS_ENABLE mutex_debug # if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MUTEX_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MUTEX_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-mutex_debug was given. if test "${enable_mutex_debug+set}" = set; then : enableval=$enable_mutex_debug; fi # CASE case "y$enable_mutex_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE mutex_debug DONE # # AC_HAS_ENABLE log_thread_id # if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_THREAD_ID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_THREAD_ID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_thread_id was given. if test "${enable_log_thread_id+set}" = set; then : enableval=$enable_log_thread_id; fi # CASE case "y$enable_log_thread_id" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_thread_id DONE # # AC_HAS_ENABLE log_pid # if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_PID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_PID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_pid was given. if test "${enable_log_pid+set}" = set; then : enableval=$enable_log_pid; fi # CASE case "y$enable_log_pid" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_pid DONE # # AC_HAS_ENABLE full_ascii7 # if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if FULL_ASCII7 has been enabled" >&5 $as_echo_n "checking if FULL_ASCII7 has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-full_ascii7 was given. if test "${enable_full_ascii7+set}" = set; then : enableval=$enable_full_ascii7; fi # CASE case "y$enable_full_ascii7" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 1 _ACEOF # CONDITIONAL Y if true; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 0 _ACEOF # CONDITIONAL N if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE full_ascii7 DONE # # AC_HAS_ENABLE non_aa_axfr_support # if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NON_AA_AXFR_SUPPORT has been enabled" >&5 $as_echo_n "checking if NON_AA_AXFR_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-non_aa_axfr_support was given. if test "${enable_non_aa_axfr_support+set}" = set; then : enableval=$enable_non_aa_axfr_support; fi # CASE case "y$enable_non_aa_axfr_support" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE non_aa_axfr_support DONE # # AC_HAS_WITH logdir # if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if logdir has been given" >&5 $as_echo_n "checking if logdir has been given... " >&6; } # ARG WITH # Check whether --with-logdir was given. if test "${with_logdir+set}" = set; then : withval=$with_logdir; # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_WITH_LOGDIR "$with_logdir" // $withval _ACEOF with_logdir="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES logdir="$withval" # ENDIF else # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 0 _ACEOF # CONDITIONAL N if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi with_logdir="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO logdir=${localstatedir}/log/yadifa # ENDIF fi # SUBST # AC_HAS_WITH logdir DONE { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has a sa_len field" >&5 $as_echo_n "checking if sockaddr has a sa_len field... " >&6; } cat > sockaddr_sa_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr sa; sa.sa_len = 4; } _ACEOF has_sockaddr_sa_len=0 ${CC} ${CFLAGS} sockaddr_sa_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_sa_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_sa_len.c sockaddr_sa_len if test $has_sockaddr_sa_len = yes; then HAS_SOCKADDR_SA_LEN_TRUE= HAS_SOCKADDR_SA_LEN_FALSE='#' else HAS_SOCKADDR_SA_LEN_TRUE='#' HAS_SOCKADDR_SA_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_SA_LEN $has_sockaddr_sa_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in has a sin_len field" >&5 $as_echo_n "checking if sockaddr_in has a sin_len field... " >&6; } cat > sockaddr_in_sin_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in sa; sa.sin_len = sizeof(struct sockaddr_in); } _ACEOF has_sockaddr_in_sin_len=0 ${CC} ${CFLAGS} sockaddr_in_sin_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in_sin_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in_sin_len.c sockaddr_in_sin_len if test $has_sockaddr_in_sin_len = yes; then HAS_SOCKADDR_IN_SIN_LEN_TRUE= HAS_SOCKADDR_IN_SIN_LEN_FALSE='#' else HAS_SOCKADDR_IN_SIN_LEN_TRUE='#' HAS_SOCKADDR_IN_SIN_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN_SIN_LEN $has_sockaddr_in_sin_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in6 has a sin6_len field" >&5 $as_echo_n "checking if sockaddr_in6 has a sin6_len field... " >&6; } cat > sockaddr_in6_sin6_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in6 sa; sa.sin6_len = sizeof(struct sockaddr_in6); } _ACEOF has_sockaddr_in6_sin6_len=0 ${CC} ${CFLAGS} sockaddr_in6_sin6_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in6_sin6_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in6_sin6_len.c sockaddr_in6_sin6_len if test $has_sockaddr_in6_sin6_len = yes; then HAS_SOCKADDR_IN6_SIN6_LEN_TRUE= HAS_SOCKADDR_IN6_SIN6_LEN_FALSE='#' else HAS_SOCKADDR_IN6_SIN6_LEN_TRUE='#' HAS_SOCKADDR_IN6_SIN6_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN6_SIN6_LEN $has_sockaddr_in6_sin6_len _ACEOF if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF if true; then HAS_DNSSEC_SUPPORT_TRUE= HAS_DNSSEC_SUPPORT_FALSE='#' else HAS_DNSSEC_SUPPORT_TRUE='#' HAS_DNSSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DNSSEC_SUPPORT 1 _ACEOF if true; then HAS_NSEC3_SUPPORT_TRUE= HAS_NSEC3_SUPPORT_FALSE='#' else HAS_NSEC3_SUPPORT_TRUE='#' HAS_NSEC3_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC3_SUPPORT 1 _ACEOF if true; then HAS_NSEC_SUPPORT_TRUE= HAS_NSEC_SUPPORT_FALSE='#' else HAS_NSEC_SUPPORT_TRUE='#' HAS_NSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC_SUPPORT 1 _ACEOF if false; then HAS_MIRROR_SUPPORT_TRUE= HAS_MIRROR_SUPPORT_FALSE='#' else HAS_MIRROR_SUPPORT_TRUE='#' HAS_MIRROR_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MIRROR_SUPPORT 0 _ACEOF if false; then HAS_DROPALL_SUPPORT_TRUE= HAS_DROPALL_SUPPORT_FALSE='#' else HAS_DROPALL_SUPPORT_TRUE='#' HAS_DROPALL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DROPALL_SUPPORT 0 _ACEOF if false; then HAS_TCL_TRUE= HAS_TCL_FALSE='#' else HAS_TCL_TRUE='#' HAS_TCL_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TCL 0 _ACEOF if false; then HAS_RDTSC_TRUE= HAS_RDTSC_FALSE='#' else HAS_RDTSC_TRUE='#' HAS_RDTSC_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RDTSC 0 _ACEOF if false; then HAS_RRCACHE_ENABLED_TRUE= HAS_RRCACHE_ENABLED_FALSE='#' else HAS_RRCACHE_ENABLED_TRUE='#' HAS_RRCACHE_ENABLED_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RRCACHE_ENABLED 0 _ACEOF requires_dnscore=1 LDDYN="-Wl,-Bdynamic" LDSTAT="-Wl,-Bstatic" echo -n "checking if -Bstatic & -Bdynamic are supported ... " $CC -Wl,-Bstatic 2>&1|grep Bstatic > /dev/null if [ $? -eq 0 ] then echo "not supported"; LDDYN="" LDSTAT="" else echo "supported"; fi LIBS="$LDDYN $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_gethostbyname=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_gethostbyname+:} false; then : break fi done if ${ac_cv_search_gethostbyname+:} false; then : else ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 $as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_socket+:} false; then : break fi done if ${ac_cv_search_socket+:} false; then : else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi if [ $requires_tcl -eq 1 ] then echo "TCL is required by this setup ..." CFLAGS="$CFLAGS -DWITHTCLINCLUDED -I${tcl_includedir}" LDFLAGS="-L${tcl_libdir} $LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing Tcl_Main" >&5 $as_echo_n "checking for library containing Tcl_Main... " >&6; } if ${ac_cv_search_Tcl_Main+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char Tcl_Main (); int main () { return Tcl_Main (); ; return 0; } _ACEOF for ac_lib in '' ${tcl_version}; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_Tcl_Main=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_Tcl_Main+:} false; then : break fi done if ${ac_cv_search_Tcl_Main+:} false; then : else ac_cv_search_Tcl_Main=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_Tcl_Main" >&5 $as_echo "$ac_cv_search_Tcl_Main" >&6; } ac_res=$ac_cv_search_Tcl_Main if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo "could not find ${tcl_version} :: tcl_includedir=${tcl_includedir} :: tcl_libdir=${tcl_libdir}"; exit 1 fi fi if [ $requires_ssl -eq 1 ] then echo "SSL is required by this setup ..." SSLDEPS="" echo "Finding the SSL dependencies" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing deflate" >&5 $as_echo_n "checking for library containing deflate... " >&6; } if ${ac_cv_search_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflate (); int main () { return deflate (); ; return 0; } _ACEOF for ac_lib in '' z; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_deflate=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_deflate+:} false; then : break fi done if ${ac_cv_search_deflate+:} false; then : else ac_cv_search_deflate=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_deflate" >&5 $as_echo "$ac_cv_search_deflate" >&6; } ac_res=$ac_cv_search_deflate if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi echo "SSLDEPS=${SSLDEPS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SSL is available" >&5 $as_echo_n "checking if SSL is available... " >&6; } ac_check_lib_ssl=0 # Check whether --with-openssl_lib was given. if test "${with_openssl_lib+set}" = set; then : withval=$with_openssl_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LDFLAGS="-L$with_openssl_lib $SSLDEPS $LDFLAGS" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi # Check whether --with-openssl_include was given. if test "${with_openssl_include+set}" = set; then : withval=$with_openssl_include; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CFLAGS="-I$with_openssl_include $CFLAGS $CFLAGS3264" echo "CFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi # Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; echo "yes" OPENSSL="${withval}" CFLAGS="-I$with_openssl/include $CFLAGS $CFLAGS3264" LDFLAGS="-L$with_openssl/lib $SSLDEPS $LDFLAGS" echo "CFLAGS=$CFLAGS" echo "LDFLAGS=$LDFLAGS" ac_check_lib_ssl=1 else echo "no" CFLAGS="$CFLAGS $CFLAGS3264" LDFLAGS="$SSLDEPS $LDFLAGS" echo "CFLAGS=${CFLAGS}" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi if [ $ac_check_lib_ssl -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RSA_new" >&5 $as_echo_n "checking for library containing RSA_new... " >&6; } if ${ac_cv_search_RSA_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char RSA_new (); int main () { return RSA_new (); ; return 0; } _ACEOF for ac_lib in '' crypto; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_RSA_new=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_RSA_new+:} false; then : break fi done if ${ac_cv_search_RSA_new+:} false; then : else ac_cv_search_RSA_new=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RSA_new" >&5 $as_echo "$ac_cv_search_RSA_new" >&6; } ac_res=$ac_cv_search_RSA_new if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5 $as_echo_n "checking for library containing SSL_library_init... " >&6; } if ${ac_cv_search_SSL_library_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char SSL_library_init (); int main () { return SSL_library_init (); ; return 0; } _ACEOF for ac_lib in '' ssl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_SSL_library_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_SSL_library_init+:} false; then : break fi done if ${ac_cv_search_SSL_library_init+:} false; then : else ac_cv_search_SSL_library_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5 $as_echo "$ac_cv_search_SSL_library_init" >&6; } ac_res=$ac_cv_search_SSL_library_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi fi else echo "SSL is not required by this setup" fi if [ $requires_dnscore -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Core library" >&5 $as_echo_n "checking for the DNS Core library... " >&6; } # Check whether --with-dnscore was given. if test "${with_dnscore+set}" = set; then : withval=$with_dnscore; CFLAGS="-I$with_dnscore/include $CFLAGS" LDFLAGS="-L$with_dnscore/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnscore_init in -ldnscore" >&5 $as_echo_n "checking for dnscore_init in -ldnscore... " >&6; } if ${ac_cv_lib_dnscore_dnscore_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnscore $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnscore_init (); int main () { return dnscore_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnscore_dnscore_init=yes else ac_cv_lib_dnscore_dnscore_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnscore_dnscore_init" >&5 $as_echo "$ac_cv_lib_dnscore_dnscore_init" >&6; } if test "x$ac_cv_lib_dnscore_dnscore_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSCORE 1 _ACEOF LIBS="-ldnscore $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnscore ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnscore_init in -ldnscore" >&5 $as_echo_n "checking for dnscore_init in -ldnscore... " >&6; } if ${ac_cv_lib_dnscore_dnscore_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnscore $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnscore_init (); int main () { return dnscore_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnscore_dnscore_init=yes else ac_cv_lib_dnscore_dnscore_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnscore_dnscore_init" >&5 $as_echo "$ac_cv_lib_dnscore_dnscore_init" >&6; } if test "x$ac_cv_lib_dnscore_dnscore_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSCORE 1 _ACEOF LIBS="-ldnscore $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnscore/include $CFLAGS" LDFLAGS="-L../../lib/dnscore/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnscore $LDDYN" fi fi fi if [ $requires_dnsdb -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Database library" >&5 $as_echo_n "checking for the DNS Database library... " >&6; } # Check whether --with-dnsdb was given. if test "${with_dnsdb+set}" = set; then : withval=$with_dnsdb; CFLAGS="-I$with_dnsdb/include $CFLAGS" LDFLAGS="-L$with_dnsdb/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zdb_init in -ldnsdb" >&5 $as_echo_n "checking for zdb_init in -ldnsdb... " >&6; } if ${ac_cv_lib_dnsdb_zdb_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnsdb $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zdb_init (); int main () { return zdb_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnsdb_zdb_init=yes else ac_cv_lib_dnsdb_zdb_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnsdb_zdb_init" >&5 $as_echo "$ac_cv_lib_dnsdb_zdb_init" >&6; } if test "x$ac_cv_lib_dnsdb_zdb_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSDB 1 _ACEOF LIBS="-ldnsdb $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnsdb ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zdb_init in -ldnsdb" >&5 $as_echo_n "checking for zdb_init in -ldnsdb... " >&6; } if ${ac_cv_lib_dnsdb_zdb_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnsdb $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zdb_init (); int main () { return zdb_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnsdb_zdb_init=yes else ac_cv_lib_dnsdb_zdb_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnsdb_zdb_init" >&5 $as_echo "$ac_cv_lib_dnsdb_zdb_init" >&6; } if test "x$ac_cv_lib_dnsdb_zdb_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSDB 1 _ACEOF LIBS="-ldnsdb $LIBS" else exit fi else echo "embedded" CFLAGS="-I${srcdir}/../../lib/dnsdb/include $CFLAGS" LDFLAGS="-L../../lib/dnsdb/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnsdb $LDDYN" fi fi fi if [ $requires_dnszone -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Zone library" >&5 $as_echo_n "checking for the DNS Zone library... " >&6; } # Check whether --with-dnszone was given. if test "${with_dnszone+set}" = set; then : withval=$with_dnszone; CFLAGS="-I$with_dnszone/include $CFLAGS" LDFLAGS="-L$with_dnszone/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnszone_init in -ldnszone" >&5 $as_echo_n "checking for dnszone_init in -ldnszone... " >&6; } if ${ac_cv_lib_dnszone_dnszone_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnszone $LDSTAT -ldnsdb -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnszone_init (); int main () { return dnszone_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnszone_dnszone_init=yes else ac_cv_lib_dnszone_dnszone_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnszone_dnszone_init" >&5 $as_echo "$ac_cv_lib_dnszone_dnszone_init" >&6; } if test "x$ac_cv_lib_dnszone_dnszone_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSZONE 1 _ACEOF LIBS="-ldnszone $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnszone ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnszone_init in -ldnszone" >&5 $as_echo_n "checking for dnszone_init in -ldnszone... " >&6; } if ${ac_cv_lib_dnszone_dnszone_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnszone $LDSTAT -ldnsdb -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnszone_init (); int main () { return dnszone_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnszone_dnszone_init=yes else ac_cv_lib_dnszone_dnszone_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnszone_dnszone_init" >&5 $as_echo "$ac_cv_lib_dnszone_dnszone_init" >&6; } if test "x$ac_cv_lib_dnszone_dnszone_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSZONE 1 _ACEOF LIBS="-ldnszone $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnszone/include $CFLAGS" LDFLAGS="-L../../lib/dnszone/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnszone $LDDYN" fi fi fi if [ $requires_dnslg -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Looking Glass library" >&5 $as_echo_n "checking for the DNS Looking Glass library... " >&6; } # Check whether --with-dnslg was given. if test "${with_dnslg+set}" = set; then : withval=$with_dnslg; CFLAGS="-I$with_dnslg/include $CFLAGS" LDFLAGS="-L$with_dnslg/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnslg_init in -ldnslg" >&5 $as_echo_n "checking for dnslg_init in -ldnslg... " >&6; } if ${ac_cv_lib_dnslg_dnslg_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnslg $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnslg_init (); int main () { return dnslg_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnslg_dnslg_init=yes else ac_cv_lib_dnslg_dnslg_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnslg_dnslg_init" >&5 $as_echo "$ac_cv_lib_dnslg_dnslg_init" >&6; } if test "x$ac_cv_lib_dnslg_dnslg_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSLG 1 _ACEOF LIBS="-ldnslg $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnslg ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnslg_init in -ldnslg" >&5 $as_echo_n "checking for dnslg_init in -ldnslg... " >&6; } if ${ac_cv_lib_dnslg_dnslg_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnslg $LDSTAT -ldnscore $LDDYN $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnslg_init (); int main () { return dnslg_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnslg_dnslg_init=yes else ac_cv_lib_dnslg_dnslg_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnslg_dnslg_init" >&5 $as_echo "$ac_cv_lib_dnslg_dnslg_init" >&6; } if test "x$ac_cv_lib_dnslg_dnslg_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSLG 1 _ACEOF LIBS="-ldnslg $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnslg/include $CFLAGS" LDFLAGS="-L../../lib/dnslg/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnslg $LDDYN" fi fi fi LDFLAGS="$LDFLAGS $LDDYN" LIBS="$LDDYN $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LTO has been enabled" >&5 $as_echo_n "checking if LTO has been enabled... " >&6; } # Check whether --enable-lto was given. if test "${enable_lto+set}" = set; then : enableval=$enable_lto; enable_lto=yes else enable_lto=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lto" >&5 $as_echo "$enable_lto" >&6; } case "$enable_lto" in yes) type -p gold if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: 'gold' not found" >&5 $as_echo "WARNING: 'gold' not found" >&6; } sleep 1 fi if [ ! "$LD" = "" ] then $LD -v |grep -i gold > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: LTO enabled but LD ($LD) is not gold" >&5 $as_echo "WARNING: LTO enabled but LD ($LD) is not gold" >&6; } sleep 1 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: LD not defined" >&5 $as_echo "LD not defined" >&6; } fi if true; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; no|*) if false; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; esac CPPFLAGS="$CPPFLAGS -DDNSLG_BUILD" for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done done # Provide a safe default value. : "${ac_cv_func_select_args=int,int *,struct timeval *}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG1 $1 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in bzero memset select socket do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_SA_LEN_TRUE}" && test -z "${HAS_SOCKADDR_SA_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_SA_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN_SIN_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN_SIN_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN_SIN_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN6_SIN6_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DNSSEC_SUPPORT_TRUE}" && test -z "${HAS_DNSSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DNSSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC3_SUPPORT_TRUE}" && test -z "${HAS_NSEC3_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC3_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC_SUPPORT_TRUE}" && test -z "${HAS_NSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MIRROR_SUPPORT_TRUE}" && test -z "${HAS_MIRROR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MIRROR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DROPALL_SUPPORT_TRUE}" && test -z "${HAS_DROPALL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DROPALL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TCL_TRUE}" && test -z "${HAS_TCL_FALSE}"; then as_fn_error $? "conditional \"HAS_TCL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RDTSC_TRUE}" && test -z "${HAS_RDTSC_FALSE}"; then as_fn_error $? "conditional \"HAS_RDTSC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRCACHE_ENABLED_TRUE}" && test -z "${HAS_RRCACHE_ENABLED_FALSE}"; then as_fn_error $? "conditional \"HAS_RRCACHE_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by dnslg $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ dnslg config.status 2.1.6-5826 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "include/dnslg/dnslg-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/dnslg/dnslg-config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi make buildinfo.h echo echo "SUMMARY for DNSLG:" echo "------------------" echo echo "CC .................................. : $CC" echo "LD .................................. : $LD" echo "AR .................................. : $AR" echo "CFLAGS .............................. : $CFLAGS" echo "CPPFLAGS ............................ : $CPPFLAGS" echo "LDFLAGS ............................. : $LDFLAGS" echo "LIBS ................................ : $LIBS" if [ ! "${OPENSSL}" = "" ] then echo "Using OpenSLL from .................. : ${OPENSSL}" fi echo echo "Install prefix ...................... : $prefix" echo echo echo "DNSLG DONE" echo "----------" echo echo yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/missing0000644000077100007710000000013212473710127017610 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597653.978344534 yadifa-2.1.6-5826/lib/dnslg/missing0000755000077100007710000001533012473710127017421 0ustar00yadifayadifa00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 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, 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/COPYING0000644000077100007710000000012412650131756017252 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.153344 30 ctime=1454597653.936344534 yadifa-2.1.6-5826/lib/dnslg/COPYING0000664000077100007710000000312012650131756017053 0ustar00yadifayadifa00000000000000 Copyright (c) 2011-2016, EURid. All rights reserved. The YADIFA TM software product is provided under the BSD 3-clause license: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of EURid nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/README0000644000077100007710000000012412654656702017106 xustar000000000000000027 mtime=1454595522.700671 27 atime=1454597464.158344 30 ctime=1454597653.950344534 yadifa-2.1.6-5826/lib/dnslg/README0000664000077100007710000005773012654656702016727 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ 20160126: YADIFA 2.1.6 Fixes: - fixed an issue where the referral would not be measured for UDP on a optimised build. 20160108: YADIFA 2.1.5 Dynamic updates do not use temporary files anymore which improves their general performance. The statistics now shows the referrals. Fixes: - fixed an issue where getting a huge incremental transfer would prevent the server from answering queries while applying the changes. - fixed an issue serving IXFR that would occur when a incremental change step was bigger than 64KB - fixed an issue for Solaris with the memory alignment fix not active everywhere - fixed an issue on the Solaris build settings - fixed an issue where sometimes yadifad would not find a configuration file given as a parameter with a relative path - fixed an issue where a wild-card would not be properly returned with an AXFR - fixed an issue where dynamically updating a zone at a speed such that the zone file would need to be written multiple times on disk before finishing the previous write could lead to a deadlock 20151026: YADIFA 2.1.4 The zone reader error reporting has been improved. Stacktrace support added for Solaris. Known issue: - Adding and or removing NSEC3PARAM dynamically is not properly handled. Fixes: - fixed an issue where an NSEC3 answer proving a * query would lead to a crash - fixed an issue where a private key may be not recognised as such - fixed an issue where dynamic update prerequisite check would fail a valid match - fixed an issue where zone signature maintenance would only start if all private keys were available. 20150821: YADIFA 2.1.3 Fixes: - fixed an issue that could lead to a crash at startup - fixed an issue where parsing a TYPE#### record would stop the parser prematurely 20150814: YADIFA 2.1.2 The ./configure script has a new option: --enable-full-ascii7 This changes the behaviour of DNS name validation to accept all the ASCII7 characters instead of only the DNS-space ones. Enabling this option is not recommended. Fixes: - fixes an issue where the hmac-shaX identification string sent with a TSIG had the suffix ".sig-alg.reg.int". 20150714: YADIFA 2.1.1 The yadifa command line has a new option: --config|-c file : read the specific configuration file instead of ~/.yadifa.rc Issues detected on the NSEC3 database have now been upgraded from debug to info/warning Fixes: - fixed an issue where, on some cases; the garbage collector for the zones was not triggering for a long time. - fixed an issue in the Makefile (courtesy of DENIC) - fixed an issue where a few bytes could be leaked in some rare cases when failing to unload a zone - fixed an issue in RRL where some values of IPv6 prefix - fixed an issue accepting some answers on IXFR transfers 20150424: YADIFA 2.1.0 New journal file format: This new format addresses a few issues like having maximum journal file and a relatively constant random access time even for very big sizes. The internal messaging queue has been changed to address huge amount of zones. New CHaos queries supported: hostname id.server Known issues: _ building successfully with LTO may require to append both AR=gcc-ar and RANLIB=gcc-ranlib to the ./configure command 20150403: YADIFA 2.0.6 This release is a public release. This minor update's sole purpose is to fix YADIFA builds on OpenBSD. Fixes: - fixed a crash that could occur while sending a massive amount of notifications - OpenBSD builds are fixed. Tested on: OpenBSD 5.6 amd64, standard installation. Configure: ./configure Tested on: OpenBSD 5.6 amd64, with gcc 4.9 installed. Configure: ./configure CC=egcc 20150226: YADIFA 2.0.5 This release is a public release. Fixes: - fixed an issue with huge IXFR transfers as a master - fixed an issue with notifications on slave-slave-master setup - fixed an issue with a potential infinite loop loading an AXFR from a master - fixed missing hmac-sha* from configuration - fixed an issue with TLSA records parsing - fixed an issue with base 16 encoding - fixed an issue parsing * domains - fixed an issue with some RRL motivated answers - increased the maximum number of network interfaces from 5 to 16 - fixed an error in the configuration examples where "statistics" was used instead of "stats" - minor fixes and improvements 20141216: YADIFA 2.0.4 This release is a public release. By popular demand, the default log file directory is now PREFIX/var/log/yadifa. It can be set using --with-logdir=/my/dir Improved build mechanism. It has been tested to work automatically on Linux, FreeBSD, OSX, SunOS. RedHat family builds will use -O2 as maximum optimisations. Note that some optional features are now enabled by default but can be disabled. Fixes: - fixed an issue with the AXFR transfer where the serial number would not be properly taken into account - fixed an issue with the notify mechanism that could occur if the server was only listening to 127.0.0.1 - fixed an issue with bogus DNSKEY records that may potentially lead to a crash in openssl - fixed a reported potential "tmpfile" vulnerability on DEBUG builds (generated with make debug) - fixed an issue with IPv6 connections on some architectures - typos fixes - minor fixes and improvements 20141104: Architecture portability enhancements. On Solaris, if no --enable-force32bits nor --enable-force64bits is set, then 64 bits will be forced (fixes an issue at link-time) ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC3 Extensions Required, dynamically linked, not stripped, no debugging information available PATH=/opt/csw/bin:/usr/ccs/bin:$PATH ./configure --enable-force32bits PATH=/opt/csw/bin:/usr/ccs/bin:$PATH make 20141030: Architecture portability enhancements. FreeBSD 9 FreeBSD dnode3 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 gcc (GCC) 4.2.1 20070831 patched [FreeBSD] ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900044), not stripped Ubuntu Linux dnode10 3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xe3b8601b9b5e59f8c9ce519cacbe9b8ff544ff1d, not stripped OSX Darwin RD-Mac-Mini.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Mach-O 64-bit executable x86_64 20141029: Architecture portability enhancements. uname -a gcc --version file yadifad YellowDog Linux Linux 2.6.29-3.ydl61.4 #1 SMP Mon Sep 7 14:50:27 PDT 2009 ppc64 ppc64 ppc64 GNU/Linux gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available Debian PPC64 Linux 3.2.0-3-powerpc64 #1 SMP Mon Jul 23 08:03:56 UTC 2012 ppc64 GNU/Linux gcc (Debian 4.6.3-8) 4.6.3 ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xedc47c984a4af7eb9a7ecbc0f135e4d064ba08f0, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available 20141016: YADIFA 2.0.2 TCP fallback support on truncation 20140905: YADIFA 2.0.0 This release is a public release Fixes: - fixed a log incorrectly reporting an error when the client didn't close the TCP connection fast enough - fixed an issue with the statistics on TCP queries Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140829: YADIFA 2.0.0-beta3-public This release is a public release - --disable-master feature at configure now builds a slave-only server Fixes: - fixed an issue with TSIG signed queries - fixed an issue with thread pool live resizing - fixed an issue where reading an undeleted obsolete journal ending at the start of a newly transferred zone from the master would incorrectly trigger an error Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140630: YADIFA 2.0.0-beta2-public This release is a public release - basepath disabled - pidpath removed, only pidfile remains - log reopen notification is now timestamped - slave zones no longer complain about missing NSEC/NSEC3 private keys - the error code ZRE_FILE_NOT_FOUND has been replaced by the more accurate code ZRE_NO_VALID_FILE_FOUND - default logging settings no longer output debug Fixes: - fixed issue in flag computation (AD,CD) - fixed an issue with journal truncation sometimes leading to a crash - zone parsing now correctly accepts '#' as a comment marker - zone parsing now rejects wrong fqdn as soon as it reads them, leading to a more accurate error message - removing the last dnskey of a zone no longer crashes the server Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. yadifa remote client commands prototype is now available with the following supported commands: -shutdown shuts down yadifa e.g. ./yadifa -s "192.0.2.1 port 53" -t shutdown -cfgreload reloads the and sections of the yadifad configuration e.g. ./yadifa -s "192.0.2.1 port 53" -t cfgreload -logreopen closes and reopen the log files e.g. ./yadifa -s "192.0.2.1 port 53" -t logreopen -freezeall prevents all zones from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freezeall -freeze prevents a zone from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freeze -q somedomain.eu -unfreezeall enables updates of all zones again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreezeall -unfreeze enables updates of a zone again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreeze -q somedomain.eu In order to work, the allow-control ACL must be defined either in
for the global commands and may also be defined in for the ones targeting a specific zone. e.g. allow-control 127.0.0.1 Note that tsig is not supported in the client yet. 20140528: YADIFA 2.0.0-beta1-public This release is a public release - NSID implemented (enabled at ./configure time with --enable-nsid - generic parser for: - getops - zone file - resolv.conf - configuration - '@' can now be used in a zone file - new binary for controlling 'yadifad' (yadifa) - framework is rewritten for multi core systems - single core server has been removed Fixes: - fixed several minor issues Know issues: - removing all dnskeys from a zone file crashes the server - yadifa has some issues with nodelay, nocork 20130424: YADIFA 1.1.0 _ added DSA signature _ added SHA-256 SHA-384 SHA-512 digest algorithms _ now supports additional DNSSEC algorithms: DSASHA1 DSASHA1_NSEC3 RSASHA256_NSEC3 RSASHA512_NSEC3 _ Respone Rate Limitation implemented (enabled at ./configure time with --enable-rrl) _ --enable-tiny-footprint now reduces the memory usage further by reducing the standard log queue from 2^20 to 2^12 entries _ the general speed has been slightly improved _ dynamic updates pending for more than 3 seconds are now dropped with an error _ dynamic provisioning Fixes: _ fixed a memory leak that could occur at NSEC3 generation when loading the zone failed in a particular way _ fixed a memory leak at ixfr send _ fixed handling of '_' character that was improperly stored in the database _ fixed bandwidth limit settings (tcp stream in and out) not always being taken from the configuration _ fixed TSIG answer verification for notifies _ fixed error codes not being registered and thus logged as unknown hexadecimal error code. _ other minor fixes 20130612: YADIFA 1.0.3 Fixes only (backports from 1.1.0) Fixes: _ fixed an issue preventing YADIFA from being build from another directory _ fixed an issue with OSX systems where gsed has to be used instead of sed _ fixed an issue with the '_' character not being properly handled _ fixed an issue where reading MX record from a zone file would incorrecly be rejected as invalid _ fixed an issue where the OPT record would not be properly written _ fixed an issue where an undefined ACL reference would be silently ignored _ fixed missing code tags for several error codes. From now on unregistered codes are dumped in hexadicimal. _ fixed portability issues with BSD and OSX _ fixed several minor issues 20120921: YADIFA 1.0.2 Fixes only Fixes: _ fixed an issue where the journal file was sometimes not properly closed at the end of a task _ fixed an issue where the TCP usage slots would sometimes wrongly return that they were all being used _ fixed an issue on IXFR processing (slave side) where the type of answer from the master would not be properly detected _ fixed an issue with TSIG on secrets not exactly 16 bytes long (binary form) _ fixed an issue on 32 bits architectures where the sig-validity-* fields would not be properly handled if not set on each zone section. _ slightly improved the replay time of big journal files _ fixed several minor issues Known issues: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120709: YADIFA 1.0.1 _ logging repeat compression is now by channel instead of global Fixes: _ fixed an issue where glibc whould assert if libgcc_s.so (libgcc_s.so.1) and libc.so (libc.so.6) where not available inside the chrooted directory of YADIFA _ fixed an issue in the syslog module Known issues: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120625: YADIFA 1.0.0 _ LTO support can be enabled with --enable-lto but this is not working with clang. LTO does not increase the performance significally _ parallel processing of listening addresses can now be enabled. It can be set using thread-count-by-address in the
section. By default YADIFA will not use parallel processing as this feature has not been as thoroughly tested as the single-thread processing model _ default parameters tuning _ fixes Known issue: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 20120530: YADIFA 1.0.0RC3 _ the configuration parser now ignores undefined logger names and report them with a warning _ syslog messages are now put in the name of "yadifad" instead of the name used for the "syslog" channel _ syslog messages do not print the time from YADIFA anymore _ improved the steps involved in loading a locally cached slave zone _ zones are now loaded in background _ man page yadifad-conf.man5 renamed into yadifad.conf.man5 Fixes: _ AXFR/IXFR answers with the RA bit set are nolonger rejected as invalid _ YADIFA now answers to SIGINT again (shutdown) _ fixed an issue where obsolete AXFR files were not always being deleted _ fixed an issue occurring when both IPv4 and IPv6 were available to handle a notify _ fixed journal replay issue where some RRSIGs records were not properly removed _ fixed an issue occurring with IPv6 queries _ fixed an issue in the generation of a specific NSEC3 error answer _ fixed named query style layout Known issue: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120328: YADIFA 1.0.0RC2 _ fixed logging issue on work file creation error _ fixed an issue where IXFR queries could be rejected as being wrongly formatted _ fixed an issue in the query logging text _ enabled command line options ( -u uid -g gid -d ) 20120319: YADIFA 1.0.0RC1 Is a full functional authoritative name server: - works as primary or secondary name server - AXFR - IXFR - NOTIFY - NSUPDATE - TSIG - CLASSES: - IN - CH (just for version) - TYPES: - AAAA - CNAME - DNSKEY - DS - HINFO - MX - NAPTR - NS - NSEC3 - NSEC3PARAM - NSEC - PTR - RRSIG - SOA - SRV - SSHFP - TXT - Automatic resigning - DNSSEC algorithms: - 5 (RSASHA1) - 7 (RSASHA1-NSEC3 - ACL's KNOWN ISSUES: NSEC3: _ cannot work with multiple NSEC3PARAM chains with mixed OPT-IN/OUT settings _ adding a new NSEC3 chain expects that the master sends the NSEC3PARAM first (it does not seems to be always the case) We have a case where a master starts with 2 thousands NSEC3 opt-out records then adds 6 millions NSEC3 opt-in records but does not give the NSEC3PARAM record first. The slave server rejects them all because it's unable to link them to a chain. (This one has high priority) DNSSEC: _ it is not allowed to change the zone security mode (unsecure, NSEC, or NSEC3). Once the zone is loaded it keeps its security mode. _ dynamic updates of NSEC as well as NSEC3 records are refused QUIT: the server will shutdown on the following conditions: _ detection of an impossible situation or an internal integrity issue (ie: for any reason the SOA has vanished from a zone) _ memory limit reached which prevents any more work _ ipc issue which prevent internal services communication ACL: _ since the access control is set by zone and CHAOS class is not implemented as a configurable zone, it is not possible (yet) to specifically block CHAOS queries. 20111121: YADIFA 0.5.5 - many fixes KNOWN ISSUE: NSEC3 slave zone replay fails. 20110706: YADIFA 0.5.0 - slave mode, AXFR/IXFR (no TSIG yet for the slave-side transfer) - answers to a notify from the master - polls the (first) master on the masters list - maintains the .axfr & .ix files (deletes the obsoletes ones) - TSIG queries are checked - Replays the zone journal on startup after the zone load (journaling) - Answers IXFR queries (journaling) 20110601: YADIFA 0.4.0 Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries with TSIG - nsupdate functionality (journaling) - TSIG on client server side will be transmitted, but not checked - ACL works - The zone has SOA, NS A resource records. 20110524: YADIFA 0.3.0 First release internally of yadifad 20110524115500 GMT+1. Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries - The zone has SOA, NS A resource records. 20091224: YADIFA 0.2.0 _ Answers AXFR queries _ ACL based on IP and TSIG (not all query types are ACL'ed yet) 20091104: YADIFA 0.1.0 YADIFA is a work in progress. The main goal is to have an alternative for BIND or NSD. Version 0.1.0 is an authoritative server only. It has no: - AXFR/IXFR functionality - dynupdate - support for NSEC - support for NSEC3 - caching mechanism - additional tools (eg.dig, dnssectools, drill,...) It has: - a very fast way to give authoritative answer - a very fast method for loading the database and checking the zone files This first release is to have a feeling how it works in an operational environment. TODO Everything what is not implemented, has to be implemented. Most of the code is there, but is not activated. No comformity tests has been done. (This of course is on the todo list) Bug Reports and Mailing Lists Bugs reports should be sent to bugreport@yadifa.eu yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/include0000644000077100007710000000013212654663025017567 xustar000000000000000030 mtime=1454597653.866344534 30 atime=1454597653.845344534 30 ctime=1454597653.866344534 yadifa-2.1.6-5826/lib/dnslg/include/0000775000077100007710000000000012654663025017452 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnslg/include/PaxHeaders.8028/dnslg0000644000077100007710000000013212654663025020676 xustar000000000000000030 mtime=1454597653.929344534 30 atime=1454597653.846344534 30 ctime=1454597653.929344534 yadifa-2.1.6-5826/lib/dnslg/include/dnslg/0000775000077100007710000000000012654663025020561 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnslg/include/dnslg/PaxHeaders.8028/config-resolver.h0000644000077100007710000000012412650131756024226 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.137344 30 ctime=1454597653.911344534 yadifa-2.1.6-5826/lib/dnslg/include/dnslg/config-resolver.h0000664000077100007710000001005512650131756024034 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once #include #include //#include #ifndef CONFIG_RESOLVER_C extern const char RESOLVER_CONTAINER[]; #endif #define RO_NO_DOMAIN_OR_SEARCH 0 #define RO_DOMAIN 1 #define RO_SEARCH 2 #define CONFIG_SEARCH_OR_DOMAIN(fieldname) \ {"search", offsetof(CONFIG_TYPE, fieldname), (config_set_field_function*)config_set_search_or_domain, NULL,{._u8=RO_SEARCH}, CONFIG_TABLE_SOURCE_NONE}, \ {"domain", offsetof(CONFIG_TYPE, fieldname), (config_set_field_function*)config_set_search_or_domain, NULL,{._u8=RO_DOMAIN}, CONFIG_TABLE_SOURCE_NONE}, struct search_or_domain_s { union { host_address *search; host_address *domain; host_address *list; } address; u8 search_or_domain; }; typedef struct search_or_domain_s search_or_domain_s; /* ------------------------------------------------------------ */ struct resolv_s { search_or_domain_s search_or_domain; host_address *nameserver; u16 timeout; u8 attempts; u8 ndots; bool no_tld_query; bool debug; }; typedef struct resolv_s resolv_s; // resolver section #define CMDLINE_RESOLVER(resolver) \ CMDLINE_SECTION( RESOLVER_CONTAINER) \ CMDLINE_BOOL( "no_tld_query", 'Z', "no_tld_query" ) \ CMDLINE_BOOL( "res_debug", 'Y', "debug" ) \ CMDLINE_OPT( "attempts", 0, "attempts" ) \ CMDLINE_OPT( "ndots", 0, "ndots" ) \ CMDLINE_OPT( "timeout", 0, "timeout" ) //CMDLINE_OPT( "retry", 0, "udp_retry" ) //CMDLINE_OPT( "nameserver", 's', "nameservers" ) ya_result config_register_resolver(u8 priority); bool resolver_no_tld_query(); bool resolver_res_debug_get(); u8 resolver_ndots_get(); u8 resolver_retry_get(); u8 resolver_time_get(); u8 resolver_tries_get(); host_address* resolver_nameservers_get(); yadifa-2.1.6-5826/lib/dnslg/include/dnslg/PaxHeaders.8028/dnslg-config.h.in0000644000077100007710000000013212654662566024114 xustar000000000000000030 mtime=1454597494.158344534 30 atime=1454597494.158344534 30 ctime=1454597653.929344534 yadifa-2.1.6-5826/lib/dnslg/include/dnslg/dnslg-config.h.in0000664000077100007710000002217512654662566023731 0ustar00yadifayadifa00000000000000/* include/dnslg/dnslg-config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* number of harware core if the auto-detect fails */ #undef DEFAULT_ASSUMED_CPU_COUNT /* always on */ #undef HAS_ACL_SUPPORT /* bfd debug support disabled. */ #undef HAS_BFD_DEBUG_SUPPORT /* i386, Athlon, Opteron, Core2, i3, i5, i7, ... */ #undef HAS_CPU_AMDINTEL /* T1000 has a Niagara cpu */ #undef HAS_CPU_NIAGARA /* remote control disabled. */ #undef HAS_CTRL /* dynamic provisioning disabled. */ #undef HAS_CTRL_DYNAMIC_PROVISIONING /* always on */ #undef HAS_DNSSEC_SUPPORT /* always off */ #undef HAS_DROPALL_SUPPORT /* dynamic update support disabled. */ #undef HAS_DYNUPDATE_SUPPORT /* YADIFA will now accept ASCII7 characters in DNS names (not recommended) disabled. */ #undef HAS_FULL_ASCII7 /* where to put the log files */ #undef HAS_LOGDIR /* write the pid in each line of log disabled. */ #undef HAS_LOG_PID_ALWAYS_ON /* write the thread id in each line of log disabled. */ #undef HAS_LOG_THREAD_ID_ALWAYS_ON /* malloc debug support disabled. */ #undef HAS_MALLOC_DEBUG_SUPPORT /* DNS master disabled. */ #undef HAS_MASTER_SUPPORT /* Define this to enable slow but safe unaligned memory accesses */ #undef HAS_MEMALIGN_ISSUES /* use messages instead of send (needed if you use more than one IP aliased on the same network interface) disabled. */ #undef HAS_MESSAGES_SUPPORT /* always off */ #undef HAS_MIRROR_SUPPORT /* mutex debug support disabled. */ #undef HAS_MUTEX_DEBUG_SUPPORT /* Allows AXFR answer from master without AA bit set (Microsoft DNS) disabled. */ #undef HAS_NON_AA_AXFR_SUPPORT /* always on */ #undef HAS_NSEC3_SUPPORT /* always on */ #undef HAS_NSEC_SUPPORT /* NSID support disabled. */ #undef HAS_NSID_SUPPORT /* The system supports thread names */ #undef HAS_PTHREAD_SETNAME_NP /* The system supports spinlocks */ #undef HAS_PTHREAD_SPINLOCK /* always off */ #undef HAS_RDTSC /* always off */ #undef HAS_RRCACHE_ENABLED /* DNS Response Rate Limiter disabled. */ #undef HAS_RRL_SUPPORT /* RRSIG verification and generation for zones disabled. */ #undef HAS_RRSIG_MANAGEMENT_SUPPORT /* The sockaddr_in6 struct has an sin6_len field */ #undef HAS_SOCKADDR_IN6_SIN6_LEN /* The sockaddr_in struct has an sin_len field */ #undef HAS_SOCKADDR_IN_SIN_LEN /* The sockaddr struct has an sa_len field */ #undef HAS_SOCKADDR_SA_LEN /* always off */ #undef HAS_TCL /* always on */ #undef HAS_TSIG_SUPPORT /* where to put the log files */ #undef HAS_WITH_LOGDIR /* zalloc debug support disabled. */ #undef HAS_ZALLOC_DEBUG_SUPPORT /* zalloc statistics support disabled. */ #undef HAS_ZALLOC_STATISTICS_SUPPORT /* zalloc memory system disabled. */ #undef HAS_ZALLOC_SUPPORT /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_BYTESWAP_H /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the header file. */ #undef HAVE_I386_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_I386_TYPES_H /* Define to 1 if the system has the type `int64_t'. */ #undef HAVE_INT64_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `c' library (-lc). */ #undef HAVE_LIBC /* Define to 1 if you have the `dnscore' library (-ldnscore). */ #undef HAVE_LIBDNSCORE /* Define to 1 if you have the `dnsdb' library (-ldnsdb). */ #undef HAVE_LIBDNSDB /* Define to 1 if you have the `dnslg' library (-ldnslg). */ #undef HAVE_LIBDNSLG /* Define to 1 if you have the `dnszone' library (-ldnszone). */ #undef HAVE_LIBDNSZONE /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_LIMITS_H /* Define to 1 if the system has the type `long long'. */ #undef HAVE_LONG_LONG /* Define to 1 if you have the header file. */ #undef HAVE_MACHINE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_NETINET6_IN6_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_PPC_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BYTEORDER_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSLIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if the system has the type `uint64_t'. */ #undef HAVE_UINT64_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `u_char'. */ #undef HAVE_U_CHAR /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* BSD */ #undef IS_BSD_FAMILY /* OSX */ #undef IS_DARWIN_OS /* LINUX */ #undef IS_LINUX_FAMILY /* SOLARIS */ #undef IS_SOLARIS_FAMILY /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef mode_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ #undef vfork yadifa-2.1.6-5826/lib/dnslg/include/dnslg/PaxHeaders.8028/config-load.h0000644000077100007710000000012412650131756023304 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.136344 30 ctime=1454597653.922344534 yadifa-2.1.6-5826/lib/dnslg/include/dnslg/config-load.h0000664000077100007710000000364612650131756023122 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include ya_result config_load_rc(const char *file_path); ya_result config_load_resolv_conf(void); yadifa-2.1.6-5826/lib/dnslg/include/dnslg/PaxHeaders.8028/resolv-conf.h0000644000077100007710000000012412650131756023357 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.135344 30 ctime=1454597653.915344534 yadifa-2.1.6-5826/lib/dnslg/include/dnslg/resolv-conf.h0000664000077100007710000000525012650131756023166 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #pragma once #include #include #include #include #include "dnslg/config-resolver.h" /* ------------------------------------------------------------ */ void resolv_print(resolv_s *resolver); void resolver_init(resolv_s *resolver); ya_result config_set_search_or_domain(const char *value, struct search_or_domain_s *dest, anytype settings); ya_result resolv_conf_parse(input_stream *out_is); ya_result resolv_conf_parse_file(const char* file_name, resolv_s *resolver); ya_result resolv_conf_parse_stream(resolv_s *resolver, input_stream *is); /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnslg/include/dnslg/PaxHeaders.8028/dnslg-config-features.h0000644000077100007710000000013212654663025025312 xustar000000000000000030 mtime=1454597653.813344534 30 atime=1454597653.778344534 30 ctime=1454597653.908344534 yadifa-2.1.6-5826/lib/dnslg/include/dnslg/dnslg-config-features.h0000664000077100007710000000016212654663025025117 0ustar00yadifayadifa00000000000000#pragma once // version 2.1.6.0-0 #define DNSLG_VERSION 0x020106000000LL// include/dnslg/dnslg-config-features.h yadifa-2.1.6-5826/lib/dnslg/include/dnslg/PaxHeaders.8028/dns.h0000644000077100007710000000012412650131756021706 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.137344 30 ctime=1454597653.918344534 yadifa-2.1.6-5826/lib/dnslg/include/dnslg/dns.h0000664000077100007710000000354312650131756021520 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include u16 dns_new_id(void); yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/aclocal.m40000644000077100007710000000013212654662564020070 xustar000000000000000030 mtime=1454597492.857344534 30 atime=1454597492.857344534 30 ctime=1454597653.901344534 yadifa-2.1.6-5826/lib/dnslg/aclocal.m40000664000077100007710000012636712654662564017715 0ustar00yadifayadifa00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_AR([ACT-IF-FAIL]) # ------------------------- # Try to determine the archiver interface, and trigger the ar-lib wrapper # if it is needed. If the detection of archiver interface fails, run # ACT-IF-FAIL (default is to abort configure with a proper error message). AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], [AC_LANG_PUSH([C]) am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a ]) AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) m4_default([$1], [AC_MSG_ERROR([could not determine $AR interface])]) ;; esac AC_SUBST([AR])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file 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. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/ltmain.sh0000644000077100007710000000013012473714653020042 xustar000000000000000029 mtime=1424988587.71705841 29 atime=1424988587.71705841 30 ctime=1454597653.975344534 yadifa-2.1.6-5826/lib/dnslg/ltmain.sh0000644000077100007710000117077112473714653017666 0ustar00yadifayadifa00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.6 package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # 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 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # 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 "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # 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 3 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --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 --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message 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. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # 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= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE 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. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # 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 () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` 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 "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # 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. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # 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 func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # 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= pie_flag= 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) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append 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,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append 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. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; 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 no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock 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 yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; 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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [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: $progname [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 -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler 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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [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 -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -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 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -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 -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -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] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) 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: $progname [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." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" 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 -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # 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 else 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 else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" 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" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; 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. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append 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 -e "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. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_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 test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append 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 func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_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 func_basename "$file" destfile=$func_basename_result 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 func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "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) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # 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/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) 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*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; 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 "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # 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. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd 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 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac 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_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= 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 func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result 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 func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_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've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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. sed_quote_subst='$sed_quote_subst' # Be 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 variables: generated_by_libtool_version='$macro_version' 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 file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ 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 "\ # 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 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # 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 \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} 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 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #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 # define FOPEN_WB "wb" # 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 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ 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]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); 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 = (size_t) (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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } 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 (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" 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 func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" 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 # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir 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 func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework 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*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # 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-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext 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 ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" 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. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'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\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. 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 $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; 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 $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append 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 notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; 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 .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # 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 yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else 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 use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # 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 func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" 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. func_append dlprefiles " $lib $dependency_libs" else func_append 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 func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && 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 func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || 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 *"$absdir:"*) ;; *) func_append 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && 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 built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; 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 lib = "$linkmode" && test yes = "$hardcode_into_libs"; 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 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* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' 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 prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; 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 (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; 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 elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; 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 yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; 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 [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; 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 prog = "$linkmode"; 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 unsupported != "$hardcode_direct"; 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 yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; 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 cannot 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 yes = "$module"; 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 no = "$build_old_libs"; 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 lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # 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 "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=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 "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # 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 func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; 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 test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # 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=$1 number_minor=$2 number_revision=$3 # # 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 # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; esac ;; no) current=$1 revision=$2 age=$3 ;; 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]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" 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 func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result 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 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; 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 no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; 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 | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "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 func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; 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 "*) ;; *) func_append 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 "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-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 yes = "$build_libtool_need_lc"; then func_append 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. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi 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 "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append 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 func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; 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 ;; esac ;; 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 with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; 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 no = "$build_old_libs"; 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 no = "$allow_undefined"; 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 no = "$build_old_libs"; 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 # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append 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 yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append 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 "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append 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 relink = "$opt_mode" || 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 shift realname=$1 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 func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "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" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && 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 : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # 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 func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result 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~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "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 $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } 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\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && 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 fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( 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 relink = "$opt_mode"; then $opt_dry_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 func_show_eval '${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 func_show_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 yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_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= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${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" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append 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 "*) ;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append 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 yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } 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 func_append 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 func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result 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 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # 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 func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$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 eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$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= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; 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 "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; 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) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_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 no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false 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) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; 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 $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where 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 build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/VERSION0000644000077100007710000000012412652141712017262 xustar000000000000000027 mtime=1453900746.981001 27 atime=1454597464.141344 30 ctime=1454597653.904344534 yadifa-2.1.6-5826/lib/dnslg/VERSION0000664000077100007710000000000612652141712017063 0ustar00yadifayadifa000000000000002.1.6 yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/configure.ac0000644000077100007710000000013212654662532020511 xustar000000000000000030 mtime=1454597466.807344534 30 atime=1454597466.805344534 30 ctime=1454597653.897344534 yadifa-2.1.6-5826/lib/dnslg/configure.ac0000664000077100007710000001170512654662532020323 0ustar00yadifayadifa00000000000000dnl ############################################################################ dnl dnl Copyright (c) 2011-2016, EURid. All rights reserved. dnl The YADIFA TM software product is provided under the BSD 3-clause license: dnl dnl Redistribution and use in source and binary forms, with or without dnl modification, are permitted provided that the following conditions dnl are met: dnl dnl * Redistributions of source code must retain the above copyright dnl notice, this list of conditions and the following disclaimer. dnl * Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in dnl the documentation and/or other materials provided with the dnl distribution. dnl * Neither the name of EURid nor the names of its contributors may be dnl used to endorse or promote products derived from this software dnl without specific prior written permission. dnl dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN dnl CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE dnl POSSIBILITY OF SUCH DAMAGE. dnl dnl ############################################################################ AC_PREREQ(2.61) AC_REVISION([$Revision: 5826 $]) AC_INIT([dnslg],m4_esyscmd([svn info 2> /dev/null | grep 'Last Changed Rev: ' | sed -re 's/.*: (.*)/Revision: \1 $/' -e 's/^/$/' >> revision.txt;echo $(cat VERSION)-$(grep \$Revision: * | sed -e 's/^.*\$Revision: *//' -e 's/\$.*//' -e 's/ *//' | sort -n| /usr/bin/tail -1 | tr -d '\n') | tr -d '\n']),[bugreport@yadifa.eu]) echo echo echo "DNSLG START" echo "-----------" echo echo m4_include([../../m4/eurid.m4]) m4_include([../../m4/yadifa.m4]) AC_CONFIG_AUX_DIR([.]) AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror tar-pax]) AC_CONFIG_HEADER([include/dnslg/dnslg-config.h]) AC_CONFIG_MACRO_DIR([m4]) dnl AC_DEFUN([SYSCONF], [/$prefix/PACKAGE/PACKAGE.conf]) AC_CANONICAL_BUILD dnl Checks for programs. dnl m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AM_PROG_AR AC_PROG_CC AM_PROG_CC_C_O LT_INIT([disable-shared]) AC_DARWIN_LIBTOOL AC_PROG_LIBTOOL dnl Checks for libraries. AC_CHECK_LIB([c], [printf]) AC_CHECK_LIB([pthread], [pthread_mutex_init]) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h]) dnl Check for Darwin or Linux AC_CHECK_HEADERS([linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h]) dnl Check for Darwin or Linux AC_CHECK_HEADERS([sys/types.h i386/types.h]) dnl AC_CHECK_HEADERS([sys/socket.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_BIGENDIAN AC_TYPE_MODE_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_STRUCT_TM dnl AC_PROG_RANLIB AC_CHECK_TYPES(uint64_t) AC_CHECK_TYPES(int64_t) AC_CHECK_TYPES(long long) AC_CHECK_TYPES(u_char) AC_SYS_LARGEFILE AC_COMPILER_CHECK AC_PTHREAD_SPINLOCK_CHECK AC_PTHREAD_SETNAME_NP_CHECK AC_YADIFA_FEATURES AC_YADIFA_ENABLE_DNSCORE AC_YADIFA_ADD_LIBS AC_CHECK_LTO CPPFLAGS="$CPPFLAGS -DDNSLG_BUILD" dnl option: DEFAULT_ASSUMED_CPU_COUNT 2 dnl Checks for library functions. AC_FUNC_FORK dnl AC_FUNC_MALLOC does weird things: dnl http://sources.redhat.com/ml/automake/2003-05/msg00023.html dnl http://www.mail-archive.com/autoconf@gnu.org/msg08935.html dnl AC_FUNC_MALLOC goals: dnl malloc(0) will not return NULL dnl realloc(NULL,x) will not crash (occurs on rare systems) dnl dnl AC_FUNC_MALLOC AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_FUNC_STAT AC_CHECK_FUNCS([bzero memset select socket]) AC_CONFIG_FILES([Makefile]) dnl AC_YADIFA_SUMMARY AC_OUTPUT dnl ---------------------------------------------------------------------------- AC_MAKE_BUILDINFO echo echo "SUMMARY for DNSLG:" echo "------------------" echo echo "CC .................................. : $CC" echo "LD .................................. : $LD" echo "AR .................................. : $AR" echo "CFLAGS .............................. : $CFLAGS" echo "CPPFLAGS ............................ : $CPPFLAGS" echo "LDFLAGS ............................. : $LDFLAGS" echo "LIBS ................................ : $LIBS" if [[ ! "${OPENSSL}" = "" ]] then echo "Using OpenSLL from .................. : ${OPENSSL}" fi echo echo "Install prefix ...................... : $prefix" echo echo echo "DNSLG DONE" echo "----------" echo echo yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/config.sub0000644000077100007710000000013212473710127020174 xustar000000000000000030 mtime=1424986199.159058409 30 atime=1424986199.159058409 30 ctime=1454597653.964344534 yadifa-2.1.6-5826/lib/dnslg/config.sub0000755000077100007710000010622312473710127020007 0ustar00yadifayadifa00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-12-03' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/m40000644000077100007710000000013212654663025016464 xustar000000000000000030 mtime=1454597653.893344534 30 atime=1454597653.866344534 30 ctime=1454597653.893344534 yadifa-2.1.6-5826/lib/dnslg/m4/0000775000077100007710000000000012654663025016347 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnslg/m4/PaxHeaders.8028/ltsugar.m40000644000077100007710000000013012473714653020465 xustar000000000000000029 mtime=1424988587.49005841 29 atime=1424988587.49005841 30 ctime=1454597653.886344534 yadifa-2.1.6-5826/lib/dnslg/m4/ltsugar.m40000644000077100007710000001044012473714653020272 0ustar00yadifayadifa00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) yadifa-2.1.6-5826/lib/dnslg/m4/PaxHeaders.8028/ltversion.m40000644000077100007710000000013012473714653021031 xustar000000000000000029 mtime=1424988587.51105841 29 atime=1424988587.51105841 30 ctime=1454597653.890344534 yadifa-2.1.6-5826/lib/dnslg/m4/ltversion.m40000644000077100007710000000127312473714653020642 0ustar00yadifayadifa00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file 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. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) yadifa-2.1.6-5826/lib/dnslg/m4/PaxHeaders.8028/libtool.m40000644000077100007710000000013012473714653020450 xustar000000000000000029 mtime=1424988587.40405841 29 atime=1424988587.40305841 30 ctime=1454597653.879344534 yadifa-2.1.6-5826/lib/dnslg/m4/libtool.m40000644000077100007710000112507312473714653020267 0ustar00yadifayadifa00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS yadifa-2.1.6-5826/lib/dnslg/m4/PaxHeaders.8028/ltoptions.m40000644000077100007710000000013012473714653021037 xustar000000000000000029 mtime=1424988587.46805841 29 atime=1424988587.46805841 30 ctime=1454597653.883344534 yadifa-2.1.6-5826/lib/dnslg/m4/ltoptions.m40000644000077100007710000003426212473714653020654 0ustar00yadifayadifa00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) yadifa-2.1.6-5826/lib/dnslg/m4/PaxHeaders.8028/lt~obsolete.m40000644000077100007710000000013012473714653021356 xustar000000000000000029 mtime=1424988587.53205841 29 atime=1424988587.53205841 30 ctime=1454597653.893344534 yadifa-2.1.6-5826/lib/dnslg/m4/lt~obsolete.m40000644000077100007710000001377412473714653021200 0ustar00yadifayadifa00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/install-sh0000644000077100007710000000013212473710127020215 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597653.971344534 yadifa-2.1.6-5826/lib/dnslg/install-sh0000755000077100007710000003452312473710127020033 0ustar00yadifayadifa00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # 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. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # 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_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 is_target_a_directory=possibly 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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi 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 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac 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 if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 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 problematic for 'test' and other utilities. 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 # 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 "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` 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-writable 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 oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && 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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/NEWS0000644000077100007710000000012412610121331016676 xustar000000000000000027 mtime=1444979417.160777 27 atime=1454597464.154344 30 ctime=1454597653.946344534 yadifa-2.1.6-5826/lib/dnslg/NEWS0000664000077100007710000000001312610121331016475 0ustar00yadifayadifa00000000000000see README yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/src0000644000077100007710000000013212654663025016733 xustar000000000000000030 mtime=1454597653.992344534 30 atime=1454597653.866344534 30 ctime=1454597653.992344534 yadifa-2.1.6-5826/lib/dnslg/src/0000775000077100007710000000000012654663025016616 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnslg/src/PaxHeaders.8028/resolv-conf.c0000644000077100007710000000012412650131756021407 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.148344 30 ctime=1454597653.989344534 yadifa-2.1.6-5826/lib/dnslg/src/resolv-conf.c0000664000077100007710000005327012650131756021223 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnslg-config.h" #include #include #include #include #include #include "dnslg/resolv-conf.h" #define INPUT_FILE "/etc/resolv.conf" #define DO_PRINT 1 #define RO_NOTHING 0 #define RO_KEY_WORD 1 #define RO_NAME_SERVER_VALUE 2 #define RO_DOMAIN_VALUE 3 #define RO_SEARCH_VALUE 4 #define RO_OPTIONS_VALUE 5 #define RO_SORTLIST_VALUE 6 #define RO_TIMEOUT_VALUE 7 #define RO_ATTEMPTS_VALUE 8 #define RO_NDOTS_VALUE 9 #define RO_NS_MAX 3 // the same as in the resolv.conf man page #define RO_DOMAIN_MAX 1 // the same as in the resolv.conf man page #define RO_SEARCH_MAX 6 // the same as in the resolv.conf man page #define RO_TIMOUT_DEFAULT 5 #define RO_TIMEOUT_MAX 65535 #define RO_ATTEMPTS_DEFAULT 3 #define RO_ATTEMPTS_MAX 5 #define RO_NDOTS_DEFAULT 1 #define RO_NDOTS_MAX 15 #define RO_NO_TLD_QUERY_OFF 0 #define RO_NO_TLD_QUERY_ON 1 #define RO_NO_TLD_QUERY_DEFAULT RO_NO_TLD_QUERY_OFF #define RO_DEBUG_OFF 0 #define RO_DEBUG_ON 1 #define RO_DEBUG_DEFAULT RO_DEBUG_OFF #define RO_NO_DOMAIN_OR_SEARCH 0 #define RO_DOMAIN 1 #define RO_SEARCH 2 ya_result config_set_search_or_domain(const char *value, struct search_or_domain_s *dest, anytype settings) { ya_result return_code; yassert((settings._u8 == RO_SEARCH) || (settings._u8 == RO_DOMAIN)); if(dest->address.list != NULL) { host_address_delete(dest->address.list); dest->address.domain = NULL; } if(settings._u8 == RO_SEARCH) { // search anytype settings = {._8u8 = {CONFIG_HOST_LIST_FLAGS_FQDN,3,0,0,0,0,0,0}}; return_code = config_set_host_list(value, &dest->address.search, settings); dest->search_or_domain = RO_SEARCH; } else { // domain anytype settings = {._8u8 = {CONFIG_HOST_LIST_FLAGS_FQDN,1,0,0,0,0,0,0}}; return_code = config_set_host_list(value, &dest->address.domain, settings); dest->search_or_domain = RO_DOMAIN; } return return_code; } void resolver_init(resolv_s *resolver) { resolver->search_or_domain.address.domain = NULL; // and search ... resolver->search_or_domain.search_or_domain = RO_NO_DOMAIN_OR_SEARCH; resolver->nameserver = NULL; resolver->timeout = RO_TIMOUT_DEFAULT; resolver->attempts = RO_ATTEMPTS_DEFAULT; resolver->ndots = RO_NDOTS_DEFAULT; resolver->no_tld_query = RO_NO_TLD_QUERY_DEFAULT; resolver->debug = RO_DEBUG_DEFAULT; } void write_search(host_address *address, char *text) { for(;;) { formatln("%s : %{hostaddr} ", text, address); if(address->next == NULL) { break; } address = address->next; } flushout(); } void resolv_print(resolv_s *resolver) { if(resolver->search_or_domain.search_or_domain == RO_SEARCH) { if (resolver->search_or_domain.address.search != NULL) { write_search(resolver->search_or_domain.address.search, "RO SEARCH "); } } else if(resolver->search_or_domain.search_or_domain == RO_DOMAIN) { if (resolver->search_or_domain.address.domain != NULL) { write_search(resolver->search_or_domain.address.domain, "RO DOMAIN "); } } if (resolver->nameserver != NULL) { write_search(resolver->nameserver, "RO NAMESE "); } formatln("RO TIMEOUT : %lu", resolver->timeout); formatln("RO ATTEMPTS : %u", resolver->attempts); formatln("RO NDOTS : %u", resolver->ndots); formatln("RO NO_TLD_QUERY : %u", resolver->no_tld_query); formatln("RO DEBUG : %u", resolver->debug); formatln("RO SEARCH_OR_DOMAIN: %u", resolver->search_or_domain); flushout(); } ya_result resolv_conf_parse_stream(resolv_s *resolver, input_stream *is) { ya_result return_code; parser_s parser; const char *string_delimiters = "\"\"''"; const char *multiline_delimiters = ""; const char *comment_markers = "#"; const char *blank_makers = "\040\t\r:"; const char *escape_characters = "\\"; if(ISOK(return_code = parser_init(&parser, string_delimiters, // by 2 multiline_delimiters, // by 2 comment_markers, // by 1 blank_makers, // by 1 escape_characters))) // by 1 { parser_push_stream(&parser, is); u64 started_at = timeus(); u8 search_domain_count = 0; u8 name_server_count = 0; u8 expect_word = RO_KEY_WORD; u8 ip_buffer[MAX_DOMAIN_LENGTH]; // declare and init 'search FQDNs' host_address search_domains; search_domains.next = NULL; #if HAS_TSIG_SUPPORT search_domains.tsig = NULL; #endif search_domains.version = HOST_ADDRESS_NONE; // declare and init 'domain FQDN' host_address domain; domain.next = NULL; #if HAS_TSIG_SUPPORT domain.tsig = NULL; #endif // declare and init resolving 'name_servers' host_address name_servers; name_servers.next = NULL; #if HAS_TSIG_SUPPORT name_servers.tsig = NULL; #endif for(;;) { if(ISOK(return_code = parser_next_token(&parser))) { if(return_code & PARSER_WORD) { u32 text_len = parser_text_length(&parser); const char *text = parser_text(&parser); switch(expect_word) { case RO_KEY_WORD: // search for key { if (!strncmp(text, "nameserver", text_len) && (text_len == 10)) { expect_word = RO_NAME_SERVER_VALUE; // add name servers on the list } else if (!strncmp(text, "domain", text_len) && (text_len == 6)) { resolver->search_or_domain.search_or_domain = RO_DOMAIN; formatln("DOMAIN %u\n", resolver->search_or_domain.search_or_domain); expect_word = RO_DOMAIN_VALUE; } else if (!strncmp(text, "search", text_len) && (text_len == 6)) { // new line, so new list if (search_domains.next != NULL) { host_address_delete_list(search_domains.next); // re-init header search_domains.version = HOST_ADDRESS_NONE; search_domains.next = NULL; #if HAS_TSIG_SUPPORT search_domains.tsig = NULL; #endif } // reset counter and set on 'search' search_domain_count = 0; resolver->search_or_domain.search_or_domain = RO_SEARCH; formatln("SEARCH %u\n", resolver->search_or_domain.search_or_domain); expect_word = RO_SEARCH_VALUE; } else if (!strncmp(text, "options", text_len) && (text_len == 7)) { expect_word = RO_OPTIONS_VALUE; } else if (!strncmp(text, "sortlist", text_len) && (text_len == 8)) { expect_word = RO_SORTLIST_VALUE; } else { print("INCORRECT\n"); return_code = ERROR; // non-existing key found } break; } case RO_NAME_SERVER_VALUE: { u8 host_type = HOST_ADDRESS_NONE; u8 ip_size; // re-init only 1 name server allowed expect_word = RO_KEY_WORD; // // check if more than 1 name server on the same line // // if so report syntax error if(FAIL(return_code = parse_ip_address(text, text_len, ip_buffer, sizeof(ip_buffer)))) { return_code = INCORRECT_IPADDRESS; break; } ip_size = (u8)return_code; if (ip_size == 4) { host_type = HOST_ADDRESS_IPV4; } if (ip_size == 16) { host_type = HOST_ADDRESS_IPV6; } // check if no more than NS_MAX name_server_count++; if(name_server_count > 3) { break; } switch(host_type) { case HOST_ADDRESS_IPV4: { host_address_append_ipv4(&name_servers, ip_buffer, NU16(DNS_DEFAULT_PORT)); break; } case HOST_ADDRESS_IPV6: { host_address_append_ipv6(&name_servers, ip_buffer, NU16(DNS_DEFAULT_PORT)); break; } } break; } case RO_DOMAIN_VALUE: { // re-init expect_word = RO_KEY_WORD; // no need to check the amount this will be tested with "RO_KEY_WORD" // check for FQDN // if not a correct FQDN report syntax error, this is in the return_code if(FAIL(return_code = cstr_to_dnsname_with_check_len(ip_buffer, text, text_len))) { break; } host_address_set_dname(&domain, ip_buffer, NU16(DNS_DEFAULT_PORT)); break; } case RO_SEARCH_VALUE: { // check for FQDN // if not a correct FQDN report syntax error, this is in the return_code if(FAIL(return_code = cstr_to_dnsname_with_check_len(ip_buffer, text, text_len))) { break; } // needs a counter, only 6 search FQDNs are allowed search_domain_count++; if(search_domain_count > 6) { break; } host_address_append_dname(&search_domains, ip_buffer, NU16(DNS_DEFAULT_PORT)); break; } case RO_OPTIONS_VALUE: { if (!strncmp(text, "timeout", text_len) && (text_len == 7)) { expect_word = RO_TIMEOUT_VALUE; } else if (!strncmp(text, "attempts", text_len) && (text_len == 8)) { expect_word = RO_ATTEMPTS_VALUE; } else if (!strncmp(text, "ndots", text_len) && (text_len == 5)) { expect_word = RO_NDOTS_VALUE; } else if (!strncmp(text, "no_tld_query", text_len) && (text_len == 12)) { expect_word = RO_KEY_WORD; resolver->no_tld_query = RO_NO_TLD_QUERY_ON; } else if (!strncmp(text, "debug", text_len) && (text_len == 5)) { expect_word = RO_KEY_WORD; resolver->debug = RO_DEBUG_ON; } else { print("INCORRECT OPTIONS\n"); return_code = ERROR; // non-existing key found } break; } case RO_TIMEOUT_VALUE: { u32 val; if(ISOK(return_code = parse_u32_check_range(text, &val, 0, MAX_U16, 10))) { resolver->timeout = (u16)val; } break; } case RO_ATTEMPTS_VALUE: { u32 val; if(ISOK(return_code = parse_u32_check_range(text, &val, 0, MAX_U8, 10))) { resolver->attempts = (u8)val; } break; } case RO_NDOTS_VALUE: { u32 val; if(ISOK(return_code = parse_u32_check_range(text, &val, 0, MAX_U8, 10))) { resolver->ndots = (u8)val; } break; } case RO_SORTLIST_VALUE: // @todo still needs todo this when I got time { #if DO_PRINT format("\n*** SORTLIST VALUE: "); output_stream_write(termout, (u8*)text, text_len); flushout(); #endif break; } default: // is not defined, so did will never be reached { #if DO_PRINT print("WRONG\n"); #endif return_code = ERROR; // non-existing key found break; } } } // PARSER_WORD else if(return_code & PARSER_EOL) { /// @todo missing 'values' for the keys found still needs to be implemented for all keys -- gery if(expect_word == RO_NAME_SERVER_VALUE) { return_code = ERROR; break; } expect_word = RO_KEY_WORD; } // PARSER_EOL else if(return_code & PARSER_EOF) { input_stream *completed_stream = parser_pop_stream(&parser); input_stream_close(completed_stream); if(parser_stream_count(&parser) <= 0) { break; } } // PARSER_EOF } else { break; } if(FAIL(return_code)) { break; } } u64 stopped_at = timeus(); u64 delta = stopped_at - started_at; formatln("\nparsing lasted %lluus : %r", delta, return_code); if(resolver->search_or_domain.search_or_domain == RO_SEARCH) { resolver->search_or_domain.address.search = search_domains.next; } else if(resolver->search_or_domain.search_or_domain == RO_DOMAIN) { resolver->search_or_domain.address.domain = host_address_copy(&domain); } else { resolver->search_or_domain.address.list = NULL; } resolver->nameserver = name_servers.next; } return return_code; } ya_result resolv_conf_parse_file(const char* file_name, resolv_s *resolver) { input_stream is; ya_result return_code; if(ISOK(return_code = file_input_stream_open(file_name, &is))) { if(ISOK(return_code = resolv_conf_parse_stream(resolver, &is))) { #if DO_PRINT resolv_print(resolver); } else { formatln("oops: %r", return_code); flushout(); #endif } } return return_code; } ya_result resolv_conf_parse(input_stream *out_is) { resolv_s resolver; resolver_init(&resolver); resolv_conf_parse_file(INPUT_FILE, &resolver); // put the struct back in a stream output_stream os; bytearray_output_stream_init(&os, NULL, 0); osformatln(&os, ""); if(resolver.search_or_domain.search_or_domain == RO_DOMAIN) { // domain osformatln(&os, "domain %{hostaddrlist}", resolver.search_or_domain.address.domain); } else if(resolver.search_or_domain.search_or_domain == RO_SEARCH) { // search` osformatln(&os, "search %{hostaddrlist}", resolver.search_or_domain.address.search); } if(resolver.nameserver != NULL) { osformatln(&os, "nameserver %{hostaddrlist}", resolver.nameserver); // TODO } osformatln(&os, "timeout %hu", resolver.timeout); osformatln(&os, "attempts %hhu", resolver.attempts); osformatln(&os, "ndots %hhu", resolver.ndots); osformatln(&os, "no_tld_query %hhu", resolver.no_tld_query); osformatln(&os, "debug %hhu", resolver.debug); osformatln(&os, ""); u32 buffer_size = bytearray_output_stream_size(&os); u8 *buffer = bytearray_output_stream_detach(&os); output_stream_close(&os); bytearray_input_stream_init(buffer, buffer_size, out_is, TRUE); return buffer_size; } /** @} */ yadifa-2.1.6-5826/lib/dnslg/src/PaxHeaders.8028/config-load.c0000644000077100007710000000012412650131756021334 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.146344 30 ctime=1454597653.992344534 yadifa-2.1.6-5826/lib/dnslg/src/config-load.c0000664000077100007710000000743712650131756021154 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnslg-config.h" #include #include #include #include #include #include ya_result config_load_rc(const char *file_path) { input_stream config_is; config_error_s cfgerr; ya_result return_code; /* ------------------------------------------------------------ */ // check if file exist then parse it struct stat s; if((return_code = stat(file_path, &s)) >= 0) { config_set_source(CONFIG_SOURCE_FILE); if(FAIL(return_code = config_read(file_path, &cfgerr))) { formatln("%s: parsing error: %s:%u : '%s': %r", "resolver", cfgerr.file, cfgerr.line_number, cfgerr.line, return_code); flushout(); input_stream_close(&config_is); return return_code; } } return OK; } ya_result config_load_resolv_conf(void) { input_stream config_is; config_error_s cfgerr; ya_result return_code; /* ------------------------------------------------------------ */ config_set_source(CONFIG_SOURCE_FILE - 1); resolv_conf_parse(&config_is); if(FAIL(return_code = config_read_from_buffer((const char*)bytearray_input_stream_buffer(&config_is), bytearray_input_stream_size(&config_is), "/etc/resolv.conf", &cfgerr))) { formatln("%s: parsing error: %s:%u : '%s': %r", "resolver", cfgerr.file, cfgerr.line_number, cfgerr.line, return_code); flushout(); input_stream_close(&config_is); return return_code; } input_stream_close(&config_is); return OK; } yadifa-2.1.6-5826/lib/dnslg/src/PaxHeaders.8028/config-resolver.c0000644000077100007710000000012412650131756022256 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.146344 30 ctime=1454597653.982344534 yadifa-2.1.6-5826/lib/dnslg/src/config-resolver.c0000664000077100007710000001024612650131756022066 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #define CONFIG_RESOLVER_C #include "dnslg-config.h" #include #include "dnslg/resolv-conf.h" const char RESOLVER_CONTAINER[] = "resolver"; // resolver defines #define DEF_VAL_CONF_OPTION_NAMESERVERS "172.19.110.8 port 53" #define DEF_VAL_CONF_OPTION_ATTEMPTS "3" #define DEF_VAL_CONF_OPTION_TIMEOUT "1" #define DEF_VAL_CONF_OPTION_UDP_TRIES "1" #define DEF_VAL_CONF_OPTION_NDOTS "1" #define DEF_VAL_CONF_OPTION_RES_DEBUG "0" #define DEF_VAL_CONF_OPTION_NO_TLD_QUERY "0" /// resolver container #define CONFIG_TYPE resolv_s CONFIG_BEGIN(config_resolver_desc) CONFIG_HOST_LIST_EX( nameserver, DEF_VAL_CONF_OPTION_NAMESERVERS, CONFIG_HOST_LIST_FLAGS_DEFAULT /*| CONFIG_HOST_LIST_FLAGS_APPEND*/, 3 ) CONFIG_U16( timeout, DEF_VAL_CONF_OPTION_TIMEOUT ) CONFIG_U8( attempts, DEF_VAL_CONF_OPTION_ATTEMPTS ) CONFIG_U8( ndots, DEF_VAL_CONF_OPTION_NDOTS ) CONFIG_BOOL( no_tld_query, DEF_VAL_CONF_OPTION_NO_TLD_QUERY ) CONFIG_BOOL( debug, DEF_VAL_CONF_OPTION_RES_DEBUG ) // tricky struct, so go raw on it CONFIG_SEARCH_OR_DOMAIN(search_or_domain) CONFIG_END(config_resolver_desc) #undef CONFIG_TYPE // declare global variable resolv_s config_resolver_settings; ya_result config_register_resolver(u8 priority) { ya_result return_code; // init and register resolver settings container ZEROMEMORY(&config_resolver_settings, sizeof(config_resolver_settings)); // ptr_vector_init(&config_resolver_settings.servers); if(FAIL(return_code = config_register_struct(RESOLVER_CONTAINER, config_resolver_desc, &config_resolver_settings, priority))) { return return_code; } return 0; } u8 resolver_time_get() { // return config_resolver_settings.udp_time; return 0; } u8 resolver_tries_get() { return config_resolver_settings.attempts; } u8 resolver_retry_get() { // return config_resolver_settings.udp_retry; return 0; } u8 resolver_ndots_get() { return config_resolver_settings.ndots; } bool resolver_res_debug_get() { return config_resolver_settings.debug; } bool resolver_no_tld_query() { return config_resolver_settings.no_tld_query; } host_address * resolver_nameservers_get() { return config_resolver_settings.nameserver; } yadifa-2.1.6-5826/lib/dnslg/src/PaxHeaders.8028/dns.c0000644000077100007710000000012412650131756017736 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.147344 30 ctime=1454597653.985344534 yadifa-2.1.6-5826/lib/dnslg/src/dns.c0000664000077100007710000000414212650131756017544 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnslg-config.h" #include #include static random_ctx id_random_ctx = NULL; u16 dns_new_id(void) { if(id_random_ctx == NULL) { id_random_ctx = random_init_auto(); } u16 id = (u16)random_next(id_random_ctx); return id; } yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/config.guess0000644000077100007710000000013212473710127020531 xustar000000000000000030 mtime=1424986199.147058409 30 atime=1424986199.146058409 30 ctime=1454597653.960344534 yadifa-2.1.6-5826/lib/dnslg/config.guess0000755000077100007710000012367212473710127020353 0ustar00yadifayadifa00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-11-04' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/lib/dnslg/PaxHeaders.8028/depcomp0000644000077100007710000000013212473710127017566 xustar000000000000000030 mtime=1424986199.161058409 30 atime=1424986199.161058409 30 ctime=1454597653.967344534 yadifa-2.1.6-5826/lib/dnslg/depcomp0000755000077100007710000005601612473710127017405 0ustar00yadifayadifa00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # 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, 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, see . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/PaxHeaders.8028/dnscore0000644000077100007710000000013212654663023016470 xustar000000000000000030 mtime=1454597651.289344534 30 atime=1454597650.541344534 30 ctime=1454597651.289344534 yadifa-2.1.6-5826/lib/dnscore/0000775000077100007710000000000012654663023016353 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/Makefile.am0000644000077100007710000000012412650131756020601 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.798344 30 ctime=1454597650.784344534 yadifa-2.1.6-5826/lib/dnscore/Makefile.am0000664000077100007710000002416112650131756020412 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ############################################################################## # # YADIFA dnscore Makefile.am script # ############################################################################## srcdir = @srcdir@ libdir = @libdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ ACLOCAL_AMFLAGS = -I m4 dist_noinst_DATA = VERSION I=include/dnscore FEATURESFILE=dnscore-config-features.h FEATURES=$(I)/$(FEATURESFILE) lib_LTLIBRARIES= libdnscore.la libdnscore_la_SOURCES = \ src/alarm.c \ src/allocator.c \ src/async.c \ src/base16.c \ src/base32.c \ src/base32hex.c \ src/base64.c \ src/basic-priority-queue.c \ src/buffer_input_stream.c \ src/buffer_output_stream.c \ src/bytearray_input_stream.c \ src/bytearray_output_stream.c \ src/bytezarray_output_stream.c \ src/chroot.c \ src/clone_input_output_stream.c \ src/cmdline.c \ src/concat_input_stream.c \ src/config-cmdline.c \ src/config_file_reader.c \ src/config_key.c \ src/config_logger.c \ src/config_settings.c \ src/config_struct.c \ src/counter_output_stream.c \ src/debug.c \ src/digest_sha0.c \ src/digest_sha1.c \ src/digest_sha256.c \ src/digest_sha384.c \ src/digest_sha512.c \ src/dns-udp.c \ src/dns_resource_record.c \ src/dnscore.c \ src/dnsformat.c \ src/dnskey.c \ src/dnskey-keyring.c \ src/dnskey_dsa.c \ src/dnskey_rsa.c \ src/dnsname.c \ src/empty-input-stream.c \ src/fdtools.c \ src/file_input_stream.c \ src/file_output_stream.c \ src/format.c \ src/host_address.c \ src/hsdllist.c \ src/identity.c \ src/input_stream.c \ src/limited_input_stream.c \ src/list-dl.c \ src/list-sl.c \ src/logger.c \ src/logger_channel_file.c \ src/logger_channel_stream.c \ src/logger_channel_syslog.c \ src/logger_handle.c \ src/logger-output-stream.c \ src/message.c \ src/message_dnsupdate.c \ src/message_print_format_dig.c \ src/message_verify_rrsig.c \ src/mt_output_stream.c \ src/mutex.c \ src/output_stream.c \ src/pace.c \ src/packet_reader.c \ src/packet_writer.c \ src/parser.c \ src/parsing.c \ src/pid.c \ src/pipe_stream.c \ src/pool.c \ src/ptr_set.c \ src/ptr_vector.c \ src/random.c \ src/rc.c \ src/rfc.c \ src/serial.c \ src/service.c \ src/server-setup.c \ src/string_set.c \ src/sys_error.c \ src/sys_get_cpu_count.c \ src/tcp_io_stream.c \ src/thread_pool.c \ src/threaded_nb_mm.c \ src/threaded_nbrb.c \ src/threaded_ringbuffer.c \ src/threaded_ringbuffer_cw.c \ src/threaded_ringlist.c \ src/threaded_dll_cw.c \ src/timeformat.c \ src/timems.c \ src/typebitmap.c \ src/u32_set.c \ src/u64_set.c \ src/zalloc.c \ src/xfr_input_stream.c pkginclude_HEADERS = \ $(FEATURES) \ $(I)/alarm.h \ $(I)/allocator.h \ $(I)/async.h \ $(I)/avl.c.inc \ $(I)/avl.h.inc \ $(I)/base16.h \ $(I)/base32.h \ $(I)/base32hex.h \ $(I)/base64.h \ $(I)/basic-priority-queue.h \ $(I)/buffer_input_stream.h \ $(I)/buffer_output_stream.h \ $(I)/bytearray_input_stream.h \ $(I)/bytearray_output_stream.h \ $(I)/bytezarray_output_stream.h \ $(I)/chroot.h \ $(I)/clone_input_output_stream.h \ $(I)/cmdline.h \ $(I)/concat_input_stream.h \ $(I)/config-cmdline.h \ $(I)/config_file_reader.h \ $(I)/config_settings.h \ $(I)/counter_output_stream.h \ $(I)/ctrl-rfc.h \ $(I)/debug.h \ $(I)/debug_config.h \ $(I)/digest.h \ $(I)/dns-udp.h \ $(I)/dns_resource_record.h \ $(I)/dnscore-config.h \ $(I)/dnscore.h \ $(I)/dnsformat.h \ $(I)/dnskey.h \ $(I)/dnskey_dsa.h \ $(I)/dnskey_rsa.h \ $(I)/dnskey-keyring.h \ $(I)/dnsname.h \ $(I)/dnsname_set.h \ $(I)/dnssec_errors.h \ $(I)/empty-input-stream.h \ $(I)/fdtools.h \ $(I)/file_input_stream.h \ $(I)/file_output_stream.h \ $(I)/fingerprint.h \ $(I)/format.h \ $(I)/host_address.h \ $(I)/hsdllist.h \ $(I)/identity.h \ $(I)/input_stream.h \ $(I)/io_stream.h \ $(I)/limited_input_stream.h \ $(I)/list-dl.h \ $(I)/list-sl.h \ $(I)/logger.h \ $(I)/logger_channel_file.h \ $(I)/logger_channel_stream.h \ $(I)/logger_channel_syslog.h \ $(I)/logger_handle.h \ $(I)/logger-output-stream.h \ $(I)/message.h \ $(I)/message_dnsupdate.h \ $(I)/message_verify_rrsig.h \ $(I)/mt_output_stream.h \ $(I)/mutex.h \ $(I)/network.h \ $(I)/output_stream.h \ $(I)/pace.h \ $(I)/packet_reader.h \ $(I)/packet_writer.h \ $(I)/parser.h \ $(I)/parsing.h \ $(I)/pid.h \ $(I)/pipe_stream.h \ $(I)/pool.h \ $(I)/print_stream.h \ $(I)/ptr_set.h \ $(I)/ptr_vector.h \ $(I)/random.h \ $(I)/rc.h \ $(I)/rfc.h \ $(I)/serial.h \ $(I)/server-setup.h \ $(I)/service.h \ $(I)/string_set.h \ $(I)/sys_error.h \ $(I)/sys_get_cpu_count.h \ $(I)/sys_types.h \ $(I)/tcp_io_stream.h \ $(I)/thread_pool.h \ $(I)/threaded_nb_mm.h \ $(I)/threaded_nbrb.h \ $(I)/threaded_queue.h \ $(I)/threaded_ringbuffer.h \ $(I)/threaded_ringbuffer_cw.h \ $(I)/threaded_ringlist.h \ $(I)/threaded_dll_cw.h \ $(I)/timeformat.h \ $(I)/timems.h \ $(I)/typebitmap.h \ $(I)/u32_set.h \ $(I)/u64_set.h \ $(I)/zalloc.h \ $(I)/xfr_input_stream.h \ $(I)/zonefile_reader.h if IS_DARWIN_OS pkginclude_HEADERS += $(I)/osx_clock_gettime.h libdnscore_la_SOURCES += src/osx_clock_gettime.c endif if HAS_TSIG_SUPPORT pkginclude_HEADERS += $(I)/tsig.h libdnscore_la_SOURCES += src/tsig.c src/tsig_algorithms.c endif if HAS_NSID_SUPPORT pkginclude_HEADERS += $(I)/nsid.h libdnscore_la_SOURCES += src/nsid.c endif libdnscore_la_LDFLAGS = -version-info 3:0:0 include ../../mk/common-settings.mk include ../../mk/common-labels.mk all: REVISION REVISION: (svn info 2>/dev/null;if [ $$? -ne 0 ];then echo "Revision: 0";fi)|grep Revision:|sed 's/^Revision: *//' > REVISION src/alarm.c: $(FEATURES) $(FEATURES): config.log REVISION VERSION echo "#pragma once" > $(FEATURES) if HAS_TSIG_SUPPORT echo "#define DNSCORE_HAS_TSIG_SUPPORT 1" >> $(FEATURES) else echo "#define DNSCORE_HAS_TSIG_SUPPORT 0" >> $(FEATURES) endif if HAS_RDTSC echo "#define DNSCORE_HAS_RDTSC 1" >> $(FEATURES) else echo "#define DNSCORE_HAS_RDTSC 0" >> $(FEATURES) endif if HAS_ACL_SUPPORT echo "#define DNSCORE_HAS_ACL_SUPPORT 1" >> $(FEATURES) else echo "#define DNSCORE_HAS_ACL_SUPPORT 0" >> $(FEATURES) endif if HAS_NSEC3_SUPPORT echo "#define DNSCORE_HAS_NSEC3_SUPPORT 1" >> $(FEATURES) else echo "#define DNSCORE_HAS_NSEC3_SUPPORT 0" >> $(FEATURES) endif if HAS_NSEC_SUPPORT echo "#define DNSCORE_HAS_NSEC_SUPPORT 1" >> $(FEATURES) else echo "#define DNSCORE_HAS_NSEC_SUPPORT 0" >> $(FEATURES) endif if HAS_ZALLOC_SUPPORT echo "#define DNSCORE_HAS_ZALLOC_SUPPORT 1" >> $(FEATURES) else echo "#define DNSCORE_HAS_ZALLOC_SUPPORT 0" >> $(FEATURES) endif if HAS_ZALLOC_DEBUG_SUPPORT echo "#define DNSCORE_HAS_ZALLOC_DEBUG_SUPPORT 1" >> $(FEATURES) else echo "#define DNSCORE_HAS_ZALLOC_DEBUG_SUPPORT 0" >> $(FEATURES) endif if HAS_ZALLOC_STATISTICS_SUPPORT echo "#define DNSCORE_HAS_ZALLOC_STATISTICS_SUPPORT 1" >> $(FEATURES) else echo "#define DNSCORE_HAS_ZALLOC_STATISTICS_SUPPORT 0" >> $(FEATURES) endif if HAS_MALLOC_DEBUG_SUPPORT echo "#define DNSCORE_HAS_MALLOC_DEBUG_SUPPORT 1" >> $(FEATURES) else echo "#define DNSCORE_HAS_MALLOC_DEBUG_SUPPORT 0" >> $(FEATURES) endif if HAS_MUTEX_DEBUG_SUPPORT echo "#define DNSCORE_HAS_MUTEX_DEBUG_SUPPORT 1" >> $(FEATURES) else echo "#define DNSCORE_HAS_MUTEX_DEBUG_SUPPORT 0" >> $(FEATURES) endif VP=DNSCORE which printf > /dev/null 2>&1 if [ $$? -eq 0 ];then \ printf '// version %i.%i.%i.%i-%i\n' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ printf '#define $(VP)_VERSION 0x%02x%02x%02x%02x%04xLL' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ else \ echo "#define $(VP)_VERSION_(vmain_,vsub_,vminor_,vpatch_,vrevision_) ((vmain_)<<40)|((vsub_)<<32)|((vminor_)<<24)|((vpatch_)<<16)|(vrevision_)" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMAIN_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VSUB_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMINOR_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VPATCH_ 0 >> $(FEATURES)" ; \ echo "#define $(VP)_VERSION_VREVISION_ $$(cat REVISION)" >> $(FEATURES) ; \ echo '#define $(VP)_VERSION $(VP)_VERSION_($(VP)_VERSION_VMAIN_,$(VP)_VERSION_VSUB_,$(VP)_VERSION_VMINOR_,$(VP)_VERSION_VPATCH_,$(VP)_VERSION_VREVISION_)' >> $(FEATURES) ; \ fi echo "// $(FEATURES)" >> $(FEATURES) echo >> $(FEATURES) yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/ar-lib0000644000077100007710000000013212473710127017633 xustar000000000000000030 mtime=1424986199.162058409 30 atime=1424986199.162058409 30 ctime=1454597651.262344534 yadifa-2.1.6-5826/lib/dnscore/ar-lib0000755000077100007710000001330212473710127017441 0ustar00yadifayadifa00000000000000#! /bin/sh # Wrapper for Microsoft lib.exe me=ar-lib scriptversion=2012-03-01.08; # UTC # Copyright (C) 2010-2014 Free Software Foundation, Inc. # Written by Peter Rosin . # # 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, 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . # func_error message func_error () { echo "$me: $1" 1>&2 exit 1 } file_conv= # func_file_conv build_file # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv in mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin) file=`cygpath -m "$file" || echo "$file"` ;; wine) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_at_file at_file operation archive # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE # for each of them. # When interpreting the content of the @FILE, do NOT use func_file_conv, # since the user would need to supply preconverted file names to # binutils ar, at least for MinGW. func_at_file () { operation=$2 archive=$3 at_file_contents=`cat "$1"` eval set x "$at_file_contents" shift for member do $AR -NOLOGO $operation:"$member" "$archive" || exit $? done } case $1 in '') func_error "no command. Try '$0 --help' for more information." ;; -h | --h*) cat < Eric Diaz Fernandez yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/Makefile.in0000644000077100007710000000013212654662602020614 xustar000000000000000030 mtime=1454597506.389344534 30 atime=1454597506.389344534 30 ctime=1454597651.233344534 yadifa-2.1.6-5826/lib/dnscore/Makefile.in0000664000077100007710000021715212654662602020432 0ustar00yadifayadifa00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ############################################################################## # # YADIFA dnscore Makefile.am script # ############################################################################## ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # ALL # ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@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@ @IS_DARWIN_OS_TRUE@am__append_1 = $(I)/osx_clock_gettime.h @IS_DARWIN_OS_TRUE@am__append_2 = src/osx_clock_gettime.c @HAS_TSIG_SUPPORT_TRUE@am__append_3 = $(I)/tsig.h @HAS_TSIG_SUPPORT_TRUE@am__append_4 = src/tsig.c src/tsig_algorithms.c @HAS_NSID_SUPPORT_TRUE@am__append_5 = $(I)/nsid.h @HAS_NSID_SUPPORT_TRUE@am__append_6 = src/nsid.c @USES_SUNC_TRUE@am__append_7 = @USES_SUNC_FALSE@am__append_8 = -O0 @HAS_CC_NO_IDENT_TRUE@am__append_9 = -fno-ident @HAS_CC_ANSI_TRUE@am__append_10 = -ansi @HAS_CC_PEDANTIC_TRUE@am__append_11 = -pedantic @HAS_CC_WALL_TRUE@am__append_12 = -Wall -Wno-unknown-pragmas @HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE@am__append_13 = -Werror=missing-field-initializers @HAS_CC_STD_GNU99_TRUE@am__append_14 = -std=gnu99 @HAS_CC_STD_C99_TRUE@@HAS_CC_STD_GNU99_FALSE@am__append_15 = -std=c99 @HAS_CC_STD_GNU99_FALSE@@HAS_CC_XC99_TRUE@am__append_16 = -xc99 @HAS_CC_TUNE_NATIVE_TRUE@am__append_17 = -mtune=native @FORCE64BITS_TRUE@@HAS_CC_M64_TRUE@am__append_18 = -m64 @FORCE64BITS_TRUE@@HAS_CC_M64_TRUE@am__append_19 = -m64 @FORCE32BITS_TRUE@@FORCE64BITS_FALSE@@HAS_CC_M32_TRUE@am__append_20 = -m32 @FORCE32BITS_TRUE@@FORCE64BITS_FALSE@@HAS_CC_M32_TRUE@am__append_21 = -m32 # # DEBUG # @HAS_CC_G3_TRUE@am__append_22 = -g3 @HAS_CC_G3_FALSE@@HAS_CC_G_TRUE@am__append_23 = -g @HAS_CC_DWARF4_TRUE@am__append_24 = -gdwarf-4 @HAS_CC_DWARF3_TRUE@@HAS_CC_DWARF4_FALSE@am__append_25 = -gdwarf-3 # # Intel C Compiler # ############################################################################### #ICC #IPO= -ipo (need to use the intel xiar instead of ar) @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@am__append_26 = -DLTO -ipo @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@am__append_27 = -ipo @USES_ICC_TRUE@am__append_28 = -DUSES_ICC @HAS_CC_ANSI_ALIAS_TRUE@@USES_ICC_TRUE@am__append_29 = -ansi-alias -U__STRICT_ANSI__ @USES_ICC_TRUE@am__append_30 = -DMODE_DEBUG_ICC # # LLVM Clang # ############################################################################### # CLANG @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@am__append_31 = -DLTO -flto @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@am__append_32 = -flto @USES_CLANG_TRUE@am__append_33 = -DUSES_LLVM @USES_CLANG_TRUE@am__append_34 = -DMODE_DEBUG_CLANG # Note: add a _d suffix for debug builds ? # # Gnu C # ############################################################################### #GCC @HAS_CPU_NIAGARA_TRUE@@USES_GCC_TRUE@am__append_35 = -mcpu=niagara @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@am__append_36 = -DLTO -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@am__append_37 = -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin @USES_GCC_TRUE@am__append_38 = -DUSES_GCC @USES_GCC_TRUE@am__append_39 = -DMODE_DEBUG_GCC @USES_SUNC_TRUE@am__append_40 = -DUSES_SUNC @USES_SUNC_TRUE@am__append_41 = -DMODE_DEBUG_SUNC # Note: add a _d suffix for debug builds ? # # Unknown compiler # ############################################################################### # if an unknown compiler is used, it should have its own section @USES_UNKNOWN_TRUE@am__append_42 = -DUSES_UNKNOWN_COMPILER @USES_UNKNOWN_TRUE@am__append_43 = -DMODE_DEBUG_UNKNOWN # # Some BSD-based OSes need this # @IS_BSD_FAMILY_TRUE@am__append_44 = -I./include @IS_SOLARIS_FAMILY_TRUE@am__append_45 = -D_POSIX_PTHREAD_SEMANTICS @HAS_CC_RDYNAMIC_TRUE@am__append_46 = -rdynamic @HAS_CC_RDYNAMIC_TRUE@am__append_47 = -rdynamic # workaround a bug where clang does not handle properly profiling and optimizations @USES_CLANG_TRUE@am__append_48 = -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/../../m4/eurid.m4 \ $(top_srcdir)/../../m4/yadifa.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(dist_noinst_DATA) \ $(am__pkginclude_HEADERS_DIST) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/dnscore/dnscore-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libdnscore_la_LIBADD = am__libdnscore_la_SOURCES_DIST = src/alarm.c src/allocator.c \ src/async.c src/base16.c src/base32.c src/base32hex.c \ src/base64.c src/basic-priority-queue.c \ src/buffer_input_stream.c src/buffer_output_stream.c \ src/bytearray_input_stream.c src/bytearray_output_stream.c \ src/bytezarray_output_stream.c src/chroot.c \ src/clone_input_output_stream.c src/cmdline.c \ src/concat_input_stream.c src/config-cmdline.c \ src/config_file_reader.c src/config_key.c src/config_logger.c \ src/config_settings.c src/config_struct.c \ src/counter_output_stream.c src/debug.c src/digest_sha0.c \ src/digest_sha1.c src/digest_sha256.c src/digest_sha384.c \ src/digest_sha512.c src/dns-udp.c src/dns_resource_record.c \ src/dnscore.c src/dnsformat.c src/dnskey.c \ src/dnskey-keyring.c src/dnskey_dsa.c src/dnskey_rsa.c \ src/dnsname.c src/empty-input-stream.c src/fdtools.c \ src/file_input_stream.c src/file_output_stream.c src/format.c \ src/host_address.c src/hsdllist.c src/identity.c \ src/input_stream.c src/limited_input_stream.c src/list-dl.c \ src/list-sl.c src/logger.c src/logger_channel_file.c \ src/logger_channel_stream.c src/logger_channel_syslog.c \ src/logger_handle.c src/logger-output-stream.c src/message.c \ src/message_dnsupdate.c src/message_print_format_dig.c \ src/message_verify_rrsig.c src/mt_output_stream.c src/mutex.c \ src/output_stream.c src/pace.c src/packet_reader.c \ src/packet_writer.c src/parser.c src/parsing.c src/pid.c \ src/pipe_stream.c src/pool.c src/ptr_set.c src/ptr_vector.c \ src/random.c src/rc.c src/rfc.c src/serial.c src/service.c \ src/server-setup.c src/string_set.c src/sys_error.c \ src/sys_get_cpu_count.c src/tcp_io_stream.c src/thread_pool.c \ src/threaded_nb_mm.c src/threaded_nbrb.c \ src/threaded_ringbuffer.c src/threaded_ringbuffer_cw.c \ src/threaded_ringlist.c src/threaded_dll_cw.c src/timeformat.c \ src/timems.c src/typebitmap.c src/u32_set.c src/u64_set.c \ src/zalloc.c src/xfr_input_stream.c src/osx_clock_gettime.c \ src/tsig.c src/tsig_algorithms.c src/nsid.c am__dirstamp = $(am__leading_dot)dirstamp @IS_DARWIN_OS_TRUE@am__objects_1 = src/osx_clock_gettime.lo @HAS_TSIG_SUPPORT_TRUE@am__objects_2 = src/tsig.lo \ @HAS_TSIG_SUPPORT_TRUE@ src/tsig_algorithms.lo @HAS_NSID_SUPPORT_TRUE@am__objects_3 = src/nsid.lo am_libdnscore_la_OBJECTS = src/alarm.lo src/allocator.lo src/async.lo \ src/base16.lo src/base32.lo src/base32hex.lo src/base64.lo \ src/basic-priority-queue.lo src/buffer_input_stream.lo \ src/buffer_output_stream.lo src/bytearray_input_stream.lo \ src/bytearray_output_stream.lo src/bytezarray_output_stream.lo \ src/chroot.lo src/clone_input_output_stream.lo src/cmdline.lo \ src/concat_input_stream.lo src/config-cmdline.lo \ src/config_file_reader.lo src/config_key.lo \ src/config_logger.lo src/config_settings.lo \ src/config_struct.lo src/counter_output_stream.lo src/debug.lo \ src/digest_sha0.lo src/digest_sha1.lo src/digest_sha256.lo \ src/digest_sha384.lo src/digest_sha512.lo src/dns-udp.lo \ src/dns_resource_record.lo src/dnscore.lo src/dnsformat.lo \ src/dnskey.lo src/dnskey-keyring.lo src/dnskey_dsa.lo \ src/dnskey_rsa.lo src/dnsname.lo src/empty-input-stream.lo \ src/fdtools.lo src/file_input_stream.lo \ src/file_output_stream.lo src/format.lo src/host_address.lo \ src/hsdllist.lo src/identity.lo src/input_stream.lo \ src/limited_input_stream.lo src/list-dl.lo src/list-sl.lo \ src/logger.lo src/logger_channel_file.lo \ src/logger_channel_stream.lo src/logger_channel_syslog.lo \ src/logger_handle.lo src/logger-output-stream.lo \ src/message.lo src/message_dnsupdate.lo \ src/message_print_format_dig.lo src/message_verify_rrsig.lo \ src/mt_output_stream.lo src/mutex.lo src/output_stream.lo \ src/pace.lo src/packet_reader.lo src/packet_writer.lo \ src/parser.lo src/parsing.lo src/pid.lo src/pipe_stream.lo \ src/pool.lo src/ptr_set.lo src/ptr_vector.lo src/random.lo \ src/rc.lo src/rfc.lo src/serial.lo src/service.lo \ src/server-setup.lo src/string_set.lo src/sys_error.lo \ src/sys_get_cpu_count.lo src/tcp_io_stream.lo \ src/thread_pool.lo src/threaded_nb_mm.lo src/threaded_nbrb.lo \ src/threaded_ringbuffer.lo src/threaded_ringbuffer_cw.lo \ src/threaded_ringlist.lo src/threaded_dll_cw.lo \ src/timeformat.lo src/timems.lo src/typebitmap.lo \ src/u32_set.lo src/u64_set.lo src/zalloc.lo \ src/xfr_input_stream.lo $(am__objects_1) $(am__objects_2) \ $(am__objects_3) libdnscore_la_OBJECTS = $(am_libdnscore_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdnscore_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libdnscore_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/dnscore depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdnscore_la_SOURCES) DIST_SOURCES = $(am__libdnscore_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dist_noinst_DATA) am__pkginclude_HEADERS_DIST = $(I)/$(FEATURESFILE) $(I)/alarm.h \ $(I)/allocator.h $(I)/async.h $(I)/avl.c.inc $(I)/avl.h.inc \ $(I)/base16.h $(I)/base32.h $(I)/base32hex.h $(I)/base64.h \ $(I)/basic-priority-queue.h $(I)/buffer_input_stream.h \ $(I)/buffer_output_stream.h $(I)/bytearray_input_stream.h \ $(I)/bytearray_output_stream.h $(I)/bytezarray_output_stream.h \ $(I)/chroot.h $(I)/clone_input_output_stream.h $(I)/cmdline.h \ $(I)/concat_input_stream.h $(I)/config-cmdline.h \ $(I)/config_file_reader.h $(I)/config_settings.h \ $(I)/counter_output_stream.h $(I)/ctrl-rfc.h $(I)/debug.h \ $(I)/debug_config.h $(I)/digest.h $(I)/dns-udp.h \ $(I)/dns_resource_record.h $(I)/dnscore-config.h \ $(I)/dnscore.h $(I)/dnsformat.h $(I)/dnskey.h \ $(I)/dnskey_dsa.h $(I)/dnskey_rsa.h $(I)/dnskey-keyring.h \ $(I)/dnsname.h $(I)/dnsname_set.h $(I)/dnssec_errors.h \ $(I)/empty-input-stream.h $(I)/fdtools.h \ $(I)/file_input_stream.h $(I)/file_output_stream.h \ $(I)/fingerprint.h $(I)/format.h $(I)/host_address.h \ $(I)/hsdllist.h $(I)/identity.h $(I)/input_stream.h \ $(I)/io_stream.h $(I)/limited_input_stream.h $(I)/list-dl.h \ $(I)/list-sl.h $(I)/logger.h $(I)/logger_channel_file.h \ $(I)/logger_channel_stream.h $(I)/logger_channel_syslog.h \ $(I)/logger_handle.h $(I)/logger-output-stream.h \ $(I)/message.h $(I)/message_dnsupdate.h \ $(I)/message_verify_rrsig.h $(I)/mt_output_stream.h \ $(I)/mutex.h $(I)/network.h $(I)/output_stream.h $(I)/pace.h \ $(I)/packet_reader.h $(I)/packet_writer.h $(I)/parser.h \ $(I)/parsing.h $(I)/pid.h $(I)/pipe_stream.h $(I)/pool.h \ $(I)/print_stream.h $(I)/ptr_set.h $(I)/ptr_vector.h \ $(I)/random.h $(I)/rc.h $(I)/rfc.h $(I)/serial.h \ $(I)/server-setup.h $(I)/service.h $(I)/string_set.h \ $(I)/sys_error.h $(I)/sys_get_cpu_count.h $(I)/sys_types.h \ $(I)/tcp_io_stream.h $(I)/thread_pool.h $(I)/threaded_nb_mm.h \ $(I)/threaded_nbrb.h $(I)/threaded_queue.h \ $(I)/threaded_ringbuffer.h $(I)/threaded_ringbuffer_cw.h \ $(I)/threaded_ringlist.h $(I)/threaded_dll_cw.h \ $(I)/timeformat.h $(I)/timems.h $(I)/typebitmap.h \ $(I)/u32_set.h $(I)/u64_set.h $(I)/zalloc.h \ $(I)/xfr_input_stream.h $(I)/zonefile_reader.h \ $(I)/osx_clock_gettime.h $(I)/tsig.h $(I)/nsid.h HEADERS = $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope am__DIST_COMMON = $(srcdir)/../../mk/common-labels.mk \ $(srcdir)/../../mk/common-settings.mk $(srcdir)/Makefile.in \ $(top_srcdir)/include/dnscore/dnscore-config.h.in AUTHORS \ COPYING ChangeLog INSTALL NEWS README ar-lib compile \ config.guess config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print VPATH = @srcdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCOPTIMISATIONFLAGS = @CCOPTIMISATIONFLAGS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DNSCORE = @DNSCORE@ DNSDB = @DNSDB@ DNSLG = @DNSLG@ DNSZONE = @DNSZONE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAS_ACL_SUPPORT = @HAS_ACL_SUPPORT@ HAS_BFD_DEBUG_SUPPORT = @HAS_BFD_DEBUG_SUPPORT@ HAS_BIG_ENDIAN = @HAS_BIG_ENDIAN@ HAS_CC_ADDRESS_SANITIZER_CHECK = @HAS_CC_ADDRESS_SANITIZER_CHECK@ HAS_CC_ANSI = @HAS_CC_ANSI@ HAS_CC_ANSI_ALIAS = @HAS_CC_ANSI_ALIAS@ HAS_CC_CATCH_UNDEFINED_BEHAVIOR = @HAS_CC_CATCH_UNDEFINED_BEHAVIOR@ HAS_CC_DWARF2 = @HAS_CC_DWARF2@ HAS_CC_DWARF3 = @HAS_CC_DWARF3@ HAS_CC_DWARF4 = @HAS_CC_DWARF4@ HAS_CC_EXCEPTIONS = @HAS_CC_EXCEPTIONS@ HAS_CC_G = @HAS_CC_G@ HAS_CC_G3 = @HAS_CC_G3@ HAS_CC_M32 = @HAS_CC_M32@ HAS_CC_M64 = @HAS_CC_M64@ HAS_CC_MISSING_FIELD_INITIALIZERS = @HAS_CC_MISSING_FIELD_INITIALIZERS@ HAS_CC_NO_IDENT = @HAS_CC_NO_IDENT@ HAS_CC_NO_OMIT_FRAME_POINTER = @HAS_CC_NO_OMIT_FRAME_POINTER@ HAS_CC_PEDANTIC = @HAS_CC_PEDANTIC@ HAS_CC_RDYNAMIC = @HAS_CC_RDYNAMIC@ HAS_CC_SANITIZE_ADDRESS = @HAS_CC_SANITIZE_ADDRESS@ HAS_CC_STACK_PROTECTOR = @HAS_CC_STACK_PROTECTOR@ HAS_CC_STD_C99 = @HAS_CC_STD_C99@ HAS_CC_STD_GNU99 = @HAS_CC_STD_GNU99@ HAS_CC_TUNE_NATIVE = @HAS_CC_TUNE_NATIVE@ HAS_CC_WALL = @HAS_CC_WALL@ HAS_CC_XC99 = @HAS_CC_XC99@ HAS_CTRL = @HAS_CTRL@ HAS_CTRL_DYNAMIC_PROVISIONING = @HAS_CTRL_DYNAMIC_PROVISIONING@ HAS_DYNUPDATE_SUPPORT = @HAS_DYNUPDATE_SUPPORT@ HAS_FULL_ASCII7 = @HAS_FULL_ASCII7@ HAS_LITTLE_ENDIAN = @HAS_LITTLE_ENDIAN@ HAS_LOGDIR = @HAS_LOGDIR@ HAS_LOG_PID_ALWAYS_ON = @HAS_LOG_PID_ALWAYS_ON@ HAS_LOG_THREAD_ID_ALWAYS_ON = @HAS_LOG_THREAD_ID_ALWAYS_ON@ HAS_MALLOC_DEBUG_SUPPORT = @HAS_MALLOC_DEBUG_SUPPORT@ HAS_MASTER_SUPPORT = @HAS_MASTER_SUPPORT@ HAS_MESSAGES_SUPPORT = @HAS_MESSAGES_SUPPORT@ HAS_MUTEX_DEBUG_SUPPORT = @HAS_MUTEX_DEBUG_SUPPORT@ HAS_NON_AA_AXFR_SUPPORT = @HAS_NON_AA_AXFR_SUPPORT@ HAS_NSID_SUPPORT = @HAS_NSID_SUPPORT@ HAS_RRL_SUPPORT = @HAS_RRL_SUPPORT@ HAS_RRSIG_MANAGEMENT_SUPPORT = @HAS_RRSIG_MANAGEMENT_SUPPORT@ HAS_TSIG_SUPPORT = @HAS_TSIG_SUPPORT@ HAS_ZALLOC_DEBUG_SUPPORT = @HAS_ZALLOC_DEBUG_SUPPORT@ HAS_ZALLOC_STATISTICS_SUPPORT = @HAS_ZALLOC_STATISTICS_SUPPORT@ HAS_ZALLOC_SUPPORT = @HAS_ZALLOC_SUPPORT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IS_BSD_FAMILY = @IS_BSD_FAMILY@ IS_DARWIN_OS = @IS_DARWIN_OS@ IS_LINUX_FAMILY = @IS_LINUX_FAMILY@ IS_SOLARIS_FAMILY = @IS_SOLARIS_FAMILY@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL = @OPENSSL@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ 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@ logdir = @logdir@ 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_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 dist_noinst_DATA = VERSION I = include/dnscore FEATURESFILE = dnscore-config-features.h FEATURES = $(I)/$(FEATURESFILE) lib_LTLIBRARIES = libdnscore.la libdnscore_la_SOURCES = src/alarm.c src/allocator.c src/async.c \ src/base16.c src/base32.c src/base32hex.c src/base64.c \ src/basic-priority-queue.c src/buffer_input_stream.c \ src/buffer_output_stream.c src/bytearray_input_stream.c \ src/bytearray_output_stream.c src/bytezarray_output_stream.c \ src/chroot.c src/clone_input_output_stream.c src/cmdline.c \ src/concat_input_stream.c src/config-cmdline.c \ src/config_file_reader.c src/config_key.c src/config_logger.c \ src/config_settings.c src/config_struct.c \ src/counter_output_stream.c src/debug.c src/digest_sha0.c \ src/digest_sha1.c src/digest_sha256.c src/digest_sha384.c \ src/digest_sha512.c src/dns-udp.c src/dns_resource_record.c \ src/dnscore.c src/dnsformat.c src/dnskey.c \ src/dnskey-keyring.c src/dnskey_dsa.c src/dnskey_rsa.c \ src/dnsname.c src/empty-input-stream.c src/fdtools.c \ src/file_input_stream.c src/file_output_stream.c src/format.c \ src/host_address.c src/hsdllist.c src/identity.c \ src/input_stream.c src/limited_input_stream.c src/list-dl.c \ src/list-sl.c src/logger.c src/logger_channel_file.c \ src/logger_channel_stream.c src/logger_channel_syslog.c \ src/logger_handle.c src/logger-output-stream.c src/message.c \ src/message_dnsupdate.c src/message_print_format_dig.c \ src/message_verify_rrsig.c src/mt_output_stream.c src/mutex.c \ src/output_stream.c src/pace.c src/packet_reader.c \ src/packet_writer.c src/parser.c src/parsing.c src/pid.c \ src/pipe_stream.c src/pool.c src/ptr_set.c src/ptr_vector.c \ src/random.c src/rc.c src/rfc.c src/serial.c src/service.c \ src/server-setup.c src/string_set.c src/sys_error.c \ src/sys_get_cpu_count.c src/tcp_io_stream.c src/thread_pool.c \ src/threaded_nb_mm.c src/threaded_nbrb.c \ src/threaded_ringbuffer.c src/threaded_ringbuffer_cw.c \ src/threaded_ringlist.c src/threaded_dll_cw.c src/timeformat.c \ src/timems.c src/typebitmap.c src/u32_set.c src/u64_set.c \ src/zalloc.c src/xfr_input_stream.c $(am__append_2) \ $(am__append_4) $(am__append_6) pkginclude_HEADERS = $(FEATURES) $(I)/alarm.h $(I)/allocator.h \ $(I)/async.h $(I)/avl.c.inc $(I)/avl.h.inc $(I)/base16.h \ $(I)/base32.h $(I)/base32hex.h $(I)/base64.h \ $(I)/basic-priority-queue.h $(I)/buffer_input_stream.h \ $(I)/buffer_output_stream.h $(I)/bytearray_input_stream.h \ $(I)/bytearray_output_stream.h $(I)/bytezarray_output_stream.h \ $(I)/chroot.h $(I)/clone_input_output_stream.h $(I)/cmdline.h \ $(I)/concat_input_stream.h $(I)/config-cmdline.h \ $(I)/config_file_reader.h $(I)/config_settings.h \ $(I)/counter_output_stream.h $(I)/ctrl-rfc.h $(I)/debug.h \ $(I)/debug_config.h $(I)/digest.h $(I)/dns-udp.h \ $(I)/dns_resource_record.h $(I)/dnscore-config.h \ $(I)/dnscore.h $(I)/dnsformat.h $(I)/dnskey.h \ $(I)/dnskey_dsa.h $(I)/dnskey_rsa.h $(I)/dnskey-keyring.h \ $(I)/dnsname.h $(I)/dnsname_set.h $(I)/dnssec_errors.h \ $(I)/empty-input-stream.h $(I)/fdtools.h \ $(I)/file_input_stream.h $(I)/file_output_stream.h \ $(I)/fingerprint.h $(I)/format.h $(I)/host_address.h \ $(I)/hsdllist.h $(I)/identity.h $(I)/input_stream.h \ $(I)/io_stream.h $(I)/limited_input_stream.h $(I)/list-dl.h \ $(I)/list-sl.h $(I)/logger.h $(I)/logger_channel_file.h \ $(I)/logger_channel_stream.h $(I)/logger_channel_syslog.h \ $(I)/logger_handle.h $(I)/logger-output-stream.h \ $(I)/message.h $(I)/message_dnsupdate.h \ $(I)/message_verify_rrsig.h $(I)/mt_output_stream.h \ $(I)/mutex.h $(I)/network.h $(I)/output_stream.h $(I)/pace.h \ $(I)/packet_reader.h $(I)/packet_writer.h $(I)/parser.h \ $(I)/parsing.h $(I)/pid.h $(I)/pipe_stream.h $(I)/pool.h \ $(I)/print_stream.h $(I)/ptr_set.h $(I)/ptr_vector.h \ $(I)/random.h $(I)/rc.h $(I)/rfc.h $(I)/serial.h \ $(I)/server-setup.h $(I)/service.h $(I)/string_set.h \ $(I)/sys_error.h $(I)/sys_get_cpu_count.h $(I)/sys_types.h \ $(I)/tcp_io_stream.h $(I)/thread_pool.h $(I)/threaded_nb_mm.h \ $(I)/threaded_nbrb.h $(I)/threaded_queue.h \ $(I)/threaded_ringbuffer.h $(I)/threaded_ringbuffer_cw.h \ $(I)/threaded_ringlist.h $(I)/threaded_dll_cw.h \ $(I)/timeformat.h $(I)/timems.h $(I)/typebitmap.h \ $(I)/u32_set.h $(I)/u64_set.h $(I)/zalloc.h \ $(I)/xfr_input_stream.h $(I)/zonefile_reader.h $(am__append_1) \ $(am__append_3) $(am__append_5) libdnscore_la_LDFLAGS = -version-info 3:0:0 # # # AM_CFLAGS = -D_THREAD_SAFE -D_REENTRANT -D_FILE_OFFSET_BITS=64 \ -I$(abs_builddir) -I$(abs_srcdir)/include $(am__append_9) \ $(am__append_10) $(am__append_11) $(am__append_12) \ $(am__append_13) $(am__append_14) $(am__append_15) \ $(am__append_16) $(am__append_17) $(am__append_18) \ $(am__append_20) $(am__append_26) $(am__append_28) \ $(am__append_29) $(am__append_31) $(am__append_33) \ $(am__append_35) $(am__append_36) $(am__append_38) \ $(am__append_40) $(am__append_42) $(am__append_44) \ $(am__append_45) $(LOCALFLAGS) $(YCFLAGS) AM_LDFLAGS = $(am__append_19) $(am__append_21) $(am__append_27) \ $(am__append_32) $(am__append_37) $(YLDFLAGS) DEBUGFLAGS = $(am__append_7) $(am__append_8) $(am__append_22) \ $(am__append_23) $(am__append_24) $(am__append_25) \ $(am__append_30) $(am__append_34) $(am__append_39) \ $(am__append_41) $(am__append_43) LOCALFLAGS = -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)"' -DLOCALSTATEDIR='"$(localstatedir)"' -DDATAROOTDIR='"$(datarootdir)"' -DDATADIR='"$(datadir)"' -DLOCALEDIR='"$(localedir)"' -DLOGDIR='"$(logdir)"' @HAS_LTO_SUPPORT_FALSE@@USES_CLANG_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_FALSE@@USES_GCC_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@AM_AR = llvm-ar @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@AM_AR = gcc-ar @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@AM_AR = xiar # # Sun C # ############################################################################### # SUNC @USES_SUNC_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_FALSE@@USES_CLANG_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_FALSE@@USES_GCC_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@AM_LD = ld.gold @USES_ICC_TRUE@AM_LD = ld @USES_SUNC_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@AM_RANLIB = gcc-ranlib YRCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -DCMR YPCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -pg -DCMP $(am__append_48) YDCFLAGS = -DDEBUG $(DEBUGFLAGS) -DCMD YSCFLAGS = $(YRCFLAGS) YRLDFLAGS = YPLDFLAGS = -pg $(am__append_46) YDLDFLAGS = -g $(am__append_47) YSLDFLAGS = $(YRLDFLAGS) AM_MAKEFLAGS = MODE_CFLAGS="$(AM_CFLAGS)" CC=$(CC) AR=$(AM_AR) LD=$(AM_LD) YCFLAGS = $(YSCFLAGS) YLDFLAGS = $(YNLDFLAGS) VP = DNSCORE all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../mk/common-settings.mk $(srcdir)/../../mk/common-labels.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu 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; $(srcdir)/../../mk/common-settings.mk $(srcdir)/../../mk/common-labels.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): include/dnscore/dnscore-config.h: include/dnscore/stamp-h1 @test -f $@ || rm -f include/dnscore/stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/dnscore/stamp-h1 include/dnscore/stamp-h1: $(top_srcdir)/include/dnscore/dnscore-config.h.in $(top_builddir)/config.status @rm -f include/dnscore/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/dnscore/dnscore-config.h $(top_srcdir)/include/dnscore/dnscore-config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f include/dnscore/stamp-h1 touch $@ distclean-hdr: -rm -f include/dnscore/dnscore-config.h include/dnscore/stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/$(DEPDIR) @: > src/$(DEPDIR)/$(am__dirstamp) src/alarm.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/allocator.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/async.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/base16.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/base32.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/base32hex.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/base64.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/basic-priority-queue.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/buffer_input_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/buffer_output_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/bytearray_input_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/bytearray_output_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/bytezarray_output_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/chroot.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/clone_input_output_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/cmdline.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/concat_input_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/config-cmdline.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/config_file_reader.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/config_key.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/config_logger.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/config_settings.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/config_struct.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/counter_output_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/debug.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/digest_sha0.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/digest_sha1.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/digest_sha256.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/digest_sha384.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/digest_sha512.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/dns-udp.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/dns_resource_record.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/dnscore.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/dnsformat.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/dnskey.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/dnskey-keyring.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/dnskey_dsa.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/dnskey_rsa.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/dnsname.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/empty-input-stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/fdtools.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/file_input_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/file_output_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/format.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/host_address.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/hsdllist.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/identity.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/input_stream.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/limited_input_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/list-dl.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/list-sl.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/logger.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/logger_channel_file.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/logger_channel_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/logger_channel_syslog.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/logger_handle.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/logger-output-stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/message.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/message_dnsupdate.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/message_print_format_dig.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/message_verify_rrsig.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/mt_output_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/mutex.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/output_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/pace.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/packet_reader.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/packet_writer.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/parser.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/parsing.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/pid.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/pipe_stream.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/pool.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/ptr_set.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/ptr_vector.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/random.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/rc.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/rfc.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/serial.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/service.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/server-setup.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/string_set.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/sys_error.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/sys_get_cpu_count.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/tcp_io_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/thread_pool.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/threaded_nb_mm.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/threaded_nbrb.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/threaded_ringbuffer.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/threaded_ringbuffer_cw.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/threaded_ringlist.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/threaded_dll_cw.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/timeformat.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/timems.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/typebitmap.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/u32_set.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/u64_set.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zalloc.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/xfr_input_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/osx_clock_gettime.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/tsig.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/tsig_algorithms.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/nsid.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) libdnscore.la: $(libdnscore_la_OBJECTS) $(libdnscore_la_DEPENDENCIES) $(EXTRA_libdnscore_la_DEPENDENCIES) $(AM_V_CCLD)$(libdnscore_la_LINK) -rpath $(libdir) $(libdnscore_la_OBJECTS) $(libdnscore_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f src/*.$(OBJEXT) -rm -f src/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/alarm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/allocator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/async.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/base16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/base32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/base32hex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/base64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/basic-priority-queue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/buffer_input_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/buffer_output_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/bytearray_input_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/bytearray_output_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/bytezarray_output_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/chroot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/clone_input_output_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/cmdline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/concat_input_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/config-cmdline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/config_file_reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/config_key.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/config_logger.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/config_settings.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/config_struct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/counter_output_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/digest_sha0.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/digest_sha1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/digest_sha256.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/digest_sha384.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/digest_sha512.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dns-udp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dns_resource_record.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dnscore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dnsformat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dnskey-keyring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dnskey.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dnskey_dsa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dnskey_rsa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dnsname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/empty-input-stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/fdtools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/file_input_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/file_output_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/host_address.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/hsdllist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/identity.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/input_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/limited_input_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/list-dl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/list-sl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/logger-output-stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/logger.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/logger_channel_file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/logger_channel_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/logger_channel_syslog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/logger_handle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/message.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/message_dnsupdate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/message_print_format_dig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/message_verify_rrsig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mt_output_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/mutex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/osx_clock_gettime.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/output_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/pace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/packet_reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/packet_writer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/parser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/parsing.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/pid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/pipe_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/ptr_set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/ptr_vector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/rc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/rfc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/serial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/server-setup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/service.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/string_set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sys_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sys_get_cpu_count.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/tcp_io_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/thread_pool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/threaded_dll_cw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/threaded_nb_mm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/threaded_nbrb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/threaded_ringbuffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/threaded_ringbuffer_cw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/threaded_ringlist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/timeformat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/timems.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/tsig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/tsig_algorithms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/typebitmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/u32_set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/u64_set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xfr_input_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zalloc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf src/.libs src/_libs distclean-libtool: -rm -f libtool config.lt install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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 "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -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__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(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 \ && cd "$$am__cwd" \ || exit 1 $(am__post_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: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { 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-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f src/$(DEPDIR)/$(am__dirstamp) -rm -f src/$(am__dirstamp) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf src/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf src/$(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-libLTLIBRARIES uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-compile 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-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS 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 tags-am uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS .PRECIOUS: Makefile release: echo YCFLAGS=$(YRCFLAGS) echo YLDFLAGS=$(YRLDFLAGS) $(MAKE) all "YCFLAGS=$(YRCFLAGS)" "YLDFLAGS=$(YRLDFLAGS)" profile: echo YCFLAGS=$(YPCFLAGS) echo YLDFLAGS=$(YPLDFLAGS) $(MAKE) all "YCFLAGS=$(YPCFLAGS)" "YLDFLAGS=$(YPLDFLAGS)" debug: echo YCFLAGS=$(YDCFLAGS) echo YLDFLAGS=$(YDLDFLAGS) $(MAKE) all "YCFLAGS=$(YDCFLAGS)" "YLDFLAGS=$(YDLDFLAGS)" rebuild: clean release release-install: release install profile-install: profile install debug-install: debug install buildinfo.h: config.log echo \#pragma once > buildinfo.h 2> /dev/null echo // generated file, do not modify >> buildinfo.h 2> /dev/null echo \#define BUILD_OPTIONS \"$$(grep "./configure" config.log | head -1 | sed 's/.*\.\/configure *//')\" >> buildinfo.h 2> /dev/null all: REVISION REVISION: (svn info 2>/dev/null;if [ $$? -ne 0 ];then echo "Revision: 0";fi)|grep Revision:|sed 's/^Revision: *//' > REVISION src/alarm.c: $(FEATURES) $(FEATURES): config.log REVISION VERSION echo "#pragma once" > $(FEATURES) @HAS_TSIG_SUPPORT_TRUE@ echo "#define DNSCORE_HAS_TSIG_SUPPORT 1" >> $(FEATURES) @HAS_TSIG_SUPPORT_FALSE@ echo "#define DNSCORE_HAS_TSIG_SUPPORT 0" >> $(FEATURES) @HAS_RDTSC_TRUE@ echo "#define DNSCORE_HAS_RDTSC 1" >> $(FEATURES) @HAS_RDTSC_FALSE@ echo "#define DNSCORE_HAS_RDTSC 0" >> $(FEATURES) @HAS_ACL_SUPPORT_TRUE@ echo "#define DNSCORE_HAS_ACL_SUPPORT 1" >> $(FEATURES) @HAS_ACL_SUPPORT_FALSE@ echo "#define DNSCORE_HAS_ACL_SUPPORT 0" >> $(FEATURES) @HAS_NSEC3_SUPPORT_TRUE@ echo "#define DNSCORE_HAS_NSEC3_SUPPORT 1" >> $(FEATURES) @HAS_NSEC3_SUPPORT_FALSE@ echo "#define DNSCORE_HAS_NSEC3_SUPPORT 0" >> $(FEATURES) @HAS_NSEC_SUPPORT_TRUE@ echo "#define DNSCORE_HAS_NSEC_SUPPORT 1" >> $(FEATURES) @HAS_NSEC_SUPPORT_FALSE@ echo "#define DNSCORE_HAS_NSEC_SUPPORT 0" >> $(FEATURES) @HAS_ZALLOC_SUPPORT_TRUE@ echo "#define DNSCORE_HAS_ZALLOC_SUPPORT 1" >> $(FEATURES) @HAS_ZALLOC_SUPPORT_FALSE@ echo "#define DNSCORE_HAS_ZALLOC_SUPPORT 0" >> $(FEATURES) @HAS_ZALLOC_DEBUG_SUPPORT_TRUE@ echo "#define DNSCORE_HAS_ZALLOC_DEBUG_SUPPORT 1" >> $(FEATURES) @HAS_ZALLOC_DEBUG_SUPPORT_FALSE@ echo "#define DNSCORE_HAS_ZALLOC_DEBUG_SUPPORT 0" >> $(FEATURES) @HAS_ZALLOC_STATISTICS_SUPPORT_TRUE@ echo "#define DNSCORE_HAS_ZALLOC_STATISTICS_SUPPORT 1" >> $(FEATURES) @HAS_ZALLOC_STATISTICS_SUPPORT_FALSE@ echo "#define DNSCORE_HAS_ZALLOC_STATISTICS_SUPPORT 0" >> $(FEATURES) @HAS_MALLOC_DEBUG_SUPPORT_TRUE@ echo "#define DNSCORE_HAS_MALLOC_DEBUG_SUPPORT 1" >> $(FEATURES) @HAS_MALLOC_DEBUG_SUPPORT_FALSE@ echo "#define DNSCORE_HAS_MALLOC_DEBUG_SUPPORT 0" >> $(FEATURES) @HAS_MUTEX_DEBUG_SUPPORT_TRUE@ echo "#define DNSCORE_HAS_MUTEX_DEBUG_SUPPORT 1" >> $(FEATURES) @HAS_MUTEX_DEBUG_SUPPORT_FALSE@ echo "#define DNSCORE_HAS_MUTEX_DEBUG_SUPPORT 0" >> $(FEATURES) which printf > /dev/null 2>&1 if [ $$? -eq 0 ];then \ printf '// version %i.%i.%i.%i-%i\n' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ printf '#define $(VP)_VERSION 0x%02x%02x%02x%02x%04xLL' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ else \ echo "#define $(VP)_VERSION_(vmain_,vsub_,vminor_,vpatch_,vrevision_) ((vmain_)<<40)|((vsub_)<<32)|((vminor_)<<24)|((vpatch_)<<16)|(vrevision_)" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMAIN_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VSUB_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMINOR_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VPATCH_ 0 >> $(FEATURES)" ; \ echo "#define $(VP)_VERSION_VREVISION_ $$(cat REVISION)" >> $(FEATURES) ; \ echo '#define $(VP)_VERSION $(VP)_VERSION_($(VP)_VERSION_VMAIN_,$(VP)_VERSION_VSUB_,$(VP)_VERSION_VMINOR_,$(VP)_VERSION_VPATCH_,$(VP)_VERSION_VREVISION_)' >> $(FEATURES) ; \ fi echo "// $(FEATURES)" >> $(FEATURES) echo >> $(FEATURES) # 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: yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/INSTALL0000644000077100007710000000012411636054660017577 xustar000000000000000027 mtime=1316510128.601808 27 atime=1454597464.618344 30 ctime=1454597651.251344534 yadifa-2.1.6-5826/lib/dnscore/INSTALL0000664000077100007710000003722611636054660017416 0ustar00yadifayadifa00000000000000Quick installation ****************** You will need the most up-to-date aclocal, autoheader, libtoolize, automaken autoconf, make and gcc installed dnscore relies on openssl for TSIG rm -f config.sub config.guess ltmain.sh aclocal autoheader libtoolize automake --add-missing autoconf ./configure make sudo make install Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `--with-openssl=DIR' Use the openssl from directory DIR `--disable-tsig' Disable TSIG support. (Not recommended) `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/compile0000644000077100007710000000013212473710127020115 xustar000000000000000030 mtime=1424986199.162058409 30 atime=1424986199.162058409 30 ctime=1454597651.266344534 yadifa-2.1.6-5826/lib/dnscore/compile0000755000077100007710000001624512473710127017734 0ustar00yadifayadifa00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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, 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/configure0000644000077100007710000000013212654662603020454 xustar000000000000000030 mtime=1454597507.373344535 30 atime=1454597506.858344535 30 ctime=1454597650.790344534 yadifa-2.1.6-5826/lib/dnscore/configure0000775000077100007710000241350412654662603020276 0ustar00yadifayadifa00000000000000#! /bin/sh # From configure.ac Revision: 5826 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for dnscore 2.1.6-5826. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: bugreport@yadifa.eu about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dnscore' PACKAGE_TARNAME='dnscore' PACKAGE_VERSION='2.1.6-5826' PACKAGE_STRING='dnscore 2.1.6-5826' PACKAGE_BUGREPORT='bugreport@yadifa.eu' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS HAS_LTO_SUPPORT_FALSE HAS_LTO_SUPPORT_TRUE DNSLG DNSZONE DNSDB DNSCORE OPENSSL HAS_RRCACHE_ENABLED_FALSE HAS_RRCACHE_ENABLED_TRUE HAS_RDTSC_FALSE HAS_RDTSC_TRUE HAS_TCL_FALSE HAS_TCL_TRUE HAS_DROPALL_SUPPORT_FALSE HAS_DROPALL_SUPPORT_TRUE HAS_MIRROR_SUPPORT_FALSE HAS_MIRROR_SUPPORT_TRUE HAS_NSEC_SUPPORT_FALSE HAS_NSEC_SUPPORT_TRUE HAS_NSEC3_SUPPORT_FALSE HAS_NSEC3_SUPPORT_TRUE HAS_DNSSEC_SUPPORT_FALSE HAS_DNSSEC_SUPPORT_TRUE HAS_SOCKADDR_IN6_SIN6_LEN_FALSE HAS_SOCKADDR_IN6_SIN6_LEN_TRUE HAS_SOCKADDR_IN_SIN_LEN_FALSE HAS_SOCKADDR_IN_SIN_LEN_TRUE HAS_SOCKADDR_SA_LEN_FALSE HAS_SOCKADDR_SA_LEN_TRUE logdir HAS_LOGDIR HAS_LOGDIR_FALSE HAS_LOGDIR_TRUE HAS_NON_AA_AXFR_SUPPORT HAS_NON_AA_AXFR_SUPPORT_FALSE HAS_NON_AA_AXFR_SUPPORT_TRUE HAS_FULL_ASCII7 HAS_FULL_ASCII7_FALSE HAS_FULL_ASCII7_TRUE HAS_LOG_PID_ALWAYS_ON HAS_LOG_PID_ALWAYS_ON_FALSE HAS_LOG_PID_ALWAYS_ON_TRUE HAS_LOG_THREAD_ID_ALWAYS_ON HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE HAS_MUTEX_DEBUG_SUPPORT HAS_MUTEX_DEBUG_SUPPORT_FALSE HAS_MUTEX_DEBUG_SUPPORT_TRUE HAS_BFD_DEBUG_SUPPORT HAS_BFD_DEBUG_SUPPORT_FALSE HAS_BFD_DEBUG_SUPPORT_TRUE HAS_MALLOC_DEBUG_SUPPORT HAS_MALLOC_DEBUG_SUPPORT_FALSE HAS_MALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_DEBUG_SUPPORT HAS_ZALLOC_DEBUG_SUPPORT_FALSE HAS_ZALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_STATISTICS_SUPPORT HAS_ZALLOC_STATISTICS_SUPPORT_FALSE HAS_ZALLOC_STATISTICS_SUPPORT_TRUE HAS_ZALLOC_SUPPORT HAS_ZALLOC_SUPPORT_FALSE HAS_ZALLOC_SUPPORT_TRUE HAS_RRSIG_MANAGEMENT_SUPPORT HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE HAS_DYNUPDATE_SUPPORT HAS_DYNUPDATE_SUPPORT_FALSE HAS_DYNUPDATE_SUPPORT_TRUE HAS_TSIG_SUPPORT HAS_TSIG_SUPPORT_FALSE HAS_TSIG_SUPPORT_TRUE HAS_ACL_SUPPORT HAS_ACL_SUPPORT_FALSE HAS_ACL_SUPPORT_TRUE HAS_NSID_SUPPORT HAS_NSID_SUPPORT_FALSE HAS_NSID_SUPPORT_TRUE HAS_CTRL HAS_MASTER_SUPPORT HAS_MASTER_SUPPORT_FALSE HAS_MASTER_SUPPORT_TRUE HAS_MESSAGES_SUPPORT HAS_MESSAGES_SUPPORT_FALSE HAS_MESSAGES_SUPPORT_TRUE HAS_RRL_SUPPORT HAS_RRL_SUPPORT_FALSE HAS_RRL_SUPPORT_TRUE HAS_CTRL_DYNAMIC_PROVISIONING HAS_CTRL_DYNAMIC_PROVISIONING_FALSE HAS_CTRL_DYNAMIC_PROVISIONING_TRUE HAS_CTRL_FALSE HAS_CTRL_TRUE HAS_BIG_ENDIAN HAS_LITTLE_ENDIAN HAS_BIG_ENDIAN_FALSE HAS_BIG_ENDIAN_TRUE HAS_LITTLE_ENDIAN_FALSE HAS_LITTLE_ENDIAN_TRUE HAS_MEMALIGN_ISSUES_FALSE HAS_MEMALIGN_ISSUES_TRUE HAS_CC_RDYNAMIC HAS_CC_RDYNAMIC_FALSE HAS_CC_RDYNAMIC_TRUE HAS_CC_CATCH_UNDEFINED_BEHAVIOR HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE HAS_CC_ADDRESS_SANITIZER_CHECK HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE HAS_CC_NO_OMIT_FRAME_POINTER HAS_CC_NO_OMIT_FRAME_POINTER_FALSE HAS_CC_NO_OMIT_FRAME_POINTER_TRUE HAS_CC_SANITIZE_ADDRESS HAS_CC_SANITIZE_ADDRESS_FALSE HAS_CC_SANITIZE_ADDRESS_TRUE HAS_CC_MISSING_FIELD_INITIALIZERS HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE HAS_CC_EXCEPTIONS HAS_CC_EXCEPTIONS_FALSE HAS_CC_EXCEPTIONS_TRUE HAS_CC_STACK_PROTECTOR HAS_CC_STACK_PROTECTOR_FALSE HAS_CC_STACK_PROTECTOR_TRUE HAS_CC_DWARF4 HAS_CC_DWARF4_FALSE HAS_CC_DWARF4_TRUE HAS_CC_DWARF3 HAS_CC_DWARF3_FALSE HAS_CC_DWARF3_TRUE HAS_CC_DWARF2 HAS_CC_DWARF2_FALSE HAS_CC_DWARF2_TRUE HAS_CC_G3 HAS_CC_G3_FALSE HAS_CC_G3_TRUE HAS_CC_G HAS_CC_G_FALSE HAS_CC_G_TRUE HAS_CC_WALL HAS_CC_WALL_FALSE HAS_CC_WALL_TRUE HAS_CC_M64 HAS_CC_M64_FALSE HAS_CC_M64_TRUE HAS_CC_M32 HAS_CC_M32_FALSE HAS_CC_M32_TRUE HAS_CC_XC99 HAS_CC_XC99_FALSE HAS_CC_XC99_TRUE HAS_CC_STD_C99 HAS_CC_STD_C99_FALSE HAS_CC_STD_C99_TRUE HAS_CC_STD_GNU99 HAS_CC_STD_GNU99_FALSE HAS_CC_STD_GNU99_TRUE HAS_CC_PEDANTIC HAS_CC_PEDANTIC_FALSE HAS_CC_PEDANTIC_TRUE HAS_CC_ANSI_ALIAS HAS_CC_ANSI_ALIAS_FALSE HAS_CC_ANSI_ALIAS_TRUE HAS_CC_ANSI HAS_CC_ANSI_FALSE HAS_CC_ANSI_TRUE HAS_CC_NO_IDENT HAS_CC_NO_IDENT_FALSE HAS_CC_NO_IDENT_TRUE HAS_CC_TUNE_NATIVE HAS_CC_TUNE_NATIVE_FALSE HAS_CC_TUNE_NATIVE_TRUE CCOPTIMISATIONFLAGS USES_UNKNOWN_FALSE USES_UNKNOWN_TRUE USES_SUNC_FALSE USES_SUNC_TRUE USES_CLANG_FALSE USES_CLANG_TRUE USES_GCC_FALSE USES_GCC_TRUE USES_ICC_FALSE USES_ICC_TRUE FORCE64BITS_FALSE FORCE64BITS_TRUE FORCE32BITS_FALSE FORCE32BITS_TRUE HAS_CPU_AMDINTEL_FALSE HAS_CPU_AMDINTEL_TRUE HAS_CPU_NIAGARA_FALSE HAS_CPU_NIAGARA_TRUE IS_SOLARIS_FAMILY IS_SOLARIS_FAMILY_FALSE IS_SOLARIS_FAMILY_TRUE IS_LINUX_FAMILY IS_LINUX_FAMILY_FALSE IS_LINUX_FAMILY_TRUE IS_BSD_FAMILY IS_BSD_FAMILY_FALSE IS_BSD_FAMILY_TRUE IS_DARWIN_OS IS_DARWIN_OS_FALSE IS_DARWIN_OS_TRUE HAS_STRDUP_FALSE HAS_STRDUP_TRUE CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC ac_ct_AR AR build_os build_vendor build_cpu build AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_largefile enable_force32bits enable_force64bits enable_ctrl_dynamic_provisioning enable_rrl enable_messages enable_master enable_ctrl enable_nsid enable_acl enable_tsig enable_dynupdate enable_rrsig_management enable_zalloc enable_zalloc_statistics enable_zalloc_debug enable_malloc_debug enable_bfd_debug enable_mutex_debug enable_log_thread_id enable_log_pid enable_full_ascii7 enable_non_aa_axfr_support with_logdir with_openssl_lib with_openssl_include with_openssl with_dnscore with_dnsdb with_dnszone with_dnslg enable_lto ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures dnscore 2.1.6-5826 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/dnscore] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of dnscore 2.1.6-5826:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=no] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --enable-force32bits Forces a 32 bits binary compilation --enable-force64bits Forces a 64 bits binary compilation --enable-ctrl-dynamic-provisioning Enable dynamic provisioning --disable-rrl Disable DNS Response Rate Limiter --enable-messages Enable use messages instead of send (needed if you use more than one IP aliased on the same network interface) --disable-master Disable DNS master --enable-ctrl Enable remote control --disable-nsid Disable NSID support --disable-acl Disable ACL support --disable-tsig Disable TSIG support --disable-dynupdate Disable dynamic update support --disable-rrsig-management Disable RRSIG verification and generation for zones --disable-zalloc Disable zalloc memory system --enable-zalloc-statistics Enable zalloc statistics support --enable-zalloc-debug Enable zalloc debug support --enable-malloc-debug Enable malloc debug support --enable-bfd-debug Enable bfd debug support --enable-mutex-debug Enable mutex debug support --enable-log-thread-id Enable write the thread id in each line of log --enable-log-pid Enable write the pid in each line of log --enable-full-ascii7 Enable YADIFA will now accept ASCII7 characters in DNS names (not recommended) --enable-non-aa-axfr-support Enable Allows AXFR answer from master without AA bit set (Microsoft DNS) --enable-lto Enable LTO support, requires gold linker Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-logdir build sets the directory where to put the log files --with-openssl-lib=DIR Use the openssl library from directory DIR --with-openssl-include=DIR Use the openssl headers from directory DIR --with-openssl=DIR Use the openssl from directory DIR --with-dnscore=DIR Use the dnscore from directory DIR/lib (devs only) --with-dnsdb=DIR Use the dnsdb from directory DIR/lib (devs only) --with-dnszone=DIR Use the dnszone from directory DIR/lib (devs only) --with-dnslg=DIR Use the dnslg from directory DIR/lib (devs only) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF dnscore configure 2.1.6-5826 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------------- ## ## Report this to bugreport@yadifa.eu ## ## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by dnscore $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo echo echo "DNSCORE START" echo "-------------" echo echo cpu_intel_compatible=1 icc_enabled=0 ac_os_workaround_done=0 # requires_tcl=0 requires_ssl=0 requires_dnscore=0 requires_dnsdb=0 requires_dnszone=0 requires_dnslg=0 requires_dnstcl=0 ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='dnscore' VERSION='2.1.6-5826' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 $as_echo_n "checking how to create a pax tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_pax-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' am__tar_="$_am_tar --format=posix -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x pax -w "$$tardir"' am__tar_='pax -L -x pax -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H pax -L' am__tar_='find "$tardir" -print | cpio -o -H pax -L' am__untar='cpio -i -H pax -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_pax}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_pax+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_pax=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 $as_echo "$am_cv_prog_tar_pax" >&6; } # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers include/dnscore/dnscore-config.h" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac # Checks for programs. DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -n "$ac_tool_prefix"; then for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 $as_echo_n "checking the archiver ($AR) interface... " >&6; } if ${am_cv_ar_interface+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 $as_echo "$am_cv_ar_interface" >&6; } case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) as_fn_error $? "could not determine $AR interface" "$LINENO" 5 ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=no fi enable_dlopen=no enable_win32_dll=no # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: case "$(uname -s)" in Darwin) alias libtoolize="glibtoolize" which libtool > /dev/null 2>&1 if [ $? -ne 0 ] then which glibtool > /dev/null 2>&1 if [ $? -eq 0 ] then alias libtool="glibtool" fi fi echo 'brol' | sed 's/brol/truc/' > /dev/null 2>&1 if [ $? -ne 0 ] then alias sed="gsed" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin workaround" >&5 $as_echo "Darwin workaround" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: nothing to do" >&5 $as_echo "nothing to do" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf in -lc" >&5 $as_echo_n "checking for printf in -lc... " >&6; } if ${ac_cv_lib_c_printf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char printf (); int main () { return printf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_printf=yes else ac_cv_lib_c_printf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_printf" >&5 $as_echo "$ac_cv_lib_c_printf" >&6; } if test "x$ac_cv_lib_c_printf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBC 1 _ACEOF LIBS="-lc $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check for Darwin or Linux for ac_header in linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check for Darwin or Linux for ac_header in sys/types.h i386/types.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default" if test "x$ac_cv_type_uint64_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UINT64_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default" if test "x$ac_cv_type_int64_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INT64_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" if test "x$ac_cv_type_long_long" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LONG_LONG 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "$ac_includes_default" if test "x$ac_cv_type_u_char" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_U_CHAR 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if has strdup" >&5 $as_echo_n "checking if has strdup... " >&6; } if false; then HAS_STRDUP_TRUE= HAS_STRDUP_FALSE='#' else HAS_STRDUP_TRUE='#' HAS_STRDUP_FALSE= fi cat > strdup_test.c <<_ACEOF #include #include int main(int argc, char** argv) { char* p = strdup("test"); return 0; } _ACEOF ${CC} ${CFLAGS} strdup_test.c -o strdup_test if [ $? -eq 0 ]; then has_strdup=1; echo "yes" else echo "no" fi rm -f strdup_test strdup_test.c if test $has_strdup = yes; then HAS_STRDUP_TRUE= HAS_STRDUP_FALSE='#' else HAS_STRDUP_TRUE='#' HAS_STRDUP_FALSE= fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi if [ $ac_os_workaround_done -eq 0 ] then ac_os_workaround_done=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of OS this is" >&5 $as_echo_n "checking what kind of OS this is... " >&6; } is_darwin_os=0 is_bsd_family=0 is_solaris_family=0 is_linux_family=0 case "$(uname -s)" in Darwin) is_darwin_os=1 is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OSX" >&5 $as_echo "OSX" >&6; } ;; FreeBSD) is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: BSD" >&5 $as_echo "BSD" >&6; } ;; Linux) is_linux_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 $as_echo "Linux" >&6; } ;; SunOS) is_solaris_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SunOS" >&5 $as_echo "SunOS" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: not specifically supported" >&5 $as_echo "not specifically supported" >&6; } ;; esac if [ "$is_darwin_os" = "" ] then echo "OS detection failed to give relevant results" exit 1; fi if [ $is_darwin_os -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 1 _ACEOF if true; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 0 _ACEOF if false; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi fi if [ $is_bsd_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 1 _ACEOF if true; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 0 _ACEOF if false; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi fi if [ $is_linux_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 1 _ACEOF if true; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 0 _ACEOF if false; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi fi if [ $is_solaris_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 1 _ACEOF if true; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 0 _ACEOF if false; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi fi fi cat >>confdefs.h <<_ACEOF #define DEFAULT_ASSUMED_CPU_COUNT 2 _ACEOF cpu_intel_compatible=1 if false; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi if false; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for the CPU options" >&5 $as_echo_n "checking checking for the CPU options... " >&6; } CPU_UNKNOWN=1 CFLAGS3264= case "$(uname -i 2>/dev/null)" in SUNW,SPARC-Enterprise-T1000) cat >>confdefs.h <<_ACEOF #define HAS_CPU_NIAGARA 1 _ACEOF if true; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: UtrasparcT1" >&5 $as_echo "UtrasparcT1" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=0 ;; *) ;; esac case "$(uname -m)" in x86_64) cat >>confdefs.h <<_ACEOF #define HAS_CPU_AMDINTEL 1 _ACEOF if true; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: AMD/Intel" >&5 $as_echo "AMD/Intel" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=1 ;; *) ;; esac case "${CPU_UNKNOWN}" in 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: generic" >&5 $as_echo "generic" >&6; } ;; 0) ;; esac if [ "$is_solaris_family" = "" ] then echo "OS must be detected first" exit 1 fi if [ $is_solaris_family -eq 1 ] then echo "Solaris ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if either force 32 or 64 bits is enabled" >&5 $as_echo_n "checking if either force 32 or 64 bits is enabled... " >&6; } if [ ! "$enable_force32bits" = "yes" ] then if [ ! "$enable_force64bits" = "yes" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forcing 64 bits" >&5 $as_echo "no, forcing 64 bits" >&6; } enable_force64bits="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else echo "Not Solaris ..." fi echo "Force ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 32 bits is enabled" >&5 $as_echo_n "checking if force 32 bits is enabled... " >&6; } if false; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi # Check whether --enable-force32bits was given. if test "${enable_force32bits+set}" = set; then : enableval=$enable_force32bits; enable_force32bits=yes else enable_force32bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force32bits" >&5 $as_echo "$enable_force32bits" >&6; } case "$enable_force32bits" in yes) CFLAGS3264=-m32 if test $enable_force32bits = yes; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 64 bits is enabled" >&5 $as_echo_n "checking if force 64 bits is enabled... " >&6; } if false; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi # Check whether --enable-force64bits was given. if test "${enable_force64bits+set}" = set; then : enableval=$enable_force64bits; enable_force64bits=yes else enable_force64bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force64bits" >&5 $as_echo "$enable_force64bits" >&6; } case "$enable_force64bits" in yes) CFLAGS3264=-m64 if test $enable_force64bits = yes; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi if [ "$enable_force32" = "yes" ] then echo "cannot do both --enable-force32bits and --enable-force64bits at the same time" exit 1 fi ;; *) ;; esac cat /etc/redhat-version > /dev/null 2>&1 if [ $? -eq 0 ] then is_redhat_family=1 else is_redhat_family=0 fi CFLAGS= VERSION_OPT=--version $CC --version > /dev/null 2>&1 if [ $? -ne 0 ] then $CC -V > /dev/null 2>&1 if [ $? -ne 0 ] then CCVER='0.0' CCNAME='unknown' VERSION_OPT='' else VERSION_OPT='-V' fi fi if [ ! "$VERSION_OPT" = "" ] then CCVER=$($CC $VERSION_OPT 2>&1|head -1|sed 's/[^0-9.]*\([0-9.]*\).*/\1/') if [ "$CCVER" = "" ] then CCVER='0.0' fi CCNAME=$($CC $VERSION_OPT 2>&1|head -1|sed -e 's/.*clang.*/clang/' -e 's/.*gcc.*/gcc/' -e 's/.*icc.*/icc/' -e 's/.*Sun C.*/Sun C/'|tr A-Z a-z) if [ "$CCNAME" = "" ] then CCNAME='unknown' fi else CCVER='0.0' CCNAME='unknown' fi # version opt CCMAJOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $1}') CCMINOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $2}') if [ "$CCMAJOR" = "" ] then CCMAJOR=0 fi if [ "$CCMINOR" = "" ] then CCMINOR=0 fi if [ "$CCNAME" = "gcc" ] then CCOPTIMISATIONFLAGS=-O3 if [ $CCMAJOR -lt 4 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC < 4.0 has optimisations issues with YADIFA." sleep 1 elif [ $CCMAJOR -eq 4 ] then if [ $CCMINOR -lt 6 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC before 4.6 have optimisation issues with YADIFA." sleep 1 elif [ $CCMINOR -eq 6 ] then CCOPTIMISATIONFLAGS=-O2 else # hopefully after 4.6 the issue is fixed ... CCOPTIMISATIONFLAGS=-O3 fi fi if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if true; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "icc" ] then echo "ICC" CCOPTIMISATIONFLAGS=-O3 if true; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi AR=xiar elif [ "$CCNAME" = "clang" ] then echo "CLANG" CCOPTIMISATIONFLAGS=-O3 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if true; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "Sun C" ] then echo "Sun C" CCOPTIMISATIONFLAGS=-xO5 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if true; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi else echo "unsupported compiler" CCNAME=$CC CCOPTIMISATIONFLAGS=-O2 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if true; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi fi # # We've been told RedHat does not like -O3 at all, so ... # if [ $is_redhat_family -ne 0 ] then if [ "$CCOPTIMISATIONFLAGS " eq "-O3" ] then CCOPTIMISATIONFLAGS=-O2 fi fi echo "detected compiler is $CCNAME $CCMAJOR $CCMINOR" CCOPTIMISATIONFLAGS=$CCOPTIMISATIONFLAGS if [ $cpu_intel_compatible -eq 0 ] then if [ $icc_enabled -ne 0 ] then echo "ERROR: cannot enable ICC with CPU other than x86 or amd64" exit 1 fi fi # # AC_COMPILER_SUPPORTS -mtune=native # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mtune=native" >&5 $as_echo_n "checking if compiler supports -mtune=native... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-TUNE_NATIVE.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -mtune=native test-gcc-TUNE_NATIVE.c -o test-gcc-TUNE_NATIVE > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-TUNE_NATIVE* # # AC_COMPILER_SUPPORTS -fno-ident # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-ident" >&5 $as_echo_n "checking if compiler supports -fno-ident... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_IDENT.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-ident test-gcc-NO_IDENT.c -o test-gcc-NO_IDENT > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_IDENT* # # AC_COMPILER_SUPPORTS -ansi # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi" >&5 $as_echo_n "checking if compiler supports -ansi... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi test-gcc-ANSI.c -o test-gcc-ANSI > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI* # # AC_COMPILER_SUPPORTS -ansi-alias # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi-alias" >&5 $as_echo_n "checking if compiler supports -ansi-alias... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI_ALIAS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi-alias test-gcc-ANSI_ALIAS.c -o test-gcc-ANSI_ALIAS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI_ALIAS* # # AC_COMPILER_SUPPORTS -pedantic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -pedantic" >&5 $as_echo_n "checking if compiler supports -pedantic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-PEDANTIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -pedantic test-gcc-PEDANTIC.c -o test-gcc-PEDANTIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-PEDANTIC* # # AC_COMPILER_SUPPORTS -std=gnu99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=gnu99" >&5 $as_echo_n "checking if compiler supports -std=gnu99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_GNU99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=gnu99 test-gcc-STD_GNU99.c -o test-gcc-STD_GNU99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_GNU99* # # AC_COMPILER_SUPPORTS -std=c99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=c99" >&5 $as_echo_n "checking if compiler supports -std=c99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_C99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=c99 test-gcc-STD_C99.c -o test-gcc-STD_C99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_C99* # # AC_COMPILER_SUPPORTS -xc99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -xc99" >&5 $as_echo_n "checking if compiler supports -xc99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-XC99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -xc99 test-gcc-XC99.c -o test-gcc-XC99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-XC99* # # AC_COMPILER_SUPPORTS -m32 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m32" >&5 $as_echo_n "checking if compiler supports -m32... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M32.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m32 test-gcc-M32.c -o test-gcc-M32 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M32* # # AC_COMPILER_SUPPORTS -m64 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m64" >&5 $as_echo_n "checking if compiler supports -m64... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M64.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m64 test-gcc-M64.c -o test-gcc-M64 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M64* # # AC_COMPILER_SUPPORTS -Wall # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Wall" >&5 $as_echo_n "checking if compiler supports -Wall... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-WALL.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Wall test-gcc-WALL.c -o test-gcc-WALL > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-WALL* # # AC_COMPILER_SUPPORTS -g # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g" >&5 $as_echo_n "checking if compiler supports -g... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g test-gcc-G.c -o test-gcc-G > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G* # # AC_COMPILER_SUPPORTS -g3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g3" >&5 $as_echo_n "checking if compiler supports -g3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g3 test-gcc-G3.c -o test-gcc-G3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G3* # # AC_COMPILER_SUPPORTS -gdwarf-2 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-2" >&5 $as_echo_n "checking if compiler supports -gdwarf-2... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF2.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-2 test-gcc-DWARF2.c -o test-gcc-DWARF2 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF2* # # AC_COMPILER_SUPPORTS -gdwarf-3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-3" >&5 $as_echo_n "checking if compiler supports -gdwarf-3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-3 test-gcc-DWARF3.c -o test-gcc-DWARF3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF3* # # AC_COMPILER_SUPPORTS -gdwarf-4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-4" >&5 $as_echo_n "checking if compiler supports -gdwarf-4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF4.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-4 test-gcc-DWARF4.c -o test-gcc-DWARF4 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF4* # # AC_COMPILER_SUPPORTS -fstack-protector --param=ssp-buffer-size=4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fstack-protector --param=ssp-buffer-size=4" >&5 $as_echo_n "checking if compiler supports -fstack-protector --param=ssp-buffer-size=4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STACK_PROTECTOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fstack-protector --param=ssp-buffer-size=4 test-gcc-STACK_PROTECTOR.c -o test-gcc-STACK_PROTECTOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STACK_PROTECTOR* # # AC_COMPILER_SUPPORTS -fexceptions # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fexceptions" >&5 $as_echo_n "checking if compiler supports -fexceptions... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-EXCEPTIONS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fexceptions test-gcc-EXCEPTIONS.c -o test-gcc-EXCEPTIONS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-EXCEPTIONS* # # AC_COMPILER_SUPPORTS -Werror=missing-field-initializers # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=missing-field-initializers" >&5 $as_echo_n "checking if compiler supports -Werror=missing-field-initializers... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-MISSING_FIELD_INITIALIZERS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Werror=missing-field-initializers test-gcc-MISSING_FIELD_INITIALIZERS.c -o test-gcc-MISSING_FIELD_INITIALIZERS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-MISSING_FIELD_INITIALIZERS* # # AC_COMPILER_SUPPORTS -fsanitize=address # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fsanitize=address" >&5 $as_echo_n "checking if compiler supports -fsanitize=address... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-SANITIZE_ADDRESS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fsanitize=address test-gcc-SANITIZE_ADDRESS.c -o test-gcc-SANITIZE_ADDRESS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-SANITIZE_ADDRESS* # # AC_COMPILER_SUPPORTS -fno-omit-frame-pointer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-omit-frame-pointer" >&5 $as_echo_n "checking if compiler supports -fno-omit-frame-pointer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_OMIT_FRAME_POINTER.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-omit-frame-pointer test-gcc-NO_OMIT_FRAME_POINTER.c -o test-gcc-NO_OMIT_FRAME_POINTER > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_OMIT_FRAME_POINTER* # # AC_COMPILER_SUPPORTS -faddress-sanitizer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -faddress-sanitizer" >&5 $as_echo_n "checking if compiler supports -faddress-sanitizer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ADDRESS_SANITIZER_CHECK.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -faddress-sanitizer test-gcc-ADDRESS_SANITIZER_CHECK.c -o test-gcc-ADDRESS_SANITIZER_CHECK > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ADDRESS_SANITIZER_CHECK* # # AC_COMPILER_SUPPORTS -fcatch_undefined_behavior # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fcatch_undefined_behavior" >&5 $as_echo_n "checking if compiler supports -fcatch_undefined_behavior... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-CATCH_UNDEFINED_BEHAVIOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fcatch_undefined_behavior test-gcc-CATCH_UNDEFINED_BEHAVIOR.c -o test-gcc-CATCH_UNDEFINED_BEHAVIOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-CATCH_UNDEFINED_BEHAVIOR* # # AC_COMPILER_SUPPORTS -rdynamic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -rdynamic" >&5 $as_echo_n "checking if compiler supports -rdynamic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-RDYNAMIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -rdynamic test-gcc-RDYNAMIC.c -o test-gcc-RDYNAMIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-RDYNAMIC* { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking if memory accesses must be size-aligned" >&5 $as_echo_n "checking checking if memory accesses must be size-aligned... " >&6; } if false; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat > memalign_issues_test.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc, char** argv) { char* p = (char*)malloc(8); p++; int* intp= (int*)p; *intp=1; return 0; } _ACEOF ${CC} ${CFLAGS} memalign_issues_test.c -o memalign_issues_test > /dev/null 2>&1 has_memalign_issues=0 ./memalign_issues_test > /dev/null 2>&1 if [ $? -ne 0 ]; then has_memalign_issues=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f memalign_issues_test memalign_issues_test.c if test $has_memalign_issues; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MEMALIGN_ISSUES $has_memalign_issues _ACEOF # # AC_ENDIANNESS # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking endianness: " >&5 $as_echo_n "checking endianness: ... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-endian.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_STDIO_H #include #endif #if defined __FreeBSD__ #if HAVE_SYS_ENDIAN_H #include #endif #elif defined __APPLE__ #if HAVE_MACHINE_ENDIAN_H #include #endif #elif defined __sun #if HAVE_SYS_BYTEORDER_H #include #endif #else #if HAVE_ENDIAN_H #include #endif #if HAVE_BYTESWAP_H #include #endif #endif static int magic = 0x00525545; int main(int argc,char** argv) { (void)argc; (void)argv; int pp = -1; int c = -1; #if defined _BIG_ENDIAN pp = 2; #elif defined _LITTLE_ENDIAN pp = 1; #endif #ifdef __BYTE_ORDER #if __BYTE_ORDER == __LITTLE_ENDIAN pp = 1; #elif __BYTE_ORDER == __BIG_ENDIAN pp = 2; #endif // printf("__BYTE_ORDER=%x\n", __BYTE_ORDER); #endif #ifdef _BYTE_ORDER #if _BYTE_ORDER == _LITTLE_ENDIAN pp = 1; #elif _BYTE_ORDER == _BIG_ENDIAN pp = 2; #endif printf("_BYTE_ORDER=%x\n", _BYTE_ORDER); #endif #ifdef BYTE_ORDER #if BYTE_ORDER == LITTLE_ENDIAN pp = 1; #elif BYTE_ORDER == BIG_ENDIAN pp = 2; #endif // printf("BYTE_ORDER=%x\n", BYTE_ORDER); #endif # #ifdef WORDS_BIGENDIAN // printf("WORDS_BIGENDIAN=%x\n", WORDS_BIGENDIAN); if(pp == 1) // could be -1 or 2 { pp = -2; } else { pp = 2; } #endif char *p = (char*)&magic; if(*p == '\0') { c = 2; } else if(*p == 'E') { c = 1; } if((pp < 0) || (c < 0)) { printf("*** WARNING *** preprocessor says %i, real test says %i *** WARNING ***\n", pp, c); } if(c == pp) { return c; } else { return -1; } } _ACEOF $CC test-gcc-endian.c -o test-gcc-endian > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"failed to compile test\"" >&5 $as_echo "\"failed to compile test\"" >&6; } exit 1 fi ./test-gcc-endian if [ $? -eq 1 ] then if true; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if false; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: little" >&5 $as_echo "little" >&6; } else if false; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if true; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: big" >&5 $as_echo "big" >&6; } fi rm -f test-gcc-endian.c* test-gcc-endian for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done for ac_header in stdio.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDIO_H 1 _ACEOF fi done for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRING_H 1 _ACEOF fi done for ac_header in endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default" if test "x$ac_cv_header_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ENDIAN_H 1 _ACEOF fi done for ac_header in syslog.h do : ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYSLOG_H 1 _ACEOF fi done for ac_header in fcntl.h do : ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FCNTL_H 1 _ACEOF fi done for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF fi done for ac_header in linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in byteswap.h do : ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" if test "x$ac_cv_header_byteswap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BYTESWAP_H 1 _ACEOF fi done for ac_header in machine/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "machine/endian.h" "ac_cv_header_machine_endian_h" "$ac_includes_default" if test "x$ac_cv_header_machine_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACHINE_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/time.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIME_H 1 _ACEOF fi done for ac_header in sys/stat.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_stat_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_STAT_H 1 _ACEOF fi done for ac_header in sys/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" if test "x$ac_cv_header_sys_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/byteorder.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/byteorder.h" "ac_cv_header_sys_byteorder_h" "$ac_includes_default" if test "x$ac_cv_header_sys_byteorder_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_BYTEORDER_H 1 _ACEOF fi done for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done for ac_header in netinet/in.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET_IN_H 1 _ACEOF fi done for ac_header in netinet6/in6.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet6/in6.h" "ac_cv_header_netinet6_in6_h" "$ac_includes_default" if test "x$ac_cv_header_netinet6_in6_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET6_IN6_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_spin_init" >&5 $as_echo_n "checking checking for pthread_spin_init... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_spinlock_t lock; pthread_spin_init(&lock, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SPINLOCK 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_setname_np" >&5 $as_echo_n "checking checking for pthread_setname_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __USE_GNU #include int main () { pthread_setname_np(pthread_self(), "myname"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SETNAME_NP 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for timegm" >&5 $as_echo_n "checking checking for timegm... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct tm t; timegm(&t); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_TIMEGM 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # # AC_HAS_ENABLE ctrl_dynamic_provisioning # if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL_DYNAMIC_PROVISIONING has been enabled" >&5 $as_echo_n "checking if CTRL_DYNAMIC_PROVISIONING has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl_dynamic_provisioning was given. if test "${enable_ctrl_dynamic_provisioning+set}" = set; then : enableval=$enable_ctrl_dynamic_provisioning; fi # CASE case "y$enable_ctrl_dynamic_provisioning" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl_dynamic_provisioning DONE # # AC_HAS_DISABLE rrl # if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRL_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrl was given. if test "${enable_rrl+set}" = set; then : enableval=$enable_rrl; fi # MSG RESULT # CASE case "y$enable_rrl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrl DONE # # AC_HAS_ENABLE messages # if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MESSAGES_SUPPORT has been enabled" >&5 $as_echo_n "checking if MESSAGES_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-messages was given. if test "${enable_messages+set}" = set; then : enableval=$enable_messages; fi # CASE case "y$enable_messages" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE messages DONE # # AC_HAS_DISABLE master # if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MASTER_SUPPORT has been disabled" >&5 $as_echo_n "checking if MASTER_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-master was given. if test "${enable_master+set}" = set; then : enableval=$enable_master; fi # MSG RESULT # CASE case "y$enable_master" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_dynupdate='no' enable_rrsig_management='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE master DONE # # AC_HAS_ENABLE ctrl # if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL has been enabled" >&5 $as_echo_n "checking if CTRL has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl was given. if test "${enable_ctrl+set}" = set; then : enableval=$enable_ctrl; fi # CASE case "y$enable_ctrl" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl DONE # # AC_HAS_DISABLE nsid # if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NSID_SUPPORT has been disabled" >&5 $as_echo_n "checking if NSID_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-nsid was given. if test "${enable_nsid+set}" = set; then : enableval=$enable_nsid; fi # MSG RESULT # CASE case "y$enable_nsid" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE nsid DONE # # AC_HAS_DISABLE acl # if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ACL_SUPPORT has been disabled" >&5 $as_echo_n "checking if ACL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-acl was given. if test "${enable_acl+set}" = set; then : enableval=$enable_acl; fi # MSG RESULT # CASE case "y$enable_acl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_tsig='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE acl DONE # # AC_HAS_DISABLE tsig # if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if TSIG_SUPPORT has been disabled" >&5 $as_echo_n "checking if TSIG_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-tsig was given. if test "${enable_tsig+set}" = set; then : enableval=$enable_tsig; fi # MSG RESULT # CASE case "y$enable_tsig" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE tsig DONE # # AC_HAS_DISABLE dynupdate # if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if DYNUPDATE_SUPPORT has been disabled" >&5 $as_echo_n "checking if DYNUPDATE_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-dynupdate was given. if test "${enable_dynupdate+set}" = set; then : enableval=$enable_dynupdate; fi # MSG RESULT # CASE case "y$enable_dynupdate" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE dynupdate DONE # # AC_HAS_DISABLE rrsig_management # if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRSIG_MANAGEMENT_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRSIG_MANAGEMENT_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrsig_management was given. if test "${enable_rrsig_management+set}" = set; then : enableval=$enable_rrsig_management; fi # MSG RESULT # CASE case "y$enable_rrsig_management" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrsig_management DONE # # AC_HAS_DISABLE zalloc # if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_SUPPORT has been disabled" >&5 $as_echo_n "checking if ZALLOC_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc was given. if test "${enable_zalloc+set}" = set; then : enableval=$enable_zalloc; fi # MSG RESULT # CASE case "y$enable_zalloc" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE zalloc DONE # # AC_HAS_ENABLE zalloc_statistics # if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_STATISTICS_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_STATISTICS_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_statistics was given. if test "${enable_zalloc_statistics+set}" = set; then : enableval=$enable_zalloc_statistics; fi # CASE case "y$enable_zalloc_statistics" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_statistics DONE # # AC_HAS_ENABLE zalloc_debug # if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_debug was given. if test "${enable_zalloc_debug+set}" = set; then : enableval=$enable_zalloc_debug; fi # CASE case "y$enable_zalloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_debug DONE # # AC_HAS_ENABLE malloc_debug # if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-malloc_debug was given. if test "${enable_malloc_debug+set}" = set; then : enableval=$enable_malloc_debug; fi # CASE case "y$enable_malloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE malloc_debug DONE # # AC_HAS_ENABLE bfd_debug # if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if BFD_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if BFD_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-bfd_debug was given. if test "${enable_bfd_debug+set}" = set; then : enableval=$enable_bfd_debug; fi # CASE case "y$enable_bfd_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE bfd_debug DONE case "$enable_bfd_debug" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlinfo" >&5 $as_echo_n "checking for library containing dlinfo... " >&6; } if ${ac_cv_search_dlinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlinfo (); int main () { return dlinfo (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlinfo+:} false; then : break fi done if ${ac_cv_search_dlinfo+:} false; then : else ac_cv_search_dlinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlinfo" >&5 $as_echo "$ac_cv_search_dlinfo" >&6; } ac_res=$ac_cv_search_dlinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no dl fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sha1_init_ctx" >&5 $as_echo_n "checking for library containing sha1_init_ctx... " >&6; } if ${ac_cv_search_sha1_init_ctx+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sha1_init_ctx (); int main () { return sha1_init_ctx (); ; return 0; } _ACEOF for ac_lib in '' iberty; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sha1_init_ctx=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sha1_init_ctx+:} false; then : break fi done if ${ac_cv_search_sha1_init_ctx+:} false; then : else ac_cv_search_sha1_init_ctx=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sha1_init_ctx" >&5 $as_echo "$ac_cv_search_sha1_init_ctx" >&6; } ac_res=$ac_cv_search_sha1_init_ctx if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo iberty fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bfd_init" >&5 $as_echo_n "checking for library containing bfd_init... " >&6; } if ${ac_cv_search_bfd_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bfd_init (); int main () { return bfd_init (); ; return 0; } _ACEOF for ac_lib in '' bfd; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bfd_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bfd_init+:} false; then : break fi done if ${ac_cv_search_bfd_init+:} false; then : else ac_cv_search_bfd_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bfd_init" >&5 $as_echo "$ac_cv_search_bfd_init" >&6; } ac_res=$ac_cv_search_bfd_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no bfd;exit 1 fi ;; no|*) ;; esac # # AC_HAS_ENABLE mutex_debug # if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MUTEX_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MUTEX_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-mutex_debug was given. if test "${enable_mutex_debug+set}" = set; then : enableval=$enable_mutex_debug; fi # CASE case "y$enable_mutex_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE mutex_debug DONE # # AC_HAS_ENABLE log_thread_id # if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_THREAD_ID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_THREAD_ID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_thread_id was given. if test "${enable_log_thread_id+set}" = set; then : enableval=$enable_log_thread_id; fi # CASE case "y$enable_log_thread_id" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_thread_id DONE # # AC_HAS_ENABLE log_pid # if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_PID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_PID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_pid was given. if test "${enable_log_pid+set}" = set; then : enableval=$enable_log_pid; fi # CASE case "y$enable_log_pid" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_pid DONE # # AC_HAS_ENABLE full_ascii7 # if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if FULL_ASCII7 has been enabled" >&5 $as_echo_n "checking if FULL_ASCII7 has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-full_ascii7 was given. if test "${enable_full_ascii7+set}" = set; then : enableval=$enable_full_ascii7; fi # CASE case "y$enable_full_ascii7" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 1 _ACEOF # CONDITIONAL Y if true; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 0 _ACEOF # CONDITIONAL N if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE full_ascii7 DONE # # AC_HAS_ENABLE non_aa_axfr_support # if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NON_AA_AXFR_SUPPORT has been enabled" >&5 $as_echo_n "checking if NON_AA_AXFR_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-non_aa_axfr_support was given. if test "${enable_non_aa_axfr_support+set}" = set; then : enableval=$enable_non_aa_axfr_support; fi # CASE case "y$enable_non_aa_axfr_support" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE non_aa_axfr_support DONE # # AC_HAS_WITH logdir # if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if logdir has been given" >&5 $as_echo_n "checking if logdir has been given... " >&6; } # ARG WITH # Check whether --with-logdir was given. if test "${with_logdir+set}" = set; then : withval=$with_logdir; # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_WITH_LOGDIR "$with_logdir" // $withval _ACEOF with_logdir="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES logdir="$withval" # ENDIF else # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 0 _ACEOF # CONDITIONAL N if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi with_logdir="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO logdir=${localstatedir}/log/yadifa # ENDIF fi # SUBST # AC_HAS_WITH logdir DONE { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has a sa_len field" >&5 $as_echo_n "checking if sockaddr has a sa_len field... " >&6; } cat > sockaddr_sa_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr sa; sa.sa_len = 4; } _ACEOF has_sockaddr_sa_len=0 ${CC} ${CFLAGS} sockaddr_sa_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_sa_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_sa_len.c sockaddr_sa_len if test $has_sockaddr_sa_len = yes; then HAS_SOCKADDR_SA_LEN_TRUE= HAS_SOCKADDR_SA_LEN_FALSE='#' else HAS_SOCKADDR_SA_LEN_TRUE='#' HAS_SOCKADDR_SA_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_SA_LEN $has_sockaddr_sa_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in has a sin_len field" >&5 $as_echo_n "checking if sockaddr_in has a sin_len field... " >&6; } cat > sockaddr_in_sin_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in sa; sa.sin_len = sizeof(struct sockaddr_in); } _ACEOF has_sockaddr_in_sin_len=0 ${CC} ${CFLAGS} sockaddr_in_sin_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in_sin_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in_sin_len.c sockaddr_in_sin_len if test $has_sockaddr_in_sin_len = yes; then HAS_SOCKADDR_IN_SIN_LEN_TRUE= HAS_SOCKADDR_IN_SIN_LEN_FALSE='#' else HAS_SOCKADDR_IN_SIN_LEN_TRUE='#' HAS_SOCKADDR_IN_SIN_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN_SIN_LEN $has_sockaddr_in_sin_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in6 has a sin6_len field" >&5 $as_echo_n "checking if sockaddr_in6 has a sin6_len field... " >&6; } cat > sockaddr_in6_sin6_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in6 sa; sa.sin6_len = sizeof(struct sockaddr_in6); } _ACEOF has_sockaddr_in6_sin6_len=0 ${CC} ${CFLAGS} sockaddr_in6_sin6_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in6_sin6_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in6_sin6_len.c sockaddr_in6_sin6_len if test $has_sockaddr_in6_sin6_len = yes; then HAS_SOCKADDR_IN6_SIN6_LEN_TRUE= HAS_SOCKADDR_IN6_SIN6_LEN_FALSE='#' else HAS_SOCKADDR_IN6_SIN6_LEN_TRUE='#' HAS_SOCKADDR_IN6_SIN6_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN6_SIN6_LEN $has_sockaddr_in6_sin6_len _ACEOF if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF if true; then HAS_DNSSEC_SUPPORT_TRUE= HAS_DNSSEC_SUPPORT_FALSE='#' else HAS_DNSSEC_SUPPORT_TRUE='#' HAS_DNSSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DNSSEC_SUPPORT 1 _ACEOF if true; then HAS_NSEC3_SUPPORT_TRUE= HAS_NSEC3_SUPPORT_FALSE='#' else HAS_NSEC3_SUPPORT_TRUE='#' HAS_NSEC3_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC3_SUPPORT 1 _ACEOF if true; then HAS_NSEC_SUPPORT_TRUE= HAS_NSEC_SUPPORT_FALSE='#' else HAS_NSEC_SUPPORT_TRUE='#' HAS_NSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC_SUPPORT 1 _ACEOF if false; then HAS_MIRROR_SUPPORT_TRUE= HAS_MIRROR_SUPPORT_FALSE='#' else HAS_MIRROR_SUPPORT_TRUE='#' HAS_MIRROR_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MIRROR_SUPPORT 0 _ACEOF if false; then HAS_DROPALL_SUPPORT_TRUE= HAS_DROPALL_SUPPORT_FALSE='#' else HAS_DROPALL_SUPPORT_TRUE='#' HAS_DROPALL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DROPALL_SUPPORT 0 _ACEOF if false; then HAS_TCL_TRUE= HAS_TCL_FALSE='#' else HAS_TCL_TRUE='#' HAS_TCL_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TCL 0 _ACEOF if false; then HAS_RDTSC_TRUE= HAS_RDTSC_FALSE='#' else HAS_RDTSC_TRUE='#' HAS_RDTSC_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RDTSC 0 _ACEOF if false; then HAS_RRCACHE_ENABLED_TRUE= HAS_RRCACHE_ENABLED_FALSE='#' else HAS_RRCACHE_ENABLED_TRUE='#' HAS_RRCACHE_ENABLED_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RRCACHE_ENABLED 0 _ACEOF LDDYN="-Wl,-Bdynamic" LDSTAT="-Wl,-Bstatic" echo -n "checking if -Bstatic & -Bdynamic are supported ... " $CC -Wl,-Bstatic 2>&1|grep Bstatic > /dev/null if [ $? -eq 0 ] then echo "not supported"; LDDYN="" LDSTAT="" else echo "supported"; fi LIBS="$LDDYN $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_gethostbyname=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_gethostbyname+:} false; then : break fi done if ${ac_cv_search_gethostbyname+:} false; then : else ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 $as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_socket+:} false; then : break fi done if ${ac_cv_search_socket+:} false; then : else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi if [ $requires_tcl -eq 1 ] then echo "TCL is required by this setup ..." CFLAGS="$CFLAGS -DWITHTCLINCLUDED -I${tcl_includedir}" LDFLAGS="-L${tcl_libdir} $LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing Tcl_Main" >&5 $as_echo_n "checking for library containing Tcl_Main... " >&6; } if ${ac_cv_search_Tcl_Main+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char Tcl_Main (); int main () { return Tcl_Main (); ; return 0; } _ACEOF for ac_lib in '' ${tcl_version}; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_Tcl_Main=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_Tcl_Main+:} false; then : break fi done if ${ac_cv_search_Tcl_Main+:} false; then : else ac_cv_search_Tcl_Main=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_Tcl_Main" >&5 $as_echo "$ac_cv_search_Tcl_Main" >&6; } ac_res=$ac_cv_search_Tcl_Main if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo "could not find ${tcl_version} :: tcl_includedir=${tcl_includedir} :: tcl_libdir=${tcl_libdir}"; exit 1 fi fi if [ $requires_ssl -eq 1 ] then echo "SSL is required by this setup ..." SSLDEPS="" echo "Finding the SSL dependencies" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing deflate" >&5 $as_echo_n "checking for library containing deflate... " >&6; } if ${ac_cv_search_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflate (); int main () { return deflate (); ; return 0; } _ACEOF for ac_lib in '' z; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_deflate=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_deflate+:} false; then : break fi done if ${ac_cv_search_deflate+:} false; then : else ac_cv_search_deflate=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_deflate" >&5 $as_echo "$ac_cv_search_deflate" >&6; } ac_res=$ac_cv_search_deflate if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi echo "SSLDEPS=${SSLDEPS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SSL is available" >&5 $as_echo_n "checking if SSL is available... " >&6; } ac_check_lib_ssl=0 # Check whether --with-openssl_lib was given. if test "${with_openssl_lib+set}" = set; then : withval=$with_openssl_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LDFLAGS="-L$with_openssl_lib $SSLDEPS $LDFLAGS" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi # Check whether --with-openssl_include was given. if test "${with_openssl_include+set}" = set; then : withval=$with_openssl_include; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CFLAGS="-I$with_openssl_include $CFLAGS $CFLAGS3264" echo "CFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi # Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; echo "yes" OPENSSL="${withval}" CFLAGS="-I$with_openssl/include $CFLAGS $CFLAGS3264" LDFLAGS="-L$with_openssl/lib $SSLDEPS $LDFLAGS" echo "CFLAGS=$CFLAGS" echo "LDFLAGS=$LDFLAGS" ac_check_lib_ssl=1 else echo "no" CFLAGS="$CFLAGS $CFLAGS3264" LDFLAGS="$SSLDEPS $LDFLAGS" echo "CFLAGS=${CFLAGS}" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi if [ $ac_check_lib_ssl -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RSA_new" >&5 $as_echo_n "checking for library containing RSA_new... " >&6; } if ${ac_cv_search_RSA_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char RSA_new (); int main () { return RSA_new (); ; return 0; } _ACEOF for ac_lib in '' crypto; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_RSA_new=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_RSA_new+:} false; then : break fi done if ${ac_cv_search_RSA_new+:} false; then : else ac_cv_search_RSA_new=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RSA_new" >&5 $as_echo "$ac_cv_search_RSA_new" >&6; } ac_res=$ac_cv_search_RSA_new if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5 $as_echo_n "checking for library containing SSL_library_init... " >&6; } if ${ac_cv_search_SSL_library_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char SSL_library_init (); int main () { return SSL_library_init (); ; return 0; } _ACEOF for ac_lib in '' ssl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_SSL_library_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_SSL_library_init+:} false; then : break fi done if ${ac_cv_search_SSL_library_init+:} false; then : else ac_cv_search_SSL_library_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5 $as_echo "$ac_cv_search_SSL_library_init" >&6; } ac_res=$ac_cv_search_SSL_library_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi fi else echo "SSL is not required by this setup" fi if [ $requires_dnscore -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Core library" >&5 $as_echo_n "checking for the DNS Core library... " >&6; } # Check whether --with-dnscore was given. if test "${with_dnscore+set}" = set; then : withval=$with_dnscore; CFLAGS="-I$with_dnscore/include $CFLAGS" LDFLAGS="-L$with_dnscore/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnscore_init in -ldnscore" >&5 $as_echo_n "checking for dnscore_init in -ldnscore... " >&6; } if ${ac_cv_lib_dnscore_dnscore_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnscore $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnscore_init (); int main () { return dnscore_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnscore_dnscore_init=yes else ac_cv_lib_dnscore_dnscore_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnscore_dnscore_init" >&5 $as_echo "$ac_cv_lib_dnscore_dnscore_init" >&6; } if test "x$ac_cv_lib_dnscore_dnscore_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSCORE 1 _ACEOF LIBS="-ldnscore $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnscore ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnscore_init in -ldnscore" >&5 $as_echo_n "checking for dnscore_init in -ldnscore... " >&6; } if ${ac_cv_lib_dnscore_dnscore_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnscore $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnscore_init (); int main () { return dnscore_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnscore_dnscore_init=yes else ac_cv_lib_dnscore_dnscore_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnscore_dnscore_init" >&5 $as_echo "$ac_cv_lib_dnscore_dnscore_init" >&6; } if test "x$ac_cv_lib_dnscore_dnscore_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSCORE 1 _ACEOF LIBS="-ldnscore $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnscore/include $CFLAGS" LDFLAGS="-L../../lib/dnscore/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnscore $LDDYN" fi fi fi if [ $requires_dnsdb -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Database library" >&5 $as_echo_n "checking for the DNS Database library... " >&6; } # Check whether --with-dnsdb was given. if test "${with_dnsdb+set}" = set; then : withval=$with_dnsdb; CFLAGS="-I$with_dnsdb/include $CFLAGS" LDFLAGS="-L$with_dnsdb/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zdb_init in -ldnsdb" >&5 $as_echo_n "checking for zdb_init in -ldnsdb... " >&6; } if ${ac_cv_lib_dnsdb_zdb_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnsdb $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zdb_init (); int main () { return zdb_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnsdb_zdb_init=yes else ac_cv_lib_dnsdb_zdb_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnsdb_zdb_init" >&5 $as_echo "$ac_cv_lib_dnsdb_zdb_init" >&6; } if test "x$ac_cv_lib_dnsdb_zdb_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSDB 1 _ACEOF LIBS="-ldnsdb $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnsdb ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zdb_init in -ldnsdb" >&5 $as_echo_n "checking for zdb_init in -ldnsdb... " >&6; } if ${ac_cv_lib_dnsdb_zdb_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnsdb $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zdb_init (); int main () { return zdb_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnsdb_zdb_init=yes else ac_cv_lib_dnsdb_zdb_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnsdb_zdb_init" >&5 $as_echo "$ac_cv_lib_dnsdb_zdb_init" >&6; } if test "x$ac_cv_lib_dnsdb_zdb_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSDB 1 _ACEOF LIBS="-ldnsdb $LIBS" else exit fi else echo "embedded" CFLAGS="-I${srcdir}/../../lib/dnsdb/include $CFLAGS" LDFLAGS="-L../../lib/dnsdb/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnsdb $LDDYN" fi fi fi if [ $requires_dnszone -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Zone library" >&5 $as_echo_n "checking for the DNS Zone library... " >&6; } # Check whether --with-dnszone was given. if test "${with_dnszone+set}" = set; then : withval=$with_dnszone; CFLAGS="-I$with_dnszone/include $CFLAGS" LDFLAGS="-L$with_dnszone/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnszone_init in -ldnszone" >&5 $as_echo_n "checking for dnszone_init in -ldnszone... " >&6; } if ${ac_cv_lib_dnszone_dnszone_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnszone $LDSTAT -ldnsdb -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnszone_init (); int main () { return dnszone_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnszone_dnszone_init=yes else ac_cv_lib_dnszone_dnszone_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnszone_dnszone_init" >&5 $as_echo "$ac_cv_lib_dnszone_dnszone_init" >&6; } if test "x$ac_cv_lib_dnszone_dnszone_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSZONE 1 _ACEOF LIBS="-ldnszone $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnszone ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnszone_init in -ldnszone" >&5 $as_echo_n "checking for dnszone_init in -ldnszone... " >&6; } if ${ac_cv_lib_dnszone_dnszone_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnszone $LDSTAT -ldnsdb -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnszone_init (); int main () { return dnszone_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnszone_dnszone_init=yes else ac_cv_lib_dnszone_dnszone_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnszone_dnszone_init" >&5 $as_echo "$ac_cv_lib_dnszone_dnszone_init" >&6; } if test "x$ac_cv_lib_dnszone_dnszone_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSZONE 1 _ACEOF LIBS="-ldnszone $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnszone/include $CFLAGS" LDFLAGS="-L../../lib/dnszone/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnszone $LDDYN" fi fi fi if [ $requires_dnslg -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Looking Glass library" >&5 $as_echo_n "checking for the DNS Looking Glass library... " >&6; } # Check whether --with-dnslg was given. if test "${with_dnslg+set}" = set; then : withval=$with_dnslg; CFLAGS="-I$with_dnslg/include $CFLAGS" LDFLAGS="-L$with_dnslg/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnslg_init in -ldnslg" >&5 $as_echo_n "checking for dnslg_init in -ldnslg... " >&6; } if ${ac_cv_lib_dnslg_dnslg_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnslg $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnslg_init (); int main () { return dnslg_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnslg_dnslg_init=yes else ac_cv_lib_dnslg_dnslg_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnslg_dnslg_init" >&5 $as_echo "$ac_cv_lib_dnslg_dnslg_init" >&6; } if test "x$ac_cv_lib_dnslg_dnslg_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSLG 1 _ACEOF LIBS="-ldnslg $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnslg ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnslg_init in -ldnslg" >&5 $as_echo_n "checking for dnslg_init in -ldnslg... " >&6; } if ${ac_cv_lib_dnslg_dnslg_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnslg $LDSTAT -ldnscore $LDDYN $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnslg_init (); int main () { return dnslg_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnslg_dnslg_init=yes else ac_cv_lib_dnslg_dnslg_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnslg_dnslg_init" >&5 $as_echo "$ac_cv_lib_dnslg_dnslg_init" >&6; } if test "x$ac_cv_lib_dnslg_dnslg_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSLG 1 _ACEOF LIBS="-ldnslg $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnslg/include $CFLAGS" LDFLAGS="-L../../lib/dnslg/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnslg $LDDYN" fi fi fi LDFLAGS="$LDFLAGS $LDDYN" LIBS="$LDDYN $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LTO has been enabled" >&5 $as_echo_n "checking if LTO has been enabled... " >&6; } # Check whether --enable-lto was given. if test "${enable_lto+set}" = set; then : enableval=$enable_lto; enable_lto=yes else enable_lto=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lto" >&5 $as_echo "$enable_lto" >&6; } case "$enable_lto" in yes) type -p gold if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: 'gold' not found" >&5 $as_echo "WARNING: 'gold' not found" >&6; } sleep 1 fi if [ ! "$LD" = "" ] then $LD -v |grep -i gold > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: LTO enabled but LD ($LD) is not gold" >&5 $as_echo "WARNING: LTO enabled but LD ($LD) is not gold" >&6; } sleep 1 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: LD not defined" >&5 $as_echo "LD not defined" >&6; } fi if true; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; no|*) if false; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; esac CPPFLAGS="$CPPFLAGS -DDNSCORE_BUILD" for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done done # Provide a safe default value. : "${ac_cv_func_select_args=int,int *,struct timeval *}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG1 $1 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in bzero memset select socket do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_STRDUP_TRUE}" && test -z "${HAS_STRDUP_FALSE}"; then as_fn_error $? "conditional \"HAS_STRDUP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_STRDUP_TRUE}" && test -z "${HAS_STRDUP_FALSE}"; then as_fn_error $? "conditional \"HAS_STRDUP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_SA_LEN_TRUE}" && test -z "${HAS_SOCKADDR_SA_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_SA_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN_SIN_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN_SIN_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN_SIN_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN6_SIN6_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DNSSEC_SUPPORT_TRUE}" && test -z "${HAS_DNSSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DNSSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC3_SUPPORT_TRUE}" && test -z "${HAS_NSEC3_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC3_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC_SUPPORT_TRUE}" && test -z "${HAS_NSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MIRROR_SUPPORT_TRUE}" && test -z "${HAS_MIRROR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MIRROR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DROPALL_SUPPORT_TRUE}" && test -z "${HAS_DROPALL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DROPALL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TCL_TRUE}" && test -z "${HAS_TCL_FALSE}"; then as_fn_error $? "conditional \"HAS_TCL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RDTSC_TRUE}" && test -z "${HAS_RDTSC_FALSE}"; then as_fn_error $? "conditional \"HAS_RDTSC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRCACHE_ENABLED_TRUE}" && test -z "${HAS_RRCACHE_ENABLED_FALSE}"; then as_fn_error $? "conditional \"HAS_RRCACHE_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by dnscore $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ dnscore config.status 2.1.6-5826 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "include/dnscore/dnscore-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/dnscore/dnscore-config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi make buildinfo.h echo echo "SUMMARY for DNSCORE:" echo "--------------------" echo echo "CC .................................. : $CC" echo "LD .................................. : $LD" echo "AR .................................. : $AR" echo "CFLAGS .............................. : $CFLAGS" echo "CPPFLAGS ............................ : $CPPFLAGS" echo "LDFLAGS ............................. : $LDFLAGS" echo "LIBS ................................ : $LIBS" echo echo "ZALLOC .............................. : $enable_zalloc" echo "ZALLOC STATISTICS ................... : $enable_zalloc_statistics" echo "ZALLOC DEBUG ........................ : $enable_zalloc_debug" echo "ACL ................................. : $enable_acl" echo "TSIG ................................ : $enable_tsig" echo "MASTER .............................. : $enable_master" echo "DYNUPDATE ........................... : $enable_dynupdate" echo "RRSIG MANAGEMENT .................... : $enable_rrsig_management" echo "CTRL ................................ : $enable_ctrl" echo "NSEC ................................ : $enable_nsec" echo "NSEC3 ............................... : $enable_nsec3" echo "RRL ................................. : $enable_rrl" echo if [ ! "${OPENSSL}" = "" ] then echo "Using OpenSLL from .................. : ${OPENSSL}" fi echo echo "Install prefix ...................... : $prefix" echo "Install sysconf ..................... : $sysconfdir" echo echo echo "DNSCORE DONE" echo "------------" echo echo yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/missing0000644000077100007710000000013212473710127020136 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597651.289344534 yadifa-2.1.6-5826/lib/dnscore/missing0000755000077100007710000001533012473710127017747 0ustar00yadifayadifa00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 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, 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/COPYING0000644000077100007710000000012412650131756017600 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.797344 30 ctime=1454597651.244344534 yadifa-2.1.6-5826/lib/dnscore/COPYING0000664000077100007710000000312012650131756017401 0ustar00yadifayadifa00000000000000 Copyright (c) 2011-2016, EURid. All rights reserved. The YADIFA TM software product is provided under the BSD 3-clause license: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of EURid nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/README0000644000077100007710000000012412654656702017434 xustar000000000000000027 mtime=1454595522.700671 27 atime=1454597464.802344 30 ctime=1454597651.259344534 yadifa-2.1.6-5826/lib/dnscore/README0000664000077100007710000005773012654656702017255 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ 20160126: YADIFA 2.1.6 Fixes: - fixed an issue where the referral would not be measured for UDP on a optimised build. 20160108: YADIFA 2.1.5 Dynamic updates do not use temporary files anymore which improves their general performance. The statistics now shows the referrals. Fixes: - fixed an issue where getting a huge incremental transfer would prevent the server from answering queries while applying the changes. - fixed an issue serving IXFR that would occur when a incremental change step was bigger than 64KB - fixed an issue for Solaris with the memory alignment fix not active everywhere - fixed an issue on the Solaris build settings - fixed an issue where sometimes yadifad would not find a configuration file given as a parameter with a relative path - fixed an issue where a wild-card would not be properly returned with an AXFR - fixed an issue where dynamically updating a zone at a speed such that the zone file would need to be written multiple times on disk before finishing the previous write could lead to a deadlock 20151026: YADIFA 2.1.4 The zone reader error reporting has been improved. Stacktrace support added for Solaris. Known issue: - Adding and or removing NSEC3PARAM dynamically is not properly handled. Fixes: - fixed an issue where an NSEC3 answer proving a * query would lead to a crash - fixed an issue where a private key may be not recognised as such - fixed an issue where dynamic update prerequisite check would fail a valid match - fixed an issue where zone signature maintenance would only start if all private keys were available. 20150821: YADIFA 2.1.3 Fixes: - fixed an issue that could lead to a crash at startup - fixed an issue where parsing a TYPE#### record would stop the parser prematurely 20150814: YADIFA 2.1.2 The ./configure script has a new option: --enable-full-ascii7 This changes the behaviour of DNS name validation to accept all the ASCII7 characters instead of only the DNS-space ones. Enabling this option is not recommended. Fixes: - fixes an issue where the hmac-shaX identification string sent with a TSIG had the suffix ".sig-alg.reg.int". 20150714: YADIFA 2.1.1 The yadifa command line has a new option: --config|-c file : read the specific configuration file instead of ~/.yadifa.rc Issues detected on the NSEC3 database have now been upgraded from debug to info/warning Fixes: - fixed an issue where, on some cases; the garbage collector for the zones was not triggering for a long time. - fixed an issue in the Makefile (courtesy of DENIC) - fixed an issue where a few bytes could be leaked in some rare cases when failing to unload a zone - fixed an issue in RRL where some values of IPv6 prefix - fixed an issue accepting some answers on IXFR transfers 20150424: YADIFA 2.1.0 New journal file format: This new format addresses a few issues like having maximum journal file and a relatively constant random access time even for very big sizes. The internal messaging queue has been changed to address huge amount of zones. New CHaos queries supported: hostname id.server Known issues: _ building successfully with LTO may require to append both AR=gcc-ar and RANLIB=gcc-ranlib to the ./configure command 20150403: YADIFA 2.0.6 This release is a public release. This minor update's sole purpose is to fix YADIFA builds on OpenBSD. Fixes: - fixed a crash that could occur while sending a massive amount of notifications - OpenBSD builds are fixed. Tested on: OpenBSD 5.6 amd64, standard installation. Configure: ./configure Tested on: OpenBSD 5.6 amd64, with gcc 4.9 installed. Configure: ./configure CC=egcc 20150226: YADIFA 2.0.5 This release is a public release. Fixes: - fixed an issue with huge IXFR transfers as a master - fixed an issue with notifications on slave-slave-master setup - fixed an issue with a potential infinite loop loading an AXFR from a master - fixed missing hmac-sha* from configuration - fixed an issue with TLSA records parsing - fixed an issue with base 16 encoding - fixed an issue parsing * domains - fixed an issue with some RRL motivated answers - increased the maximum number of network interfaces from 5 to 16 - fixed an error in the configuration examples where "statistics" was used instead of "stats" - minor fixes and improvements 20141216: YADIFA 2.0.4 This release is a public release. By popular demand, the default log file directory is now PREFIX/var/log/yadifa. It can be set using --with-logdir=/my/dir Improved build mechanism. It has been tested to work automatically on Linux, FreeBSD, OSX, SunOS. RedHat family builds will use -O2 as maximum optimisations. Note that some optional features are now enabled by default but can be disabled. Fixes: - fixed an issue with the AXFR transfer where the serial number would not be properly taken into account - fixed an issue with the notify mechanism that could occur if the server was only listening to 127.0.0.1 - fixed an issue with bogus DNSKEY records that may potentially lead to a crash in openssl - fixed a reported potential "tmpfile" vulnerability on DEBUG builds (generated with make debug) - fixed an issue with IPv6 connections on some architectures - typos fixes - minor fixes and improvements 20141104: Architecture portability enhancements. On Solaris, if no --enable-force32bits nor --enable-force64bits is set, then 64 bits will be forced (fixes an issue at link-time) ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC3 Extensions Required, dynamically linked, not stripped, no debugging information available PATH=/opt/csw/bin:/usr/ccs/bin:$PATH ./configure --enable-force32bits PATH=/opt/csw/bin:/usr/ccs/bin:$PATH make 20141030: Architecture portability enhancements. FreeBSD 9 FreeBSD dnode3 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 gcc (GCC) 4.2.1 20070831 patched [FreeBSD] ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900044), not stripped Ubuntu Linux dnode10 3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xe3b8601b9b5e59f8c9ce519cacbe9b8ff544ff1d, not stripped OSX Darwin RD-Mac-Mini.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Mach-O 64-bit executable x86_64 20141029: Architecture portability enhancements. uname -a gcc --version file yadifad YellowDog Linux Linux 2.6.29-3.ydl61.4 #1 SMP Mon Sep 7 14:50:27 PDT 2009 ppc64 ppc64 ppc64 GNU/Linux gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available Debian PPC64 Linux 3.2.0-3-powerpc64 #1 SMP Mon Jul 23 08:03:56 UTC 2012 ppc64 GNU/Linux gcc (Debian 4.6.3-8) 4.6.3 ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xedc47c984a4af7eb9a7ecbc0f135e4d064ba08f0, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available 20141016: YADIFA 2.0.2 TCP fallback support on truncation 20140905: YADIFA 2.0.0 This release is a public release Fixes: - fixed a log incorrectly reporting an error when the client didn't close the TCP connection fast enough - fixed an issue with the statistics on TCP queries Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140829: YADIFA 2.0.0-beta3-public This release is a public release - --disable-master feature at configure now builds a slave-only server Fixes: - fixed an issue with TSIG signed queries - fixed an issue with thread pool live resizing - fixed an issue where reading an undeleted obsolete journal ending at the start of a newly transferred zone from the master would incorrectly trigger an error Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140630: YADIFA 2.0.0-beta2-public This release is a public release - basepath disabled - pidpath removed, only pidfile remains - log reopen notification is now timestamped - slave zones no longer complain about missing NSEC/NSEC3 private keys - the error code ZRE_FILE_NOT_FOUND has been replaced by the more accurate code ZRE_NO_VALID_FILE_FOUND - default logging settings no longer output debug Fixes: - fixed issue in flag computation (AD,CD) - fixed an issue with journal truncation sometimes leading to a crash - zone parsing now correctly accepts '#' as a comment marker - zone parsing now rejects wrong fqdn as soon as it reads them, leading to a more accurate error message - removing the last dnskey of a zone no longer crashes the server Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. yadifa remote client commands prototype is now available with the following supported commands: -shutdown shuts down yadifa e.g. ./yadifa -s "192.0.2.1 port 53" -t shutdown -cfgreload reloads the and sections of the yadifad configuration e.g. ./yadifa -s "192.0.2.1 port 53" -t cfgreload -logreopen closes and reopen the log files e.g. ./yadifa -s "192.0.2.1 port 53" -t logreopen -freezeall prevents all zones from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freezeall -freeze prevents a zone from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freeze -q somedomain.eu -unfreezeall enables updates of all zones again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreezeall -unfreeze enables updates of a zone again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreeze -q somedomain.eu In order to work, the allow-control ACL must be defined either in
for the global commands and may also be defined in for the ones targeting a specific zone. e.g. allow-control 127.0.0.1 Note that tsig is not supported in the client yet. 20140528: YADIFA 2.0.0-beta1-public This release is a public release - NSID implemented (enabled at ./configure time with --enable-nsid - generic parser for: - getops - zone file - resolv.conf - configuration - '@' can now be used in a zone file - new binary for controlling 'yadifad' (yadifa) - framework is rewritten for multi core systems - single core server has been removed Fixes: - fixed several minor issues Know issues: - removing all dnskeys from a zone file crashes the server - yadifa has some issues with nodelay, nocork 20130424: YADIFA 1.1.0 _ added DSA signature _ added SHA-256 SHA-384 SHA-512 digest algorithms _ now supports additional DNSSEC algorithms: DSASHA1 DSASHA1_NSEC3 RSASHA256_NSEC3 RSASHA512_NSEC3 _ Respone Rate Limitation implemented (enabled at ./configure time with --enable-rrl) _ --enable-tiny-footprint now reduces the memory usage further by reducing the standard log queue from 2^20 to 2^12 entries _ the general speed has been slightly improved _ dynamic updates pending for more than 3 seconds are now dropped with an error _ dynamic provisioning Fixes: _ fixed a memory leak that could occur at NSEC3 generation when loading the zone failed in a particular way _ fixed a memory leak at ixfr send _ fixed handling of '_' character that was improperly stored in the database _ fixed bandwidth limit settings (tcp stream in and out) not always being taken from the configuration _ fixed TSIG answer verification for notifies _ fixed error codes not being registered and thus logged as unknown hexadecimal error code. _ other minor fixes 20130612: YADIFA 1.0.3 Fixes only (backports from 1.1.0) Fixes: _ fixed an issue preventing YADIFA from being build from another directory _ fixed an issue with OSX systems where gsed has to be used instead of sed _ fixed an issue with the '_' character not being properly handled _ fixed an issue where reading MX record from a zone file would incorrecly be rejected as invalid _ fixed an issue where the OPT record would not be properly written _ fixed an issue where an undefined ACL reference would be silently ignored _ fixed missing code tags for several error codes. From now on unregistered codes are dumped in hexadicimal. _ fixed portability issues with BSD and OSX _ fixed several minor issues 20120921: YADIFA 1.0.2 Fixes only Fixes: _ fixed an issue where the journal file was sometimes not properly closed at the end of a task _ fixed an issue where the TCP usage slots would sometimes wrongly return that they were all being used _ fixed an issue on IXFR processing (slave side) where the type of answer from the master would not be properly detected _ fixed an issue with TSIG on secrets not exactly 16 bytes long (binary form) _ fixed an issue on 32 bits architectures where the sig-validity-* fields would not be properly handled if not set on each zone section. _ slightly improved the replay time of big journal files _ fixed several minor issues Known issues: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120709: YADIFA 1.0.1 _ logging repeat compression is now by channel instead of global Fixes: _ fixed an issue where glibc whould assert if libgcc_s.so (libgcc_s.so.1) and libc.so (libc.so.6) where not available inside the chrooted directory of YADIFA _ fixed an issue in the syslog module Known issues: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120625: YADIFA 1.0.0 _ LTO support can be enabled with --enable-lto but this is not working with clang. LTO does not increase the performance significally _ parallel processing of listening addresses can now be enabled. It can be set using thread-count-by-address in the
section. By default YADIFA will not use parallel processing as this feature has not been as thoroughly tested as the single-thread processing model _ default parameters tuning _ fixes Known issue: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 20120530: YADIFA 1.0.0RC3 _ the configuration parser now ignores undefined logger names and report them with a warning _ syslog messages are now put in the name of "yadifad" instead of the name used for the "syslog" channel _ syslog messages do not print the time from YADIFA anymore _ improved the steps involved in loading a locally cached slave zone _ zones are now loaded in background _ man page yadifad-conf.man5 renamed into yadifad.conf.man5 Fixes: _ AXFR/IXFR answers with the RA bit set are nolonger rejected as invalid _ YADIFA now answers to SIGINT again (shutdown) _ fixed an issue where obsolete AXFR files were not always being deleted _ fixed an issue occurring when both IPv4 and IPv6 were available to handle a notify _ fixed journal replay issue where some RRSIGs records were not properly removed _ fixed an issue occurring with IPv6 queries _ fixed an issue in the generation of a specific NSEC3 error answer _ fixed named query style layout Known issue: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120328: YADIFA 1.0.0RC2 _ fixed logging issue on work file creation error _ fixed an issue where IXFR queries could be rejected as being wrongly formatted _ fixed an issue in the query logging text _ enabled command line options ( -u uid -g gid -d ) 20120319: YADIFA 1.0.0RC1 Is a full functional authoritative name server: - works as primary or secondary name server - AXFR - IXFR - NOTIFY - NSUPDATE - TSIG - CLASSES: - IN - CH (just for version) - TYPES: - AAAA - CNAME - DNSKEY - DS - HINFO - MX - NAPTR - NS - NSEC3 - NSEC3PARAM - NSEC - PTR - RRSIG - SOA - SRV - SSHFP - TXT - Automatic resigning - DNSSEC algorithms: - 5 (RSASHA1) - 7 (RSASHA1-NSEC3 - ACL's KNOWN ISSUES: NSEC3: _ cannot work with multiple NSEC3PARAM chains with mixed OPT-IN/OUT settings _ adding a new NSEC3 chain expects that the master sends the NSEC3PARAM first (it does not seems to be always the case) We have a case where a master starts with 2 thousands NSEC3 opt-out records then adds 6 millions NSEC3 opt-in records but does not give the NSEC3PARAM record first. The slave server rejects them all because it's unable to link them to a chain. (This one has high priority) DNSSEC: _ it is not allowed to change the zone security mode (unsecure, NSEC, or NSEC3). Once the zone is loaded it keeps its security mode. _ dynamic updates of NSEC as well as NSEC3 records are refused QUIT: the server will shutdown on the following conditions: _ detection of an impossible situation or an internal integrity issue (ie: for any reason the SOA has vanished from a zone) _ memory limit reached which prevents any more work _ ipc issue which prevent internal services communication ACL: _ since the access control is set by zone and CHAOS class is not implemented as a configurable zone, it is not possible (yet) to specifically block CHAOS queries. 20111121: YADIFA 0.5.5 - many fixes KNOWN ISSUE: NSEC3 slave zone replay fails. 20110706: YADIFA 0.5.0 - slave mode, AXFR/IXFR (no TSIG yet for the slave-side transfer) - answers to a notify from the master - polls the (first) master on the masters list - maintains the .axfr & .ix files (deletes the obsoletes ones) - TSIG queries are checked - Replays the zone journal on startup after the zone load (journaling) - Answers IXFR queries (journaling) 20110601: YADIFA 0.4.0 Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries with TSIG - nsupdate functionality (journaling) - TSIG on client server side will be transmitted, but not checked - ACL works - The zone has SOA, NS A resource records. 20110524: YADIFA 0.3.0 First release internally of yadifad 20110524115500 GMT+1. Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries - The zone has SOA, NS A resource records. 20091224: YADIFA 0.2.0 _ Answers AXFR queries _ ACL based on IP and TSIG (not all query types are ACL'ed yet) 20091104: YADIFA 0.1.0 YADIFA is a work in progress. The main goal is to have an alternative for BIND or NSD. Version 0.1.0 is an authoritative server only. It has no: - AXFR/IXFR functionality - dynupdate - support for NSEC - support for NSEC3 - caching mechanism - additional tools (eg.dig, dnssectools, drill,...) It has: - a very fast way to give authoritative answer - a very fast method for loading the database and checking the zone files This first release is to have a feeling how it works in an operational environment. TODO Everything what is not implemented, has to be implemented. Most of the code is there, but is not activated. No comformity tests has been done. (This of course is on the todo list) Bug Reports and Mailing Lists Bugs reports should be sent to bugreport@yadifa.eu yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/include0000644000077100007710000000013212654663022020112 xustar000000000000000030 mtime=1454597650.778344534 30 atime=1454597650.778344534 30 ctime=1454597650.778344534 yadifa-2.1.6-5826/lib/dnscore/include/0000775000077100007710000000000012654663022017775 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnscore/include/PaxHeaders.8028/dnscore0000644000077100007710000000013212654663023021550 xustar000000000000000030 mtime=1454597651.237344534 30 atime=1454597650.778344534 30 ctime=1454597651.237344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/0000775000077100007710000000000012654663023021433 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/timems.h0000644000077100007710000000012412650131756023274 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.588344 30 ctime=1454597651.188344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/timems.h0000664000077100007710000000532512650131756023106 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscoretools Generic Tools * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _TIMEMS_H #define _TIMEMS_H #include #include #ifdef __cplusplus extern "C" { #endif /* * Return the time in us */ u64 timeus(); /* * Return the time in ms */ u64 timems(); /* * Wait until the ms is incremented, then return the time in ms */ u64 timems_new(); /** * usleep only support a limited range of time (sometimes 2^32 us, sometimes < 1 s) * This wrapper ensures time supported is up to 4294967295.000000 seconds * * @param us the number of microseconds to wait for, can range from 0 to 4294967295000000 micro seconds */ void usleep_ex(u64 us_); #ifdef __cplusplus } #endif #endif /* _TIMEMS_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dns_resource_record.h0000644000077100007710000000012412650131756026027 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.579344 30 ctime=1454597650.932344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dns_resource_record.h0000664000077100007710000000706212650131756025641 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscore * @ingroup dnscore * @brief Wire resource record reader * * Wire resource record reader * * @{ */ #ifndef _DNS_RESOURCE_RECORD_H_ #define _DNS_RESOURCE_RECORD_H_ #include #include #include typedef struct dns_resource_record dns_resource_record; struct dns_resource_record { u8 *rdata; /* allocated */ struct type_class_ttl_rdlen tctr; /* I used this already known structure to make passing theses values easier */ u16 rdata_size; u16 rdata_buffer_size; u8 name_len; /* dnsname_len(name) */ u8 name[MAX_DOMAIN_LENGTH]; }; void dns_resource_record_init(dns_resource_record *rr); void dns_resource_record_clear(dns_resource_record *rr); /** * * This utility function reads an uncompressed record from a stream. * Compression has to be handled by the underlying input_stream * If an error code is returned, then most likely the stream is broken. * * @param is * @param rr * * @return an error code or the number of bytes read */ ya_result dns_resource_record_read(dns_resource_record *rr, input_stream *is); /** * * This utility function writes an uncompressed record to a stream. * Compression has to be handled by the underlying output_stream * If an error code is returned, then most likely the stream is broken. * * @param os * @param rr * * @return an error code or the number of bytes written */ ya_result dns_resource_record_write(dns_resource_record *rr, output_stream *os); bool dns_resource_record_equals(dns_resource_record *a, dns_resource_record *b); bool dns_resource_record_match(dns_resource_record *a, dns_resource_record *b); #endif // _DNS_RESOURCE_RECORD_H_ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/async.h0000644000077100007710000000012412650131756023113 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.506344 30 ctime=1454597650.835344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/async.h0000664000077100007710000001501412650131756022721 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #ifndef ASYNC_H #define ASYNC_H #define ASYNC_QUEUE_TYPE_RINGBUFFER 1 #define ASYNC_QUEUE_TYPE_DLL 2 #define ASYNC_QUEUE_TYPE ASYNC_QUEUE_TYPE_DLL #if ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_DLL #include #elif ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_RINGBUFFER #include #else #error "ASYNC_QUEUE_TYPE not set" #endif #include #ifdef __cplusplus extern "C" { #endif /** * * Typically, the handler will be a small function that pushes the message in another processing queue, * with or without changing the id (so processors can be chained) * * The handler can also be a function that allows another function to proceed (delegation mechanism, in the .net linguo) * This would make the handling synchronous but the processing parallel * */ // used by threads to process a task then push it further in the assembly line struct async_message_s; typedef void async_done_callback(struct async_message_s *msg); struct async_wait_s { pthread_mutex_t mutex; pthread_cond_t cond_wait; volatile s32 wait_count; volatile s32 error_code; }; typedef struct async_wait_s async_wait_s; struct async_queue_s { #if ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_DLL threaded_dll_cw queue; #elif ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_RINGBUFFER threaded_ringbuffer_cw queue; #else threaded_queue queue; #endif pace_s pace; }; typedef struct async_queue_s async_queue_s; struct async_message_s { s32 id; // the message id for the processor s32 error_code; // the error code to be set by the processor void *args; // the arguments for the processor async_done_callback *handler; // what must be called when the processor has finished working void *handler_args; // complementary arguments for the handler volatile u64 start_time; }; typedef struct async_message_s async_message_s; /** * * Initialises a synchronisation point * count is the number of releases to do before the async_wait call returns * * @param aw * @param count * @return */ void async_wait_init(async_wait_s *aw, s32 count); /** * Waits until the count has be reduced to 0 (or below if something bad is going on) * * @param aw * @return */ void async_wait(async_wait_s *aw); /** * Waits until the count has be reduced to 0 (or below if something bad is going on) * OR until the amount of microseconds has elapsed. * * @param aw * @param usec * @return true if and only if the wait counter reached 0 */ bool async_wait_timeout(async_wait_s *aw, u64 usec); /** * Waits until the count has be reduced to 0 (or below if something bad is going on) * OR until the epoch in microseconds has been reached. * * @param aw * @param usec * @return true if and only if the wait counter reached 0 */ bool async_wait_timeout_absolute(async_wait_s *aw, u64 epoch_usec); /** * Returns the current value of the counter * * @param aw * @return */ s32 async_wait_get_counter(async_wait_s *aw); /** * * Decreases the count of that amount * * @param aw * @param count * @return */ void async_wait_progress(async_wait_s *aw, s32 count); void async_wait_set_first_error(async_wait_s *aw, s32 error); s32 async_wait_get_error(async_wait_s *aw); /** * * Destroys the synchronisation point * * @param aw * @return */ void async_wait_finalize(async_wait_s *aw); void async_queue_init(async_queue_s *q, u32 size, u64 min_us, u64 max_us, const char* name); void async_queue_finalize(async_queue_s *q); bool async_queue_emtpy(async_queue_s *q); u32 async_queue_size(async_queue_s *q); async_message_s *async_message_next(async_queue_s *queue); async_message_s* async_message_try_next(async_queue_s *queue); /** * * Pushes the message to the queue. * The queue is supposed to be read in another thread * * @param queue * @param msg */ void async_message_call(async_queue_s *queue, async_message_s *msg); /** * Sets the handler and handler_args fields to make the message a waiter * Restores the fields before returning * * @param msg */ int async_message_call_and_wait(async_queue_s *queue, async_message_s *msg); /** * Sets the handler and handler_args fields to ignore the result * (fire and forget) * * @param msg */ void async_message_call_and_forget(async_queue_s *queue, async_message_s *msg); /** * Sets the handler and handler_args fields to ignore the result * (fire and forget) * * @param msg */ void async_message_call_and_release(async_queue_s *queue, async_message_s *msg); void async_message_pool_init(); async_message_s *async_message_alloc(); void async_message_release(async_message_s *msg); void async_message_pool_finalize(); #ifdef __cplusplus } #endif #endif /* ASYNC_H */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/u32_set.h0000644000077100007710000000012412650131756023262 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.546344 30 ctime=1454597651.196344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/u32_set.h0000664000077100007710000001161312650131756023071 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief * * A collection of strings based on the AVL * * @{ * *----------------------------------------------------------------------------*/ #ifndef _U32_SET_H #define _U32_SET_H #include #ifdef __cplusplus extern "C" { #endif /* * A digest is stored prefixed with its length ([1;255]) */ /* * A structure to hold both children with direct access */ typedef struct u32_node u32_node; struct u32_children { struct u32_node* left; struct u32_node* right; }; /* * An union to have access to the children with direct or indexed access */ typedef union u32_children_union u32_children_union; union u32_children_union { struct u32_children lr; struct u32_node * child[2]; }; /* * The node structure CANNOT have a varying size on a given collection * This means that the digest size is a constant in the whole tree */ struct u32_node { union u32_children_union children; /* 2 ptrs */ void* value; /* 1 ptr */ u32 key; /* 4 b */ s8 balance; /* 1 b */ }; /* 29 OR 17 bytes (64/32) */ /* * AVL definition part begins here */ /* * The maximum depth of a tree. * 40 is enough for storing 433494436 items (worst case) * * Depth 0 is one node. * * Worst case : N is enough for sum[n = 0,N](Fn) where F is Fibonacci * Best case : N is enough for (2^(N+1))-1 */ #define AVL_MAX_DEPTH 24 /* 64 */ /* * The previx that will be put in front of each function name */ #define AVL_PREFIX u32_set_ /* * The type that hold the node */ #define AVL_NODE_TYPE u32_node /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_TREE_TYPE AVL_NODE_TYPE* typedef AVL_TREE_TYPE u32_set; /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_CONST_TREE_TYPE AVL_NODE_TYPE * const /* * How to find the root in the tree */ #define AVL_TREE_ROOT(__tree__) (*(__tree__)) /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE u32 #define AVL_REFERENCE_IS_POINTER FALSE #define AVL_REFERENCE_IS_CONST FALSE /* * The node has got a pointer to its parent * * 0 : disable * !=0 : enable */ #define AVL_HAS_PARENT_POINTER 0 #ifdef __cplusplus } #endif #include #ifdef __cplusplus extern "C" { #endif /* * I recommand setting a define to identify the C part of the template * So it can be used to undefine what is not required anymore for every * C file but that one. * */ #ifndef _U32_SET_C #undef AVL_MAX_DEPTH #undef AVL_PREFIX #undef AVL_NODE_TYPE #undef AVL_TREE_TYPE #undef AVL_CONST_TREE_TYPE #undef AVL_TREE_ROOT #undef AVL_REFERENCE_TYPE #undef AVL_HAS_PARENT_POINTER #undef AVL_REFERENCE_IS_POINTER #undef AVL_REFERENCE_IS_CONST #undef _AVL_H_INC #endif /* _U32_SET_C */ #define U32_SET_EMPTY {NULL} #ifdef __cplusplus } #endif #endif /* _U32_SET_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dnscore.h0000644000077100007710000000012412650131756023433 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.523344 30 ctime=1454597650.939344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dnscore.h0000664000077100007710000000702512650131756023244 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscore System core functions * @brief System core functions * * @{ */ #ifndef _DNSCORE_H #define _DNSCORE_H #include #include #ifndef __DNSCORE_C__ #ifdef __cplusplus extern "C" output_stream __termout__; extern "C" output_stream __termerr__; extern "C" logger_handle *g_system_logger; #else extern output_stream __termout__; extern output_stream __termerr__; struct logger_handle; extern struct logger_handle *g_system_logger; #endif static inline void flushout() { output_stream_flush(&__termout__); } static inline void flusherr() { output_stream_flush(&__termerr__); } #define termout &__termout__ #define termerr &__termerr__ #endif #ifdef __cplusplus extern "C" { #endif /* * This fingerprint feature has been added so libraries could check they are compatible */ typedef enum { DNSLIB_TSIG=1, DNSLIB_ACL=2, DNSLIB_NSEC=4, DNSLIB_NSEC3=8 } dnslib_fingerprint; u32 dnscore_fingerprint_mask(); dnslib_fingerprint dnscore_getfingerprint(); void dnscore_init(); u32 dnscore_timer_get_tick(); void dnscore_reset_timer(); void dnscore_stop_timer(); void dnscore_finalize(); void dnscore_shutdown(); bool dnscore_shuttingdown(); void dnscore_signature_check(int so_mutex_t, int so_group_mutex_t); /** * Will try to find a FD in MT(BUFFER(FILE(fd))) * Returns true if it has been found (valid or invalid) * * @param os * @return true iff there is an fd at the bottom. */ bool stdstream_is_tty(output_stream *os); #define DNSCORE_API_CHECK() dnscore_signature_check(sizeof(mutex_t), sizeof(group_mutex_t)) #ifdef __cplusplus } #endif #endif /* _DNSCORE_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dnskey_rsa.h0000644000077100007710000000012412650131756024140 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.560344 30 ctime=1454597650.954344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dnskey_rsa.h0000664000077100007710000000575612650131756023762 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnskey DNSSEC keys functions * @ingroup dnsdbdnssec * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef _DNSSEC_RSA_H #define _DNSSEC_RSA_H /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include #include #include #ifdef __cplusplus extern "C" { #endif ya_result rsa_storeprivate(FILE* private, dnssec_key* key); ya_result rsa_loadpublic(const u8 *rdata, u16 rdata_size, const char *origin, dnssec_key** out_key); ya_result rsa_loadprivate(FILE* private, u8 algorithm,u16 flags,const char* origin, dnssec_key** out_key); ya_result rsa_initinstance(RSA* rsa, u8 algorithm,u16 flags,const char* origin, dnssec_key** out_key); ya_result rsa_newinstance(u32 size, u8 algorithm,u16 flags,const char* origin, dnssec_key** out_key); ya_result rsa_private_parse_field(dnssec_key *key, parser_s *p); #ifdef __cplusplus } #endif #endif /* _DNSSEC_RSA_H */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/threaded_ringlist.h0000644000077100007710000000012412650131756025471 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.519344 30 ctime=1454597651.177344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/threaded_ringlist.h0000664000077100007710000001024612650131756025301 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _THREADED_RINGLIST_H #define _THREADED_RINGLIST_H #include #include #ifdef MUTEX_USE_SPINLOCK #error "Cascaded MUTEX_USE_SPINLOCK definition. Please remove the potential definition mistmatch (#undef ?)" #endif #define MUTEX_USE_SPINLOCK 0 #include #include #ifdef __cplusplus extern "C" { #endif typedef struct threaded_ringlist threaded_ringlist; struct threaded_ringlist_node; struct threaded_ringlist { /* DO NOT MOVE THESE POINTERS */ struct threaded_ringlist_node *next; struct threaded_ringlist_node *prev; /* -------------------------- */ struct threaded_ringlist_node *pool; mutex_t mutex; mutex_t mutex_enqueue; mutex_t mutex_dequeue; volatile u32 max_size; /* DO NOT CACHE THIS INTO REGISTERS */ volatile u32 size; /* DO NOT CACHE THIS INTO REGISTERS */ }; #define THREADED_RINGLIST_NULL {0,0,0,PTHREAD_MUTEX_INITIALIZER,PTHREAD_MUTEX_INITIALIZER,PTHREAD_MUTEX_INITIALIZER,0,0} void threaded_ringlist_init(threaded_ringlist* queue, int max_size); void threaded_ringlist_finalize(threaded_ringlist* queue); void threaded_ringlist_enqueue(threaded_ringlist* queue,void* constant_pointer); bool threaded_ringlist_try_enqueue(threaded_ringlist* queue,void* constant_pointer); void* threaded_ringlist_peek(threaded_ringlist* queue); void* threaded_ringlist_try_peek(threaded_ringlist* queue); void* threaded_ringlist_dequeue(threaded_ringlist* queue); void* threaded_ringlist_try_dequeue(threaded_ringlist *queue); u32 threaded_ringlist_dequeue_set(threaded_ringlist* queue, void** array, u32 array_size); void threaded_ringlist_wait_empty(threaded_ringlist* queue); int threaded_ringlist_size(threaded_ringlist* queue); /* * The queue will block (write) if bigger than this. * Note that if the key is already bigger it will blocked (write) until * the content is emptied by the readers. */ ya_result threaded_ringlist_set_maxsize(threaded_ringlist *queue, int max_size); #undef MUTEX_USE_SPINLOCK #ifdef __cplusplus } #endif #endif /* _THREADED_QUEUE_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/base64.h0000644000077100007710000000012412650131756023062 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.605344 30 ctime=1454597650.857344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/base64.h0000664000077100007710000000601412650131756022670 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup base Base conversion functions * @ingroup dnscore * @brief Base 64 codec * * @{ * *----------------------------------------------------------------------------*/ #ifndef _BASE64_H #define _BASE64_H #include #ifdef __cplusplus extern "C" { #endif #define BASE64_ENCODED_SIZE(binary_size) ((((binary_size)+2)/3)*4) #define BASE64_DECODED_SIZE(text_size) ((((text_size)+3)/4)*3) /** * Encodes bytes into base64 * The output size must be at least size_in * 4/3 * * @param buffer_in bytes to convert * @param size_in number of bytes * @param buffer_out output buffer of a size >= size_in * 4/3 * * @return output size */ u32 base64_encode(const u8* buffer_in,u32 size_in,char* buffer_out); /** * Decodes base64 into bytes * The output size must be at least size_in * 3/4 * * @param buffer_in base64 text * @param size_in number of chars * @param buffer_out output buffer of a size >= size_in * 3/4 * * @return output size */ ya_result base64_decode(const char* buffer_in,u32 size_in,u8* buffer_out); #ifdef __cplusplus } #endif #endif /* _BASE64_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/packet_reader.h0000644000077100007710000000012412650131756024567 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.519344 30 ctime=1454597651.076344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/packet_reader.h0000664000077100007710000000771512650131756024406 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnspacket DNS Messages * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _PACKET_READER_H #define _PACKET_READER_H #include #include #ifdef __cplusplus extern "C" { #endif /* dynupdate */ /* reads and unpack */ typedef struct packet_unpack_reader_data packet_unpack_reader_data; struct packet_unpack_reader_data { const u8* packet; u32 packet_size; u32 offset; }; ya_result packet_reader_read_record(packet_unpack_reader_data* reader, u8 *output_buffer, u32 len); ya_result packet_reader_read_fqdn(packet_unpack_reader_data* reader, u8 *output_buffer, u32 len); ya_result packet_reader_read(packet_unpack_reader_data* reader, void *output_buffer, u32 len); ya_result packet_reader_read_u16(packet_unpack_reader_data* reader, u16 *val); ya_result packet_reader_read_u32(packet_unpack_reader_data* reader, u32 *val); static inline ya_result packet_reader_skip(packet_unpack_reader_data* reader, u32 len) { if((reader->offset += len) > reader->packet_size) { reader->offset = reader->packet_size; return UNEXPECTED_EOF; /* unexpected EOF */ } return len; } /* fqdn + type + class */ ya_result packet_reader_read_zone_record(packet_unpack_reader_data* reader, u8* output_buffer, u32 len); /* fqdn + type + class + ttl + size + rdata */ void packet_reader_rewind(packet_unpack_reader_data* reader); ya_result packet_reader_skip_fqdn(packet_unpack_reader_data* reader); ya_result packet_reader_skip_record(packet_unpack_reader_data* reader); void packet_reader_init(packet_unpack_reader_data* reader, const u8* buffer, u32 buffer_size); /* two tools functions for the controller */ ya_result packet_reader_read_utf8(packet_unpack_reader_data *reader, u16 rdatasize, u16 rclass, char **txt, bool dryrun); ya_result packet_reader_read_remote_server(packet_unpack_reader_data *reader, u16 rdatasize, u16 rclass, host_address **ha, bool dryrun); #ifdef __cplusplus } #endif #endif /* _PACKET_READER_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/bytezarray_output_stream.h0000644000077100007710000000012412650131756027165 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.615344 30 ctime=1454597650.879344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/bytezarray_output_stream.h0000664000077100007710000000712012650131756026772 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #pragma once #include #ifdef __cplusplus extern "C" { #endif /* * The buffer will be freed (free) on close. */ #define BYTEARRAY_OWNED 1 /* * The buffer's size can be changed. */ #define BYTEARRAY_DYNAMIC 2 /* * The internal context has been allocated by a malloc (the default except if the _static variant is used) * YOU MOSTLY WILL NOT USE THAT FLAG */ #define BYTEARRAY_ZALLOC_CONTEXT 4 typedef char bytezarray_output_stream_context[sizeof(void*) + 9]; void bytezarray_output_stream_init(output_stream *out_stream, u8 *array, u32 size); void bytezarray_output_stream_init_ex(output_stream *out_stream, u8 *array, u32 size, u8 flags); /* * most of bytezarray_output_stream usages function-enclosed : init, work on, close * this variant of initialisation avoids an malloc */ void bytezarray_output_stream_init_ex_static(output_stream* out_stream, u8 *array,u32 size, u8 flags, bytezarray_output_stream_context *ctx); void bytezarray_output_stream_reset(output_stream *out_stream); u32 bytezarray_output_stream_size(output_stream *out_stream); u8 *bytezarray_output_stream_buffer(output_stream *out_stream); u32 bytezarray_output_stream_buffer_size(output_stream *stream); u8 *bytezarray_output_stream_detach(output_stream *out_stream); void bytezarray_output_stream_set(output_stream* out_stream, u8 *buffer, u32 buffer_size, bool owned); #ifdef __cplusplus } #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dnscore-config.h.in0000644000077100007710000000013212654662600025303 xustar000000000000000030 mtime=1454597504.342344534 30 atime=1454597504.342344534 30 ctime=1454597651.237344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dnscore-config.h.in0000664000077100007710000002226512654662600025120 0ustar00yadifayadifa00000000000000/* include/dnscore/dnscore-config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* number of harware core if the auto-detect fails */ #undef DEFAULT_ASSUMED_CPU_COUNT /* always on */ #undef HAS_ACL_SUPPORT /* bfd debug support disabled. */ #undef HAS_BFD_DEBUG_SUPPORT /* i386, Athlon, Opteron, Core2, i3, i5, i7, ... */ #undef HAS_CPU_AMDINTEL /* T1000 has a Niagara cpu */ #undef HAS_CPU_NIAGARA /* remote control disabled. */ #undef HAS_CTRL /* dynamic provisioning disabled. */ #undef HAS_CTRL_DYNAMIC_PROVISIONING /* always on */ #undef HAS_DNSSEC_SUPPORT /* always off */ #undef HAS_DROPALL_SUPPORT /* dynamic update support disabled. */ #undef HAS_DYNUPDATE_SUPPORT /* YADIFA will now accept ASCII7 characters in DNS names (not recommended) disabled. */ #undef HAS_FULL_ASCII7 /* where to put the log files */ #undef HAS_LOGDIR /* write the pid in each line of log disabled. */ #undef HAS_LOG_PID_ALWAYS_ON /* write the thread id in each line of log disabled. */ #undef HAS_LOG_THREAD_ID_ALWAYS_ON /* malloc debug support disabled. */ #undef HAS_MALLOC_DEBUG_SUPPORT /* DNS master disabled. */ #undef HAS_MASTER_SUPPORT /* Define this to enable slow but safe unaligned memory accesses */ #undef HAS_MEMALIGN_ISSUES /* use messages instead of send (needed if you use more than one IP aliased on the same network interface) disabled. */ #undef HAS_MESSAGES_SUPPORT /* always off */ #undef HAS_MIRROR_SUPPORT /* mutex debug support disabled. */ #undef HAS_MUTEX_DEBUG_SUPPORT /* Allows AXFR answer from master without AA bit set (Microsoft DNS) disabled. */ #undef HAS_NON_AA_AXFR_SUPPORT /* always on */ #undef HAS_NSEC3_SUPPORT /* always on */ #undef HAS_NSEC_SUPPORT /* NSID support disabled. */ #undef HAS_NSID_SUPPORT /* The system supports thread names */ #undef HAS_PTHREAD_SETNAME_NP /* The system supports spinlocks */ #undef HAS_PTHREAD_SPINLOCK /* always off */ #undef HAS_RDTSC /* always off */ #undef HAS_RRCACHE_ENABLED /* DNS Response Rate Limiter disabled. */ #undef HAS_RRL_SUPPORT /* RRSIG verification and generation for zones disabled. */ #undef HAS_RRSIG_MANAGEMENT_SUPPORT /* The sockaddr_in6 struct has an sin6_len field */ #undef HAS_SOCKADDR_IN6_SIN6_LEN /* The sockaddr_in struct has an sin_len field */ #undef HAS_SOCKADDR_IN_SIN_LEN /* The sockaddr struct has an sa_len field */ #undef HAS_SOCKADDR_SA_LEN /* always off */ #undef HAS_TCL /* The system supports timegm */ #undef HAS_TIMEGM /* always on */ #undef HAS_TSIG_SUPPORT /* where to put the log files */ #undef HAS_WITH_LOGDIR /* zalloc debug support disabled. */ #undef HAS_ZALLOC_DEBUG_SUPPORT /* zalloc statistics support disabled. */ #undef HAS_ZALLOC_STATISTICS_SUPPORT /* zalloc memory system disabled. */ #undef HAS_ZALLOC_SUPPORT /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_BYTESWAP_H /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the header file. */ #undef HAVE_I386_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_I386_TYPES_H /* Define to 1 if the system has the type `int64_t'. */ #undef HAVE_INT64_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `c' library (-lc). */ #undef HAVE_LIBC /* Define to 1 if you have the `dnscore' library (-ldnscore). */ #undef HAVE_LIBDNSCORE /* Define to 1 if you have the `dnsdb' library (-ldnsdb). */ #undef HAVE_LIBDNSDB /* Define to 1 if you have the `dnslg' library (-ldnslg). */ #undef HAVE_LIBDNSLG /* Define to 1 if you have the `dnszone' library (-ldnszone). */ #undef HAVE_LIBDNSZONE /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_LIMITS_H /* Define to 1 if the system has the type `long long'. */ #undef HAVE_LONG_LONG /* Define to 1 if you have the header file. */ #undef HAVE_MACHINE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_NETINET6_IN6_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_PPC_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BYTEORDER_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSLIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if the system has the type `uint64_t'. */ #undef HAVE_UINT64_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `u_char'. */ #undef HAVE_U_CHAR /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* BSD */ #undef IS_BSD_FAMILY /* OSX */ #undef IS_DARWIN_OS /* LINUX */ #undef IS_LINUX_FAMILY /* SOLARIS */ #undef IS_SOLARIS_FAMILY /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef mode_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ #undef vfork yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/message.h0000644000077100007710000000012412650131756023422 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.512344 30 ctime=1454597651.047344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/message.h0000664000077100007710000003632012650131756023233 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnspacket DNS Messages * @ingroup dnscore * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef MESSAGE_H_ #define MESSAGE_H_ #ifdef __cplusplus extern "C" { #endif /* ------------------------------------------------------------ */ #include #include #include #include #include #include #include #include #include #include #include #include #include /* ------------------------------------------------------------ */ /* Processing flags */ #define PROCESS_FL_ADDITIONAL_AUTH 0x01 #define PROCESS_FL_AUTHORITY_AUTH 0x02 #define PROCESS_FL_ADDITIONAL_CACHE 0x04 #define PROCESS_FL_AUTHORITY_CACHE 0x08 #define PROCESS_FL_RECURSION 0x20 #define PROCESS_FL_TCP 0x80 #define NETWORK_BUFFER_SIZE 65536 /** * @note buffer MUST be aligned on 16 bits */ #define MESSAGE_HIFLAGS(buffer_) ((buffer_)[ 2]) #define MESSAGE_LOFLAGS(buffer_) ((buffer_)[ 3]) /* Only use constants with this */ #if AVOID_ANTIALIASING static inline void MESSAGE_FLAGS_OR_P(void* address, u16 f) { u16 *p = (u16*)address; *p |= f; } static inline void MESSAGE_FLAGS_AND_P(void* address, u16 f) { u16 *p = (u16*)address; *p &= f; } #ifdef WORDS_BIGENDIAN #define MESSAGE_FLAGS_OR(buffer_, hi_, lo_) MESSAGE_FLAGS_OR_P(&(buffer_)[2], (u16)((u16)((lo_) & 0xff) | ((u16)(hi_) << 8))) #define MESSAGE_FLAGS_AND(buffer_, hi_, lo_) MESSAGE_FLAGS_AND_P(&(buffer_)[2], (u16)((u16)((lo_) & 0xff) | ((u16)(hi_) << 8))) #define MESSAGE_FLAGS_SET(buffer_, hi_, lo_) SET_U16_AT_P(&(buffer_)[2], (u16)((u16)((lo_) & 0xff) | ((u16)hi_ << 8))) #else #define MESSAGE_FLAGS_OR(buffer_, hi_, lo_) MESSAGE_FLAGS_OR_P(&(buffer_)[2], (u16)(((u16)((hi_) & 0xff)) | (((u16)(lo_)) << 8))) #define MESSAGE_FLAGS_AND(buffer_, hi_, lo_) MESSAGE_FLAGS_AND_P(&(buffer_)[2], (u16)(((u16)((hi_) & 0xff)) | (((u16)(lo_)) << 8))) #define MESSAGE_FLAGS_SET(buffer_, hi_, lo_) SET_U16_AT_P(&(buffer_)[2], (u16)(((u16)((hi_) & 0xff)) | (((u16)(lo_)) << 8))) #endif #define MESSAGE_ID(buffer_) GET_U16_AT_P(&(buffer_)[0]) #define MESSAGE_SET_ID(buffer_,id_) SET_U16_AT_P(&(buffer_)[0],(id_)) #else #ifdef WORDS_BIGENDIAN #define MESSAGE_FLAGS_OR(buffer_, hi_, lo_) *((u16*)&(buffer_[2])) |= (lo_ | ((u16)hi_ << 8)) #define MESSAGE_FLAGS_AND(buffer_, hi_, lo_) *((u16*)&(buffer_[2])) &= (lo_ | ((u16)hi_ << 8)) #define MESSAGE_FLAGS_SET(buffer_, hi_, lo_) *((u16*)&(buffer_[2])) = (lo_ | ((u16)hi_ << 8)) #else #define MESSAGE_FLAGS_OR(buffer_, hi_, lo_) *((u16*)&(buffer_[2])) |= (hi_ | ((u16)lo_ << 8)) #define MESSAGE_FLAGS_AND(buffer_, hi_, lo_) *((u16*)&(buffer_[2])) &= (hi_ | ((u16)lo_ << 8)) #define MESSAGE_FLAGS_SET(buffer_, hi_, lo_) *((u16*)&(buffer_[2])) = (hi_ | ((u16)lo_ << 8)) #endif #define MESSAGE_ID(buffer) (*((u16*)&(buffer)[ 0])) #define MESSAGE_SET_ID(buffer_,id_) (*((u16*)&(buffer)[ 0])) = (id_) #endif #define MESSAGE_QR(buffer_) (MESSAGE_HIFLAGS(buffer_) & QR_BITS) #define MESSAGE_OP(buffer_) (MESSAGE_HIFLAGS(buffer_) & OPCODE_BITS) #define MESSAGE_AA(buffer_) (MESSAGE_HIFLAGS(buffer_) & AA_BITS) #define MESSAGE_TC(buffer_) (MESSAGE_HIFLAGS(buffer_) & TC_BITS) #define MESSAGE_RD(buffer_) (MESSAGE_HIFLAGS(buffer_) & RD_BITS) #define MESSAGE_RA(buffer_) (MESSAGE_LOFLAGS(buffer_) & RA_BITS) #define MESSAGE_ZF(buffer_) (MESSAGE_LOFLAGS(buffer_) & Z_BITS) #define MESSAGE_AD(buffer_) (MESSAGE_LOFLAGS(buffer_) & AD_BITS) #define MESSAGE_CD(buffer_) (MESSAGE_LOFLAGS(buffer_) & CD_BITS) #define MESSAGE_RCODE(buffer_) (MESSAGE_LOFLAGS(buffer_) & RCODE_BITS) // the size of the section by index [0;3] #define MESSAGE_SECTION_COUNT(buffer_,index_) GET_U16_AT(((buffer_)[4 + ((index_)<< 1)])) #define MESSAGE_QD(buffer_) GET_U16_AT((buffer_)[4]) #define MESSAGE_AN(buffer_) GET_U16_AT((buffer_)[6]) #define MESSAGE_NS(buffer_) GET_U16_AT((buffer_)[8]) #define MESSAGE_AR(buffer_) GET_U16_AT((buffer_)[10]) #define MESSAGE_NSAR(buffer_) GET_U32_AT((buffer_)[8]) #define MESSAGE_SET_OP(buffer_, val_) (MESSAGE_HIFLAGS(buffer_) = (MESSAGE_HIFLAGS(buffer_) & ~OPCODE_BITS) | (val_)) #define MESSAGE_SET_QD(buffer_,val_) SET_U16_AT((buffer_)[4],(val_)) #define MESSAGE_SET_AN(buffer_,val_) SET_U16_AT((buffer_)[6],(val_)) #define MESSAGE_SET_NS(buffer_,val_) SET_U16_AT((buffer_)[8],(val_)) #define MESSAGE_SET_AR(buffer_,val_) SET_U16_AT((buffer_)[10],(val_)) #define MESSAGE_SET_NSAR(buffer_,val_) SET_U32_AT((buffer_)[8],(val_)) /* DYNUPDATE rfc 2136 */ #define MESSAGE_ZO(buffer_) GET_U16_AT((buffer_)[4]) #define MESSAGE_PR(buffer_) GET_U16_AT((buffer_)[6]) #define MESSAGE_UP(buffer_) GET_U16_AT((buffer_)[8]) #define MESSAGE_SET_ZO(buffer_, val_) SET_U16_AT((buffer_)[4],(val_)) #define MESSAGE_SET_PR(buffer_, val_) SET_U16_AT((buffer_)[6],(val_)) #define MESSAGE_SET_UP(buffer_, val_) SET_U16_AT((buffer_)[8],(val_)) //#define MESSAGE_AD(buffer) (*((u16*)&(buffer)[10])) #define MESGDATA_TAG 0x415441444753454d #if DNSCORE_HAS_TSIG_SUPPORT #define MESSAGE_HAS_TSIG(__message) ((__message).tsig.tsig != NULL) #define MESSAGEP_HAS_TSIG(__message) ((__message)->tsig.tsig != NULL) typedef struct message_tsig message_tsig; struct message_tsig { const tsig_item *tsig; u16 reserved_0; /* ALIGN32 */ u16 timehi; /* NETWORK */ u32 timelo; /* NETWORK */ u16 fudge; /* NETWORK */ u16 mac_size; /* NATIVE */ u16 original_id;/* NETWORK */ u16 error; /* NETWORK */ u16 other_len; /* NETWORK */ u16 reserved_1; /* ALIGN32 */ u32 reserved_2; /* ALIGN64 */ u8 mac[64]; u8 *other; HMAC_CTX ctx; /* only used for tcp */ s8 tcp_tsig_countdown; /* Maximum value is supposed to be 100 */ u8 mac_algorithm; }; #endif /* A memory pool for the lookup's benefit */ #define MESSAGE_POOL_SIZE 0x20000 // flags for MESSAGE_MAKE_QUERY_EX #define MESSAGE_EDNS0_SIZE 0x4000 // any bit that is not set in EDNS0 #define MESSAGE_EDNS0_DNSSEC 0x8000 typedef struct message_data message_data; struct message_data { u8 *ar_start; /* for the TSIG */ socketaddress other; u16 received; u16 size_limit; u16 send_length; u16 reserved_; socklen_t addr_len; int sockfd; finger_print status; u32 rcode_ext; bool edns; #if HAS_NSID_SUPPORT bool nsid; #endif process_flags_t process_flags; u16 qtype; u16 qclass; char protocol; u8 referral; /* bool is_delegation; for quick referral : later */ #if DNSCORE_HAS_TSIG_SUPPORT message_tsig tsig; #endif u_char qname[MAX_DOMAIN_LENGTH]; /* Ensure (buffer - buffer_tcp_len) is equal to 2 ! */ u64 __reserved_force_align__1; u32 __reserved_force_align__2; u16 __reserved_force_align__3; u8 buffer_tcp_len[2]; /* DON'T SEPARATE THESE TWO (FIRST) */ u8 buffer[NETWORK_BUFFER_SIZE]; /* DON'T SEPARATE THESE TWO (SECOND) */ u64 __reserved_force_align__4; u8 pool_buffer[MESSAGE_POOL_SIZE]; /* A memory pool for the lookup's benefit */ }; typedef struct message_dnsupdate_data message_dnsupdate_data; struct message_dnsupdate_data { message_dnsupdate_data *next; u32 zttl; u16 ztype; u16 zclass; u8 zname[MAX_DOMAIN_LENGTH]; output_stream zrdata[RDATA_MAX_LENGTH +1]; u8 *zrdata2; u16 zrdata_len; }; /* ------------------------------------------------------------ */ static inline bool message_isquery(message_data *mesg) { return MESSAGE_QR(mesg->buffer) == 0; } static inline bool message_isanswer(message_data *mesg) { return MESSAGE_QR(mesg->buffer) != 0; } ya_result message_process_query(message_data *mesg); int message_process(message_data *); int message_process_lenient(message_data *mesg); void message_transform_to_error(message_data *mesg); /* global */ void message_edns0_setmaxsize(u16 maxsize); /** * * @param mesg * @param qname * @param qtype * @param qclass * @param id */ void message_make_query(message_data *mesg, u16 id, const u8 *qname, u16 qtype, u16 qclass); void message_make_query_ex(message_data *mesg, u16 id, const u8 *qname, u16 qtype, u16 qclass, u16 flags); void message_make_message(message_data *mesg, u16 id, const u8 *qname, u16 qtype, u16 qclass, packet_writer* uninitialised_packet_writer); void message_make_dnsupdate_init(message_data *mesg, u16 id, const u8 *zzone, u16 zclass, u16 max_size, packet_writer *uninitialised_pw); ya_result message_make_dnsupdate_delete_all_rrsets(message_data *mesg, packet_writer *pw, const u8 *fqdn); ya_result message_make_dnsupdate_delete_rrset(message_data *mesg, packet_writer *pw, const u8 *fqdn, u16 rtype); ya_result message_make_dnsupdate_delete_record(message_data *mesg, packet_writer *pw, const u8 *fqdn, u16 rtype, u16 rdata_size, const u8 *rdata); ya_result message_make_dnsupdate_add_record(message_data *mesg, packet_writer *pw, const u8 *fqdn, u16 rtype, u16 rclass, u32 rttl, u16 rdata_size, const u8 *rdata); ya_result message_make_dnsupdate_finalize(message_data *mesg, packet_writer *pw); /** * * @param mesg * @param qname * @param qtype * @param qclass * @param id */ void message_make_notify(message_data *mesg, u16 id, const u8 *qname, u16 qtype /* TYPE_SOA */, u16 qclass /* CLASS_IN */); void message_make_ixfr_query(message_data *mesg, u16 id, const u8 *qname, u32 soa_ttl, u16 soa_rdata_size, const u8 *soa_rdata); #if DNSCORE_HAS_TSIG_SUPPORT ya_result message_sign_query_by_name(message_data *mesg, const u8 *tsig_name); ya_result message_sign_answer_by_name(message_data *mesg, const u8 *tsig_name); ya_result message_sign_query(message_data *mesg, const tsig_item *key); ya_result message_sign_answer(message_data *mesg, const tsig_item *key); #endif /** * Creates an empty answer with an error code */ void message_make_error(message_data *mesg, u16 error_code); /** * Creates an answer with an OPT error code */ void message_make_error_ext(message_data *mesg, u16 error_code); static inline void message_update_tcp_length(message_data *mesg) { u16 len = mesg->send_length; mesg->buffer_tcp_len[0] = (u8)(len>>8); mesg->buffer_tcp_len[1] = (u8)(len ); } static inline u16 message_get_tcp_length(message_data *mesg) { u16 len; len = mesg->buffer_tcp_len[0]; len <<= 8; len |= mesg->buffer_tcp_len[1]; return len; } ya_result message_query_tcp_with_timeout(message_data *mesg, host_address *server, u8 to_sec); ya_result message_query_tcp(message_data *mesg, host_address *server); ya_result message_query_tcp_ex(message_data *mesg, host_address *server, message_data *answer); ya_result message_query_udp(message_data *mesg, host_address *server); ya_result message_query_udp_with_time_out(message_data *mesg, host_address *server, int seconds, int useconds); ya_result message_query_udp_with_time_out_and_retries(message_data *mesg, host_address *server, int seconds, int useconds, u8 retries, u8 flags); ya_result message_query_serial(const u8 *origin, host_address *server, u32 *serial_out); /* * Does not clone the pool. */ message_data* message_dup(message_data *mesg); ya_result message_ixfr_query_get_serial(const message_data *mesg, u32 *serial); ya_result message_print_buffer(output_stream *os, const u8 *buffer, u16 length); u16 message_edns0_getmaxsize(); ya_result message_print_format_multiline(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with, long time_duration); ya_result message_print_format_short(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with, long time_duration); ya_result message_print_format_wire(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with, long time_duration); ya_result message_print_format_wire_ext(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with, long time_duration); ya_result message_print_format_dig(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with, long time_duration); ya_result message_print_format_dig_buffer(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with); ya_result message_print_format_json(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with, long time_duration); ya_result message_print_format_json_buffer(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with); ya_result message_print_format_parse(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with, long time_duration); ya_result message_print_buffer_format_parse(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with); ya_result message_print_format_xml(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with, long time_duration); ya_result message_print_format_xml_buffer(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with); #ifdef __cplusplus } #endif #endif /* MESSAGE_H_ */ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/logger_channel_stream.h0000644000077100007710000000012412650131756026320 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.542344 30 ctime=1454597651.032344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/logger_channel_stream.h0000664000077100007710000000461312650131756026131 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logger Logging functions * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _LOGGER_CHANNEL_STREAM_H #define _LOGGER_CHANNEL_STREAM_H #include #ifdef __cplusplus extern "C" { #endif struct logger_channel; void logger_channel_stream_open(output_stream* os, bool forceflush, struct logger_channel *chan); #ifdef __cplusplus } #endif #endif /* _LOGGER_CHANNEL_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/logger.h0000644000077100007710000000012412650131756023255 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.569344 30 ctime=1454597651.024344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/logger.h0000664000077100007710000000422712650131756023067 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logger Logging functions * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _LOGGER_H #define _LOGGER_H #include #endif /* _LOGGER_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/ptr_vector.h0000644000077100007710000000012412650131756024165 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.575344 30 ctime=1454597651.110344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/ptr_vector.h0000664000077100007710000002141112650131756023771 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief A dynamic-sized array of pointers * * A dynamic-sized array of pointers * * Used for resource record canonization and such. * * @{ */ #ifndef _PTR_VECTOR_H #define _PTR_VECTOR_H #ifdef __cplusplus extern "C" { #endif #include #define PTR_VECTOR_TAG 0x524f544345565252 /** "RRVECTOR" */ #define PTR_VECTOR_DEFAULT_SIZE 32 #define EMPTY_PTR_VECTOR {NULL, -1, 0} typedef struct ptr_vector ptr_vector; struct ptr_vector { void** data; s32 offset; s32 size; }; static inline void ptr_vector_init_empty(ptr_vector* v) { v->data = NULL; v->offset = -1; v->size = 0; } /** * Initialises a vector structure with a size of PTR_VECTOR_DEFAULT_SIZE entries * * @param v a pointer to the ptr_vector structure to initialise */ void ptr_vector_init(ptr_vector* v); /** * Initialises a vector structure with a size of PTR_VECTOR_DEFAULT_SIZE entries * * @param v a pointer to the ptr_vector structure to initialise * @param initial_capacity the size to allocate to start with */ void ptr_vector_init_ex(ptr_vector* v, s32 initial_capacity); /** * Frees the memory used by a vector structure (not the vector structure itself) * * @param v a pointer to the ptr_vector structure */ void ptr_vector_destroy(ptr_vector* v); /** * Empties the vector (does not release memory) * * @param v a pointer to the ptr_vector structure */ void ptr_vector_empties(ptr_vector* v); /** * Changes the capacity of a vector to the specified size * The new size MUST be enough to keep the current content * of the vector. Failing to do so will most likely result * into a crash. * * @param v a pointer to the ptr_vector structure * @param newsize the new size of the vector */ void ptr_vector_resize(ptr_vector*v, s32 newsize); /** * Ensures the vector has enough capacity to accommodate a * specified number of items * * @param v a pointer to the ptr_vector structure * @param reqsize the minimum size of the vector */ void ptr_vector_ensures(ptr_vector*v, s32 reqsize); /** * Resizes the capacity so it can at most contain its * current size. * * @param v a pointer to the ptr_vector structure */ void ptr_vector_shrink(ptr_vector*v); /** * Appends the item (pointer) to the vector * * @param v a pointer to the ptr_vector structure * @param data a pointer to the item */ void ptr_vector_append(ptr_vector* v, void* data); /** * Appends the item (pointer) to the vector and try to keep the buffer size at at most * restrictedlimit. * The goal is to avoid a growth of *2 that would go far beyond the restrictedlimit. * The performance is extremely poor when the number of items in the buffer is restrictedlimit or more. * * @param v a pointer to the ptr_vector structure * @param data a pointer to the item * @param restrictedlimit a guideline limit on the size of the vector */ void ptr_vector_append_restrict_size(ptr_vector* v, void* data, u32 restrictedlimit); /** * Removes an item from the back of the vector and returns its reference * * @param v a pointer to the ptr_vector structure * @return a pointer to the removed item */ void* ptr_vector_pop(ptr_vector* v); typedef int ptr_vector_qsort_callback(const void*, const void*); /** * Sort the content of the vector using the compare callback * * @param v a pointer to the ptr_vector structure * @param compare comparison callback */ void ptr_vector_qsort(ptr_vector* v, ptr_vector_qsort_callback compare); typedef void void_function_voidp(void*); /** * Empties the vector releasing the item memory first * * @param v a pointer to the ptr_vector structure * @param free_memory item free callback */ void ptr_vector_free_empties(ptr_vector* v, void_function_voidp free_memory); /* * First argument is the key, second one is the item to match with the key * */ typedef int ptr_vector_search_callback(const void*, const void*); /** * Look sequentially in the vector for an item using a key and a comparison function * The callback only needs to tell equal (0) or not equal (anything else) * * @param v a pointer to the ptr_vector structure * @param what the key * @param compare the comparison function * * @return the first matching item or NULL if none has been found */ void* ptr_vector_linear_search(const ptr_vector* v, const void* what, ptr_vector_search_callback compare); /** * Look sequentially in the vector for an item using a key and a comparison function, returns the index of the first matching item * * @param v a pointer to the ptr_vector structure * @param what the key * @param compare the comparison function * * @return the first matching item index or -1 if none has been found */ s32 ptr_vector_index_of(const ptr_vector* v, const void* what, ptr_vector_search_callback compare); /** * Look in the vector for an item using a key and a comparison function * The callback needs to tell equal (0) smaller (<0) or bigger (>0) * * @param v a pointer to the ptr_vector structure * @param what the key * @param compare the comparison function * * @return the first matching item or NULL if none has been found */ void* ptr_vector_search(const ptr_vector* v, const void* what,ptr_vector_search_callback compare); static inline void* ptr_vector_get(const ptr_vector* v, s32 idx) { return v->data[idx]; } static inline void ptr_vector_set(ptr_vector* v, s32 idx, void* val) { v->data[idx] = val; } static inline void *ptr_vector_last(const ptr_vector* v) { void *r = NULL; if(v->offset >= 0) { r = v->data[v->offset]; } return r; } static inline s32 ptr_vector_size(const ptr_vector *v) { return v->offset + 1; } static inline s32 ptr_vector_last_index(const ptr_vector *v) { return v->offset; } static inline s32 ptr_vector_capacity(const ptr_vector *v) { return v->size; } static inline bool ptr_vector_isempty(const ptr_vector* v) { return (v->offset < 0); } static inline void ptr_vector_end_swap(ptr_vector *pv,s32 idx) { void* tmp = pv->data[idx]; pv->data[idx] = pv->data[pv->offset]; pv->data[pv->offset] = tmp; } /** * Inserts a value at position, pushing items from this position up * Potentially very slow. * * @param pv * @param idx */ void ptr_vector_insert_at(ptr_vector *pv, s32 idx, void *val); /** * Inserts multiple values at position, pushing items from this position up * Potentially very slow. * * @param pv * @param idx * @param valp an array of pointers that will be inserted * @param n the size of the array of pointers */ void ptr_vector_insert_array_at(ptr_vector *pv, s32 idx, void **valp, u32 n); /** * * Removes a value at position, pulling items above this position down * Potentially very slow * * @param pv * @param idx * @return the removed value */ void* ptr_vector_remove_at(ptr_vector *pv, s32 idx); #ifdef __cplusplus } #endif #endif /* _RR_VECTOR_H */ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/thread_pool.h0000644000077100007710000000012412650131756024276 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.588344 30 ctime=1454597651.155344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/thread_pool.h0000664000077100007710000001120412650131756024101 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _THREAD_POOL_H #define _THREAD_POOL_H #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* * There are two ideas behind the thread_pool * * _ The thread are launched once so using * a thread is "instant" (about 0.00001 s) * * _ The tasks can be associated to a counter * so we know exactly how much of these are * running. Some thread are "irrelevant" for * our concurrence issues (axfr, ixfr) * * We just have to have a counter on relevant * threads so we know when we are able to update * * NOTE: I actually do not know how many are * scheduled so I could add this in the counter * */ #define THREAD_STATUS_STARTING 0 #define THREAD_STATUS_WAITING 1 #define THREAD_STATUS_WORKING 2 #define THREAD_STATUS_TERMINATING 3 #define THREAD_STATUS_TERMINATED 4 typedef void *thread_pool_function(void*); typedef struct thread_pool_task_counter thread_pool_task_counter; struct thread_pool_task_counter { mutex_t mutex; volatile s32 value; }; void thread_pool_counter_init(thread_pool_task_counter *counter, s32 value); void thread_pool_counter_destroy(thread_pool_task_counter *counter); s32 thread_pool_counter_get_value(thread_pool_task_counter *counter); s32 thread_pool_counter_add_value(thread_pool_task_counter *counter, s32 value); struct thread_pool_s; struct thread_pool_s *thread_pool_init_ex(u8 thread_count, u32 queue_size, const char* pool_name); struct thread_pool_s *thread_pool_init(u8 thread_count, u32 queue_size); ya_result thread_pool_enqueue_call(struct thread_pool_s *tp, thread_pool_function func, void *parm, thread_pool_task_counter *counter, const char *categoryname); ya_result thread_pool_destroy(struct thread_pool_s *tp); ya_result thread_pool_wait_all_running(struct thread_pool_s *tp); /** * Returns the new size of the pool or an error. * * @param tp * @param new_size * @return */ ya_result thread_pool_resize(struct thread_pool_s* tp, u8 new_size); random_ctx thread_pool_get_random_ctx(); void thread_pool_setup_random_ctx(); void thread_pool_destroy_random_ctx(); u8 thread_pool_get_size(struct thread_pool_s *tp); /** * * Returns the current size of the thread pool * * @param tp * @return */ int thread_pool_queue_size(struct thread_pool_s *tp); // before and after a fork ya_result thread_pool_stop_all(); // fork ya_result thread_pool_start_all(); #ifdef __cplusplus } #endif #endif /* _THREAD_POOL_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/chroot.h0000644000077100007710000000012412650131756023274 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.586344 30 ctime=1454597650.883344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/chroot.h0000664000077100007710000000500412650131756023100 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup chroot * @ingroup dnscore * @brief Chroot functions * * @{ */ #pragma once #include /** * * Returns the base path by taking into account the chroot path. * * This is seldom used because it's usually more efficient to update paths * with the right prefix once at initialisation. * * @return if the chroot jail is on, returns "/", else returns the last value set by: chroot_set_path(const char*) * */ const char *chroot_get_path(); ya_result chroot_set_path(const char *path); ya_result chroot_jail(); ya_result chroot_manage_path(char **managed_location, const char *path, bool chroot_relative); ya_result chroot_unmanage_path(char **managed_location); /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/rfc.h0000644000077100007710000000012412650131756022550 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.502344 30 ctime=1454597651.121344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/rfc.h0000664000077100007710000022230112650131756022355 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef RFC_H_ #define RFC_H_ #include /* ------------------------------------------------------------ * * INCLUDES */ /* ------------------------------------------------------------ * * VALUES */ /* http://en.wikipedia.org/wiki/List_of_DNS_record_types */ /* dns */ #define DNS_HEADER_LENGTH 12 /* rfc 1035 */ #define MAX_LABEL_LENGTH 63 /* rfc 1034 */ #define MAX_DOMAIN_TEXT_LENGTH (MAX_DOMAIN_LENGTH - 1) /* rfc 1034 */ #define MAX_DOMAIN_LENGTH 255 /* rfc 1034 */ #define MAX_LABEL_COUNT ((MAX_DOMAIN_LENGTH + 1) / 2) #define MAX_SOA_RDATA_LENGTH (255 + 255 + 20) #define DNS_DEFAULT_PORT 53 /* edns0 */ #define EDNS0_MAX_LENGTH 65535 /* See 4.5.5 in RFC rfc 2671 */ #define EDNS0_MIN_LENGTH 512 /* rfc 2671 */ #define EDNS0_DO 0 /* DNSSEC OK flag */ #define EDNS0_OPT_0 0 /* Reserverd rfc 2671 */ #define EDNS0_OPT_3 3 /* NSID rfc 5001 */ #define DNSPACKET_MAX_LENGTH 0xffff #define UDPPACKET_MAX_LENGTH 512 #define RDATA_MAX_LENGTH 0xffff /* dnssec (dns & bind) */ #define DNSSEC_AD 0x20 /* Authenticated Data flag */ #define DNSSEC_CD 0x10 /* Checking Disabled flag */ #define RRSIG_RDATA_HEADER_LEN 18 /* The length of an RRSIG rdata without the * signer_name and the signature */ #define ID_BITS 0xFF /* rfc 1035 */ // HIGH flags #define QR_BITS 0x80 /* rfc 1035 */ #define OPCODE_BITS 0x78 /* rfc 1035 */ #define OPCODE_SHIFT 3 #define AA_BITS 0x04 /* rfc 1035 */ #define TC_BITS 0x02 /* rfc 1035 */ #define RD_BITS 0x01 /* rfc 1035 */ // LOW flags #define RA_BITS 0x80 /* rfc 1035 */ #define Z_BITS 0x40 /* rfc 1035 */ #define AD_BITS 0x20 /* rfc 2065 */ #define CD_BITS 0x10 /* rfc 2065 */ #define RCODE_BITS 0x0F /* rfc 1035 */ #ifdef WORDS_BIGENDIAN // BIG endian #define DNS_FLAGS_HAS_QR(f_) (f_ & ((u16)QR_BITS << 8)) #define DNS_FLAGS_GET_OPCODE(f_) ((f_ >> (OPCODE_SHIFT + 8)) & OPCODE_BITS) #define DNS_FLAGS_HAS_AA(f_) (f_ & ((u16)AA_BITS << 8)) #define DNS_FLAGS_HAS_TC(f_) (f_ & ((u16)TC_BITS << 8)) #define DNS_FLAGS_HAS_RD(f_) (f_ & ((u16)RD_BITS << 8)) #define DNS_FLAGS_HAS_RA(f_) (f_ & ((u16)RA_BITS)) #define DNS_FLAGS_HAS_Z(f_) (f_ & ((u16)Z_BITS)) #define DNS_FLAGS_HAS_AD(f_) (f_ & ((u16)AD_BITS)) #define DNS_FLAGS_HAS_CD(f_) (f_ & ((u16)CD_BITS)) #define DNS_FLAGS_GET_RCODE(f_) (f_ & RCODE_BITS) #else #define DNS_FLAGS_HAS_QR(f_) (f_ & ((u16)QR_BITS)) #define DNS_FLAGS_GET_OPCODE(f_) ((f_ >> OPCODE_SHIFT) & OPCODE_BITS) #define DNS_FLAGS_HAS_AA(f_) (f_ & ((u16)AA_BITS)) #define DNS_FLAGS_HAS_TC(f_) (f_ & ((u16)TC_BITS)) #define DNS_FLAGS_HAS_RD(f_) (f_ & ((u16)RD_BITS)) #define DNS_FLAGS_HAS_RA(f_) (f_ & ((u16)RA_BITS << 8)) #define DNS_FLAGS_HAS_Z(f_) (f_ & ((u16)Z_BITS << 8)) #define DNS_FLAGS_HAS_AD(f_) (f_ & ((u16)AD_BITS << 8)) #define DNS_FLAGS_HAS_CD(f_) (f_ & ((u16)CD_BITS << 8)) #define DNS_FLAGS_GET_RCODE(f_) ((f_ >> 8) & RCODE_BITS) #endif #define QDCOUNT_BITS 0xFFFF /* number of questions rfc 1035 */ #define ANCOUNT_BITS 0xFFFF /* number of resource records rfc 1035 */ #define NSCOUNT_BITS 0xFFFF /* name servers in the author.rec. rfc 1035 */ #define ARCOUNT_BITS 0xFFFF /* additional records rfc 1035 */ #define ZOCOUNT_BITS 0xFFFF /* Number of RRs in the Zone Sect. rfc 2136 */ #define PRCOUNT_BITS 0xFFFF /* Number of RRs in the Prereq. Sect. rfc 2136 */ #define UPCOUNT_BITS 0xFFFF /* Number of RRs in the Upd. Sect. rfc 2136 */ #define ADCOUNT_BITS 0xFFFF /* Number of RRs in the Add Sect. rfc 2136 */ #define OPCODE_QUERY (0< / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_NULL NU16(10) /* a null RR - EXPERIMENTAL rfc 1035 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ADDRESS | 32 bit address ARPA Internet address | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PROTOCOL | | PROTOCOL: 8 bit IP protocol number +--+--+--+--+--+--+--+--+ | / / BIT MAP: variable length bit map. The bit map +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ must be a multiple of 8 bits long. */ #define TYPE_WKS NU16(11) /* a well known service description rfc 1035 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / PTRNAME / dns formatted domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_PTR NU16(12) /* a domain name pointer rfc 1035 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / CPU / character-string +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / OS / character-string +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_HINFO NU16(13) /* host information rfc 1035 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / RMAILBX / character-string +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / EMAILBX / character-string +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_MINFO NU16(14) /* mailbox or mail list information rfc 1035 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFERENCE | 16 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / EXCHANGE / dns formatted domain name / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_MX NU16(15) /* mail exchange rfc 1035 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / TXT-DATA / one or more s (pascal string) +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_TXT NU16(16) /* text strings rfc 1035 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / MBOX-DNAME / dns formatted domain name local-part. Can have '\'before . +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / TXT-DNAME / dns formatted domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_RP NU16(17) /* For Responsible Person rfc 1183 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | SUBTYPE | 16 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / HOSTNAME / dns formatted domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_AFSDB NU16(18) /* AFS Data Base location rfc 1183 rfc 5864 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / PSDN-ADDRESS / pascal string (numeric only) +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_X25 NU16(19) /* X.25 PSDN address rfc 1183 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / ISDN-ADDRESS / pascal string (IA5 allowed) +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / SA / pascal string (numeric BCD) (OPTIONAL) +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_ISDN NU16(20) /* ISDN address rfc 1183 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFERENCE | 16 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / INTERMEDIATE-HOST / dns formatted domain name / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_RT NU16(21) /* Route Through rfc 1183 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / NSAP (in hex) / binary encoding of NSAP in hex +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ /* |--------------| | <-- IDP --> | |--------------|-------------------------------------| | AFI | IDI | <-- DSP --> | |-----|--------|-------------------------------------| | 47 | 0005 | DFI | AA |Rsvd | RD |Area | ID |Sel | |-----|--------|-----|----|-----|----|-----|----|----| octets | 1 | 2 | 1 | 3 | 2 | 2 | 2 | 6 | 1 | |-----|--------|-----|----|-----|----|-----|----|----| IDP Initial Domain Part AFI Authority and Format Identifier IDI Initial Domain Identifier DSP Domain Specific Part DFI DSP Format Identifier AA Administrative Authority Rsvd Reserved RD Routing Domain Identifier Area Area Identifier ID System Identifier SEL NSAP Selector */ #define TYPE_NSAP NU16(22) /* NSAP address, NSAP style A record rfc 1706 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / PTRNAME / dns formatted domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_NSAP_PTR NU16(23) /* domain name pointer, NSAP style rfc 1348 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TYPE COVERED | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ALGORITHM | LABELS | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ORIGINAL TTL | 32 bit | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | SIGNATURE EXPIRATION | 32 bit | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | SIGNATURE INCEPTION | 32 bit | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | KEY TAG | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / SIGNER'S NAME / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / SIGNATURE / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_SIG NU16(24) /* for security signature rfc 4034 rfc 3755 rfc 2535 rfc 2536 rfc 2537 rfc 2931 rfc 3110 rfc 3008 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | FLAGS | 16 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PROTOCOL | ALGORITHM | PROTOCOL: 8 bit, ALGORITHM: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / PUBLIC KEY / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ /* flags 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ | A/C | Z | XT| Z | Z | NAMTYP| Z | Z | Z | Z | SIG | +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+ */ #define TYPE_KEY NU16(25) /* for security key rfc 4034 rfc 3755 rfc 2535 rfc 2536 rfc 2537 rfc 2539 rfc 3008 rfc 3110 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFERENCE | 16 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / MAP822 / dns formatted domain name / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / MAPX400 / dns formatted domain name / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_PX NU16(26) /* X.400 mail mapping information rfc 2163 */ /* +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / LONGITUDE / c-string (representing a real number) +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / LATITUDE / c-string (representing a real number) +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / ALTITUDE / c-string (representing a real number) +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_GPOS NU16(27) /* Geographical Position rfc 1712 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ADDRESS | 32 bit address address | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ADDRESS | 32 bit address address | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ADDRESS | 32 bit address address | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ADDRESS | 32 bit address address | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_AAAA NU16(28) /* IP6 Address rfc 3596 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | VERSION | SIZE | VERSION: 8 bit int, SIZE: 8 bit int +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | HORIZ PRE | VERT PRE | HORIZ PRE: 8 bit int, VERT PRE: 8 bit int +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | LATITUDE | 32 bit integer | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | LONGITUDE | 32 bit integer | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ALTITUDE | 32 bit integer | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_LOC NU16(29) /* Location information rfc 1876 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / NEXT DOMAIN NAME / dns formatted domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / TYPE BIT MAPS / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_NXT NU16(30) /* Next Domain - OBSOLETE rfc 3755 rfc 2535 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / ENDPOINT IDENTIFIER / string of octets. (Binary encoding of the Identifier, / / meaningful only to the system utilizing it) +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_EID NU16(31) /* Endpoint Identifier @note undocumented see draft-ietf-nimrod-dns-01.txt */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / NIMROD LOCATOR / variable string of octets. (Binary encoding of the Locator / / specified in the Nimrod protocol) +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_NIMLOC NU16(32) /* Nimrod Locator @note undocumented see draft-ietf-nimrod-dns-01.txt */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PRIORITY | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | WEIGHT | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PORT | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / TARGET / dns formatted domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_SRV NU16(33) /* Server selection rfc 2782 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | FORMAT | | FORMAT: 8 bit +--+--+--+--+--+--+--+--+ | ADDRESS: c-string / ADDRESS / | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_ATMA NU16(34) /* ATM Address @note undocumented see ATM Name System V2.0 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ORDER | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFERENCE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / FLAGS / character-string (a-z0-9) can be empty +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / SERVICES / character-string (a-z0-9) can be empty +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / REGEXP / character-string +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / REPLACEMENT / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_NAPTR NU16(35) /* Naming Authority Pointer rfc 2915 rfc 2168 rfc 3403 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFERENCE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / EXCHANGER / dns formatted domain name / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_KX NU16(36) /* Key Exchanger rfc 2230 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TYPE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | KEY TAG | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ALGORITHM | / +--+--+--+--+--+--+--+--+ / / / / CERTIFICATE OR CRL / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_CERT NU16(37) /* CERT rfc 4398 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFIX | / 8 bit unsigned integer +--+--+--+--+--+--+--+--+ / / / / ADDRESS SUFFIX / 0..16 octets / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / PREFIX NAME / uncompressed domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_A6 NU16(38) /* A6 rfc 3226 rfc 2874 rfc 6563 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / DNAME / dns formatted domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_DNAME NU16(39) /* DNAME rfc 6672 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | CODING | SUBCODING | CODING: 8 bit, SUBCODING: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | / c-string / DATA / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_SINK NU16(40) /* SINK @note undocumented see The Kitchen Sink Resource Record */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | OPTION-CODE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | OPTION-LENGTH | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | / OPTION-DATA / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | EXTENDED-RCODE | VERSION | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | Z | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_OPT NU16(41) /* edns0 flag rfc 6891 rfc 3225 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ADDRESSFAMILY | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFIX | N| AFDLENGTH | PREFIX: 8 bit unsigned binary coded, N: 1 bit, +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ ADFLENGTH: 7 bit unsigned / / / AFDPART / address family dependent | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_APL NU16(42) /* APL rfc 3123 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | KEY TAG | 16 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ALGORITHM | DIGEST TYPE | ALGORITHM: 8 bit, DIGEST TYPE: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / DIGEST / digest dependent / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_DS NU16(43) /* Delegation Signer rfc 4034 rfc 3658 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ALGORITHM | FP TYPE | ALGORITHM: 8 bit, FP TYPE: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / FINGERPRINT / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_SSHFP NU16(44) /* SSH Key Fingerprint rfc 4255 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PRECEDENCE | GATEWAY TYPE | PRECEDENCE: 8 bit, GATEWAY TYPE: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ALGORITHM | | ALGORITHM: 8 bit +--+--+--+--+--+--+--+--+ | | GATEWAY | GATEWAY: 32 bit IPv4 / 128 bit IPv6 / uncompressed domain name / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / PUBLIC KEY / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_IPSECKEY NU16(45) /* IPSECKEY rfc 4025 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | TYPE COVERED | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ALGORITHM | LABELS | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ORIGINAL TTL | 32 bit | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | SIGNATURE EXPIRATION | 32 bit | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | SIGNATURE INCEPTION | 32 bit | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | KEY TAG | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / SIGNER'S NAME / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / SIGNATURE / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_RRSIG NU16(46) /* RRSIG rfc 4034 rfc 3755 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / NEXT DOMAIN NAME / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / TYPE NIT MAPS / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_NSEC NU16(47) /* NSEC rfc 4034 rfc 3755 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | FLAGS | 16 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PROTOCOL | ALGORITHM | PROTOCOL: 8 bit, ALGORITHM: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / PUBLIC KEY / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_DNSKEY NU16(48) /* DNSKEY rfc 4034 rfc 3755 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | IDENTIFIER TYPE | 16 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | DIGEST TYPE | / 8 bit +--+--+--+--+--+--+--+--+ / / DIGEST / dependent on the digest type +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_DHCID NU16(49) /* DHCID rfc 4701 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | HASH ALGORITHM | FLAGS | HASH ALGORITHM: 8 bit, FLAGS: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ITERATIONS | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | SALT LENGTH | / 8 bit unsigned integer +--+--+--+--+--+--+--+--+ / / SALT / Can be zero length +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | HASH LENGTH | / 8 bit unsigned integer +--+--+--+--+--+--+--+--+ / / NEXT HASHED OWNER NAME / unmodified binary hash value. +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / TYPE BIT MAPS / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ /* Flags 0 1 2 3 4 5 6 7 +-+-+-+-+-+-+-+-+ | |O| +-+-+-+-+-+-+-+-+ ^ OPT-OUT flag */ #define TYPE_NSEC3 NU16(50) /* NSEC3 rfc 5155 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | HASH ALGORITHM | FLAGS | HASH ALGORITHM: 8 bit, FLAGS: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ITERATIONS | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | SALT LENGTH | / 8 bit unsigned integer +--+--+--+--+--+--+--+--+ / / SALT / Can be zero length +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_NSEC3PARAM NU16(51) /* NSEC3PARAM rfc 5155 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | CERTIFICATE USAGE | SELECTOR | CERTIFICATE USAGE: 8 bit, SELECTOR: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / MATCHING TYPE | / +--+--+--+--+--+--+--+--+ / / / / CERTIFICATE ASSOCIATION DATA / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_TLSA NU16(52) /* TLSA rfc 6698 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | HIT LENGTH | PK ALGORITHM | HIT LENGTH: 8 bit unsigned integer, +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ PK ALGORITHM: 8 bit unsigned integer | PK LENGTH | PK LENTH: 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / HIT / binary value in network order / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / PUBLIC KEY / dependent on the type / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / RENDEZVOUS SERVERS / dns formatted domain name / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_HIP NU16(55) /* Host Identity Protocol rfc 5205 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / NINFO-DATA / one or more c-strings +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_NINFO NU16(56) /* NINFO @note undocumented see draft-reid-dnsext-zs-01.txt */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | FLAGS | 16 bit: (value 0) +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PROTOCOL | ALGORITHM | PROTOCOL: 8 bit (value 1), ALGORITHM: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / PUBLIC KEY / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_RKEY NU16(57) /* RKEY @note undocumented see draft-reid-dnsext-rkey-00.txt */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / TALINK START/PREVIOUS / dns formatted domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / TALINK NEXT/END / dns formatted domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_TALINK NU16(58) /* Trust Anchor LINK @note undocumented see talink-completed-template */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | KEY TAG | 16 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ALGORITHM | DIGEST TYPE | ALGORITHM: 8 bit, DIGEST TYPE: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / DIGEST / digest dependent / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_CDS NU16(59) /* Child DS rfc 7344 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / SPF-DATA / one or more c-strings +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_SPF NU16(99) /* SPF rfc7208 */ #define TYPE_UINFO NU16(100) /* IANA-Reserved */ #define TYPE_UID NU16(101) /* IANA-Reserved */ #define TYPE_GID NU16(102) /* IANA-Reserved */ #define TYPE_UNSPEC NU16(103) /* IANA-Reserved */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFERENCE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | | NODEID | 64 bit | | | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_NID NU16(104) /* NODE ID rfc 6742 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFERENCE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | LOCATOR32 | 32 bit unsigned integer | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_L32 NU16(105) /* LOCATOR 32 rfc 6742 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFERENCE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | | LOCATOR64 | 64 bit unsigned integer | | | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_L64 NU16(106) /* LOCATOR 64 rfc 6742 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PREFERENCE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / FQDN / dns formatted domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_LP NU16(107) /* LOCATOR POINTER rfc 6742 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | | EUI-48 ADDRESS | 48 bit (MUST be represented as six two-digit hexadecimal | | numbers separated by hyphens) +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_EUI48 NU16(108) /* EUI-48 address rfc 7043 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | | EUI-64 ADDRESS | 64 bit (MUST be represented as six two-digit hexadecimal | | numbers separated by hyphens) | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_EUI64 NU16(109) /* EUI-64 address rfc 7043 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / ALGORITHM / algorithm in dns formatted domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | INCEPTION | 32 bit unsigned integer | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | EXPIRATION | 32 bit unsigned integer | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | MODE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ERROR | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | KEY SIZE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / KEY DATA / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | OTHER SIZE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / OTHER DATA / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_TKEY NU16(249) /* Transaction Key rfc 2930 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / ALGORITHM / algorithm in dns formatted domain name +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | | | INCEPTION | 48 bit unsigned integer | | +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | FUDGE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | MAC SIZE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / MAC / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ORIGINAL ID | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ERROR | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | OTHER SIZE | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / OTHER DATA / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_TSIG NU16(250) /* Transaction Signature rfc 2845 */ #define TYPE_IXFR NU16(251) /* Incremental Transfer rfc 1995 */ #define TYPE_AXFR NU16(252) /* Transfer of an entire zone rfc 1035 rfc 5936 */ #define TYPE_MAILB NU16(253) /* A request for mailbox-related records (MB, MG or MR) rfc 1035 */ #define TYPE_MAILA NU16(254) /* A request for mail agent RRs (Obsolete - see MX) rfc 1035 */ #define TYPE_ANY NU16(255) /* a request for all records rfc 1035 rfc 6895 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | PRIORITY | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | WEIGHT | 16 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / TARGET / / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_URI NU16(256) /* URI @note undocumented see draft-faltstrom-uri-14 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | FLAGS | TAG LENGTH | FLAGS: 8 bit, TAG LENGTH: 8 bit unsigned integer +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / TAG / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / VALUE / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_CAA NU16(257) /* Certification Authority Authorization rfc 6844 */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | KEY TAG | 16 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ALGORITHM | DIGEST TYPE | ALGORITHM: 8 bit, DIGEST TYPE: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / DIGEST / digest dependent / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_TA NU16(32768) /* DNSSEC Trust Authorities @note undocumented see Deploying DNSSEC Without a Signed Root */ /* 1 1 1 1 1 1 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | KEY TAG | 16 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ | ALGORITHM | DIGEST TYPE | ALGORITHM: 8 bit, DIGEST TYPE: 8 bit +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ / / / DIGEST / digest dependent / / +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+ */ #define TYPE_DLV NU16(32769) /* DNSSEC Lookaside Validation rfc 4431 */ #define TYPE_PRIVATE_FIRST NU16(65280) #define TYPE_PRIVATE_LAST NU16(65534) #define HOST_CLASS_IN 1 /* the Internet rfc 1025 */ #define CLASS_IN NU16(HOST_CLASS_IN) /* the Internet rfc 1025 */ #define CLASS_CS NU16(2) /* CSNET class rfc 1025 */ #define CLASS_CH NU16(3) /* the CHAOS class rfc 1025 */ #define CLASS_HS NU16(4) /* Hesiod rfc 1025 */ #define CLASS_CTRL NU16(0x2A) /* @note Yadifa controller class */ #if HAS_WHOIS #define CLASS_WHOIS NU16(0x2B) /* @note WHOIS class */ #endif // HAS_WHOIS #if HAS_DNSQ #define CLASS_DNSQ NU16(0x2C) /* @note DNSQuality class */ #endif // HAS_DNSQ #define CLASS_NONE NU16(254) /* rfc 2136 rfc 2136 */ #define CLASS_ANY NU16(255) /* rfc 1035 QCLASS ONLY rfc 1025 */ /* -----------------------------------------------------------------*/ #define AXFR_TSIG_PERIOD 100 /* -----------------------------------------------------------------*/ #ifdef WORDS_BIGENDIAN #define DNSKEY_FLAG_KEYSIGNINGKEY 0x0001 #define DNSKEY_FLAG_ZONEKEY 0x0100 #else #define DNSKEY_FLAG_KEYSIGNINGKEY 0x0100 #define DNSKEY_FLAG_ZONEKEY 0x0001 #endif #define DNSKEY_PROTOCOL_FIELD 3 /* MUST be this */ #define DNSKEY_ALGORITHM_DSASHA1 3 #define DNSKEY_ALGORITHM_RSASHA1 5 #define DNSKEY_ALGORITHM_DSASHA1_NSEC3 6 #define DNSKEY_ALGORITHM_RSASHA1_NSEC3 7 #define DNSKEY_ALGORITHM_RSASHA256_NSEC3 8 /* RFC 5702 */ #define DNSKEY_ALGORITHM_RSASHA512_NSEC3 10 /* RFC 5702 */ #define DNSKEY_ALGORITHM_ECDSAP256SHA256 13 /* RFC 6605 */ #define DNSKEY_ALGORITHM_ECDSAP384SHA384 14 /* RFC 6605 */ #define DS_DIGEST_SHA1 1 #define DS_DIGEST_SHA256 2 #define NSEC3_FLAGS_OPTOUT 1 /* */ /* -----------------------------------------------------------------*/ #define IS_TYPE_PRIVATE(t) ( ((t) >= 65280) && ( (t) <= 65534)) #define IS_TYPE_NPRIVATE(t) ( (NU16(t) >= 65280) && ( NU16(t) <= 65534)) /* ------------------------------------------------------------ * * STRUCTS */ #define EDNS0_RECORD_SIZE 11 /* rfc 2671 */ struct edns0_data { u8 domain_name; /* must be empty */ u16 opt; u16 payload_size; u8 extended_rcode; /* extended rcode and flags */ u8 version; /* extended rcode and flags */ u8 z_bits; /* extended rcode and flags */ u8 option_code; u16 option_length; }; typedef struct edns0_data edns0_data; /* - */ typedef struct value_name_table value_name_table; struct value_name_table { u32 id; char *data; }; typedef value_name_table class_table; typedef value_name_table type_table; typedef struct message_header message_header; struct message_header { u16 id; u16 opcode; u16 qdcount; u16 ancount; u16 nscount; u16 arcount; }; /* ------------------------------------------------------------ */ #define CLASS_IN_NAME "IN" #define CLASS_CS_NAME "CS" #define CLASS_CH_NAME "CH" #define CLASS_HS_NAME "HS" #define CLASS_CTRL_NAME "CTRL" /* @note YADIFA's personal class, maybe one day in a RFC */ #define CLASS_NONE_NAME "NONE" #define CLASS_ANY_NAME "ANY" extern const class_table qclass[]; #define TYPE_A_NAME "A" #define TYPE_NS_NAME "NS" #define TYPE_MD_NAME "MD" #define TYPE_MF_NAME "MF" #define TYPE_CNAME_NAME "CNAME" #define TYPE_SOA_NAME "SOA" #define TYPE_MB_NAME "MB" #define TYPE_MG_NAME "MG" #define TYPE_MR_NAME "MR" #define TYPE_NULL_NAME "NULL" #define TYPE_WKS_NAME "WKS" #define TYPE_PTR_NAME "PTR" #define TYPE_HINFO_NAME "HINFO" #define TYPE_MINFO_NAME "MINFO" #define TYPE_MX_NAME "MX" #define TYPE_TXT_NAME "TXT" #define TYPE_RP_NAME "RP" #define TYPE_AFSDB_NAME "AFSDB" #define TYPE_X25_NAME "X25" #define TYPE_ISDN_NAME "ISDN" #define TYPE_RT_NAME "RT" #define TYPE_NSAP_NAME "NSAP" #define TYPE_NSAP_PTR_NAME "NSAP-PTR" #define TYPE_SIG_NAME "SIG" #define TYPE_KEY_NAME "KEY" #define TYPE_PX_NAME "PX" #define TYPE_GPOS_NAME "GPOS" #define TYPE_AAAA_NAME "AAAA" #define TYPE_LOC_NAME "LOC" #define TYPE_NXT_NAME "NXT" #define TYPE_EID_NAME "EID" /* @note undocumented see draft-lewis-dns-undocumented-types-01 */ #define TYPE_NIMLOC_NAME "NIMLOC" /* @note undocumented see draft-lewis-dns-undocumented-types-01 */ #define TYPE_SRV_NAME "SRV" #define TYPE_ATMA_NAME "ATMA" #define TYPE_NAPTR_NAME "NAPTR" #define TYPE_KX_NAME "KX" #define TYPE_CERT_NAME "CERT" #define TYPE_A6_NAME "A6" #define TYPE_DNAME_NAME "DNAME" #define TYPE_SINK_NAME "SINK" /* @note undocumented see draft-lewis-dns-undocumented-types-01 */ #define TYPE_OPT_NAME "OPT" #define TYPE_APL_NAME "APL" #define TYPE_DS_NAME "DS" #define TYPE_SSHFP_NAME "SSHFP" #define TYPE_IPSECKEY_NAME "IPSECKEY" #define TYPE_RRSIG_NAME "RRSIG" #define TYPE_NSEC_NAME "NSEC" #define TYPE_DNSKEY_NAME "DNSKEY" #define TYPE_DHCID_NAME "DHCID" #define TYPE_NSEC3_NAME "NSEC3" #define TYPE_NSEC3PARAM_NAME "NSEC3PARAM" #define TYPE_TLSA_NAME "TLSA" #define TYPE_HIP_NAME "HIP" #define TYPE_NINFO_NAME "NINFO" /* @note undocumented see draft-lewis-dns-undocumented-types-01 */ #define TYPE_RKEY_NAME "RKEY" /* @note undocumented see draft-lewis-dns-undocumented-types-01 */ #define TYPE_TALINK_NAME "TALINK" /* @note undocumented see draft-lewis-dns-undocumented-types-01 */ #define TYPE_CDS_NAME "CDS" #define TYPE_SPF_NAME "SPF" #define TYPE_UINFO_NAME "UINFO" #define TYPE_UID_NAME "UID" #define TYPE_GID_NAME "GID" #define TYPE_UNSPEC_NAME "UNSPEC" #define TYPE_NID_NAME "NID" #define TYPE_L32_NAME "L32" #define TYPE_L64_NAME "L64" #define TYPE_LP_NAME "LP" #define TYPE_EUI48_NAME "EUI48" #define TYPE_EUI64_NAME "EUI64" #define TYPE_TKEY_NAME "TKEY" #define TYPE_TSIG_NAME "TSIG" #define TYPE_IXFR_NAME "IXFR" #define TYPE_AXFR_NAME "AXFR" #define TYPE_MAILB_NAME "MAILB" #define TYPE_MAILA_NAME "MAILA" #define TYPE_ANY_NAME "ANY" /** @note type ANY's string was set to '*' ? * Setting this to anything else will break * dnsformat:358 */ #define TYPE_URI_NAME "URI" /* @note undocumented see draft-lewis-dns-undocumented-types-01 */ #define TYPE_CAA_NAME "CAA" /* @note undocumented see draft-lewis-dns-undocumented-types-01 */ #define TYPE_TA_NAME "TA" /* @note undocumented see draft-lewis-dns-undocumented-types-01 */ #define TYPE_DLV_NAME "DLV" #define OPT_NSID 3 // the option value for NSID extern const type_table qtype[]; /** * Static asciiz representation of a dns class * * @param c * @return the c-string */ const char *get_name_from_class(u16 c); /** * Static asciiz representation of a dns type * * @param c * @return the c-string */ const char *get_name_from_type(u16 t); /** \brief Get the numeric value of a class (network order) from its name * * @param[in] src the name of the class * @param[out] dst value of the class, network order * * @retval OK * @retval NOK */ int get_class_from_name(const char *src, u16 *dst); /** \brief Get the numeric value of a class (network order) from its name * Case insensitive * * @param[in] src the name of the class (case insensitive) * @param[out] dst value of the class, network order * * @retval OK * @retval NOK */ int get_class_from_case_name(const char *src, u16 *dst); /** \brief Get the numeric value of a type (network order) from its name * * @param[in] src the name of the type * @param[out] dst value of the type, network order * * @retval OK * @retval NOK */ int get_type_from_name(const char *src, u16 *dst); /** \brief Get the numeric value of a type (network order) from its name * Case insensitive * * @param[in] src the name of the type (case insensitive) * @param[out] dst value of the type, network order * * @retval OK * @retval NOK */ int get_type_from_case_name(const char *src, u16 *dst); int get_type_from_case_name_len(const char *src, int src_len, u16 *dst); /** * @brief Case-insensitive search for the name in the table, returns the value * * @param table the name->value table * @param name the name to look for * @param out_value a pointer to an u32 that will hold the value in case of a match * * @return SUCCESS iff the name was matched */ ya_result get_value_from_casename(const value_name_table *table, const char *name, u32 *out_value); /** * @brief Static asciiz representation of a dns opcode * * @param c * * @return the c-string */ const char *get_opcode(u16 c); /** * @brief Static asciiz representation of a dns rcode * * @param c * * @return the c-string */ const char *get_rcode(u16 c); #if HAS_NSID_SUPPORT #ifndef DNSCORE_RFC_C extern u32 edns0_record_size; extern u8 *edns0_rdatasize_nsid_option_wire; extern u32 edns0_rdatasize_nsid_option_wire_size; #endif void edns0_set_nsid(u8 *bytes, u16 size); #endif #endif /* RFC_H_ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/base32.h0000644000077100007710000000012412650131756023055 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.569344 30 ctime=1454597650.850344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/base32.h0000664000077100007710000000561212650131756022666 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup base Base conversion functions * @ingroup dnscore * @brief Base 32 codec * * @{ * *----------------------------------------------------------------------------*/ #ifndef _BASE32_H #define _BASE32_H #include #ifdef __cplusplus extern "C" { #endif /** * Encodes bytes into base32 * The output size must be at least size_in * 8/5 * * @param buffer_in bytes to convert * @param size_in number of bytes * @param buffer_out output buffer of a size >= size_in * 8/5 * * @return output size */ u32 base32_encode(const u8* buffer_in,u32 size_in,char* buffer_out); /** * Decodes base32 into bytes * The output size must be at least size_in * 5/8 * * @param buffer_in base32 text * @param size_in number of chars * @param buffer_out output buffer of a size >= size_in * 5/8 * * @return output size */ ya_result base32_decode(const char* buffer_in,u32 size_in,u8* buffer_out); #ifdef __cplusplus } #endif #endif /* _BASE32_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/list-dl.h0000644000077100007710000000012412650131756023346 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.531344 30 ctime=1454597651.017344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/list-dl.h0000664000077100007710000003405212650131756023157 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief A node-based single linked list * * A node-based single linked list * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef LIST_DL_H_ #define LIST_DL_H_ /* ------------------------------------------------------------ * * INCLUDES */ #include #include /* ------------------------------------------------------------ * * STRUCTS */ /** * Linked list for interface data * * (looks like a no-header no-sentinel single-linked list of strings) * * * head : the base structure of the list * item : the concept of what is being stored in the list * node : holds the item * data : the reference to the item (which can be called data because it's type-less) * */ typedef struct list_dl_node_s list_dl_node_s; // 24 bytes struct list_dl_node_s { struct list_dl_node_s *next; struct list_dl_node_s *prev; void *data; }; typedef struct list_dl_node_sentiel_s list_dl_node_sentiel_s; // 16 bytes struct list_dl_node_sentiel_s { struct list_dl_node_s *next; struct list_dl_node_s *prev; }; typedef struct list_dl_s list_dl_s; // 36 bytes struct list_dl_s { list_dl_node_sentiel_s head_sentinel; list_dl_node_sentiel_s tail_sentinel; u32 size; }; typedef struct list_dl_iterator_s list_dl_iterator_s; struct list_dl_iterator_s { list_dl_s *list; list_dl_node_s *current_node; }; /* ------------------------------------------------------------ * * PROTOTYPES */ static inline void list_dl_iterator_init(list_dl_iterator_s *iter, list_dl_s *list) { iter->list = list; iter->current_node = (list_dl_node_s*)&list->head_sentinel; } static inline bool list_dl_iterator_has_next(list_dl_iterator_s *iter) { return iter->current_node->next != (list_dl_node_s*)&iter->list->tail_sentinel; } static inline void* list_dl_iterator_next(list_dl_iterator_s *iter) { iter->current_node = iter->current_node->next; return iter->current_node->data; } static inline list_dl_node_s * list_dl_node_alloc() { list_dl_node_s *node; ZALLOC_OR_DIE(list_dl_node_s*, node, list_dl_node_s, GENERIC_TAG); return node; } static inline void list_dl_node_free(list_dl_node_s *node) { ZFREE(node, list_dl_node_s); } /** * Initialises a list. * * @param list */ static inline void list_dl_init(list_dl_s *list) { ZEROMEMORY(list, sizeof(list_dl_s)); list->head_sentinel.next = (list_dl_node_s*)&list->tail_sentinel; list->tail_sentinel.prev = (list_dl_node_s*)&list->head_sentinel; } /** * Adds an item at the head of the list. * * @param list * @param data */ static inline void list_dl_insert(list_dl_s *list, void *data) { list_dl_node_s *node; ZALLOC_OR_DIE(list_dl_node_s*, node, list_dl_node_s, GENERIC_TAG); node->next = list->head_sentinel.next; node->prev = (list_dl_node_s*)&list->head_sentinel; list->head_sentinel.next->prev = node; list->head_sentinel.next = node; #ifdef DEBUG assert(list->head_sentinel.next->prev == (list_dl_node_s*)&list->head_sentinel); #endif node->data = data; list->size++; } static inline void list_dl_insert_node(list_dl_s *list, list_dl_node_s *node) { node->next = list->head_sentinel.next; node->prev = (list_dl_node_s*)&list->head_sentinel; list->head_sentinel.next->prev = node; list->head_sentinel.next = node; #ifdef DEBUG assert(list->head_sentinel.next->prev == (list_dl_node_s*)&list->head_sentinel); #endif list->size++; } /** * Adds an item at the tail of the list. * * @param list * @param data */ static inline void list_dl_append(list_dl_s *list, void *data) { list_dl_node_s *node; ZALLOC_OR_DIE(list_dl_node_s*, node, list_dl_node_s, GENERIC_TAG); node->next = (list_dl_node_s*)&list->tail_sentinel; node->prev = list->tail_sentinel.prev; list->tail_sentinel.prev->next = node; list->tail_sentinel.prev = node; #ifdef DEBUG assert(list->tail_sentinel.prev->next == (list_dl_node_s*)&list->tail_sentinel); #endif node->data = data; list->size++; } static inline void list_dl_append_node(list_dl_s *list, list_dl_node_s *node) { node->next = (list_dl_node_s*)&list->tail_sentinel; node->prev = list->tail_sentinel.prev; list->tail_sentinel.prev->next = node; list->tail_sentinel.prev = node; #ifdef DEBUG assert(list->tail_sentinel.prev->next == (list_dl_node_s*)&list->tail_sentinel); #endif list->size++; } static inline void list_dl_append_list(list_dl_s *list, list_dl_s *list_to_add) { if(list_to_add->size > 0) { list_dl_node_s *node; node = list_to_add->head_sentinel.next; node->prev = list->tail_sentinel.prev; list->tail_sentinel.prev->next = node; node = list_to_add->tail_sentinel.prev; node->next = (list_dl_node_s*)&list->tail_sentinel; list->tail_sentinel.prev = node; list->size += list_to_add->size; list_to_add->head_sentinel.next = (list_dl_node_s*)&list_to_add->tail_sentinel; list_to_add->tail_sentinel.prev = (list_dl_node_s*)&list_to_add->head_sentinel; list_to_add->size = 0; } } /** * * Adds an item to the list. * Effectively inserts the item. * * @param list * @param data */ static inline void list_dl_add(list_dl_s *list, void *data) { list_dl_append(list, data); } /** * Remove the first item from the list. * Deletes the node but not the data. * The data is returned. * * @param list * @return the data or NULL if the list is empty */ static inline void* list_dl_remove_first(list_dl_s *list) { if(list->size > 0) { #ifdef DEBUG assert(list->head_sentinel.next != (list_dl_node_s*)&list->tail_sentinel); assert(list->tail_sentinel.prev != (list_dl_node_s*)&list->head_sentinel); assert(list->head_sentinel.next != NULL); assert(list->tail_sentinel.prev != NULL); #endif list_dl_node_s *node = list->head_sentinel.next; list->head_sentinel.next = node->next; node->next->prev = (list_dl_node_s*)&list->head_sentinel; list->size--; void *data = node->data; ZFREE(node, list_dl_node_s); #ifdef DEBUG assert(list->head_sentinel.next->prev == (list_dl_node_s*)&list->head_sentinel); #endif return data; } else { return NULL; } } static inline list_dl_node_s* list_dl_remove_first_node(list_dl_s *list) { if(list->size > 0) { #ifdef DEBUG assert(list->head_sentinel.next != (list_dl_node_s*)&list->tail_sentinel); assert(list->tail_sentinel.prev != (list_dl_node_s*)&list->head_sentinel); assert(list->head_sentinel.next != NULL); assert(list->tail_sentinel.prev != NULL); #endif list_dl_node_s *node = list->head_sentinel.next; list->head_sentinel.next = node->next; node->next->prev = (list_dl_node_s*)&list->head_sentinel; list->size--; #ifdef DEBUG assert(list->head_sentinel.next->prev == (list_dl_node_s*)&list->head_sentinel); #endif return node; } else { return NULL; } } /** * Remove the last item from the list. * Deletes the node but not the data. * The data is returned. * * @param list * @return the data or NULL if the list is empty */ static inline void* list_dl_remove_last(list_dl_s *list) { if(list->size > 0) { #ifdef DEBUG assert(list->head_sentinel.next != (list_dl_node_s*)&list->tail_sentinel); assert(list->tail_sentinel.prev != (list_dl_node_s*)&list->head_sentinel); assert(list->head_sentinel.next != NULL); assert(list->tail_sentinel.prev != NULL); #endif list_dl_node_s *node = list->tail_sentinel.prev; list->tail_sentinel.prev = node->prev; node->prev->next = (list_dl_node_s*)&list->tail_sentinel; list->size--; void *data = node->data; ZFREE(node, list_dl_node_s); #ifdef DEBUG assert(list->tail_sentinel.prev->next == (list_dl_node_s*)&list->tail_sentinel); #endif return data; } else { return NULL; } } static inline list_dl_node_s * list_dl_remove_last_node(list_dl_s *list) { if(list->size > 0) { #ifdef DEBUG assert(list->head_sentinel.next != (list_dl_node_s*)&list->tail_sentinel); assert(list->tail_sentinel.prev != (list_dl_node_s*)&list->head_sentinel); assert(list->head_sentinel.next != NULL); assert(list->tail_sentinel.prev != NULL); #endif list_dl_node_s *node = list->tail_sentinel.prev; list->tail_sentinel.prev = node->prev; node->prev->next = (list_dl_node_s*)&list->tail_sentinel; list->size--; #ifdef DEBUG assert(list->tail_sentinel.prev->next == (list_dl_node_s*)&list->tail_sentinel); #endif return node; } else { return NULL; } } /** * Enqueues the item in the list, seen as a queue. * * @param list * @param data */ static inline void list_dl_enqueue(list_dl_s *list, void *data) { list_dl_insert(list, data); } /** * Dequeues the item from the list, seen as a queue. * * @param list * @return an item or NULL if the list/queue is empty */ static inline void* list_dl_dequeue(list_dl_s *list) { void *data = list_dl_remove_last(list); return data; } /** * Remove the first item that points to data; * * @param list * @param data * @return TRUE if an item has been deleted */ bool list_dl_remove(list_dl_s *list, const void *data); /** * Remove the first item for which the match does not returns 0. * * @param list * @param match a callback function called with the data and args * @param args * @return */ bool list_dl_remove_matching(list_dl_s *list, result_callback_function *match, void *args); /** * Remove all the items for which the match does not returns 0. * * @param list * @param match a callback function called with the data and args * @param args * @return */ bool list_dl_remove_all_matching(list_dl_s *list, result_callback_function *match, void *args); /** * Remove all items from the list. * Deletes the nodes but not the data. * * @param list */ void list_dl_clear(list_dl_s *list); /** * Iterates through the items of the function, calling the comparator. * * The comparator must return: * * COLLECTION_ITEM_SKIP : go to next item * COLLECTION_ITEM_STOP : stop processing, return NULL * COLLECTION_ITEM_PROCESS_THEN_STOP : stop processing, return node data * * @param list * @param comparator * * @return a matching node or NULL */ void *list_dl_search(list_dl_s *list, result_callback_function *comparator, void *parm); /** * * Returns the index of that specific pointer into the list * Linear search (slow) * * @param list * @param comparator * @return */ ya_result list_dl_indexof(list_dl_s *list, void *data); void *list_dl_get(list_dl_s *list, int index); ya_result list_dl_foreach(list_dl_s *list, result_callback_function *callback, void *caller_data); /** * Iterates through the items of the function, calling the comparator. * * The comparator must return: * * COLLECTION_ITEM_SKIP : go to next item * COLLECTION_ITEM_PROCESS : delete, then go to next item * COLLECTION_ITEM_STOP : stop processing * COLLECTION_ITEM_PROCESS_THEN_STOP : delete, then stop processing * * @param list * @param comparator * * @return TRUE if at least one item has been deleted, FALSE otherwise. */ bool list_dl_remove_match(list_dl_s *list, result_callback_function *comparator, void *parm); /** * * Returns the size of the list * * @param list * @return the size of the list */ static inline u32 list_dl_size(const list_dl_s *list) { #ifdef DEBUG if(list->size == 0) { assert(list->head_sentinel.next == (list_dl_node_s*)&list->tail_sentinel); assert(list->tail_sentinel.prev == (list_dl_node_s*)&list->head_sentinel); assert(list->head_sentinel.prev == NULL); assert(list->tail_sentinel.next == NULL); } #endif return list->size; } /* ------------------------------------------------------------ */ #endif /* LIST_DL_H_ */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/format.h0000644000077100007710000000012412650131756023266 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.617344 30 ctime=1454597650.991344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/format.h0000664000077100007710000002473312650131756023104 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup format C-string formatting * @ingroup dnscore * @brief * * @{ * *----------------------------------------------------------------------------*/ #pragma once #include #include #include #include #include #define OSPRINT_DUMP_LAYOUT_GROUP_MASK 0x0000ff00 #define OSPRINT_DUMP_LAYOUT_GROUP_SHIFT 8 #define OSPRINT_DUMP_LAYOUT_SEPARATOR_MASK 0x000000ff #define OSPRINT_DUMP_LAYOUT_SEPARATOR_SHIFT 0 #define OSPRINT_DUMP_ADDRESS 0x40000000 #define OSPRINT_DUMP_HEX 0x20000000 #define OSPRINT_DUMP_TEXT 0x10000000 // predefined layouts #define OSPRINT_DUMP_LAYOUT_DENSE 0x0000ffff #define OSPRINT_DUMP_LAYOUT_ERIC 0x000003ff #define OSPRINT_DUMP_LAYOUT_GERY 0x00000003 #define OSPRINT_DUMP_ALL (OSPRINT_DUMP_ADDRESS|OSPRINT_DUMP_HEX|OSPRINT_DUMP_TEXT) #define OSPRINT_DUMP_HEXTEXT (OSPRINT_DUMP_HEX|OSPRINT_DUMP_TEXT) /** * * Formats: * * modifier : restrict : * : to : * - : : change justification * 123456789 : : padding space * 0 : : use '0' char for padding * .12345789 : f : for float types, precision to use * hh : iudXxo : half half : 8 bits * h : iudXxo : half : 16 bits * l : iudXxo : long : 32 bits * ll : iudXxo : long long : 64 bits * L : f : long double * * formats : * : * %t : integer, prints the number of tabs on the output * %T : integer, prints the number of spaces on the output * %i : integer, prints the signed 8/16/32/64 bits integer in base 10 on the output * %r : integer, prints the ya_result registered message on the output or the hexadecimal code * %u : integer, prints the unsigned 8/16/32/64 bits integer in base 10 on the output * %d : integer, prints the unsigned 8/16/32/64 bits integer in base 10 on the output * %X : integer, prints the unsigned 8/16/32/64 bits integer in base 16 uppercase on the output * %x : integer, prints the unsigned 8/16/32/64 bits integer in base 16 lowercase on the output * %o : integer, prints the unsigned 8/16/32/64 bits integer in base 8 on the output * %p : void* , prints the pointer in hexadecimal on the output * %P : void* , prints the name of the pointer if possible, else the hexadecimal on the output * %f : double , prints the long double/double/float on the output * %s : char* , prints the ASCIIZ string on the output * %c : char , prints the 8-bits char on the output * %w : format_writer, calls the format_writer callback to print on the output * * Format extension mechanism: * * "%{registeredformatname}" : void*, prints the pointed value on the output * : use ya_result format_registerclass(format_handler_descriptor* fhd) for registration */ /* void* value, output_stream*, s32 padding, char pad_char, bool left_justified, void* reserved */ typedef void format_handler_method(const void*, output_stream*, s32, char, bool, void* reserved_for_method_parameters); typedef struct format_handler_descriptor format_handler_descriptor; // About the %w format: // // a pointer to this can be given as a 'w' parameter ie: "%w" // the writer callback get's called with // void* value as first parameter, what to print // output_stream *os as second parameter, where to write the chars to // s32 padding the number of chars it's supposed to take on the output (minimum) // char padchar the character to use for padding // bool left_justified where to justify the text // void* don't use that one // // ex: // // format_writer temp_fw_0(my_complex_or_rare_type_printer_callback, &my_complex_or_rare_type); // // format("So the value is : '%w'\n", &temp_fw_0); // struct format_writer { format_handler_method *callback; const void *value; }; typedef struct format_writer format_writer; struct format_handler_descriptor { const char* name; int name_len; /* Needed in order to quicken the matching */ format_handler_method* format_handler; }; void format_class_init(); ya_result format_registerclass(const format_handler_descriptor* fhd); /** * %% -> % * %-09lli right-justified 0-padded "long long integer" (s64) * %-9llu right-justified "long long unsigned integer" (u64) * %-20{class} right-justified "class" (class has to be registered) * %-20{class(a,b,c,d)} right-justified "class" called with 4 arguments (class has to be registered) * * %[-][0| ]([hh|h|l|ll]u|i|x)|([L]f)|c|s|{} * * --- * * hh 8 bits * h 16 bits * l 32 bits (The default if no length is given is 32 bits) * ll 64 bits * * i signed integer * u unsigned integer * d unsigned integer * x hexadecimal lo * X hexadecimal hi * b binary (not in yet) * * --- * * L long * * f double * * --- * * c char * * --- * * s asciiz string * * --- * * {class name} pointer to something that will be interpreted by the handler * */ ya_result vosformat(output_stream* os_, const char* fmt, va_list args); ya_result osprint(output_stream* stream,const char* text); ya_result osprintln(output_stream* stream,const char* text); ya_result osformat(output_stream* stream,const char* fmt,...); ya_result osformatln(output_stream* stream,const char* fmt,...); ya_result print(const char* text); ya_result println(const char* text); ya_result format(const char* fmt,...); ya_result formatln(const char* fmt,...); int vsnformat(char* out_, size_t out_size, const char* fmt, va_list args); int snformat(char* out, size_t out_size, const char* fmt, ...); /** * This formatter will return an allocated (malloc) string as a result of the format * * @param outp * @param out_size * @param fmt * @param args * @return */ int vasnformat(char** outp, size_t out_size, const char* fmt, va_list args); /** * This formatter will return an allocated (malloc) string as a result of the format * * @param outp * @param out_size * @param fmt * @param ... * @return */ int asnformat(char** outp, size_t out_size, const char* fmt, ...); /** * This formatter will return an allocated (malloc) string as a result of the format * * @param outp * @param fmt * @param ... * @return */ int asformat(char** outp, const char* fmt, ...); /* Used by extensions */ void format_dec_u64(u64 val, output_stream* stream, s32 padding, char pad_char, bool left_justified); void format_dec_s64(s64 val, output_stream* stream, s32 padding, char pad_char, bool left_justified); void format_hex_u64_lo(u64 val, output_stream* stream, s32 padding, char pad_char, bool left_justified); void format_hex_u64_hi(u64 val, output_stream* stream, s32 padding, char pad_char, bool left_justified); void format_oct_u64(u64 val, output_stream* stream, s32 padding, char pad_char, bool left_justified); void format_asciiz(const char* val, output_stream* stream, s32 padding, char pad_char, bool left_justified); /**/ int osprint_base16(output_stream* os, const u8* rdata, u32 rdata_size); int osprint_base64(output_stream* os, const u8* rdata, u32 rdata_size); void osprint_u32(output_stream* os, u32 value); void osprint_u16(output_stream* os, u16 value); void osprint_u32_hex(output_stream* os, u32 value); void print_char(char value); void osprint_char(output_stream *os, char value); void osprint_dump(output_stream *os, const void* data_pointer_, size_t size_, size_t line_size, u32 flags); ya_result osprint_type_bitmap(output_stream *os, const u8 *rdata_pointer, u16 rdata_size); ya_result osprint_rdata(output_stream *os, u16 type, const u8 *rdata_pointer, u16 rdata_size); ya_result print_rdata(u16 type, u8 *rdata, u16 rdata_size); void osprint_question(output_stream *os, u8 *qname, u16 qclass, u16 qtype); void print_question(u8 *qname, u16 qclass, u16 qtype); #if 0 /* fix */ #else #define FORMAT_BREAK_ON_INVALID(address__, len__) #endif /* * This is just a tool function used to test vsnformat. * It is not meant for the logger. * It has an output length limitation of 4096 bytes. * * Please use the other functions if possible. */ int fformat(FILE *out, const char *fmt, ...); /** * This tool struct is used so the RDATA part of a record can be printed/formatted * * we would have: * * rdata_desc myrdata={TYPE_SOA, rdata_len, rdata}; * format("bla bla bla %{rdatadesc}", &myrdata); * * */ struct rdata_desc_s { u16 type; u16 len; const u8 * rdata; }; typedef struct rdata_desc_s rdata_desc; /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/avl.c.inc0000644000077100007710000000012412650131756023323 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.614344 30 ctime=1454597650.839344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/avl.c.inc0000664000077100007710000013272512650131756023142 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * * * SVN Program: * $URL: https://svn.int.eurid.eu/svn/sysdevel/projects/yadifa/tags/release-2.1.6-public/lib/dnscore/include/dnscore/avl.c.inc $ * * Creation Date: * 2009-01-07 * * Last Update: * $Date: 2016-01-21 11:33:18 +0100 (Thu, 21 Jan 2016) $ * $Revision: 5792 $ * * Last Change: * $Author: timh $ * *------------------------------------------------------------------------------ * * DOCUMENTATION */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief AVL structure and functions * * AVL structure and functions * * @{ */ /* Optimization that have an effect on some avl depths */ #include #include #include #include #include "dnscore/sys_types.h" #include "dnscore/format.h" #ifndef DUMPER_FUNCTION #define DUMPER_FUNCTION(...) formatln(__VA_ARGS__);flushout() #endif #if defined(DEBUG_DUMP) #define DUMP(...) DUMPER_FUNCTION(__VA_ARGS__) #define DUMP_NODE(...) AVL_DUMP_NODE(__VA_ARGS__) #else #define DUMP(...) #define DUMP_NODE(...) #endif /* * */ #if AVL_HAS_PARENT_POINTER != 0 #ifndef AVL_PARENT #error AVL_HAS_PARENT_POINTER enabled but parent not defined #endif #else #ifdef AVL_PARENT #error AVL_HAS_PARENT_POINTER disabled but parent defined #endif #endif #ifndef AVL_REFERENCE_IS_POINTER #define AVL_REFERENCE_IS_POINTER TRUE #endif #ifndef AVL_REFERENCE_IS_CONST #define AVL_REFERENCE_IS_CONST FALSE #endif #if AVL_REFERENCE_IS_POINTER #undef AVL_REFERENCE_MODIFIER #define AVL_REFERENCE_MODIFIER const #else #undef AVL_REFERENCE_MODIFIER #define AVL_REFERENCE_MODIFIER #endif #if AVL_REFERENCE_IS_CONST #undef AVL_REFERENCE_MODIFIER #define AVL_REFERENCE_MODIFIER #undef AVL_REFERENCE_CONST #define AVL_REFERENCE_CONST #else #undef AVL_REFERENCE_CONST #define AVL_REFERENCE_CONST const #endif #define TOOLEFT (-2) #define LEFT (-1) #define MIDDLE 0 #define RIGHT 1 #define TOORIGHT 2 #define DIR_LEFT 0 #define DIR_RIGHT 1 #define DIR_CRASH 127 static s8 DIR_TO_AVL_BALANCE_[2] = {LEFT, RIGHT}; #define DIR_TO_AVL_BALANCE(dir) DIR_TO_AVL_BALANCE_[(dir)] static s8 AVL_BALANCE_TO_DIR_[5] = {DIR_LEFT, DIR_LEFT, DIR_CRASH, DIR_RIGHT, DIR_RIGHT}; #define AVL_BALANCE_TO_DIR(bal) AVL_BALANCE_TO_DIR_[(bal)-TOOLEFT] #define NODE_AVL_BALANCED(node) (AVL_BALANCE(node)==MIDDLE) #define MUST_REAVL_BALANCE(node) ((AVL_BALANCE(node)RIGHT)) #if (defined(AVL_PARENT) && defined(DEBUG)) #define ASSERT_CHECK_CHILD_PARENT_LINK(node) \ if(node!=NULL) \ { \ AVL_NODE_TYPE *parent__ = AVL_PARENT(node); \ if(parent__ != NULL) \ { \ AVL_NODE_TYPE *l__ = AVL_LEFT_CHILD(parent__); \ AVL_NODE_TYPE *r__ = AVL_RIGHT_CHILD(parent__); \ if(!(l__==(node) || \ r__==(node)) ) \ { \ DUMP("parent->node link broken"); \ DUMP("\tparent=(%p, " AVL_REFERENCE_FORMAT_STRING")",parent__, AVL_REFERENCE_FORMAT(AVL_REFERENCE(parent__))); \ if(l__ != NULL) \ { \ DUMP("\t\tparent.lt=(%p, " AVL_REFERENCE_FORMAT_STRING")",l__, AVL_REFERENCE_FORMAT(AVL_REFERENCE(l__))); \ } \ if(r__ != NULL) \ { \ DUMP("\t\tparent.rt=(%p, " AVL_REFERENCE_FORMAT_STRING")",r__, AVL_REFERENCE_FORMAT(AVL_REFERENCE(r__))); \ } \ DUMP("\tnode=(%p, " AVL_REFERENCE_FORMAT_STRING")",node, AVL_REFERENCE_FORMAT(AVL_REFERENCE(node))); \ DUMP_NODE(parent__); \ DUMP_NODE(node); \ logger_flush(); \ flushout(); \ flusherr(); \ puts("assertion failed on a " TOSTRING(AVL_NODE_TYPE));fflush(NULL); \ abort(); \ } \ } \ } #else #define ASSERT_CHECK_CHILD_PARENT_LINK(node) #endif static AVL_NODE_TYPE* avl_node_single_rotation2(AVL_NODE_TYPE* node) { AVL_NODE_TYPE* save; assert(node != NULL); ASSERT_CHECK_CHILD_PARENT_LINK(node); if(AVL_BALANCE(node) < 0) /* balance = LEFT -> dir = RIGHT other = LEFT */ { save = AVL_LEFT_CHILD(node); assert(save != NULL); ASSERT_CHECK_CHILD_PARENT_LINK(save); #ifdef AVL_PARENT if(AVL_RIGHT_CHILD(save) != NULL) { AVL_PARENT(AVL_RIGHT_CHILD(save)) = node; } AVL_PARENT(save) = AVL_PARENT(node); AVL_PARENT(node) = save; #endif AVL_LEFT_CHILD(node) = AVL_RIGHT_CHILD(save); AVL_RIGHT_CHILD(save) = node; } else { save = AVL_RIGHT_CHILD(node); assert(save != NULL); ASSERT_CHECK_CHILD_PARENT_LINK(save); #ifdef AVL_PARENT if(AVL_LEFT_CHILD(save) != NULL) { AVL_PARENT(AVL_LEFT_CHILD(save)) = node; } AVL_PARENT(save) = AVL_PARENT(node); AVL_PARENT(node) = save; #endif AVL_RIGHT_CHILD(node) = AVL_LEFT_CHILD(save); AVL_LEFT_CHILD(save) = node; } AVL_BALANCE(node) = MIDDLE; AVL_BALANCE(save) = MIDDLE; ASSERT_CHECK_CHILD_PARENT_LINK(node); return save; } static AVL_NODE_TYPE* avl_node_double_rotation2(AVL_NODE_TYPE* node) { AVL_NODE_TYPE* save; assert(node != NULL); if(AVL_BALANCE(node) < 0) /* balance = LEFT -> dir = RIGHT other = LEFT */ { save = AVL_RIGHT_CHILD(AVL_LEFT_CHILD(node)); if(AVL_BALANCE(save) == MIDDLE) { AVL_BALANCE(AVL_LEFT_CHILD(node)) = MIDDLE; AVL_BALANCE(node) = MIDDLE; } else if(AVL_BALANCE(save) > 0) /* dir right & balance right */ { AVL_BALANCE(AVL_LEFT_CHILD(node)) = LEFT; AVL_BALANCE(node) = MIDDLE; } else /* AVL_BALANCE(save)<0 */ { AVL_BALANCE(AVL_LEFT_CHILD(node)) = MIDDLE; AVL_BALANCE(node) = RIGHT; } AVL_BALANCE(save) = MIDDLE; #ifdef AVL_PARENT if(AVL_LEFT_CHILD(node) != NULL) { AVL_PARENT(AVL_LEFT_CHILD(node)) = save; } if(AVL_LEFT_CHILD(save) != NULL) { AVL_PARENT(AVL_LEFT_CHILD(save)) = AVL_LEFT_CHILD(node); } if(AVL_RIGHT_CHILD(save) != NULL) { AVL_PARENT(AVL_RIGHT_CHILD(save)) = node; } AVL_PARENT(save) = AVL_PARENT(node); AVL_PARENT(node) = save; #endif AVL_RIGHT_CHILD(AVL_LEFT_CHILD(node)) = AVL_LEFT_CHILD(save); AVL_LEFT_CHILD(save) = AVL_LEFT_CHILD(node); AVL_LEFT_CHILD(node) = AVL_RIGHT_CHILD(save); AVL_RIGHT_CHILD(save) = node; } else /* balance = RIGHT -> dir = LEFT other = RIGHT */ { save = AVL_LEFT_CHILD(AVL_RIGHT_CHILD(node)); assert(save != NULL); if(AVL_BALANCE(save) == MIDDLE) { AVL_BALANCE(AVL_RIGHT_CHILD(node)) = MIDDLE; AVL_BALANCE(node) = MIDDLE; } else if(AVL_BALANCE(save) < 0) /* dir left & balance left */ { AVL_BALANCE(AVL_RIGHT_CHILD(node)) = RIGHT; AVL_BALANCE(node) = MIDDLE; } else /* AVL_BALANCE(save)>0 */ { AVL_BALANCE(AVL_RIGHT_CHILD(node)) = MIDDLE; AVL_BALANCE(node) = LEFT; } AVL_BALANCE(save) = MIDDLE; #ifdef AVL_PARENT if(AVL_RIGHT_CHILD(node) != NULL) { AVL_PARENT(AVL_RIGHT_CHILD(node)) = save; } if(AVL_RIGHT_CHILD(save) != NULL) { AVL_PARENT(AVL_RIGHT_CHILD(save)) = AVL_RIGHT_CHILD(node); } if(AVL_LEFT_CHILD(save) != NULL) { AVL_PARENT(AVL_LEFT_CHILD(save)) = node; } AVL_PARENT(save) = AVL_PARENT(node); AVL_PARENT(node) = save; #endif AVL_LEFT_CHILD(AVL_RIGHT_CHILD(node)) = AVL_RIGHT_CHILD(save); AVL_RIGHT_CHILD(save) = AVL_RIGHT_CHILD(node); AVL_RIGHT_CHILD(node) = AVL_LEFT_CHILD(save); AVL_LEFT_CHILD(save) = node; } ASSERT_CHECK_CHILD_PARENT_LINK(node); return save; } static AVL_NODE_TYPE* avl_create_node(AVL_REFERENCE_TYPE hash) { AVL_NODE_TYPE* node; AVL_ALLOC_NODE(node, hash); AVL_LEFT_CHILD(node) = NULL; AVL_RIGHT_CHILD(node) = NULL; AVL_INIT_NODE(node, hash); AVL_BALANCE(node) = MIDDLE; return node; } /** @brief Initializes the tree * * Initializes the tree. * Basically : *tree=NULL; * * @param[in] tree the tree to initialize * */ void AVL_PREFIXED(avl_init)(AVL_TREE_TYPE* tree) { AVL_TREE_ROOT(tree) = NULL; } /** @brief Find a node in the tree * * Find a node in the tree matching a hash value. * * @param[in] root the tree to search in * @param[in] obj_hash the hash to find * * @return A pointer to the node or NULL if there is no such node. */ AVL_NODE_TYPE* AVL_PREFIXED(avl_find)(AVL_CONST_TREE_TYPE* tree, AVL_REFERENCE_CONST AVL_REFERENCE_TYPE obj_hash) { assert(tree != NULL); const AVL_NODE_TYPE* node = AVL_TREE_ROOT(tree); AVL_REFERENCE_MODIFIER AVL_REFERENCE_TYPE h; /* This is one of the parts I could try to optimize * I've checked the assembly, and it sucks ... */ /* Both the double-test while/ternary and the current one * are producing the same assembly code. */ while(node != NULL) { h = AVL_REFERENCE(node); if(AVL_ISEQUAL(h, obj_hash)) { return (AVL_NODE_TYPE*)node; } node = AVL_CHILD(node, AVL_ISBIGGER(obj_hash, h)&1); } return NULL; } /** @brief Insert a node into the tree. * * Insert data into the tree. * Since hash can have collisions, the data will most likely be a collection * (another tree, a list, ...) * * NOTE: * If the node associated to the hash already exists, it is returned unaltered, * the caller will be responsible to manipulate the node's data. * Else a new node is created, pointing to the data. * * @param[in] root the tree where the insertion should be made * @param[in] obj_hash the hash associated to the data * @param[out] obj the data to insert * * @return The node associated to the hash */ AVL_NODE_TYPE* AVL_PREFIXED(avl_insert)(AVL_TREE_TYPE* tree, AVL_REFERENCE_TYPE obj_hash) { assert(tree != NULL); DUMP("avl_insert(%p, " AVL_REFERENCE_FORMAT_STRING ") ------------------------------", tree, AVL_REFERENCE_FORMAT(obj_hash)); if(AVL_TREE_ROOT(tree) == NULL) { AVL_TREE_ROOT(tree) = avl_create_node(obj_hash); DUMP("First node (root) (" AVL_REFERENCE_FORMAT_STRING ")", AVL_REFERENCE_FORMAT(AVL_REFERENCE(AVL_TREE_ROOT(tree)))); assert(AVL_TREE_ROOT(tree) != NULL); return AVL_TREE_ROOT(tree); } AVL_NODE_TYPE * nodes[AVL_MAX_DEPTH]; s8 balances[AVL_MAX_DEPTH]; u8 dirs[AVL_MAX_DEPTH]; AVL_NODE_TYPE* node = AVL_TREE_ROOT(tree); AVL_REFERENCE_TYPE node_hash; int level = 0; s8 dir = MIDDLE; while((node != NULL) && !AVL_ISEQUAL(obj_hash, (node_hash = AVL_REFERENCE(node)))) { nodes[level] = node; balances[level] = AVL_BALANCE(node); /* DIR_LEFT = 0, DIR_RIGHT = 1 */ dir = AVL_ISBIGGER(obj_hash, node_hash)&1; ASSERT_CHECK_CHILD_PARENT_LINK(node); node = AVL_CHILD(node, dir); dirs[level++] = dir; } DUMP("Level = %i", level); if(node != NULL) { /* match */ DUMP("Got a match"); ASSERT_CHECK_CHILD_PARENT_LINK(node); return node; } /* Add a new node to the last one (the AVL_PARENT) */ node = nodes[--level]; /* the parent is node */ AVL_NODE_TYPE* ret = avl_create_node(obj_hash); AVL_CHILD(node, dir) = ret; #ifdef AVL_PARENT AVL_PARENT(ret) = node; #endif ASSERT_CHECK_CHILD_PARENT_LINK(ret); ASSERT_CHECK_CHILD_PARENT_LINK(node); DUMP("Created a new node from " AVL_REFERENCE_FORMAT_STRING ", going %i (%p)", AVL_REFERENCE_FORMAT(AVL_REFERENCE(node)), dir, ret); if(AVL_BALANCE(node) == MIDDLE) { /* There were no AVL_CHILD, now there is one */ /* not balanced anymore */ AVL_BALANCE(node) = DIR_TO_AVL_BALANCE(dir); /* 0 or 1 => -1 or +1 */ DUMP("Parent was balanced, now it is not anymore : %i (%i)", dir, AVL_BALANCE(node)); } else { /* There was a AVL_CHILD, now there is two */ /* balance */ AVL_BALANCE(node) = MIDDLE; DUMP("Parent was not balanced, now it is"); } AVL_NODE_TYPE* parent; /* Now I have to update the balance up to the root (if needed ...) * node is m_nodes[level] * we need the parent at m_nodes[level-1] * parent -> node -> (new node/processed node) */ while(level > 0) /* level points to the parent */ { DUMP("\tUpdating balance at %i", level); if(AVL_BALANCE(node) == balances[level]) /* balance of the node */ { /* this branch will exit */ /* The node's balance has not been changed */ ASSERT_CHECK_CHILD_PARENT_LINK(ret); return ret; } /* The node's balance has been changed */ DUMP("\t\tBalance of " AVL_REFERENCE_FORMAT_STRING " was %i, now it is %i", AVL_REFERENCE_FORMAT(AVL_REFERENCE(node)), balances[level], AVL_BALANCE(node)); if(AVL_BALANCE(node) == MIDDLE) /* this branch will exit */ { /* AVL_BALANCE(node)==MIDDLE and we are balanced * balanced -> done */ ASSERT_CHECK_CHILD_PARENT_LINK(ret); DUMP("Done (E)"); return ret; } parent = nodes[level - 1]; /* not balanced (anymore) */ /* Now dir AVL_CHILD it is un balanced ... */ /* Let's update the imbalance */ dir = dirs[level - 1]; DUMP("\t\t\timbalance: dir=%i old parent balance=%i patch=%i", dir, AVL_BALANCE(parent), DIR_TO_AVL_BALANCE(dir)); AVL_BALANCE(parent) += DIR_TO_AVL_BALANCE(dir); if(MUST_REAVL_BALANCE(parent)) /* this branch will exit */ { /* parent is the "root" */ /* node is the pivot */ DUMP("\t\t\t\tREBALANCING of " AVL_REFERENCE_FORMAT_STRING "", AVL_REFERENCE_FORMAT(AVL_REFERENCE(parent))); AVL_BALANCE(parent) >>= 1; /* reset the balance to -1;1 ... */ DUMP("\t\t\t\tbalance fix -> %i", AVL_BALANCE(parent)); /* HERE THE AVL_BALANCES ARE LOST/CORRUPTED !!! */ if(AVL_BALANCE(node) == AVL_BALANCE(parent)) /* if the sign is the same ... */ { /* AVL_BALANCE(node)=0; */ node = avl_node_single_rotation2(parent); /* the parent's parent has to be updated (to node) */ DUMP("\t\t\t\tSingle rotation, new parent is " AVL_REFERENCE_FORMAT_STRING "", AVL_REFERENCE_FORMAT(AVL_REFERENCE(node))); } else { /* AVL_BALANCE(node)=0; */ node = avl_node_double_rotation2(parent); /* the parent's parent has to be updated (to node) */ DUMP("\t\t\t\tDouble rotation, new parent is " AVL_REFERENCE_FORMAT_STRING "", AVL_REFERENCE_FORMAT(AVL_REFERENCE(node))); } /* typically ... * level--; * node=parent; * parent=m_nodes[level-1]; * here I have to reset the new parent * -> I have to get the parent on level-2 (oops if level is < 2 : * it means that the parent is the root, thus that we have to fix the root) * -> I have to get the dir used on level-2 and set it to node */ if(level > 1) /* 2 or more ... */ { AVL_CHILD(nodes[level - 2], dirs[level - 2]) = node; } else /* root */ { DUMP("Root changing from " AVL_REFERENCE_FORMAT_STRING " to " AVL_REFERENCE_FORMAT_STRING "", AVL_REFERENCE_FORMAT(AVL_REFERENCE(AVL_TREE_ROOT(tree))), AVL_REFERENCE_FORMAT(AVL_REFERENCE(node))); AVL_TREE_ROOT(tree) = node; } ASSERT_CHECK_CHILD_PARENT_LINK(node); /* rebalancing -> done */ DUMP("Done (I)"); ASSERT_CHECK_CHILD_PARENT_LINK(ret); return ret; } node = parent; ASSERT_CHECK_CHILD_PARENT_LINK(node); ASSERT_CHECK_CHILD_PARENT_LINK(parent); level--; } ASSERT_CHECK_CHILD_PARENT_LINK(ret); return ret; } /** @brief Deletes a node from the tree. * * Deletes a node from the tree. * * @param[in] root the tree from which the delete will be made * @param[in] obj_hash the hash associated to the node to remove * * @return The node associated to the hash, NULL if it did not exist. */ void AVL_PREFIXED(avl_delete)(AVL_TREE_TYPE* tree, AVL_REFERENCE_CONST AVL_REFERENCE_TYPE obj_hash) { DUMP("avl_delete(%p, " AVL_REFERENCE_FORMAT_STRING ") ------------------------------", tree, AVL_REFERENCE_FORMAT(obj_hash)); assert(tree != NULL); if(AVL_TREE_ROOT(tree) == NULL) { /* Already empty */ return; } AVL_NODE_TYPE *nodes[AVL_MAX_DEPTH]; s8 balances[AVL_MAX_DEPTH]; u8 dirs[AVL_MAX_DEPTH]; #ifdef DEBUG memset(&nodes, 0xff, sizeof (AVL_NODE_TYPE*) * AVL_MAX_DEPTH); memset(&balances, 0xff, AVL_MAX_DEPTH); memset(&dirs, 0xff, AVL_MAX_DEPTH); #endif AVL_NODE_TYPE *node = AVL_TREE_ROOT(tree); AVL_REFERENCE_TYPE node_hash; int level = 0; s8 dir = MIDDLE; /* look for the node to delete, keep the path */ while((node != NULL) && !AVL_ISEQUAL(obj_hash, (node_hash = AVL_REFERENCE(node)))) { nodes[level] = node; balances[level] = AVL_BALANCE(node); /* DIR_LEFT = 0, DIR_RIGHT = 1 */ dir = AVL_ISBIGGER(obj_hash, node_hash)&1; node = AVL_CHILD(node, dir); dirs[level++] = dir; } DUMP("Level = %i", level); assert(level < AVL_MAX_DEPTH); if(node == NULL) { /* no match : nothing to delete */ DUMP("No match"); return; } DUMP("[%2i] Victim is "AVL_REFERENCE_FORMAT_STRING, level, AVL_REFERENCE_FORMAT(AVL_REFERENCE(node))); /* keep a pointer to the parent->child pointer */ AVL_NODE_TYPE **victim_parent_link = &AVL_TREE_ROOT(tree); if(level > 0) { victim_parent_link = &(AVL_CHILD(nodes[level - 1],dirs[level - 1])); } nodes[level] = node; balances[level] = AVL_BALANCE(node); dirs[level++] = dir; /* THIS IS WRONG (?) */ /* Remove "node" from the parent */ /* Keep the pointer for the find & destroy operation */ AVL_NODE_TYPE* victim = node; #ifdef AVL_NODE_DELETE_CALLBACK AVL_NODE_DELETE_CALLBACK(victim); #endif AVL_NODE_TYPE* victim_left = AVL_LEFT_CHILD(node); AVL_NODE_TYPE* victim_right = AVL_RIGHT_CHILD(node); /** We have found the victim node. From here 3 cases can be found * * #1 : the victim has no AVL_CHILD. We just have to remove it. (and change parent balance) * * #2 : the victim has only got one AVL_CHILD. We just have to remove it and * put its children in its place. * * #3 : the victim has got two children. * * Method '1': Theoretical way: * * We move the successor of the victim instead of B, then delete using * #1 or #2. * * Actually this requires a lot of work. (5 to 10 times more than ...) * * Method '2': Fastest way: (and forbidden with the NSEC3 because I keep pointer into the nodes) * * We have to find his "successor" (left or right). * We overwrite the data of the successor into the victim. * We link the parent of the successor * We then rebalance from the node right before where successor was. * * #3 is dependent on #1 and #2 so let's handle #3 first. */ if(victim_left != NULL && victim_right != NULL) { /** Case #3: * * @note: It is recommended to switch left/right successors * between each delete for a better balancing. * * NOTE: The path has to be completed. * */ DUMP("#3"); /* Arbitraty: "<" successor */ /****************************/ /* * Look for the node that will replace this one. * Given that we are in a (L-R) case, it's the last one in the chain L->R* */ u32 victim_level = level - 1; dirs[victim_level] = DIR_LEFT; DUMP("[%2i] From "AVL_REFERENCE_FORMAT_STRING ", going LEFT", level-1, AVL_REFERENCE_FORMAT(AVL_REFERENCE(victim))); DUMP("\tUpdating balance at %i", level-1); DUMP("\t\tBalance of " AVL_REFERENCE_FORMAT_STRING " was %i, now it is %i", AVL_REFERENCE_FORMAT(AVL_REFERENCE(victim)), balances[level-1], AVL_BALANCE(victim)); AVL_NODE_TYPE* beforesuccessor = victim; /* actually it's "victim" here */ AVL_NODE_TYPE* successor = victim_left; AVL_NODE_TYPE* tmp_node; nodes[level] = successor; balances[level] = AVL_BALANCE(successor); dirs[level++] = DIR_RIGHT; while((tmp_node = AVL_RIGHT_CHILD(successor)) != NULL) { beforesuccessor = successor; DUMP("[%2i] From " AVL_REFERENCE_FORMAT_STRING ", going RIGHT", level-1, AVL_REFERENCE_FORMAT(AVL_REFERENCE(successor))); successor = tmp_node; nodes[level] = successor; DUMP("\tUpdating balance at %i", level); DUMP("\t\tBalance of " AVL_REFERENCE_FORMAT_STRING " was %i, now it is %i", AVL_REFERENCE_FORMAT(AVL_REFERENCE(successor)), balances[level], AVL_BALANCE(successor)); balances[level] = AVL_BALANCE(successor); dirs[level++] = DIR_RIGHT; } assert(level < AVL_MAX_DEPTH); /* successor has at most one left AVL_CHILD */ DUMP("[%2i] Replacement "AVL_REFERENCE_FORMAT_STRING, level-1, AVL_REFERENCE_FORMAT(AVL_REFERENCE(successor))); /* Method 2 uses 3 moves, method 1 uses 10 */ #if 1 /* * Move the parent of victim must point to successor * The parent of successor must point to nothing. */ *victim_parent_link = successor; nodes[victim_level] = successor; AVL_RIGHT_CHILD(successor) = victim_right; AVL_BALANCE(successor) = AVL_BALANCE(victim); #ifdef AVL_PARENT AVL_PARENT(successor) = AVL_PARENT(victim); AVL_PARENT(victim_right) = successor; #endif if(beforesuccessor != victim) { AVL_RIGHT_CHILD(beforesuccessor) = AVL_LEFT_CHILD(successor); #ifdef AVL_PARENT if(AVL_LEFT_CHILD(successor) != NULL) { AVL_PARENT(AVL_LEFT_CHILD(successor)) = beforesuccessor; } #endif AVL_LEFT_CHILD(successor) = victim_left; #ifdef AVL_PARENT AVL_PARENT(victim_left) = successor; #endif AVL_BALANCE(beforesuccessor)--; level -= 2; } else { AVL_BALANCE(successor)++; level -= 2; } AVL_FREE_NODE(victim); #else /* * Overwrite node successor into victim, * then delete successor, since its content is safe * * This special case does not work if the node is linked by a third party * so I disabled it to avoid misuses. */ AVL_COPY_PAYLOAD(victim, successor); if(beforesuccessor != victim) { AVL_RIGHT_CHILD(beforesuccessor) = AVL_LEFT_CHILD(successor); AVL_BALANCE(beforesuccessor)--; } else { AVL_LEFT_CHILD(beforesuccessor) = AVL_LEFT_CHILD(successor); AVL_BALANCE(beforesuccessor)++; } AVL_FREE_NODE(successor); level -= 2; #endif /*nodes[level] = successor;*/ } /* Case #3 done */ else { /* Only 2 cases could occur right now : #1 and #2 */ AVL_FREE_NODE(victim); if(level > 1) { AVL_NODE_TYPE* victim_parent = nodes[level - 2]; /* ONE or BOTH are NULL, this is the best alternative to an if/elseif/else */ AVL_CHILD(victim_parent, dir) = (AVL_NODE_TYPE*)((intptr)victim_left | (intptr)victim_right); #ifdef AVL_PARENT if(victim_left != NULL) { AVL_PARENT(victim_left) = victim_parent; } if(victim_right != NULL) { AVL_PARENT(victim_right) = victim_parent; } #endif AVL_BALANCE(victim_parent) -= DIR_TO_AVL_BALANCE(dir); /* The balance has changed */ /* At this point the victim is detached from the tree */ /* I can delete it */ level -= 2; } else /* Else we have no AVL_PARENT, so we change the root */ { /* ONE or BOTH are NULL, this is the best alternative to the if/elseif/else above */ AVL_TREE_ROOT(tree) = (AVL_NODE_TYPE*)((intptr)victim_left | (intptr)victim_right); #ifdef AVL_PARENT if(victim_left != NULL) { AVL_PARENT(victim_left) = NULL; } if(victim_right != NULL) { AVL_PARENT(victim_right) = NULL; } #endif return; } } /* Rebalance will occur either from the replacement's parent, either from * the victim's parent. */ /* NOTE: A delete-rebalance can occur many times, up to the root. */ node = nodes[level]; /* Now I have to update the balance up to the root (if needed ...) * node is m_nodes[level] * we need the parent at m_nodes[level-1] * parent -> node -> (new node/processed node) */ while(level >= 0) /* level points to the parent */ { if(AVL_BALANCE(node) == balances[level]) /* balance of the node */ { /* this branch will exit */ /* The node's balance has not been changed */ return; } /* The node's balance has been changed */ /* * balance became 0 : It was -1 or +1 : the tree's height decreased. * It is balanced but a propagation is required. * * balance became -1 or +1 : It was 0 : the tree's height didn't changed. * (One of its branch is shorter but the other one's size didn't changed.) * It is a valid AVL and the propagation can stop. * * balance became -2 or +2 : it was -1 or +1 : the tree is un balanced. * It needs to be re balanced and then a propagation is required. */ if(AVL_BALANCE(node) == MIDDLE) { /* Height decreased, tell it to the parent */ level--; if(level >= 0) { DUMP("\t[%2i] " AVL_REFERENCE_FORMAT_STRING " balance changed for MIDDLE (%i) Fixing [%i] parent balance of %i (%i)", level + 1, AVL_REFERENCE_FORMAT(AVL_REFERENCE(node)), balances[level + 1], level, DIR_TO_AVL_BALANCE(dirs[level]), dirs[level]); node = nodes[level]; AVL_BALANCE(node) -= DIR_TO_AVL_BALANCE(dirs[level]); } continue; } if(AVL_BALANCE(node) == LEFT || AVL_BALANCE(node) == RIGHT) /* this branch will exit */ { DUMP("\t[%2i] " AVL_REFERENCE_FORMAT_STRING " balance changed for LEFT or RIGHT (%i)", level, AVL_REFERENCE_FORMAT(AVL_REFERENCE(node)), balances[level]); return; } DUMP("\t[%2i] " AVL_REFERENCE_FORMAT_STRING " balance changed for imbalance (%i)", level, AVL_REFERENCE_FORMAT(AVL_REFERENCE(node)), balances[level]); /* * We need to rotate in order to be AVL again. * * + cases: * * R(+) P(-) => R(0) P(0) (double rotation) * R(+) P(0) => R(+) P(-) (single rotation, delete special case) * R(+) P(+) => R(0) P(0) (single roration) * * => if node&save balance are equal => MIDDLE for both * */ AVL_BALANCE(node) >>= 1; AVL_NODE_TYPE* child = AVL_CHILD(node, AVL_BALANCE_TO_DIR(AVL_BALANCE(node))); s8 parent_balance = AVL_BALANCE(node); s8 child_balance = AVL_BALANCE(child); if(child_balance == MIDDLE) /* patched single rotation */ { DUMP("Single Rotation (delete)"); AVL_NODE_TYPE* newroot; newroot = avl_node_single_rotation2(node); assert(newroot == child); AVL_BALANCE(child) = -parent_balance; AVL_BALANCE(node) = parent_balance; node = newroot; } else if(parent_balance == child_balance) /* single rotation case */ { DUMP("Single Rotation"); node = avl_node_single_rotation2(node); assert(node == child); } else { DUMP("Double Rotation"); node = avl_node_double_rotation2(node); } if(level == 0) /* 2 or more ... */ { /* root */ DUMP("Root changing from " AVL_REFERENCE_FORMAT_STRING " to " AVL_REFERENCE_FORMAT_STRING "", AVL_REFERENCE_FORMAT(AVL_REFERENCE(AVL_TREE_ROOT(tree))), AVL_REFERENCE_FORMAT(AVL_REFERENCE(node))); AVL_TREE_ROOT(tree) = node; break; } /* link the parent to its new child */ /* level--; AVL_CHILD(nodes[level],dirs[level])=node; node=nodes[level]; */ /* The rotations could have changed something */ /* I'll process the same level again */ AVL_CHILD(nodes[level - 1], dirs[level - 1]) = node; //AVL_CHILD(nodes[level], dirs[level]) = node; ASSERT_CHECK_CHILD_PARENT_LINK(node); /* node=nodes[level]; */ } DUMP("avl_delete done level=%i", level); } static void avl_destroy_(AVL_NODE_TYPE* node) { #ifdef AVL_NODE_DELETE_CALLBACK AVL_NODE_DELETE_CALLBACK(node); #endif AVL_NODE_TYPE* AVL_CHILD = AVL_LEFT_CHILD(node); if(AVL_CHILD != NULL) { avl_destroy_(AVL_CHILD); } AVL_CHILD = AVL_RIGHT_CHILD(node); if(AVL_CHILD != NULL) { avl_destroy_(AVL_CHILD); } AVL_FREE_NODE(node); } /** @brief Releases all the nodes of a tree * * Releases all the nodes of a tree. Data is not destroyed. * * @param[in] tree the tree to empty */ void AVL_PREFIXED(avl_destroy)(AVL_TREE_TYPE* tree) { if(AVL_TREE_ROOT(tree) != NULL) { avl_destroy_(AVL_TREE_ROOT(tree)); AVL_TREE_ROOT(tree) = NULL; } } AVL_NODE_TYPE* AVL_PREFIXED(avl_node_last)(AVL_NODE_TYPE* node) { if(node == NULL) { return NULL; } for(;;) { AVL_NODE_TYPE *next = AVL_RIGHT_CHILD(node); if(next == NULL) { return node; } node = next; } } /* Iterators -> */ void AVL_PREFIXED(avl_iterator_init)(AVL_CONST_TREE_TYPE *tree, AVL_PREFIXED(avl_iterator*) iter) { /* Do we have a tree to iterate ? */ iter->stack_pointer = -1; const AVL_NODE_TYPE* node = AVL_TREE_ROOT(tree); while(node != NULL) { iter->stack[++iter->stack_pointer] = (AVL_NODE_TYPE*)node; node = AVL_LEFT_CHILD(node); } } bool AVL_PREFIXED(avl_iterator_hasnext)(AVL_PREFIXED(avl_iterator*) iter) { return iter->stack_pointer >= 0; } AVL_NODE_TYPE* AVL_PREFIXED(avl_iterator_next_node)(AVL_PREFIXED(avl_iterator*) iter) { assert(iter->stack_pointer >= 0); AVL_NODE_TYPE* node = iter->stack[iter->stack_pointer]; AVL_NODE_TYPE* current = node; /* we got the data, now let's ready the next node */ AVL_NODE_TYPE* tmp; /* let's branch right if possible */ if((tmp = AVL_RIGHT_CHILD(node)) != NULL) { iter->stack[iter->stack_pointer] = tmp; /* replace TOP */ node = tmp; while((tmp = AVL_LEFT_CHILD(node)) != NULL) { iter->stack[++iter->stack_pointer] = tmp; /* PUSH */ node = tmp; } return current; } iter->stack_pointer--; return current; } /* <- Iterators */ static void avl_callback_and_destroy_(AVL_NODE_TYPE* node, callback_function callback) { AVL_NODE_TYPE* AVL_CHILD = AVL_LEFT_CHILD(node); if(AVL_CHILD != NULL) { avl_callback_and_destroy_(AVL_CHILD, callback); } AVL_CHILD = AVL_RIGHT_CHILD(node); if(AVL_CHILD != NULL) { avl_callback_and_destroy_(AVL_CHILD, callback); } callback(node); AVL_FREE_NODE(node); } /** @brief Releases all the nodes of a tree * * Releases all the nodes of a tree. * Calls a function passed in parameter before destroying the data. * It's the responsibility of the callback to process (destroy) the data * in the tree. * * @param[in] tree the tree to empty */ void AVL_PREFIXED(avl_callback_and_destroy)(AVL_TREE_TYPE *tree, callback_function callback) { if(AVL_TREE_ROOT(tree) != NULL) { avl_callback_and_destroy_(AVL_TREE_ROOT(tree), callback); } } AVL_NODE_TYPE* AVL_PREFIXED(avl_get_first)(AVL_CONST_TREE_TYPE* tree) { assert(tree != NULL); AVL_NODE_TYPE* node = AVL_TREE_ROOT(tree); if(node != NULL) { while(node->children.lr.left != NULL) { node = node->children.lr.left; } } return node; } #ifdef AVL_PARENT AVL_NODE_TYPE* AVL_PREFIXED(avl_node_next)(const AVL_NODE_TYPE* node) { AVL_NODE_TYPE* next; next = AVL_RIGHT_CHILD(node); if(next != NULL) { /* Not a leaf */ /* * From the (current) right, go all the way down to the left. */ while(AVL_LEFT_CHILD(next) != NULL) { next = AVL_LEFT_CHILD(next); } } else { /* Leaf */ /* * Go up until we are the left child */ next = AVL_PARENT(node); while(next != NULL) { if(AVL_LEFT_CHILD(next) == node) { break; } node = next; next = AVL_PARENT(node); } } return next; } AVL_NODE_TYPE* AVL_PREFIXED(avl_node_prev)(const AVL_NODE_TYPE* node) { AVL_NODE_TYPE* prev; prev = AVL_LEFT_CHILD(node); if(prev != NULL) { /* Not a leaf */ /* * From the (current) left, go all the way down to the right. * If there is nothing, then the current node (prev) is the one I'm looking for. */ while(AVL_RIGHT_CHILD(prev) != NULL) { prev = AVL_RIGHT_CHILD(prev); } } else { /* Leaf */ for(;;) { prev = AVL_PARENT(node); if(prev == NULL) { break; /* no pred */ } if(AVL_RIGHT_CHILD(prev) == node) { break; } node = prev; } } return prev; } AVL_NODE_TYPE* AVL_PREFIXED(avl_node_mod_next)(const AVL_NODE_TYPE* node) { AVL_NODE_TYPE* next; next = AVL_RIGHT_CHILD(node); if(next != NULL) { /* Not a leaf */ /* * From the (current) right, go all the way down to the left. */ while(AVL_LEFT_CHILD(next) != NULL) { next = AVL_LEFT_CHILD(next); } } else { /* Leaf */ /* * Go up until we are the left child */ next = AVL_PARENT(node); while(next != NULL) { if(AVL_LEFT_CHILD(next) == node) { break; } node = next; next = AVL_PARENT(node); } if(next == NULL) { /* Modulo */ /* We are at the root, the next one is the one most on the left * or ourself. */ next = (AVL_NODE_TYPE*)node; // node is not the starting point anymore, so casting to not-const is ok while(AVL_LEFT_CHILD(next) != NULL) { next = AVL_LEFT_CHILD(next); } } } return next; } AVL_NODE_TYPE* AVL_PREFIXED(avl_node_mod_prev)(const AVL_NODE_TYPE* node) { AVL_NODE_TYPE* prev; prev = AVL_LEFT_CHILD(node); if(prev != NULL) { /* Not a leaf */ /* * From the (current) left, go all the way down to the right. */ while(AVL_RIGHT_CHILD(prev) != NULL) { prev = AVL_RIGHT_CHILD(prev); } // at this point prev cannot be NULL } else { /* Leaf */ for(;;) { prev = AVL_PARENT(node); if(prev == NULL) { /* We are at the root AND we have no left children * * Since it is an AVL, the last one is the right child. * And if we have none ... ourself ... */ prev = AVL_RIGHT_CHILD(node); if(prev == NULL) { prev = (AVL_NODE_TYPE*)node; // node is not the starting point anymore, so casting to not-const is ok } // prev is not NULL break; } // prev is not NULL if(AVL_RIGHT_CHILD(prev) == node) { // prev is not NULL break; } node = prev; } // prev cannot be NULL } // not NULL return prev; } static int AVL_PREFIXED(avl_check_node)(AVL_NODE_TYPE* root, int depth); static int AVL_PREFIXED(avl_check_common)(AVL_NODE_TYPE* node, int depth) { int ld = depth; int rd = depth; AVL_NODE_TYPE *lc = AVL_LEFT_CHILD(node); AVL_NODE_TYPE *rc = AVL_RIGHT_CHILD(node); if(lc != NULL) { if((ld = AVL_PREFIXED(avl_check_node)(lc, depth + 1)) < 0) { return ld; } } if(rc != NULL) { if((rd = AVL_PREFIXED(avl_check_node)(rc, depth + 1)) < 0) { return rd; } } s8 b = AVL_BALANCE(node); if( ((ld == rd) && (b != MIDDLE)) || ((ld > rd) && (b != LEFT)) || ((ld < rd) && (b != RIGHT)) || (abs(ld - rd) > 1) ) { /* oops */ DUMP("avl_check_common: invalid balancing |%d - %d| = %i (b = %i)", ld, rd, rd - ld, b); logger_flush(); DUMP("avl_check_node:\tnode=(%p, " AVL_REFERENCE_FORMAT_STRING")",node, AVL_REFERENCE_FORMAT(AVL_REFERENCE(node))); logger_flush(); return -depth; } return MAX(ld, rd); } static int AVL_PREFIXED(avl_check_node)(AVL_NODE_TYPE* node, int depth) { #if AVL_HAS_PARENT_POINTER == 1 if(AVL_PARENT(node) == NULL) { /* oops */ DUMP("avl_check_node: expected a parent"); logger_flush(); DUMP("avl_check_node:\tnode=(%p, " AVL_REFERENCE_FORMAT_STRING")",node, AVL_REFERENCE_FORMAT(AVL_REFERENCE(node))); logger_flush(); return -depth; } if(AVL_PARENT(node)) { AVL_NODE_TYPE *parent__ = AVL_PARENT(node); if(parent__ != NULL) { AVL_NODE_TYPE *l__ = AVL_LEFT_CHILD(parent__); AVL_NODE_TYPE *r__ = AVL_RIGHT_CHILD(parent__); if(!(l__==(node) || r__==(node)) ) { DUMP("avl_check_node: parent->node link broken"); DUMP("avl_check_node:\tparent=(%p, " AVL_REFERENCE_FORMAT_STRING")",parent__, AVL_REFERENCE_FORMAT(AVL_REFERENCE(parent__))); if(l__ != NULL) { DUMP("avl_check_node:\t\tparent.lt=(%p, " AVL_REFERENCE_FORMAT_STRING")",l__, AVL_REFERENCE_FORMAT(AVL_REFERENCE(l__))); } if(r__ != NULL) { DUMP("avl_check_node:\t\tparent.rt=(%p, " AVL_REFERENCE_FORMAT_STRING")",r__, AVL_REFERENCE_FORMAT(AVL_REFERENCE(r__))); } DUMP("avl_check_node:\tnode=(%p, " AVL_REFERENCE_FORMAT_STRING")",node, AVL_REFERENCE_FORMAT(AVL_REFERENCE(node))); DUMP_NODE(parent__); DUMP_NODE(node); logger_flush(); flushout(); flusherr(); return -depth; } } } #endif return AVL_PREFIXED(avl_check_common)(node, depth); } int AVL_PREFIXED(avl_check)(AVL_TREE_TYPE* tree) { if(AVL_TREE_ROOT(tree) == NULL) { return 0; } #if AVL_HAS_PARENT_POINTER == 1 if(AVL_PARENT(AVL_TREE_ROOT(tree)) != NULL) { /* oops */ DUMP("avl_check: didn't expected a parent"); logger_flush(); DUMP("avl_check:\troot=(%p, " AVL_REFERENCE_FORMAT_STRING")",AVL_TREE_ROOT(tree), AVL_REFERENCE_FORMAT(AVL_REFERENCE(AVL_TREE_ROOT(tree)))); logger_flush(); return -1; } #endif int depth = AVL_PREFIXED(avl_check_common)(AVL_TREE_ROOT(tree), 0); return depth; } static void AVL_PREFIXED(avl_dump_node)(AVL_NODE_TYPE *node, int level, char c) { #if defined(DEBUG_DUMP) char b; switch(AVL_BALANCE(node)) { case TOOLEFT: b = 'l'; break; case LEFT: b = 'L'; break; case MIDDLE: b = 'M'; break; case RIGHT: b = 'R'; break; case TOORIGHT: b = 'r'; break; default: b = '?'; break; } #if AVL_HAS_PARENT_POINTER == 1 DUMP("[%2i]%T %c@%p='" AVL_REFERENCE_FORMAT_STRING"' %c (%p,%p) <- %p", level, level, c, node, AVL_REFERENCE_FORMAT(AVL_REFERENCE(node)), b, AVL_LEFT_CHILD(node), AVL_RIGHT_CHILD(node), AVL_PARENT(node)); #else DUMP("[%2i]%T %c@%p='" AVL_REFERENCE_FORMAT_STRING"' %c (%p,%p)", level, level, c, node, AVL_REFERENCE_FORMAT(AVL_REFERENCE(node)), b, AVL_LEFT_CHILD(node), AVL_RIGHT_CHILD(node)); #endif #endif if(AVL_LEFT_CHILD(node) != NULL) { AVL_PREFIXED(avl_dump_node)(AVL_LEFT_CHILD(node), level +1, 'l'); } if(AVL_RIGHT_CHILD(node) != NULL) { AVL_PREFIXED(avl_dump_node)(AVL_RIGHT_CHILD(node), level +1, 'r'); } } void AVL_PREFIXED(avl_dump)(AVL_TREE_TYPE *tree) { AVL_PREFIXED(avl_dump_node)(AVL_TREE_ROOT(tree), 0, 'r'); } #endif /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/cmdline.h0000644000077100007710000000012412650131756023411 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.503344 30 ctime=1454597650.890344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/cmdline.h0000664000077100007710000001310012650131756023211 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once #include #include #define CMDLINE_FLAG_SECTION 0 #define CMDLINE_FLAG_ALIAS 1 #define CMDLINE_FLAG_TRANSLATOR 2 #define CMDLINE_FLAG_ARGUMENTS 128 #define CMDLINE_ARG_STOP_PROCESSING_FLAG_OPTIONS 1 #define CMDLINE_ERROR_BASE 0x800E0000 #define CMDLINE_ERROR_CODE(code_) ((s32)(CMDLINE_ERROR_BASE+(code_))) #define CMDLINE_PROCESSING_SECTION_AS_ARGUMENT CMDLINE_ERROR_CODE(0xff01) #define CMDLINE_PROCESSING_INVALID_DESCRIPTOR CMDLINE_ERROR_CODE(0xff02) #define CMDLINE_LONG_OPT_UNDEFINED CMDLINE_ERROR_CODE(0x0001) #define CMDLINE_SHORT_OPT_UNDEFINED CMDLINE_ERROR_CODE(0x0002) #define CMDLINE_OPT_EXPECTS_ARGUMENT CMDLINE_ERROR_CODE(0x0003) struct cmdline_desc_s; typedef ya_result cmdline_translator_callback(const struct cmdline_desc_s *desc, output_stream *os, const char *section_name, const char *arg_name); typedef ya_result cmdline_filter_callback(const struct cmdline_desc_s *desc, const char *arg_name, void *callback_owned); struct cmdline_desc_s { u8 flags; char letter; const char *name; const char *value; union { const char *alias; cmdline_translator_callback *translator; } target; }; typedef struct cmdline_desc_s cmdline_desc_s; /** * Definition of a command-line * The command line is handled as a table of aliases to configuration settings. * It means that each entry has to be linked to a section/container as well as a variable. * * The table must be put between CMDLINE_BEGIN and CMDLINE_END * * The parameter of CMDLINE_BEGIN and CMDLINE_END is the name of the table (a variable name) * * The section is set using CMDLINE_SECTION(section name). Each configuration alias refers * to the section named by the last CMDLINE_SECTION entry above it. * * CMDLINE_BOOL CMDLINE_BOOL_NOT CMDLINE_OPT are taking 3 parameters * The first one is the name of the parameter on the command line. (long option) * The second one is the letter of the parameter on the command line. (short option) * The third one is the name of the variable in the configuration section. * */ #define CMDLINE_BEGIN(name_) static const cmdline_desc_s name_[] = { #define CMDLINE_SECTION(name_) { 0, '\0', (name_), NULL, {.alias = NULL}}, #define CMDLINE_BOOL(name_,letter_,alias_) {CMDLINE_FLAG_ALIAS , (letter_), (name_), "on", {.alias = (alias_)}}, #define CMDLINE_BOOL_NOT(name_,letter_,alias_) {CMDLINE_FLAG_ALIAS , (letter_), (name_), "off", {.alias = (alias_)}}, #define CMDLINE_OPT(name_,letter_,alias_) {CMDLINE_FLAG_ALIAS|CMDLINE_FLAG_ARGUMENTS, (letter_), (name_), NULL, {.alias = (alias_)}}, #define CMDLINE_END(name_) { 0, '\0', NULL, NULL, {.alias = NULL}} }; /** * Parses a command line and returns an input stream ready to be parsed by a configuration reader. * * The function works by generating a configuration file in a stream using the command line table as a map. * * @param table the name of a table defined using CMDLINE_BEGIN * @param argc the argc of main() * @param argv the argv of main() * @param filter a callback function that will be called for unhandled command line parameters (file names, "--", ...) * @param filter_arg a pointer given to the filter callback * @param is the input stream to initialise with the command line * @return */ ya_result cmdline_parse(const cmdline_desc_s *table, int argc, char **argv, cmdline_filter_callback *filter, void *filter_arg, input_stream *is); /** * Registers command line error codes. */ void cmdline_init_error_codes(); yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/ctrl-rfc.h0000644000077100007710000000012412650131756023512 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.538344 30 ctime=1454597650.913344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/ctrl-rfc.h0000664000077100007710000003355512650131756023332 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #define HAS_DYNAMIC_PROVISIONING 1 #if HAS_DYNAMIC_PROVISIONING #define TYPE_ZONE_TYPE_NAME "ZONETYPE" #define TYPE_ZONE_FILE_NAME "ZONEFILE" #define TYPE_ZONE_NOTIFY_NAME "ZONENOTIFY" #define TYPE_ZONE_MASTER_NAME "MASTER" #define TYPE_ZONE_SLAVES_NAME "SLAVES" #define TYPE_ZONE_DNSSEC_NAME "DNSSEC" #define TYPE_ZONE_COMMENT "COMMENT" #define TYPE_SIGINTV_NAME "SIGINTV" #define TYPE_SIGREGN_NAME "SIGREGN" #define TYPE_SIGJITR_NAME "SIGJITR" #define TYPE_NTFRC_NAME "NTFRC" #define TYPE_NTFRP_NAME "NTFRP" #define TYPE_NTFRPI_NAME "NTFRPI" #define TYPE_NTFAUTO_NAME "NTFAUTO" #define OPCODE_CTRL (9<15 (4 higher bits reserved) ... or don't we set a limit ? */ #define TYPE_CTRL_SRVLOGLEVEL NU16(0x2b05) /* * Q: . ZONEFREEZE CTRL * C: . ZONEFREEZE [fqdn class view] * * if rdata size > 0, rdata is FQDN [2 bytes] [0->n utf8/asciiz? bytes] */ #define TYPE_CTRL_ZONEFREEZE NU16(0x2b06) /* * Q: . ZONEUNFREEZE CTRL * C: . ZONEUNFREEZE [fqdn class view] * * if rdata size > 0, rdata is FQDN [2 bytes] [0->n utf8/asciiz? bytes] */ #define TYPE_CTRL_ZONEUNFREEZE NU16(0x2b07) /* * Q: . ZONESYNC CTRL * C: . ZONESYNC clean [fqdn class view] * * clean is one byte, values 0->1 (7 higher bits reserved) * if rdata size > 0, rdata is FQDN [2 bytes] [0->n utf8/asciiz? bytes] */ #define TYPE_CTRL_ZONESYNC NU16(0x2b08) /* * Q: . ZONENOTIFY CTRL * C: . ZONENOTIFY fqdn [class view] * * rdata is FQDN [2 bytes] [0->n utf8/asciiz? bytes] */ #define TYPE_CTRL_ZONENOTIFY NU16(0x2b09) /* * Q: . ZONERELOAD CTRL * C: . ZONERELOAD fqdn class view * * rdata is FQDN [2 bytes] [0->n utf8/asciiz? bytes] */ #define TYPE_CTRL_ZONERELOAD NU16(0x2b0a) /* * Q: . ZONECFGRELOAD CTRL * C: . ZONECFGRELOAD [fqdn [class [view]]] * * rdata is FQDN [2 bytes] [0->n utf8/asciiz? bytes] */ #define TYPE_CTRL_ZONECFGRELOAD NU16(0x2b0b) #define TYPE_CTRL_ZONECFGRELOADALL NU16(0x2b0c) /* DOMAIN NAME = zone */ /* RDATASIZE = 0 */ #define TYPE_CTRL_ZONEFREEZEALL NU16(0x2b0d) /* DOMAIN NAME = zone */ /* RDATASIZE = 0 */ #define TYPE_CTRL_ZONEUNFREEZEALL NU16(0x2b0e) /* DOMAIN NAME = . */ /* RDATASIZE = 0 */ /** * @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/threaded_dll_cw.h0000644000077100007710000000012412650131756025102 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.524344 30 ctime=1454597651.181344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/threaded_dll_cw.h0000664000077100007710000000711412650131756024712 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * This version of the ring buffer uses the condition-wait mechanism instead of the 3-mutex one. * I'll have to bench both versions but the main incentive is to get rid of complains from helgrind * * @{ * *----------------------------------------------------------------------------*/ #pragma once #include #include #include #ifdef __cplusplus extern "C" { #endif struct threaded_dll_cw { list_dl_s queue; list_dl_node_s *pool; mutex_t mutex; cond_t cond_read; cond_t cond_write; u32 max_size; }; typedef struct threaded_dll_cw threaded_dll_cw; #define THREADED_SLL_CW_NULL {{NULL,NULL},{NULL,NULL},0}, NULL, PTHREAD_MUTEX_INITIALIZER,PTHREAD_COND_INITIALIZER,PTHREAD_COND_INITIALIZER,MAX_U32} void threaded_dll_cw_init(threaded_dll_cw *queue, int max_size); void threaded_dll_cw_finalize(threaded_dll_cw *queue); void threaded_dll_cw_enqueue(threaded_dll_cw *queue,void* constant_pointer); bool threaded_dll_cw_try_enqueue(threaded_dll_cw *queue,void* constant_pointer); void* threaded_dll_cw_dequeue(threaded_dll_cw *queue); void* threaded_dll_cw_try_dequeue(threaded_dll_cw *queue); void threaded_dll_cw_wait_empty(threaded_dll_cw *queue); int threaded_dll_cw_size(threaded_dll_cw *queue); int threaded_dll_cw_room(threaded_dll_cw *queue); /* * The queue will block (write) if bigger than this. * Note that if the key is already bigger it will blocked (write) until * the content is emptied by the readers. */ ya_result threaded_dll_cw_set_maxsize(threaded_dll_cw *queue, int max_size); #ifdef __cplusplus } #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/hsdllist.h0000644000077100007710000000012412650131756023624 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.572344 30 ctime=1454597650.998344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/hsdllist.h0000664000077100007710000000602312650131756023432 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief * * A header/sentiel/double-linked list * * @{ * *----------------------------------------------------------------------------*/ #ifndef __HSDLLIST_H__ #define __HSDLLIST_H__ #include #include struct hsdllist_node_s { struct hsdllist_node_s *next; struct hsdllist_node_s *prev; void *data; }; typedef struct hsdllist_node_s hsdllist_node_s; struct hsdllist_s { struct hsdllist_node_s first; // first node struct hsdllist_node_s last; // last node allocator_s *node_allocator; // what to use to allocate/delete nodes (default: malloc/free a.k.a &libc_allocator) callback_function *data_free_callback; // what to use to free data (can be NULL) u32 size; }; typedef struct hsdllist_s hsdllist_s; void hsdllist_init(hsdllist_s *lst); void hsdllist_destroy(hsdllist_s *lst); void hsdllist_append(hsdllist_s *lst, void *data); void hsdllist_insert(hsdllist_s *lst, void *data); u32 hsdllist_size(hsdllist_s *lst); void* hsdllist_remove_last(hsdllist_s *lst); void* hsdllist_remove_first(hsdllist_s *lst); #endif // __HSDLLIST_H__ /** * @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/zalloc.h0000644000077100007710000000012412650131756023262 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.545344 30 ctime=1454597651.203344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/zalloc.h0000664000077100007710000002154512650131756023076 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup zmalloc The database specialized allocation function * @ingroup dnsdb * @brief The database specialized allocation function * * The database specialized allocation function * Which basically mean either I find a (very fast) way to use different memory pools * (one for each thread) either I can only use these allocations with the core * database : not the signer. * * Its no big deal, but its very important to remember this. * * @{ */ #pragma once #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif #ifndef DNSCORE_HAS_ZALLOC_SUPPORT #error "DNSCORE_HAS_ZALLOC_SUPPORT should be set to 1 or 0" #endif #if !DNSCORE_HAS_ZALLOC_SUPPORT /* 8 bytes aligned */ #define ZALLOC_OR_DIE(cast,label,object,tag) MALLOC_OR_DIE(cast,label,sizeof(object),tag);assert((label) != NULL) #define ZFREE(label,object) free(label) #define ZALLOC_ARRAY_OR_DIE(cast,label,size,tag) MALLOC_OR_DIE(cast,label,size,tag);assert((label) != NULL) #define ZFREE_ARRAY(ptr,size_) (void)(size_);free(ptr) /* not aligned, max size 256 */ #define ZALLOC_STRING_OR_DIE(cast,label,size,tag) MALLOC_OR_DIE(cast,label,size,tag);assert((label) != NULL) #define ZFREE_STRING(label) free(label) #define ZALLOC_ARRAY_RESIZE(type_,array_,count_,newcount_) \ { \ int zalloc_new_count = (newcount_); \ (array_) = (type_*)realloc((array_),zalloc_new_count*sizeof(type_));\ (count_) = zalloc_new_count; \ } #else /** * ZALLOC_PG_SIZE_COUNT tells how many memory sizes are supported, with 8 bytes increments. * Setting this up involves some computation and bigger numbers may lead to unmanagable amounts of memory. * The current setting (256 = 2K) should be enough for most structures. * Exceptions like message_data should be on stack or mallocated any maybe in a pool too. * * I feel more and more that this allocator could and should be put in the core. * The logger could benefit greatly from it. (although I don't know if I'd use * it like this or by forcing an higher granularity like 32 or 64 to avoid mapping too many slots.) * */ #define ZALLOC_PG_SIZE_COUNT 256 // 2K #define ZALLOC_PG_PAGEABLE_MAXSIZE (ZALLOC_PG_SIZE_COUNT * 8) /* x 8 because we are going by 8 increments */ #define ZALLOC_SIZE_TO_PAGE(size_) ((s32)(((size_)-1)>>3)) #define ZALLOC_CANHANDLE(size_) (((s32)(size_))<=ZALLOC_PG_PAGEABLE_MAXSIZE) // prepares the zalloc tables int zalloc_init(); // actually does nothing, just there for symmetry void zalloc_finalise(); /** * @brief Allocates one slot in a memory set * * Allocates one slot in a memory set. * * The size of a slot is page_index*8 * * @param[in] page_index the index of the memory set * * @return a pointer to the allocated memory */ void* zalloc_line(u32 page_index); /** * @brief Frees one slot in a memory set * * Frees one slot in a memory set * * The size of a slot is page_index*8 * * @param[in] ptr a pointer to the memory to free * @param[in] page_index the index of the memory set * */ void zfree_line(void* ptr, u32 page_index); /** * DEBUG */ u64 zheap_line_total(u32 page); u64 zheap_line_avail(u32 page); /** * zalloc_set_owner_thread made sense when it was not thread-safe. * Now this does nothing */ static inline void zalloc_set_owner_thread(pthread_t owner) {(void)owner;} static inline void* zalloc(s32 size) { u32 page = ZALLOC_SIZE_TO_PAGE(size); void* ptr; if(page < ZALLOC_PG_SIZE_COUNT) { ptr = zalloc_line(ZALLOC_SIZE_TO_PAGE(size)); } else { ptr = malloc(size); } return ptr; } static inline void zfree(void* ptr, s32 size) { u32 page = ZALLOC_SIZE_TO_PAGE(size); if(page < ZALLOC_PG_SIZE_COUNT) { zfree_line(ptr,ZALLOC_SIZE_TO_PAGE(size)); } else { free(ptr); } } /** * * Only works if --enable-zalloc-statistics has been set with ./configure * * @return the number of bytes allocated in the zalloc memory system, or -1 if the statistics are not enabled */ s64 zallocatedtotal(); /** * @brief Allocates unaligned memory of an arbitrary size using zalloc_line and malloc * * Allocates unaligned memory of an arbitrary size using zalloc_line and malloc * * @param[in] size the size to allocated * * @return a pointer to the allocated memory */ void* zalloc_unaligned(u32 size); /** * @brief Frees unaligned memory of an arbitrary size using zfree_line and free * * Allocates unaligned memory of an arbitrary size using zalloc_line and malloc * * @param[in] ptr a pointer to the memory to free * */ void zfree_unaligned(void* ptr); #define ZALLOC_STRING_OR_DIE(cast,label,size,tag) label=(cast)zalloc_unaligned(size) #define ZFREE_STRING(label) zfree_unaligned(label) /* * THIS SHOULD BE OPTIMIZED BY THE COMPILER AS ONE AND ONLY ONE CALL */ #define ZALLOC(object) ((((sizeof(object) + 7) >> 3)-1) < ZALLOC_PG_SIZE_COUNT)?zalloc_line(((sizeof(object) + 7) >> 3)-1):malloc(sizeof(object)) #define ZFREE(ptr,object) ((((sizeof(object) + 7) >> 3)-1) < ZALLOC_PG_SIZE_COUNT)?zfree_line(ptr,(((sizeof(object) + 7) >> 3)-1)):free(ptr) #define ZALLOC_OR_DIE(cast,label,object,tag) if((label=(cast)ZALLOC(object))==NULL) {DIE(ZALLOC_ERROR_OUTOFMEMORY); } assert((label) != NULL) #define ZALLOC_ARRAY_OR_DIE(cast,label,size_,tag) if((label = (cast)zalloc(size_)) == NULL) {DIE(ZALLOC_ERROR_OUTOFMEMORY); } assert((label) != NULL) #define ZFREE_ARRAY(ptr,size_) zfree(ptr,size_) /** * (Z)Allocates a new array of count type elements so it can hold * newcount type elements. (It takes granularity into account to avoid * unnecessary work) * * If the array is smaller, the end is truncated * If the new count is zero the array is deleted. * * After the macro, array_ and count_ are changed so don't use consts. * * This helper is meant to be used by NSEC3 structures */ #define ZALLOC_ARRAY_RESIZE_TAG 0x44455a49534552 /* RESIZED */ #define ZALLOC_ARRAY_RESIZE(type_,array_,count_,newcount_) \ { \ u32 zalloc_new_count = (u32)(newcount_); \ if(((u32)(count_)) != zalloc_new_count) \ { \ if( ZALLOC_SIZE_TO_PAGE(sizeof(type_)*((u32)(count_))) != \ ZALLOC_SIZE_TO_PAGE(sizeof(type_)*zalloc_new_count)) \ { \ type_* __tmp__; \ \ if(zalloc_new_count > 0) \ { \ ZALLOC_ARRAY_OR_DIE(type_*,__tmp__,sizeof(type_)*zalloc_new_count, ZALLOC_ARRAY_RESIZE_TAG); \ MEMCOPY(__tmp__,(array_),sizeof(type_)*MIN((u32)(count_),zalloc_new_count)); \ } \ else \ { \ __tmp__ = NULL; \ } \ \ ZFREE_ARRAY((array_),sizeof(type_)*((u32)(count_))); \ array_ = __tmp__; \ count_ = newcount_; \ } \ } \ assert(array_ != NULL); \ } #endif struct output_stream; void zalloc_print_stats(struct output_stream *os); #ifdef __cplusplus } #endif /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/ptr_set.h0000644000077100007710000000012412650131756023456 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.508344 30 ctime=1454597651.106344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/ptr_set.h0000664000077100007710000001516612650131756023274 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief * * * * @{ */ #pragma once #ifdef __cplusplus extern "C" { #endif #include /* * A digest is stored prefixed with its length ([1;255]) */ /* * A structure to hold both children with direct access */ typedef int ptr_node_compare(const void *node_a, const void *node_b); typedef struct ptr_set ptr_set; typedef struct ptr_node ptr_node; struct ptr_set { struct ptr_node *root; ptr_node_compare *compare; }; struct ptr_set_children { struct ptr_node* left; struct ptr_node* right; }; /* * An union to have access to the children with direct or indexed access */ typedef union ptr_set_children_union ptr_set_children_union; union ptr_set_children_union { struct ptr_set_children lr; struct ptr_node * child[2]; }; /* * The node structure CANNOT have a varying size on a given collection * This means that the digest size is a constant in the whole tree */ struct ptr_node { union ptr_set_children_union children; // 16 /**/ struct ptr_node* parent; // 8 /**/ void *key; /* ie: nsec3 item */ void *value; /* ie: label linked to the nsec3 item */ s8 balance; }; #define PTR_SET_NODE_SIZE(node) sizeof(ptr_node) /* * AVL definition part begins here */ /* * The maximum depth of a tree. * 40 is enough for storing 433494436 items (worst case) * * Depth 0 is one node. * * Worst case : N is enough for sum[n = 0,N](Fn) where F is Fibonacci * Best case : N is enough for (2^(N+1))-1 */ #define AVL_MAX_DEPTH 40 /* 64 */ /* * The previx that will be put in front of each function name */ #define AVL_PREFIX ptr_set_ /* * The type that hold the node */ #define AVL_NODE_TYPE ptr_node /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_TREE_TYPE ptr_set /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_CONST_TREE_TYPE const ptr_set /* * */ #define AVL_TREE_ROOT(__tree__) (__tree__)->root /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE void* #define AVL_REFERENCE_IS_POINTER TRUE #define AVL_REFERENCE_IS_CONST FALSE /* * The node has got a pointer to its parent * * 0 : disable * !=0 : enable */ #define AVL_HAS_PARENT_POINTER 1 #ifdef __cplusplus } #endif #include #ifdef __cplusplus extern "C" { #endif /* * I recommand setting a define to identify the C part of the template * So it can be used to undefine what is not required anymore for every * C file but that one. * */ #ifndef _PTR_SET_COLLECTION_C #undef AVL_MAX_DEPTH #undef AVL_PREFIX #undef AVL_NODE_TYPE #undef AVL_TREE_TYPE #undef AVL_CONST_TREE_TYPE #undef AVL_TREE_ROOT #undef AVL_REFERENCE_TYPE #undef AVL_HAS_PARENT_POINTER #undef AVL_REFERENCE_IS_POINTER #undef AVL_REFERENCE_IS_CONST #undef _AVL_H_INC #endif /* _PTR_SET_COLLECTION_C */ #ifdef __cplusplus } #endif #define ptr_set_default_node_compare ptr_set_ptr_node_compare // key = ptr int ptr_set_ptr_node_compare(const void *node_a, const void *node_b); // key = asciiz (cannot be NULL) int ptr_set_asciizp_node_compare(const void *node_a, const void *node_b); // key = fqdn (cannot be NULL) int ptr_set_dnsname_node_compare(const void *node_a, const void *node_b); // key = fqdn (cannot be NULL) int ptr_set_dnslabel_node_compare(const void *node_a, const void *node_b); // key = asciiz (can be NULL) int ptr_set_nullable_asciizp_node_compare(const void *node_a, const void *node_b); // key = fqdn (can be NULL) int ptr_set_nullable_dnsname_node_compare(const void *node_a, const void *node_b); int ptr_set_host_address_node_compare(const void *node_a, const void *node_b); #define PTR_SET_EMPTY {NULL, ptr_set_default_node_compare} #define PTR_SET_ASCIIZ_EMPTY {NULL, ptr_set_asciizp_node_compare} #define PTR_SET_DNSNAME_EMPTY {NULL, ptr_set_dnsname_node_compare} #define PTR_SET_NULLABLE_ASCIIZ_EMPTY {NULL, ptr_set_nullable_asciizp_node_compare} #define PTR_SET_NULLABLE_DNSNAME_EMPTY {NULL, ptr_set_nullable_dnsname_node_compare} #define PTR_SET_PTR_EMPTY {NULL, ptr_set_ptr_node_compare} #define PTR_SET_CUSTOM(comparator___) {NULL, (comparator___)} #define PTR_SET_HOST_ADDRESS_EMPTY {NULL, ptr_set_host_address_node_compare} void *ptr_set_avl_iterator_hasnext_next_value(ptr_set_avl_iterator *iterp); #define FOREACH_PTR_SET(cast__,var__,ptr_set__) ptr_set_avl_iterator PREPROCESSOR_CONCAT_EVAL(foreach_ptr_set_iter,__LINE__); ptr_set_avl_iterator_init((ptr_set__), &PREPROCESSOR_CONCAT_EVAL(foreach_ptr_set_iter,__LINE__)); for(cast__ var__;((var__) = (cast__)ptr_set_avl_iterator_hasnext_next_value(&PREPROCESSOR_CONCAT_EVAL(foreach_ptr_set_iter,__LINE__))) != NULL;) /* * AVL definition part ends here */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/pipe_stream.h0000644000077100007710000000012412650131756024306 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.595344 30 ctime=1454597651.095344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/pipe_stream.h0000664000077100007710000000605212650131756024116 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef PIPE_STREAM_H_ #define PIPE_STREAM_H_ #ifdef __cplusplus extern "C" { #endif #include #include /** * Creates both output and input stream * Writing in the output stream makes it available for the input stream * This is not thread-safe. * * This is used in the XFR input stream. The internal processing of the XFR stream * writes the available bytes to the output so the reader can get them from the * input. * * @param output * @param input */ void pipe_stream_init(output_stream *output, input_stream *input, u32 buffer_size); /** * * Number of available bytes in the input stream * * @param input * @return */ ya_result pipe_stream_read_available(input_stream *input); /** * * Room for bytes in the output stream * * @param input * @return */ ya_result pipe_stream_write_available(output_stream *input); #ifdef __cplusplus } #endif #endif /* PIPE_STREAM_H_ */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dnssec_errors.h0000644000077100007710000000012412650131756024651 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.596344 30 ctime=1454597650.969344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dnssec_errors.h0000664000077100007710000000761712650131756024471 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup error dnssec * @ingroup dnscore * @brief DNSSEC error codes * * @{ */ #ifndef _DNSSEC_ERROR_H #define _DNSSEC_ERROR_H #define DNSSEC_ERROR_BASE 0x80050000 #define DNSSEC_ERROR_CODE(code_) ((s32)(DNSSEC_ERROR_BASE+(code_))) #define DNSSEC_ERROR_NOENGINE DNSSEC_ERROR_CODE( 1) #define DNSSEC_ERROR_INVALIDENGINE DNSSEC_ERROR_CODE( 2) #define DNSSEC_ERROR_CANTPOOLTHREAD DNSSEC_ERROR_CODE( 4) #define DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM DNSSEC_ERROR_CODE( 10) #define DNSSEC_ERROR_UNSUPPORTEDDIGESTALGORITHM DNSSEC_ERROR_CODE( 11) #define DNSSEC_ERROR_DUPLICATEKEY DNSSEC_ERROR_CODE( 64) #define DNSSEC_ERROR_INCOMPLETEKEY DNSSEC_ERROR_CODE( 65) #define DNSSEC_ERROR_KEYSTOREPATHISTOOLONG DNSSEC_ERROR_CODE( 66) #define DNSSEC_ERROR_UNABLETOCREATEKEYFILES DNSSEC_ERROR_CODE( 67) #define DNSSEC_ERROR_KEYWRITEERROR DNSSEC_ERROR_CODE( 68) #define DNSSEC_ERROR_BNISNULL DNSSEC_ERROR_CODE( 69) #define DNSSEC_ERROR_BNISBIGGERTHANBUFFER DNSSEC_ERROR_CODE( 70) #define DNSSEC_ERROR_UNEXPECTEDKEYSIZE DNSSEC_ERROR_CODE( 71) #define DNSSEC_ERROR_KEYISTOOBIG DNSSEC_ERROR_CODE( 72) #define DNSSEC_ERROR_KEYRING_ALGOTAG_COLLISION DNSSEC_ERROR_CODE( 73) #define DNSSEC_ERROR_KEYRING_KEY_IS_INVALID DNSSEC_ERROR_CODE( 74) #define DNSSEC_ERROR_RSASIGNATUREFAILED DNSSEC_ERROR_CODE(128) #define DNSSEC_ERROR_DSASIGNATUREFAILED DNSSEC_ERROR_CODE(129) #define DNSSEC_ERROR_ECDSASIGNATUREFAILED DNSSEC_ERROR_CODE(130) #define DNSSEC_ERROR_NSEC3_INVALIDZONESTATE DNSSEC_ERROR_CODE(256) #define DNSSEC_ERROR_NSEC3_LABELTODIGESTFAILED DNSSEC_ERROR_CODE(257) #define DNSSEC_ERROR_NSEC3_DIGESTORIGINOVERFLOW DNSSEC_ERROR_CODE(258) #define DNSSEC_ERROR_NSEC_INVALIDZONESTATE DNSSEC_ERROR_CODE(384) #define DNSSEC_ERROR_RRSIG_NOENGINE DNSSEC_ERROR_CODE(512) #define DNSSEC_ERROR_RRSIG_NOZONEKEYS DNSSEC_ERROR_CODE(513) #define DNSSEC_ERROR_RRSIG_NOUSABLEKEYS DNSSEC_ERROR_CODE(514) #define DNSSEC_ERROR_RRSIG_NOSOA DNSSEC_ERROR_CODE(515) #define DNSSEC_ERROR_RRSIG_NOSIGNINGKEY DNSSEC_ERROR_CODE(516) #define DNSSEC_ERROR_RRSIG_UNSUPPORTEDRECORD DNSSEC_ERROR_CODE(517) #endif // _DNSSEC_ERROR_H yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/sys_get_cpu_count.h0000644000077100007710000000012412650131756025532 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.553344 30 ctime=1454597651.143344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/sys_get_cpu_count.h0000664000077100007710000000445212650131756025344 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup cpu CPU * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _SYS_GET_CPU_COUNT_H #define _SYS_GET_CPU_COUNT_H #include #ifdef __cplusplus extern "C" { #endif ya_result sys_get_cpu_count(); void sys_set_cpu_count(int count); #ifdef __cplusplus } #endif #endif /* _SYS_GET_CPU_COUNT_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/xfr_input_stream.h0000644000077100007710000000012412650131756025367 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.483344 30 ctime=1454597651.207344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/xfr_input_stream.h0000664000077100007710000000723312650131756025201 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup dnscore * @brief * * @{ */ #ifndef XFR_INPUT_STREAM_H_ #define XFR_INPUT_STREAM_H_ #include #include #include #ifdef __cplusplus extern "C" { #endif typedef enum { XFR_ALLOW_AXFR=1, XFR_ALLOW_IXFR=2, XFR_ALLOW_BOTH=3, XFR_CURRENT_SERIAL_SET=4 } xfr_copy_flags; /* typedef struct xfr_copy_args xfr_copy_args; struct xfr_copy_args { input_stream *is; // TCP stream const u8 *origin; // origin of the zone message_data *message; // message (first set to the head XFR message by the init) u32 current_serial; // the current serial for the zone (if XFR_CURRENT_SERIAL_SET in flags) u32 out_loaded_serial; // the target serial of the stream xfr_copy_flags flags; // what is allowed in the stream }; */ /** * * The XFR input stream is meant to give record by record the payload of an XFR * transfer. It verifies the TSIGs. It knows its type after two read records. * * @param args see xfr_copy_args * @param filtering_stream * @return */ ya_result xfr_input_stream_init(input_stream* filtering_stream, const u8 *origin, input_stream *xfr_source_stream, message_data *message, u32 current_serial, xfr_copy_flags flags); ya_result xfr_input_stream_get_type(input_stream* in_xfr_input_stream); const u8* xfr_input_stream_get_origin(input_stream* in_xfr_input_stream); /** * Returns the serial of the SOA at the end of the stream. * * @param in_xfr_input_stream * @return */ ya_result xfr_input_stream_get_serial(input_stream* in_xfr_input_stream); #ifdef __cplusplus } #endif #endif /* XFR_INPUT_STREAM_H_ */ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/serial.h0000644000077100007710000000012412650131756023255 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.571344 30 ctime=1454597651.125344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/serial.h0000664000077100007710000000605612650131756023071 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscore * @ingroup dnscore * @brief serial arithmetic * * @{ * *----------------------------------------------------------------------------*/ #ifndef _SERIAL_H #define _SERIAL_H #include #ifdef __cplusplus extern "C" { #endif /* * SERIAL ARITHMETIC */ /* * Returns TRUE if a >,<,>=,<= b */ /** * * Returns TRUE iff a > b in serial arithmetic, else FALSE * * @param a * @param b * @return a > b */ bool serial_gt(u32 a, u32 b); /** * * Returns TRUE iff a < b in serial arithmetic, else FALSE * * @param a * @param b * @return a < b */ bool serial_lt(u32 a, u32 b); /** * * Returns TRUE iff a >= b in serial arithmetic, else FALSE * * @param a * @param b * @return a >= b */ bool serial_ge(u32 a, u32 b); /** * * Returns TRUE iff a <= b in serial arithmetic, else FALSE * * @param a * @param b * @return a <= b */ bool serial_le(u32 a, u32 b); #ifdef __cplusplus } #endif #endif /* _SERIAL_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dns-udp.h0000644000077100007710000000012412650131756023350 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.534344 30 ctime=1454597650.928344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dns-udp.h0000664000077100007710000001445212650131756023163 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #ifndef DNS_UDP_H #define DNS_UDP_H #include #include #include #include // error codes #define DNS_UDP_TIMEOUT 0x81000001 #define DNS_UDP_INTERNAL 0x81000002 #define DNS_UDP_CANCEL 0x81000003 // #define DNS_UDP_TIMEOUT_US 3000000 // 3s #define DNS_UDP_TIMEOUT_US_MIN 1000000 // 1s #define DNS_UDP_TIMEOUT_US_MAX 3600000000// 1h #define DNS_UDP_SEND_RATE 1000000 // 1MB/s #define DNS_UDP_SEND_RATE_MIN 512 // 512B/s #define DNS_UDP_SEND_RATE_MAX 100000000 // 100MB/s #define DNS_UDP_SEND_QUEUE 200000 // 200000 messages #define DNS_UDP_SEND_QUEUE_MIN 1 #define DNS_UDP_SEND_QUEUE_MAX 0x1000000 // 16.7M messages #define DNS_UDP_PORT_COUNT 256 // A.K.A workers #define DNS_UDP_PORT_COUNT_MIN 1 #define DNS_UDP_PORT_COUNT_MAX 4000 #define DNS_UDP_RETRY_COUNT 2 // tries after the first failure #define DNS_UDP_RETRY_COUNT_MIN 0 #define DNS_UDP_RETRY_COUNT_MAX 16 #define DNS_SIMPLE_MESSAGE_HAS_WAIT_COND 0 #define DNS_SIMPLE_MESSAGE_FLAGS_DNSSEC MESSAGE_EDNS0_DNSSEC #define DNS_SIMPLE_MESSAGE_STATUS_QUEUED 0x01 #define DNS_SIMPLE_MESSAGE_STATUS_COLLECTED 0x02 #define DNS_SIMPLE_MESSAGE_STATUS_SENT 0x04 #define DNS_SIMPLE_MESSAGE_STATUS_AGGREGATED 0x08 #define DNS_SIMPLE_MESSAGE_STATUS_RECEIVED 0x10 #define DNS_SIMPLE_MESSAGE_STATUS_TIMEDOUT 0x20 #define DNS_SIMPLE_MESSAGE_STATUS_FAILURE 0x40 #define DNS_SIMPLE_MESSAGE_STATUS_INVALID 0x80 struct dns_udp_settings_s { u64 timeout; u32 send_rate; u32 queue_size; u32 port_count; u32 retry_count; }; typedef struct dns_udp_settings_s dns_udp_settings_s; // reference count common to all dns_simple_message (aggregation of answer for same query) struct dns_simple_message_async_node_s { struct dns_simple_message_async_node_s *next; async_message_s *async; }; typedef struct dns_simple_message_async_node_s dns_simple_message_async_node_s; /* * This is basically a DNS query descriptor (retries and all) */ struct dns_simple_message_s { host_address *name_server; message_data *answer; // answer, can be shared dns_simple_message_async_node_s async_node; volatile s64 queued_time_us; volatile s64 sent_time_us; volatile s64 received_time_us; smp_int rc; // number of references for this message group_mutex_t mtx; volatile pthread_t owner; u32 worker_index; u16 qtype; u16 qclass; u16 flags; u16 source_port; u16 dns_id; u8 retries_left; u8 status; bool recurse; u8 fqdn[MAX_DOMAIN_LENGTH]; }; typedef struct dns_simple_message_s dns_simple_message_s; /** * This needs to be called before dns_udp_handler_init() or some settings will not be taken * into account * * @param settings that will be used by the dns_udp handler */ void dns_udp_handler_configure(const dns_udp_settings_s *settings); int dns_udp_handler_init(); int dns_udp_handler_start(); int dns_udp_handler_stop(); int dns_udp_handler_finalize(); /** * Cancels all pending queries. * Their handlers will be called with the error message DNS_UDP_CANCEL * The purpose is cleaning up before shutdown. */ void dns_udp_cancel_all_queries(); int dns_udp_send_simple_message(const host_address* name_server, const u8 *fqdn, u16 qtype, u16 qclass, u16 flags, async_done_callback *cb, void* cbargs); int dns_udp_send_recursive_message(const host_address* name_server, const u8 *fqdn, u16 qtype, u16 qclass, u16 flags, async_done_callback *cb, void* cbargs); int dns_udp_send_simple_message_sync(const host_address* name_server, const u8 *fqdn, u16 qtype, u16 qclass,u16 flags, dns_simple_message_s **to_release); int dns_udp_send_recursive_message_sync(const host_address* name_server, const u8 *fqdn, u16 qtype, u16 qclass,u16 flags, dns_simple_message_s **to_release); bool dns_udp_simple_message_trylock(dns_simple_message_s *simple_message); void dns_udp_simple_message_lock(dns_simple_message_s *simple_message); void dns_udp_simple_message_unlock(dns_simple_message_s *simple_message); void dns_udp_simple_message_retain(dns_simple_message_s *simple_message); void dns_udp_simple_message_release(dns_simple_message_s *simple_message); static inline const message_data *dns_udp_simple_message_get_answer(const dns_simple_message_s *simple_message) { return simple_message->answer; } u32 dns_udp_send_queue_size(); u32 dns_udp_pending_queries_count(); u32 dns_udp_pending_feedback_count(); #endif // DNS_UDP_H yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/tsig.h0000644000077100007710000000012412650131756022744 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.530344 30 ctime=1454597651.218344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/tsig.h0000664000077100007710000001604412650131756022556 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup dnscore * @brief * * @{ */ #ifndef TSIG_H_ #define TSIG_H_ #include #include #include #include #include #define HMAC_UNKNOWN 0 #define HMAC_MD5 157 #define HMAC_SHA1 161 #define HMAC_SHA224 162 #define HMAC_SHA256 163 #define HMAC_SHA384 164 #define HMAC_SHA512 165 #if DNSCORE_HAS_TSIG_SUPPORT #ifdef __cplusplus extern "C" { #endif /* * */ /* * A digest is stored prefixed with its length ([1;255]) */ /* * A structure to hold both children with direct access */ typedef struct tsig_node tsig_node; struct tsig_children { struct tsig_node* left; struct tsig_node* right; }; /* * An union to have access to the children with direct or indexed access */ typedef union tsig_children_union tsig_children_union; union tsig_children_union { struct tsig_children lr; struct tsig_node * child[2]; }; typedef struct tsig_item tsig_item; struct tsig_item { const u8 *name; const u8 *mac; const u8 *mac_algorithm_name; const EVP_MD *evp_md; u16 name_len; u16 mac_algorithm_name_len; u16 mac_size; u8 mac_algorithm; u8 load_serial; }; /* * The node structure CANNOT have a varying size on a given collection * This means that the digest size is a constant in the whole tree */ struct tsig_node { union tsig_children_union children; tsig_item item; s8 balance; }; /** * Call this before a config reload */ void tsig_serial_next(); /* * I recommand setting a define to identify the C part of the template * So it can be used to undefine what is not required anymore for every * C file but that one. * */ ya_result tsig_register(const u8 *name, const u8 *mac, u16 mac_size, u8 mac_algorithm); void tsig_finalize(); tsig_item *tsig_get(const u8 *name); u32 tsig_get_count(); tsig_item *tsig_get_at_index(s32 index); struct message_data; typedef enum { TSIG_NOWHERE = -1, TSIG_START = 0, TSIG_MIDDLE = 1, TSIG_END = 2, TSIG_WHOLE = 3 } tsig_tcp_message_position; /** * Sign the first message_data of a tcp answer */ ya_result tsig_sign_tcp_first_message(struct message_data *mesg); /** * Sign one of the "middle" message_data of a tcp answer */ ya_result tsig_sign_tcp_next_message(struct message_data *mesg); /** * Sign the 100*Nth last message_data of a tcp answer */ ya_result tsig_sign_tcp_last_message(struct message_data *mesg); /** * Calls the relevant sign tcp function */ ya_result tsig_sign_tcp_message(struct message_data *mesg, tsig_tcp_message_position pos); /** * Sign the first message_data of a tcp answer */ ya_result tsig_sign_tcp_first_message(struct message_data *mesg); /** * Sign one of the "middle" message_data of a tcp answer */ ya_result tsig_sign_tcp_next_message(struct message_data *mesg); /** * Sign the 100*Nth last message_data of a tcp answer */ ya_result tsig_sign_tcp_last_message(struct message_data *mesg); /** * Calls the relevant verify tcp function */ ya_result tsig_verify_tcp_first_message(struct message_data *mesg, const u8 *mac, u16 mac_size); ya_result tsig_verify_tcp_next_message(struct message_data *mesg); void tsig_verify_tcp_last_message(struct message_data *mesg); void tsig_register_algorithms(); const EVP_MD *tsig_get_EVP_MD(u8 algorithm); u8 tsig_get_algorithm(const u8 *name); const u8* tsig_get_algorithm_name(u8 algorithm); /* * Called by tsig_extract_and_process * Processes the TSIG of the message, remove the TSIG from the message * *mesg the message * *purd the packet reader pointing to be start of the RDATA of the TSIG * tsigname the dname of the TSIG * tctr the TYPE-CLASS-TTL-RDATALEN of the TSIG */ // no verification whatsoever, use with care ya_result tsig_process(struct message_data *mesg, packet_unpack_reader_data *purd, u32 tsig_offset, const tsig_item *tsig, struct type_class_ttl_rdlen *tctr); ya_result tsig_process_query(struct message_data *mesg, packet_unpack_reader_data *purd, u32 tsig_offset, u8 tsigname[MAX_DOMAIN_LENGTH], struct type_class_ttl_rdlen *tctr); ya_result tsig_process_answer(struct message_data *mesg, packet_unpack_reader_data *purd, u32 tsig_offset, const tsig_item *tsig, struct type_class_ttl_rdlen *tctr, const u8 *mac, u16 mac_size); /* * Search for the last * */ ya_result tsig_extract_and_process(struct message_data *mesg); /** * signs the message * the tsig.tsig should be set * the tsig fields must be set * */ ya_result tsig_sign_answer(struct message_data *mesg); /** * signs the message * the tsig.tsig should be set * the tsig fields should be clear * */ ya_result tsig_sign_query(struct message_data *mesg); ya_result tsig_verify_answer(struct message_data *mesg, const u8 *mac, u16 mac_size); ya_result tsig_append_unsigned_error(struct message_data *mesg); ya_result tsig_append_error(struct message_data *mesg); /** * Removes the TSIG if any, setups the tsig fields of the message. * * Returns 1 if a TSIG has been processed. * Returns 0 if none were found. */ ya_result tsig_message_extract(struct message_data *mesg); #define TSIG_ENABLED(message__) ((message__)->tsig.tsig != NULL) #ifdef __cplusplus } #endif #endif /* TSIG support */ #endif /* TSIG_H_ */ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/logger_handle.h0000644000077100007710000000012412650131756024570 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.584344 30 ctime=1454597651.039344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/logger_handle.h0000664000077100007710000003207212650131756024401 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logger Logging functions * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _LOGGER_HANDLE_H #define _LOGGER_HANDLE_H #include #include #include /* * Basically a copy from syslog */ #define MSG_EMERG 0 /* system is unusable */ #define MSG_ALERT 1 /* action must be taken immediately */ #define MSG_CRIT 2 /* critical conditions */ #define MSG_ERR 3 /* error conditions */ #define MSG_WARNING 4 /* warning conditions */ #define MSG_NOTICE 5 /* normal, but significant, condition */ #define MSG_INFO 6 /* informational message */ #define MSG_DEBUG 7 /* debug-level message */ #define MSG_DEBUG1 8 /* debug-level message */ #define MSG_DEBUG2 9 /* debug-level message */ #define MSG_DEBUG3 10 /* debug-level message */ #define MSG_DEBUG4 11 /* debug-level message */ #define MSG_DEBUG5 12 /* debug-level message */ #define MSG_DEBUG6 13 /* debug-level message */ #define MSG_DEBUG7 14 /* debug-level message */ #define MSG_ALL 15 /* all message levels */ #define MSG_ALL_MASK 0xffff /* all message levels as a bitmap */ #define MSG_PROD_MASK 0x007f /// non-debug message levels as a bitmap #define MSG_LEVEL_COUNT 16 /** * The default buffer size (0-cost) made available for each line. * If the line is bigger the buffer's size is raised at a certain (non-nul) * cost. * */ #define DEFAULT_MAX_LINE_SIZE 128 #define LOG_QUEUE_MIN_SIZE 0x00000400 // 1K #define LOG_QUEUE_MAX_SIZE 0x01000000 // 16M #define LOG_QUEUE_DEFAULT_SIZE 0x00100000 // 1M #ifdef __cplusplus extern "C" { #endif /** * Handle */ typedef ptr_vector logger_channel_array; struct logger_channel; typedef struct logger_handle logger_handle; struct logger_handle { logger_channel_array channels[MSG_LEVEL_COUNT]; const char *name; const char *formatted_name; struct logger_handle **global_reference; u8 formatted_name_len; }; /** * Channel */ struct logger_channel_vtbl; union logger_message; struct logger_channel { void *data; const struct logger_channel_vtbl *vtbl; union logger_message *last_message; u32 last_message_count; s32 linked_handles; }; typedef struct logger_channel logger_channel; typedef ya_result logger_channel_constmsg_method(logger_channel* chan, int level, char* text, u32 text_len, u32 date_offset); typedef ya_result logger_channel_msg_method(logger_channel* chan, int level, char* text, ...); typedef ya_result logger_channel_vmsg_method(logger_channel* chan, int level, char* text, va_list args); typedef void logger_channel_flush_method(logger_channel* chan); typedef void logger_channel_close_method(logger_channel* chan); typedef ya_result logger_channel_reopen_method(logger_channel* chan); typedef struct logger_channel_vtbl logger_channel_vtbl; struct logger_channel_vtbl { logger_channel_constmsg_method *constmsg; logger_channel_msg_method *msg; logger_channel_vmsg_method *vmsg; logger_channel_flush_method *flush; logger_channel_close_method *close; logger_channel_reopen_method *reopen; /* So a HUP will flush, close then reopen/create the log files again */ const char *__class__; }; #define logger_channel_msg(channel_,level_,text_, text_len_, date_offs_) (channel_)->vtbl->constmsg((channel_),(level_),(text_),(text_len_),(date_offs_)) #define logger_channel_msgf(channel_,level_,text_, ...) (channel_)->vtbl->msg((channel_),(level_),(text_),__VA_ARGS__) #define logger_channel_vmsgf(channel_,level_,text_, args_) (channel_)->vtbl->msg((channel_),(level_),(text_),(args_)) #define logger_channel_flush(channel_) (channel_)->vtbl->flush(channel_) #define logger_channel_reopen(channel_) (channel_)->vtbl->reopen(channel_) #define logger_channel_close(channel_) (channel_)->vtbl->close(channel_) /** * Message flags */ #define LOGGER_MESSAGE_STD 0 #define LOGGER_MESSAGE_TIMEMS 1 #define LOGGER_MESSAGE_PREFIX 2 /** * Allocates an empty channel * Meant to be used by channels implementation */ logger_channel* logger_channel_alloc(); s32 logger_channel_get_usage_count(const char* channel_name); void logger_channel_register(const char* channel_name, struct logger_channel *channel); void logger_channel_unregister(const char* channel_name); void logger_channel_close_all(); void logger_handle_create(const char *logger_name, logger_handle **handle_holder); void logger_handle_add_channel(const char* logger_name, int level, const char* channel_name); void logger_handle_remove_channel(const char *logger_name, const char *channel_name); s32 logger_handle_count_channels(const char *logger_name); void logger_handle_close(const char *logger_name); /** * * Sends a formatted text to the logger * * @param handle handle to use, can be NULL * @param level level of the message * @param fmt format string * @param args parameters for the format */ void logger_handle_vmsg(logger_handle* handle, u32 level, const char* fmt, va_list args); /** * * Sends a formatted text to the logger * * @param handle handle to use, can be NULL * @param level level of the message * @param fmt format string * @param ... parameters for the format */ void logger_handle_msg(logger_handle* handle, u32 level, const char* fmt, ...); /** * * Sends a text to the logger * * @param handle handle to use, can be NULL * @param level level of the message * @param text text to send * @param text_len length of the text to send */ void logger_handle_msg_text(logger_handle *handle, u32 level, const char* text, u32 text_len); /** * * Sends a text to the logger with a prefix * * @param handle handle to use, can be NULL * @param level level of the message * @param text text to send * @param text_len text length * @param prefix prefix * @param prefix_len prefix length * @param flags LOGGER_MESSAGE_* flags */ void logger_handle_msg_text_ext(logger_handle *handle, u32 level, const char* text, u32 text_len, const char* prefix, u32 prefix_len, u16 flags); /** * Sets the layout for the logged memory dumps * Values MUST be set to (2^n)-1 with n >= 0 * Values MUST be < 256 * * @param group_mask The mask to group the bytes together (ie: 3 for making groups of 4) * @param separator_mask the mask to put a space separator every few bytes (ie: 3 for every 4 bytes) * */ void log_memdump_set_layout(u32 group_mask, u32 separator_mask); /** * Dumps memory in to the logger * * @param hndl handle to use, can be NULL * @param level level of the message * @param data_pointer memory to dump * @param size size of the memory to dump * @param line_size length of a line * @param flags see osprint_dump for details: OSPRINT_DUMP_ADDRESS, OSPRINT_DUMP_HEX, OSPRINT_DUMP_TEXT */ void log_memdump_ex(logger_handle* hndl, u32 level, const void* data_pointer, size_t size, size_t line_size, u32 flags); void log_memdump(logger_handle* hndl, u32 level, const void* data_pointer, size_t size, size_t line_size); void logger_handle_exit_level(u32 level); void logger_handle_finalize(); void logger_set_level(u8 level); #define LOG_MEMDUMP_LAYOUT_DENSE 0xff,0xff #define LOG_MEMDUMP_LAYOUT_ERIC 3,0xff #define LOG_MEMDUMP_LAYOUT_GERY 0,3 /* * GCC style : * * #define debug(vararg...) logger_handle_msg(NULL,MSG_DEBUG,vararg) * * C99 style : * * #define debug(...) logger_handle_msg(NULL,MSG_DEBUG,__VA_ARGS__) * */ #if defined(MODULE_MSG_HANDLE) #define debug(...) logger_handle_msg((MODULE_MSG_HANDLE),MSG_DEBUG,__VA_ARGS__) #else #define debug(...) logger_handle_msg(NULL,MSG_DEBUG,__VA_ARGS__) #endif /** * LOG_TEXT_PREFIX is a text constant that will be prefixed to every text logged in the current source file. * It is a constant that MUST be set before including logger_handle.h (or any logger header) */ #if !defined(LOG_TEXT_PREFIX) #define LOG_TEXT_PREFIX #endif #define log_debug7(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_DEBUG7,LOG_TEXT_PREFIX __VA_ARGS__) #define log_debug6(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_DEBUG6,LOG_TEXT_PREFIX __VA_ARGS__) #define log_debug5(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_DEBUG5,LOG_TEXT_PREFIX __VA_ARGS__) #define log_debug4(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_DEBUG4,LOG_TEXT_PREFIX __VA_ARGS__) #define log_debug3(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_DEBUG3,LOG_TEXT_PREFIX __VA_ARGS__) #define log_debug2(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_DEBUG2,LOG_TEXT_PREFIX __VA_ARGS__) #define log_debug1(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_DEBUG1,LOG_TEXT_PREFIX __VA_ARGS__) #define log_debug(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_DEBUG,LOG_TEXT_PREFIX __VA_ARGS__) #define log_notice(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_NOTICE,LOG_TEXT_PREFIX __VA_ARGS__) #define log_info(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_INFO,LOG_TEXT_PREFIX __VA_ARGS__) #define log_warn(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_WARNING,LOG_TEXT_PREFIX __VA_ARGS__) #define log_err(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_ERR,LOG_TEXT_PREFIX __VA_ARGS__) /* Obsolete, Critical error: quit */ #define log_quit(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_CRIT,LOG_TEXT_PREFIX __VA_ARGS__) /* Critical error: quit */ #define log_crit(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_CRIT,LOG_TEXT_PREFIX __VA_ARGS__) /* Emergency: quit */ #define log_emerg(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_EMERG,LOG_TEXT_PREFIX __VA_ARGS__) /* -7---------------------------------------------------------------------------- * * MACROS */ #ifdef DEBUG #define DERROR_MSG(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_ERR,__VA_ARGS__) #else #define DERROR_MSG(...) /* nothing */ #endif /* DEBUG */ /** * For practical reasons, the code for logger_init() is in logger_handle.c */ void logger_init(); /** * For practical reasons, the code for logger_start() is in logger_handle.c */ void logger_start(); /** * For practical reasons, the code for logger_stop() is in logger_handle.c */ void logger_stop(); /** * For practical reasons, the code for logger_finalize() is in logger_handle.c */ void logger_finalize(); /** * For practical reasons, the code for logger_flush() is in logger_handle.c */ void logger_flush(); /** * For practical reasons, the code for logger_reopen() is in logger_handle.c */ void logger_reopen(); bool logger_is_running(); /** * Sets the logger queue size */ u32 logger_set_queue_size(u32 n); void logger_set_path(const char *path); const char* logger_get_path(); void logger_set_uid(uid_t uid); uid_t logger_get_uid(); void logger_set_gid(uid_t gid); gid_t logger_get_gid(); #ifdef __cplusplus } #endif #endif /* _LOGGER_HANDLE_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dnskey-keyring.h0000644000077100007710000000012412650131756024741 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.492344 30 ctime=1454597650.957344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dnskey-keyring.h0000664000077100007710000000475112650131756024555 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnskey DNSSEC keyring functions * @ingroup dnsdbdnssec * @brief * * * @{ */ #pragma once #include struct dnskey_keyring { mutex_t mtx; u32_set tag_to_key; }; typedef struct dnskey_keyring dnskey_keyring; #define EMPTY_DNSKEY_KEYRING {MUTEX_INITIALIZER, U32_SET_EMPTY }; ya_result dnskey_keyring_init(dnskey_keyring *ks); ya_result dnskey_keyring_add(dnskey_keyring *ks, dnssec_key* key); dnssec_key *dnskey_keyring_get(dnskey_keyring *ks, u8 algorithm, u16 tag, const u8 *domain); dnssec_key *dnskey_keyring_remove(dnskey_keyring *ks, u8 algorithm, u16 tag, const u8 *domain); void dnskey_keyring_destroy(dnskey_keyring *ks); /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/pool.h0000644000077100007710000000012412650131756022747 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.531344 30 ctime=1454597651.099344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/pool.h0000664000077100007710000000577512650131756022572 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #ifndef POOL_H #define POOL_H #include #include struct pool_s; typedef void *pool_allocate_callback(void *args); typedef void pool_free_callback(void *ptr, void* args); // for destruction struct pool_s { ptr_vector pool; pool_allocate_callback *allocate_method; pool_free_callback *free_method; mutex_t mtx; void *allocate_args; volatile u64 allocated_count; volatile u64 released_count; const char* name; s32 max_size; // do not retain more than this, stored as "max_size - 1" volatile s32 current_count; volatile s32 peak_count; struct pool_s *next; bool hard_limit; bool maxed; }; typedef struct pool_s pool_s; void pool_init(pool_s *pool, pool_allocate_callback *allocate, pool_free_callback *free, void *allocate_args, const char* name); void pool_finalize(pool_s *pool); void pool_log_stats(pool_s *pool); void pool_log_all_stats(); void pool_log_stats_ex(pool_s *pool, logger_handle* handle, u32 level); void pool_log_all_stats_ex(logger_handle* handle, u32 level); void *pool_alloc(pool_s *pool); void pool_release(pool_s *pool, void *p); void pool_set_size(pool_s *pool, s32 max_size); #endif yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/config_settings.h0000644000077100007710000000012412650131756025163 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.547344 30 ctime=1454597650.905344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/config_settings.h0000664000077100007710000007052212650131756024776 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * @{ */ #pragma once #include #include #include #include /* Each section/container descriptor is registered. config section descriptor -------> target base (ie: g_config) | V config table descriptor vtbl -----> callbacks (init, start, stop, finalise, ...) | V table descriptor (BEGIN/END, names, offsets in target base, setters) */ #define CONFIG_ERROR_BASE 0x800C0000 #define CONFIG_ERROR_CODE(code_) ((s32)(CONFIG_ERROR_BASE+(code_))) // Bugs in the program #define CONFIG_SECTION_ALREADY_REGISTERED CONFIG_ERROR_CODE(0xff01) #define CONFIG_ALIAS_CHAIN_TOO_BIG CONFIG_ERROR_CODE(0xff02) // Parsing issues #define CONFIG_PARSE_SECTION_TAG_NOT_CLOSED CONFIG_ERROR_CODE(0x0001) #define CONFIG_PARSE_UNEXPECTED_SECTION_OPEN CONFIG_ERROR_CODE(0x0002) #define CONFIG_PARSE_UNEXPECTED_SECTION_CLOSE CONFIG_ERROR_CODE(0x0003) #define CONFIG_PARSE_CLOSED_WRONG_SECTION CONFIG_ERROR_CODE(0x0004) #define CONFIG_PARSE_SECTION_TAG_TOO_SMALL CONFIG_ERROR_CODE(0x0005) #define CONFIG_PARSE_INCLUDE_EXPECTED_FILE_PATH CONFIG_ERROR_CODE(0x0006) #define CONFIG_PARSE_UNKNOWN_KEYWORD CONFIG_ERROR_CODE(0x0007) #define CONFIG_PARSE_EXPECTED_VALUE CONFIG_ERROR_CODE(0x0008) // Content issues #define CONFIG_UNKNOWN_SETTING CONFIG_ERROR_CODE(0x0011) #define CONFIG_VALUE_OUT_OF_RANGE CONFIG_ERROR_CODE(0x0012) #define CONFIG_FILE_PATH_TOO_BIG CONFIG_ERROR_CODE(0x0013) #define CONFIG_BAD_UID CONFIG_ERROR_CODE(0x0014) #define CONFIG_BAD_GID CONFIG_ERROR_CODE(0x0015) #define CONFIG_TEXT_LENGHT_TOO_BIG CONFIG_ERROR_CODE(0x0016) #define CONFIG_ARRAY_SIZE_TOO_BIG CONFIG_ERROR_CODE(0x0017) // Logger config specific issues #define CONFIG_LOGGER_HANDLE_ALREADY_DEFINED CONFIG_ERROR_CODE(0x1001) #define CONFIG_LOGGER_INVALID_DEBUGLEVEL CONFIG_ERROR_CODE(0x1002) // TSIG key config specific issues #define CONFIG_KEY_INCOMPLETE_KEY CONFIG_ERROR_CODE(0x2001) #define CONFIG_KEY_UNSUPPORTED_ALGORITHM CONFIG_ERROR_CODE(0x2002) /* #define CONFIG_LOGGER_INVALID_DEBUGLEVEL CONFIG_ERROR_CODE(0x0001) */ #define CONFIG_TABLE_SOURCE_NONE 0 #define CONFIG_TABLE_SOURCE_DEFAULT 1 #define CONFIG_TABLE_SOURCE_CONFIGURATION_FILE 2 #define CONFIG_TABLE_SOURCE_COMMAND_LINE 3 #define CONFIG_HOST_LIST_FLAGS_IPV4 0x01 #define CONFIG_HOST_LIST_FLAGS_IPV6 0x02 #define CONFIG_HOST_LIST_FLAGS_FQDN 0x04 #define CONFIG_HOST_LIST_FLAGS_PORT 0x08 #define CONFIG_HOST_LIST_FLAGS_TSIG 0x10 #define CONFIG_HOST_LIST_FLAGS_APPEND 0x20 #define CONFIG_HOST_LIST_FLAGS_DEFAULT (CONFIG_HOST_LIST_FLAGS_IPV4 | CONFIG_HOST_LIST_FLAGS_IPV6 | CONFIG_HOST_LIST_FLAGS_PORT | CONFIG_HOST_LIST_FLAGS_TSIG) #define CONFIG_FLAG_ON "1" #define CONFIG_FLAG_OFF "0" #define CONFIG_SOURCE_NONE 0 #define CONFIG_SOURCE_DEFAULT 1 #define CONFIG_SOURCE_FILE 128 #define CONFIG_SOURCE_CMDLINE 250 #define CONFIG_SOURCE_HIGHEST 255 #define CONFIG_SETTINGS_DEBUG 0 /** * This union covers 64 bits * Meant to be used to store different parameters */ union anytype_u { /* DO NOT ADD THIS : bool _bool; */ intptr _intptr; u8 _u8; u16 _u16; u32 _u32; u8 _8u8[8]; u16 _4u16[4]; u32 _2u32[2]; u64 _u64; s8 _s8; s16 _s16; s32 _s32; s64 _s64; s8 _8s8[8]; s16 _4s16[4]; s32 _2s32[2]; callback_function *void_callback; result_callback_function *result_callback; void* _voidp; char* _charp; }; typedef union anytype_u anytype; typedef ya_result config_set_field_function(const char*, void*, anytype); struct config_section_descriptor_s; /** * name is the name of the key, expected in the config file * field_offset is the offset of the value from the beginning of the target struct * setter is the function able to parse the value of the key and store it at target + offset * default_value_string is the string containing the default value for the key * function_specific is a parameter given to the setter. The meaning is different for each setter. * source is the level that wrote the current value in the table */ struct config_table_descriptor_item_s { const char *name; int field_offset; config_set_field_function *setter; const char *default_value_string; anytype function_specific; u8 source; }; typedef struct config_table_descriptor_item_s config_table_descriptor_item_s; typedef ya_result config_section_set_wild_method(struct config_section_descriptor_s *, const char *key, const char *value); typedef ya_result config_section_print_wild_method(struct config_section_descriptor_s *, output_stream *os, const char *key); typedef ya_result config_section_init_method(struct config_section_descriptor_s *); typedef ya_result config_section_start_method(struct config_section_descriptor_s *); typedef ya_result config_section_stop_method(struct config_section_descriptor_s *); typedef ya_result config_section_postprocess_method(struct config_section_descriptor_s *); typedef ya_result config_section_finalise_method(struct config_section_descriptor_s *); struct config_section_descriptor_vtbl_s { /// section name const char *name; // the table name config_table_descriptor_item_s *table; // the descriptor for the table config_section_set_wild_method *set_wild; // sets an undefined (dynamic) field config_section_print_wild_method *print_wild; // prints an undefined (dynamic) field config_section_init_method *init; // initialises config_section_start_method *start; // called when a section starts config_section_stop_method *stop; // called when a section stops config_section_postprocess_method *postprocess; // called after the section has been processed config_section_finalise_method *finalise; // finishes }; typedef struct config_section_descriptor_vtbl_s config_section_descriptor_vtbl_s; struct config_section_descriptor_s { void *base; // base of the structure to fill up const config_section_descriptor_vtbl_s *vtbl; }; typedef struct config_section_descriptor_s config_section_descriptor_s; /** * Here are the helper macro used to define the fields in the structure * * The definition of the table always be done like this: * * struct my_struct_type * { * u32 field_name_in_my_struct_type; * }; * * typedef struct my_struct_type my_struct_type; * * #define CONFIG_TYPE my_struct_type * CONFIG_BEGIN(my_struct_type_table_desc) * CONFIG_U32(field_name_in_my_struct_type,default_value_in_text_form) * CONFIG_END(my_struct_type_table_desc) * #undef CONFIG_TYPE * * */ #undef CONFIG_TYPE /* please_define_me */ #define CONFIG_BEGIN(name_) static config_table_descriptor_item_s name_[] = { #define CONFIG_BOOL(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_bool, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_FLAG8(fieldname_,defaultvalue_, realfieldname_, mask_) {#fieldname_,offsetof(CONFIG_TYPE, realfieldname_), (config_set_field_function*)config_set_flag8, defaultvalue_,{(u8)mask_}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_FLAG16(fieldname_,defaultvalue_, realfieldname_,mask_) {#fieldname_,offsetof(CONFIG_TYPE, realfieldname_), (config_set_field_function*)config_set_flag16, defaultvalue_,{(u16)mask_}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_FLAG32(fieldname_,defaultvalue_, realfieldname_,mask_) {#fieldname_,offsetof(CONFIG_TYPE, realfieldname_), (config_set_field_function*)config_set_flag32, defaultvalue_,{(u32)mask_}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_FLAG64(fieldname_,defaultvalue_, realfieldname_,mask_) {#fieldname_,offsetof(CONFIG_TYPE, realfieldname_), (config_set_field_function*)config_set_flag64, defaultvalue_,{(u64)mask_}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_U64(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_u64, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_U32(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_u32, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_U32_RANGE(fieldname_,defaultvalue_,min_,max_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_u32_range, defaultvalue_,{._2u32={(min_),(max_)}}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_U32_CLAMP(fieldname_,defaultvalue_,min_,max_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_u32_clamp, defaultvalue_,{._2u32={(min_),(max_)}}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_U16(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_u16, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_DNS_TYPE(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_dnstype, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_DNS_CLASS(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_dnsclass, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_U8(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_u8, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_U8_INC(fieldname_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_inc_u8, 0,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_STRING(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_string, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_STRING_COPY(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_string_copy, defaultvalue_,{._u32=(sizeof(((CONFIG_TYPE*)NULL)->fieldname_))}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_STRING_ARRAY(fieldname_,default_value_,max_size_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_append_string_array_item, default_value_,{._u32=(max_size_)}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_PASSWORD(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_password, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_FQDN(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_fqdn, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_PATH(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_path, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_CHROOT(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_chroot, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_LOGPATH(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_logpath, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_FILE(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_file, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_UID(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_uid_t, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_GID(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_gid_t, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, //#define CONFIG_ACL(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, ac) + offsetof(access_control,fieldname_), (config_set_field_function*)config_set_acl_item, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, //#define CONFIG_ACL_FILTER(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_acl_item, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_LIST_ITEM(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_add_list_item, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_ENUM(fieldname_,defaultvalue_,enumtable_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_enum_value, defaultvalue_, {(intptr)enumtable_}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_ENUM8(fieldname_,defaultvalue_,enumtable_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_enum8_value, defaultvalue_, {(intptr)enumtable_}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_HOST_LIST(fieldname_,defaultvalue_) {#fieldname_, offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_host_list, defaultvalue_,{._8u8={CONFIG_HOST_LIST_FLAGS_DEFAULT,255,0,0,0,0,0,0}}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_HOST_LIST_EX(fieldname_,defaultvalue_,flags_,host_list_max_) {#fieldname_, offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_host_list, defaultvalue_,{._8u8={(flags_),(host_list_max_),0,0,0,0,0,0}}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_BYTES(fieldname_,defaultvalue_,maxsize_) {#fieldname_, offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_bytes, defaultvalue_, {maxsize_}, CONFIG_TABLE_SOURCE_NONE}, //#define CONFIG_DNSSEC(fieldname_,defaultvalue_) {#fieldname_,offsetof(CONFIG_TYPE, fieldname_), (config_set_field_function*)config_set_dnssec, defaultvalue_,{._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, #define CONFIG_ALIAS(fieldname_, aliasedname_) {#fieldname_, 0, NULL, #aliasedname_, {._intptr=0}, CONFIG_TABLE_SOURCE_NONE}, /*#define CONFIG_CATEGORY(fieldname_, category_) {#fieldname_, 0, NULL, NULL, #category},*/ #define CONFIG_END(name_) {NULL,0,NULL,NULL, {._intptr=0}, CONFIG_TABLE_SOURCE_NONE} }; // name_ ya_result config_set_bool(const char *value, bool *dest, anytype notused); ya_result config_set_flag8(const char *value, u8 *dest, anytype mask8); ya_result config_set_flag16(const char *value, u16 *dest, anytype mask16); ya_result config_set_flag32(const char *value, u32 *dest, anytype mask32); ya_result config_set_flag64(const char *value, u64 *dest, anytype mask64); ya_result config_set_u64(const char *value,u64 *dest, anytype notused); ya_result config_set_u32(const char *value,u32 *dest, anytype notused); ya_result config_set_u32_range(const char *value,u32 *dest, anytype min_max); ya_result config_set_u16(const char *value,u16 *dest, anytype notused); ya_result config_set_u8(const char *value,u8 *dest, anytype notused); ya_result config_inc_u8(const char *value_notused,u8 *dest, anytype notused); ya_result config_set_string(const char *value, char **dest, anytype notused); ya_result config_set_string_copy(const char *value, char *dest, anytype maxlen); ya_result config_append_string_array_item(const char *value, ptr_vector *dest, anytype maxsize); ya_result config_set_password(const char *value, char **dest, anytype notused); ya_result config_set_fqdn(const char *value, u8 **dest, anytype notused); ya_result config_set_path(const char *value, char **dest, anytype notused); ya_result config_set_chroot(const char *value, char **dest, anytype notused); ya_result config_set_logpath(const char *value, char **dest, anytype notused); ya_result config_set_file(const char *value, char **dest, anytype notused); ya_result config_set_uid_t(const char *value, uid_t *dest, anytype notused); ya_result config_set_gid_t(const char *value, gid_t *dest, anytype notused); ya_result config_set_dnstype(const char *value, u16 *dest, anytype notused); ya_result config_set_dnsclass(const char *value, u16 *dest, anytype notused); ya_result config_set_enum_value(const char *value, u32 *dest, anytype enum_value_name_table); ya_result config_set_enum8_value(const char *value, u8 *dest, anytype enum_value_name_table); ya_result config_set_host_list(const char *value, host_address **dest, anytype notused); ya_result config_set_bytes(const char *value, void *dest, anytype sizeoftarget); // life of the config processing void config_init_error_codes(); struct config_error_s { u32 line_number; char line[256]; char file[PATH_MAX]; }; typedef struct config_error_s config_error_s; struct config_source_s; typedef ya_result config_source_provider_callback_function(struct config_source_s *source, input_stream *out_source, config_error_s *cfgerr); struct config_source_file_name_s { const char* name; }; struct config_source_buffer_s { const char* text; u32 size; }; /** * An help tool to register many sources at once */ struct config_source_s { config_source_provider_callback_function *get_source; const char *name; const char *__class__; union { struct config_source_file_name_s file_name; struct config_source_buffer_s buffer; } source; u8 level; }; #ifdef TODO struct config_s { u32_set section_descriptor_set = U32_SET_EMPTY; }: #endif ya_result config_init(); /** * Configuration: * * priority : the lowest value, the fastest to be parsed * negative value : choose * * level : ex: 0 for none, 1 for default, 2 for config, 3 for command line * command line has priority on everything else */ /** * Gets the current source level * @return the current source level */ u8 config_get_source(); /** * Sets the current source level * * @param l the current source level */ void config_set_source(u8 l); /** * If the source level has been parsed, automatically fill the default values * for fields that are not set yet. * * @return after what level do we automatically set the default values in the container */ u8 config_get_autodefault_after_source(); /** * If the source level has been parsed, automatically fill the default values * for fields that are not set yet. * * @param l after what level do we automatically set the default values in the container ? */ void config_set_autodefault_after_source(u8 l); // if a configuration is read at this level, the default is automatically applied after /** * Gets the default source level * * @return the default source level */ u8 config_get_default_source(); /** * Sets the default source level (default = 1) * * @param l the default source level */ void config_set_default_source(u8 l); // this level is meant for default (1) #define CONFIG_CALLBACK_RESULT_CONTINUE 0 #define CONFIG_CALLBACK_RESULT_STOP 1 typedef ya_result config_callback_function(const char *section_name, int section_index); /** * Adds a callback called when a section has been read * * @param section_name the name of the section * @param on_section_read the function to call * * * @return continue, stop or an error code to fail */ ya_result config_add_on_section_read_callback(const char *section_name, config_callback_function *on_section_read); /** * Removes a callback called when a section has been read * * @param section_name the name of the section * @param on_section_read the function to call * * @return continue, stop or an error code to fail */ ya_result config_remove_on_section_read_callback(const char *section_name, config_callback_function *on_section_read); /** * Registers a descriptor at the given priority * * @param section_descritor config descriptor * @param priority config priority * * @return an error code */ ya_result config_register(const config_section_descriptor_s *section_descritor, s32 priority); /** * * Reads matching section/containers from a file on disk * * @param configuration_file_path the file path * @param cfgerr error handling structure (can be NULL) * @param section_name the name to match, or if NULL : all sections * * @return an error code */ ya_result config_read_section(const char *configuration_file_path, config_error_s *cfgerr, const char *section_name); /** * Reads all sections/containers from a file * * @param configuration_file_path the file path * @param cfgerr if not NULL, the error reporting structure * * @return an error code */ ya_result config_read(const char *configuration_file_path, config_error_s *cfgerr); /** * Reads all sections/containers from a buffer * * @param buffer the text buffer * @param buffer_len the text buffer length * @param buffer_name the name of the buffer for error reporting * @param cfgerr if not NULL, the error reporting structure * * @return an error code */ ya_result config_read_from_buffer(const char *buffer, u32 buffer_len, const char *buffer_name, config_error_s *cfgerr); /** * Sets a text buffer in a source * * @param source the source struct to initialise * @param name the name of the source * @param level the level of the source * @param buffer text for the source * @param buffer_len text length for the source */ void config_source_set_buffer(struct config_source_s *source, const char *name, u8 level, const char *buffer, u32 buffer_len); /** * Sets a file in a source * * @param source the source struct to initialise * @param name the name of the file * @param level the level of the source */ void config_source_set_file(struct config_source_s *source, const char *name, u8 level); /** * Read all sources from a table * * @param sources a pointer to the first source * @param sources_count the number of sources * @param cfgerr if not NULL, the error reporting structure * * @return an error code */ ya_result config_read_from_sources(struct config_source_s *sources, u32 sources_count, config_error_s *cfgerr); /** * Applies default values to uninitialised fields. * @param cfgerr * * @param cfgerr if not NULL, the error reporting structure * * @return an error code */ ya_result config_set_default(config_error_s *cfgerr); /** * Gets the section descriptor for the section/container name * * @param name the name of the section descriptor * * @return a pointer to the section descriptor or NULL if not found */ config_section_descriptor_s *config_section_get_descriptor(const char *name); /** * Sets the table default values * * @param section_descriptor the descriptor to use (points to the table) * @param cfgerr if not NULL, the error reporting structure * * @return an error code */ ya_result config_set_section_default(config_section_descriptor_s *section_descriptor, config_error_s *cfgerr); /** * Sets the key to a value * Source level is taken into account. * ie: config_value_set(&yadifa_config_main_desc, "daemon", "on"); * * @param section_descriptor the descriptor pointing to the table * @param key the key to set * @param value to value to set it to * * @return an error code */ ya_result config_value_set(config_section_descriptor_s *section_descriptor, const char *key, const char *value); /** * * Sets the key of the section/container to its default value * * @param section_name name of the section * @param name key of the value * @param cfgerr if not NULL, the error reporting structure * * @return an error code */ ya_result config_value_set_to_default(const char *section_name, const char *name, config_error_s *cfgerr); typedef bool config_section_struct_type_handler(output_stream *os, const char *name, void *ptr); bool config_section_struct_register_type_handler(config_set_field_function* setter, config_section_struct_type_handler *handler); /** * * Prints the content of every supported types of the table using the descriptor * * @param section_descriptor the descriptor * @param os where to print to */ void config_section_print(const config_section_descriptor_s *section_descriptor, output_stream *os); /** * * Prints the content of every supported types of the table using the given descriptor on the given struct * * @param section_descriptor the descriptor * @param a pointer to the config struct base * @param os where to print to */ void config_section_struct_print(const config_section_descriptor_s *section_descriptor, const void* configbase, output_stream *os); /** * * Gets the index of the key on the table * * @param table a config table * @param name the field key name * * @return an error code */ ya_result config_item_index_get(const config_table_descriptor_item_s *table, const char *name); /** * Prints the config to the output stream * * @param os the output stream */ void config_print(output_stream *os); /** * Call the postproces callback on the registered tables */ ya_result config_postprocess(); /** * Call the finalise callback on the registered tables * */ ya_result config_finalise(); // helpers typedef void *config_section_struct_collection_get_next_method(void *previous_data_struct); /** * * Registers a struct with its descriptor and name, for configuration. * * @param name name of the struct * @param table table describing the struct * @param data_struct pointer to the struct * @param priority priority level (order of read) * * @return an error code */ ya_result config_register_struct(const char *name, config_table_descriptor_item_s *table, void *data_struct, s32 priority); /** * * Registers the logger configuration. * * @note logger_handle_create("handle-name",logger_handle_for_handle_name_ptr_ptr) MUST be called * before the config_read is done * * @param null_or_channels_name * @param null_or_loggers_name * @param priority * * @return an error code */ ya_result config_register_logger(const char *null_or_channels_name, const char *null_or_loggers_name, s32 priority); /** * Returns TRUE iff any logging section has been found. * * @return TRUE iff any logging section has been found. */ bool config_logger_isconfigured(); /** * Clears the logger-configured flag */ void config_logger_clearconfigured(); /** * Sets the base path for the logger * * @param null_or_key_name * @param priority * @return */ void config_set_log_base_path(const char *path); /** * Registers the key configuration (TSIG) * * @param null_or_key_name * @param priority * @return */ ya_result config_register_key(const char *null_or_key_name, s32 priority); /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/digest.h0000644000077100007710000000012412650131756023255 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.508344 30 ctime=1454597650.924344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/digest.h0000664000077100007710000000643412650131756023071 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnskey DNSSEC keys functions * @ingroup dnsdbdnssec * @brief * * * @{ */ #ifndef _DIGEST_H #define _DIGEST_H #include #include #include #define DIGEST_BUFFER_SIZE 64 struct digest_s; typedef s32 digest_update_method(struct digest_s*,const void*, u32); typedef s32 digest_final_method(struct digest_s*, void*, u32); typedef s32 digest_get_size_method(struct digest_s*); struct digest_vtbl { digest_update_method* update; digest_final_method* final; digest_get_size_method* get_size; const char * __class__; }; struct digest_s { const struct digest_vtbl *vtbl; union { SHA_CTX sha0; SHA_CTX sha1; SHA256_CTX sha256; SHA512_CTX sha384; SHA512_CTX sha512; } ctx; }; typedef struct digest_s digest_s; #define digest_class(is_) ((is_)->vtbl) #define digest_class_name(is_) ((is_)->vtbl->__class__) #define digest_update(ctx_,buffer_,len_) (ctx_)->vtbl->update(ctx_,buffer_,len_) #define digest_final(ctx_,buffer_,len_) (ctx_)->vtbl->final(ctx_,buffer_,len_) #define digest_get_size(ctx_) (ctx_)->vtbl->get_size(ctx_) #ifndef OPENSSL_NO_SHA1 void digest_sha1_init(digest_s *ctx); #endif #ifndef OPENSSL_NO_SHA256 void digest_sha256_init(digest_s *ctx); #endif #ifndef OPENSSL_NO_SHA512 void digest_sha384_init(digest_s *ctx); void digest_sha512_init(digest_s *ctx); #endif #ifndef OPENSSL_NO_SHA0 void digest_sha0_init(digest_s *ctx); #endif #endif // _DIGEST_H yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dnskey_dsa.h0000644000077100007710000000012412650131756024122 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.546344 30 ctime=1454597650.950344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dnskey_dsa.h0000664000077100007710000000575612650131756023744 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnskey DNSSEC keys functions * @ingroup dnsdbdnssec * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef _DNSSEC_DSA_H #define _DNSSEC_DSA_H /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include #include #include #ifdef __cplusplus extern "C" { #endif ya_result dsa_storeprivate(FILE* private, dnssec_key* key); ya_result dsa_loadpublic(const u8 *rdata, u16 rdata_size, const char *origin, dnssec_key** out_key); ya_result dsa_loadprivate(FILE* private, u8 algorithm,u16 flags,const char* origin, dnssec_key** out_key); ya_result dsa_initinstance(DSA* dsa, u8 algorithm,u16 flags,const char* origin, dnssec_key** out_key); ya_result dsa_newinstance(u32 size, u8 algorithm,u16 flags,const char* origin, dnssec_key** out_key); ya_result dsa_private_parse_field(dnssec_key *key, parser_s *p); #ifdef __cplusplus } #endif #endif /* _DNSSEC_RSA_H */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/input_stream.h0000644000077100007710000000012412650131756024510 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.568344 30 ctime=1454597651.006344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/input_stream.h0000664000077100007710000001207712650131756024324 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _INPUT_STREAM_H #define _INPUT_STREAM_H #include #ifdef __cplusplus extern "C" { #endif typedef struct input_stream input_stream; typedef ya_result input_stream_read_method(input_stream *stream,u8 *in_buffer,u32 in_len); typedef void input_stream_close_method(input_stream *stream); typedef ya_result input_stream_skip_method(input_stream *stream,u32 byte_count); typedef struct input_stream_vtbl input_stream_vtbl; struct input_stream_vtbl { input_stream_read_method* read; input_stream_skip_method* skip; input_stream_close_method* close; const char* __class__; /* MUST BE A UNIQUE POINTER, ie: One defined in the class's .c file */ /* The name should be unique in order to avoid compiler tricks */ /* Add your inheritable methods here */ }; struct input_stream { void* data; const input_stream_vtbl* vtbl; }; #define input_stream_class(is_) ((is_)->vtbl) #define input_stream_class_name(is_) ((is_)->vtbl->__class__) #define input_stream_read(is_,buffer_,len_) (is_)->vtbl->read(is_,buffer_,len_) #define input_stream_close(is_) (is_)->vtbl->close(is_) #define input_stream_skip(is_,len_) (is_)->vtbl->skip(is_,len_) #define input_stream_valid(is_) ((is_)->vtbl != NULL) ya_result input_stream_read_fully(input_stream *stream, void *buffer, u32 len); ya_result input_stream_skip_fully(input_stream *stream, u32 len_start); ya_result input_stream_read_nu32(input_stream *stream,u32 *output); ya_result input_stream_read_nu16(input_stream *stream,u16 *output); ya_result input_stream_read_u32(input_stream *stream,u32 *output); ya_result input_stream_read_u16(input_stream *stream,u16 *output); ya_result input_stream_read_u8(input_stream *stream,u8 *output); ya_result input_stream_read_dnsname(input_stream *stream,u8 *output); ya_result input_stream_read_rname(input_stream *stream, u8 *output_buffer); ya_result input_stream_read_line(input_stream *stream, char *output, int max_len); static inline ya_result input_stream_read_rr_header(input_stream *is, u8 *rname, u32 rname_size, u16 *rtype, u16 *rclass, u32 *rttl, u16 *rdata_size) { ya_result ret; if(FAIL(ret = input_stream_read_dnsname(is, rname/*, rname_size*/))) { return ret; } if(FAIL(ret = input_stream_read_fully(is, rtype, 2))) /** @note NATIVETYPE */ { return ret; } if(FAIL(ret = input_stream_read_fully(is, rclass, 2))) /** @note NATIVECLASS */ { return ret; } if(FAIL(ret = input_stream_read_nu32(is, rttl))) { return ret; } return input_stream_read_nu16(is, rdata_size); } /** * This tools allows a safer misuse (and detection) of closed streams * It sets the stream to a sink that warns abouts its usage and for which every call that can fail fails. * * @param is the stream to set as a void. It needs to have been closed already. */ void input_stream_set_void(input_stream *is); #ifdef __cplusplus } #endif #endif /* _INPUT_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/nsid.h0000644000077100007710000000012412650131756022733 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.523344 30 ctime=1454597651.222344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/nsid.h0000664000077100007710000000450412650131756022543 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #pragma once #include #define EDNS0_NSID_SIZE_MAX 512 #ifndef DNSCORE_NSID_C extern u32 edns0_record_size; extern u8 *edns0_rdatasize_nsid_option_wire; extern u32 edns0_rdatasize_nsid_option_wire_size; #endif void edns0_set_nsid(u8 *bytes, u16 size); /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/avl.h.inc0000644000077100007710000000012412650131756023330 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.484344 30 ctime=1454597650.842344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/avl.h.inc0000664000077100007710000001626212650131756023144 0ustar00yadifayadifa00000000000000/* * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * * File: avl.h.inc * Author: ericdf * * Created on June 5, 2009, 12:07 PM */ #ifndef _AVL_H_INC #define _AVL_H_INC #include #include #ifdef __cplusplus extern "C" { #endif #ifndef AVL_PREFIX #error Expected define: AVL_PREFIX name #endif #ifndef AVL_NODE_TYPE #error Expected define: AVL_NODE_TYPE type #endif #ifndef AVL_TREE_TYPE #error Expected define: AVL_TREE_TYPE type #endif #ifndef AVL_CONST_TREE_TYPE #error Expected define: AVL_CONST_TREE_TYPE type #endif /* * Self explanatory but not mandatory, defaulted to TRUE */ // #define AVL_REFERENCE_IS_POINTER TRUE #ifndef AVL_REFERENCE_TYPE #error Expected define: AVL_REFERENCE_TYPE type #endif #ifndef AVL_HAS_PARENT_POINTER #error Expected define: AVL_HAS_PARENT_POINTER boolean. #endif #ifndef AVL_TREE_ROOT #error Expected define: AVL_TREE_ROOT(__tree__). // #define AVL_TREE_ROOT(x) (*x) #endif #ifndef AVL_REFERENCE_IS_CONST #error Expected define: AVL_REFERENCE_IS_CONST #endif #ifndef AVL_REFERENCE_IS_POINTER #error Expected define: AVL_REFERENCE_IS_POINTER #endif #if AVL_REFERENCE_IS_CONST #undef AVL_REFERENCE_MODIFIER #undef AVL_REFERENCE_CONST #define AVL_REFERENCE_MODIFIER #define AVL_REFERENCE_CONST #else // there is no "const" in AVL_REFERENCE_TYPE #define AVL_REFERENCE_CONST const #endif /* * Macros to set the prefix to the function name * And no : AFAIK there are no other way to do this using only one parameter in * the first call ... (ie: less than 3 lines) */ #define __AVL_PREFIXED(name_a,name_b) name_a ## name_b /* Concat */ #define _AVL_PREFIXED(name_a,name_b) __AVL_PREFIXED(name_a,name_b) /* Do the expansion */ #define AVL_PREFIXED(name) _AVL_PREFIXED( AVL_PREFIX , name) /* Call with macro */ typedef struct AVL_PREFIXED(avl_iterator) AVL_PREFIXED(avl_iterator); struct AVL_PREFIXED(avl_iterator) { s32 stack_pointer; AVL_NODE_TYPE* stack[AVL_MAX_DEPTH]; /* An AVL depth of 64 is HUGE */ }; /** @brief Initializes the tree * * Initializes the tree. * Basically : *tree=NULL; * * @param[in] tree the tree to initialize * */ void AVL_PREFIXED(avl_init)(AVL_TREE_TYPE* tree); /** @brief Find a node in the tree * * Find a node in the tree matching a hash value. * * @param[in] tree the tree to search in * @param[in] obj_hash the hash to find * * @return A pointer to the node or NULL if there is no such node. */ AVL_NODE_TYPE* AVL_PREFIXED(avl_find)(AVL_CONST_TREE_TYPE* tree, AVL_REFERENCE_CONST AVL_REFERENCE_TYPE obj_hash); /** @brief Insert a node into the tree. * * Insert data into the tree. * Since hash can have collisions, the data will most likely be a collection * (another tree, a list, ...) * * NOTE: * If the node associated to the hazdb_icmtl_replaysh already exists, it is returned unaltered, * the caller will be responsible to manipulate the node's data. * Else a new node is created, pointing to the data. * * @param[in] tree the tree where the insertion should be made * @param[in] obj_hash the hash associated to the data * * @return The node associated to the hash */ AVL_NODE_TYPE* AVL_PREFIXED(avl_insert)(AVL_TREE_TYPE *tree,AVL_REFERENCE_TYPE obj_hash); /** @brief Deletes a node from the tree. * * Deletes a node from the tree. * * @param[in] tree the tree from which the delete will be made * @param[in] obj_hash the hash associated to the node to remove * * @return The node associated to the hash, NULL if it did not exist. */ void AVL_PREFIXED(avl_delete)(AVL_TREE_TYPE *tree,AVL_REFERENCE_CONST AVL_REFERENCE_TYPE obj_hash); /** @brief Releases all the nodes of a tree * * Releases all the nodes of a tree. Data is not destroyed. * Only the right and left childs are used. Everything else * is of no importance. (Useful for destroying data & keys, * then only calling this to free the container structure) * * @param[in] tree the tree to empty */ void AVL_PREFIXED(avl_destroy)(AVL_TREE_TYPE *tree); static inline bool AVL_PREFIXED(avl_isempty)(AVL_CONST_TREE_TYPE *tree) { return AVL_TREE_ROOT(tree) == NULL; } /** * * @brief Returns the last node of the tree * */ AVL_NODE_TYPE* AVL_PREFIXED(avl_node_last)(AVL_NODE_TYPE *node); void AVL_PREFIXED(avl_iterator_init)(AVL_CONST_TREE_TYPE* tree,AVL_PREFIXED(avl_iterator*) iter); bool AVL_PREFIXED(avl_iterator_hasnext)(AVL_PREFIXED(avl_iterator*) iter); AVL_NODE_TYPE* AVL_PREFIXED(avl_iterator_next_node)(AVL_PREFIXED(avl_iterator*) iter); /** @brief Releases all the nodes of a tree * * Releases all the nodes of a tree. * Calls a function passed in parameter before destroying the data. * It's the responsibility of the callback to process (destroy) the data * in the tree. * * @param[in] tree the tree to empty */ void AVL_PREFIXED(avl_callback_and_destroy)(AVL_TREE_TYPE *tree,callback_function callback); AVL_NODE_TYPE *AVL_PREFIXED(avl_get_first)(AVL_CONST_TREE_TYPE* tree); #if AVL_HAS_PARENT_POINTER != 0 AVL_NODE_TYPE* AVL_PREFIXED(avl_node_next)(const AVL_NODE_TYPE* node); AVL_NODE_TYPE* AVL_PREFIXED(avl_node_prev)(const AVL_NODE_TYPE* node); AVL_NODE_TYPE* AVL_PREFIXED(avl_node_mod_next)(const AVL_NODE_TYPE* node); AVL_NODE_TYPE* AVL_PREFIXED(avl_node_mod_prev)(const AVL_NODE_TYPE* node); #endif int AVL_PREFIXED(avl_check)(AVL_TREE_TYPE *tree); void AVL_PREFIXED(avl_dump)(AVL_TREE_TYPE *tree); #undef AVL_REFERENCE_CONST #ifdef __cplusplus } #endif #else #error AVL.H.INC SHOULD NOT BE INCLUDED TWICE #endif /* _AVL_H_INC */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/identity.h0000644000077100007710000000012412650131756023627 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.483344 30 ctime=1454597651.002344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/identity.h0000664000077100007710000000425212650131756023437 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #pragma once ya_result identity_change(uid_t new_uid, gid_t new_gid); /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/service.h0000644000077100007710000000012412650131756023436 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.560344 30 ctime=1454597651.132344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/service.h0000664000077100007710000001160012650131756023241 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #ifndef SERVICE_H #define SERVICE_H #include #include #include #ifdef __cplusplus extern "C" { #endif #define SERVICE_OFF 0 #define SERVICE_START 1 #define SERVICE_SERVICING 2 #define SERVICE_STOP 4 #define SERVICE_STOPPING 8 // this macro checks the function succeeded, // elses sends a general shutdown and returns // meant to be used in a service for the *_init() calls #define SHUTDOWN_RETURN_ON_FAIL(function__)\ { int err; if(FAIL((err = function__()))) { \ log_err( #function__ ": failed with %r", err); \ dnscore_shutdown(); \ return err; \ } } #define SHUTDOWN_RETURN_ON_FAIL_WITH_ARGS(function__,...)\ { int err; if(FAIL((err = function__(__VA_ARGS__)))) { \ log_err( #function__ "(" #__VA_ARGS__ "): failed with %r", err); \ dnscore_shutdown(); \ return err; \ } } struct service_s; struct service_worker_s; typedef int service_main(struct service_worker_s *); #define UNINITIALIZED_SERVICE {NULL, NULL, NULL, 0, 0} struct service_worker_s { struct service_s *service; mutex_t lock; pthread_t tid; u32 worker_index; volatile u32 last_seen_alive; volatile int return_code; volatile u8 flags; }; struct service_s { service_main *entry_point; char* name; struct service_worker_s *worker; u32 worker_count; volatile u32 last_seen_alive; }; int service_init(struct service_s *desc, service_main *entry_point, const char* name); int service_init_ex(struct service_s *desc, service_main *entry_point, const char* name, u32 count); int service_finalize(struct service_s *desc); int service_start(struct service_s *desc); int service_stop(struct service_s *desc); int service_wait(struct service_s *desc); /** * Only to be called by the service itself when it is working. */ int service_set_servicing(struct service_worker_s *worker); /** * Only to be called by the service itself when it noticed it has to shut down. */ int service_set_stopping(struct service_worker_s *worker); int service_shouldrun(struct service_worker_s *worker); bool service_servicing(struct service_s *desc); bool service_stopped(struct service_s *desc); ya_result service_wait_servicing(struct service_s *desc); static inline bool service_started(struct service_s *desc) { return !service_stopped(desc); } /** * check that all services/workers are alive * logs warnings when blocked-looking workers/services are found */ int service_check_all_alive(); struct service_worker_s *service_worker_get_sibling(const struct service_worker_s *worker, u32 idx); struct service_worker_s *service_get_worker(const struct service_s *service, u32 idx); void service_signal_worker(const struct service_s *service, u32 idx, int signo); void service_signal_all_workers(const struct service_s *service, int signo); void service_stop_all(); void service_start_all(); #ifdef __cplusplus } #endif #endif /* SERVICE_H */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/file_output_stream.h0000644000077100007710000000012412650131756025710 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.535344 30 ctime=1454597650.983344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/file_output_stream.h0000664000077100007710000000624612650131756025525 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _FILE_OUTPUT_STREAM_H #define _FILE_OUTPUT_STREAM_H #include #ifdef __cplusplus extern "C" { #endif ya_result file_output_stream_open(const char *filename, output_stream *os); /** * man 2 open */ ya_result file_output_stream_open_ex(const char *filename,int flags, mode_t mode, output_stream *os); /* * This version of open_create_ex does NOT log anything, which is very important sometimes in the logger thread */ ya_result file_output_stream_open_ex_nolog(const char *filename,int flags, mode_t mode, output_stream *os); void file_output_stream_close_nolog(output_stream* os); ya_result file_output_stream_create(const char *filename,mode_t mode, output_stream *stream); ya_result fd_output_stream_attach(output_stream *os, int fd); void fd_output_stream_detach(output_stream *os); ya_result fd_output_stream_get_filedescriptor(output_stream *os); s64 fd_output_stream_get_size(output_stream *os); bool is_fd_output_stream(output_stream *os); void file_output_steam_advise_sequential(output_stream* os); #ifdef __cplusplus } #endif #endif /* _FILE_OUTPUT_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/pace.h0000644000077100007710000000012412650131756022706 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.566344 30 ctime=1454597651.073344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/pace.h0000664000077100007710000000452012650131756022514 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #ifndef PACE_H #define PACE_H #include struct pace_s { u64 min_us; u64 max_us; u64 current_us; u64 counter; u64 wait_start; u64 wait_end; const char *name; }; typedef struct pace_s pace_s; /** * initialises the pace * * @param pace */ void pace_init(pace_s *pace, u64 min_us, u64 max_us, const char* name); /** * Will pause for a while */ void pace_wait(pace_s *pace); /** * Will update the pace taking the fact that now we have work to do */ void pace_work(pace_s *pace); #endif yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/rc.h0000644000077100007710000000012412650131756022402 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.526344 30 ctime=1454597651.117344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/rc.h0000664000077100007710000000742612650131756022220 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #pragma once /** * * The RC struct helps having a structure referenced by multiple concurrent threads * released when nobody uses it anymore. * */ #include #ifdef __cplusplus extern "C" { #endif typedef void rc_free_method(void*); struct rc_vtbl { rc_free_method *free_callback; mutex_t *mtx; }; typedef struct rc_vtbl rc_vtbl; /** * Initialises an RC vtbl. * The callback is called to free the struct when its last reference is released. * The mutex is meant to be shared trough a struct type. * * @param spvtbl * @param free_callback * @param mtx */ void rc_init_vtbl(rc_vtbl *spvtbl, rc_free_method *free_callback, mutex_t *mtx); void rc_finalise_vtbl(rc_vtbl *spvtbl); struct rc_s { rc_vtbl *vtbl; s32 count; }; typedef struct rc_s rc_s; /** * struct whatever * { * RC_COUNTER; * int brol; * }; * * alloc: * struct whatever *w = malloc & create & cie; * rc_acquire(w); * return w; * * get: * rc_acquire(w); * return w; * * * rc_release(w); * w = NULL; * */ #define RC_COUNTER struct rc_s __reference_counter void rc_set_internal(rc_s *rc, rc_vtbl *vtbl); void rc_aquire_internal(rc_s *rc); void rc_release_internal(rc_s *rc, void *data); #define rc_set(__structptr__, spvtbl) \ rc_set_internal((__structptr__), &((__structptr__)->__reference_counter)); /** * The typical place of an rc_acquire is before returning the variable. */ #define rc_aquire(__structptr__, spvtbl) \ rc_aquire_internal(&((__struct_ptr__)->__reference_counter)) /** * An rc_release SHOULD be followed by the variable being set to NULL. */ #define rc_release(__struct_ptr__) \ rc_release_internal(&((__struct_ptr__)->__reference_counter), (__struct_ptr__)) #ifdef __cplusplus } #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/threaded_queue.h0000644000077100007710000000012412650131756024762 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.609344 30 ctime=1454597651.166344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/threaded_queue.h0000664000077100007710000002600312650131756024570 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _THREADED_QUEUE_H #define _THREADED_QUEUE_H /* * Four implementations of the threaded queue can be used ... */ #define THREADED_QUEUE_RINGLIST 1 #define THREADED_QUEUE_RINGBUFFER 2 #define THREADED_QUEUE_RINGBUFFER_CW 3 #define THREADED_QUEUE_NBRB 4 #define THREADED_QUEUE_DLL_CW 5 /* typedef void threaded_queue_init_method(threaded_queue *queue, int max_size); typedef void threaded_queue_finalize_method(threaded_queue *queue); typedef void threaded_queue_enqueue_method(threaded_queue *queue,void* constant_pointer); typedef bool threaded_queue_try_enqueue_method(threaded_queue *queue,void* constant_pointer); typedef void* threaded_queue_peek_method(threaded_queue *queue); typedef void* threaded_queue_try_peek_method(threaded_queue *queue); typedef void* threaded_queue_dequeue_method(threaded_queue *queue); typedef void* threaded_queue_try_dequeue_method(threaded_queue *queue); typedef u32 threaded_queue_dequeue_set_method(threaded_queue *queue, void** array, u32 array_size); typedef void threaded_queue_wait_empty_method(threaded_queue *queue); typedef int threaded_queue_size_method(threaded_queue *queue); struct threaded_queue_vtbl { threaded_queue_enqueue_method *enqueue; threaded_queue_dequeue_method *dequeue; threaded_queue_peek_method *peek; threaded_queue_try_enqueue_method *try_enqueue; threaded_queue_try_dequeue_method *try_dequeue; threaded_queue_try_peek_method *try_peek; threaded_queue_dequeue_set_method *dequeue_set; threaded_queue_wait_empty_method *wait_empty; threaded_queue_size_method *size; threaded_queue_finalize_method *finalize; }; struct threaded_queue_wrapper { struct threaded_queue_vtbl *vtbl; void *data; }; */ #ifndef THREADED_QUEUE_MODE #define THREADED_QUEUE_MODE THREADED_QUEUE_RINGBUFFER_CW #else // THREADED_QUEUE_MODE should be set globally #endif #if THREADED_QUEUE_MODE == THREADED_QUEUE_RINGLIST #define THREADED_QUEUE ringlist #include typedef struct threaded_ringlist threaded_queue; #define THREADED_QUEUE_NULL THREADED_RINGLIST_NULL #define threaded_queue_init(queue_,max_size_) threaded_ringlist_init((queue_),(max_size_)) #define threaded_queue_finalize(queue_) threaded_ringlist_finalize((queue_)) #define threaded_queue_enqueue(queue_,constant_pointer_) threaded_ringlist_enqueue((queue_),(constant_pointer_)) #define threaded_queue_try_enqueue(queue_,constant_pointer_) threaded_ringlist_try_enqueue((queue_),(constant_pointer_)) #define threaded_queue_dequeue(queue_) threaded_ringlist_dequeue((queue_)) #define threaded_queue_try_dequeue(queue_) threaded_ringlist_try_dequeue((queue_)) #define threaded_queue_dequeue_set(queue_, array_, size_) threaded_ringlist_dequeue_set((queue_),(array_),(size_)) #define threaded_queue_wait_empty(queue_) threaded_ringlist_wait_empty((queue_)) #define threaded_queue_size(queue_) threaded_ringlist_size((queue_)) /* * The queue will block (write) if bigger than this. * Note that if the key is already bigger it will blocked (write) until * the content is emptied by the readers. */ #define threaded_queue_set_maxsize(queue_, max_size_) threaded_ringlist_set_maxsize((queue_), (max_size_)) #elif THREADED_QUEUE_MODE == THREADED_QUEUE_RINGBUFFER #define THREADED_QUEUE ringbuffer #include typedef struct threaded_ringbuffer threaded_queue; #define THREADED_QUEUE_NULL THREADED_RINGBUFFER_NULL #define threaded_queue_init(queue_,max_size_) threaded_ringbuffer_init((queue_),(max_size_)) #define threaded_queue_finalize(queue_) threaded_ringbuffer_finalize((queue_)) #define threaded_queue_enqueue(queue_,constant_pointer_) threaded_ringbuffer_enqueue((queue_),(constant_pointer_)) #define threaded_queue_try_enqueue(queue_,constant_pointer_) threaded_ringbuffer_try_enqueue((queue_),(constant_pointer_)) #define threaded_queue_dequeue(queue_) threaded_ringbuffer_dequeue((queue_)) #define threaded_queue_try_dequeue(queue_) threaded_ringbuffer_try_dequeue((queue_)) #define threaded_queue_dequeue_set(queue_, array_, size_) threaded_ringbuffer_dequeue_set((queue_),(array_),(size_)) #define threaded_queue_wait_empty(queue_) threaded_ringbuffer_wait_empty((queue_)) #define threaded_queue_size(queue_) threaded_ringbuffer_size((queue_)) /* * The queue will block (write) if bigger than this. * Note that if the key is already bigger it will blocked (write) until * the content is emptied by the readers. */ #define threaded_queue_set_maxsize(queue_, max_size_) threaded_ringbuffer_set_maxsize((queue_), (max_size_)) #elif THREADED_QUEUE_MODE == THREADED_QUEUE_RINGBUFFER_CW #define THREADED_QUEUE ringbuffer_cw #include typedef struct threaded_ringbuffer_cw threaded_queue; #define THREADED_QUEUE_NULL THREADED_RINGBUFFER_CW_NULL #define threaded_queue_init(queue_,max_size_) threaded_ringbuffer_cw_init((queue_),(max_size_)) #define threaded_queue_finalize(queue_) threaded_ringbuffer_cw_finalize((queue_)) #define threaded_queue_enqueue(queue_,constant_pointer_) threaded_ringbuffer_cw_enqueue((queue_),(constant_pointer_)) #define threaded_queue_try_enqueue(queue_,constant_pointer_) threaded_ringbuffer_cw_try_enqueue((queue_),(constant_pointer_)) #define threaded_queue_peek(queue_) threaded_ringbuffer_cw_peek((queue_)) #define threaded_queue_try_peek(queue_) threaded_ringbuffer_cw_try_peek((queue_)) #define threaded_queue_dequeue(queue_) threaded_ringbuffer_cw_dequeue((queue_)) #define threaded_queue_try_dequeue(queue_) threaded_ringbuffer_cw_try_dequeue((queue_)) #define threaded_queue_dequeue_set(queue_, array_, size_) threaded_ringbuffer_cw_dequeue_set((queue_),(array_),(size_)) #define threaded_queue_wait_empty(queue_) threaded_ringbuffer_cw_wait_empty((queue_)) #define threaded_queue_size(queue_) threaded_ringbuffer_cw_size((queue_)) /* * The queue will block (write) if bigger than this. * Note that if the key is already bigger it will blocked (write) until * the content is emptied by the readers. */ #define threaded_queue_set_maxsize(queue_, max_size_) threaded_ringbuffer_cw_set_maxsize((queue_), (max_size_)) #elif THREADED_QUEUE_MODE == THREADED_QUEUE_NBRB #define THREADED_QUEUE nbrb #include typedef struct threaded_nbrb threaded_queue; #define THREADED_QUEUE_NULL THREADED_NBRB_NULL #define threaded_queue_init(queue_,max_size_) threaded_nbrb_init((queue_),(max_size_)) #define threaded_queue_finalize(queue_) threaded_nbrb_finalize((queue_)) #define threaded_queue_enqueue(queue_,constant_pointer_) threaded_nbrb_enqueue((queue_),(constant_pointer_)) #define threaded_queue_try_enqueue(queue_,constant_pointer_) threaded_nbrb_try_enqueue((queue_),(constant_pointer_)) #define threaded_queue_peek(queue_) threaded_nbrb_peek((queue_)) #define threaded_queue_try_peek(queue_) threaded_nbrb_try_peek((queue_)) #define threaded_queue_dequeue(queue_) threaded_nbrb_dequeue((queue_)) #define threaded_queue_try_dequeue(queue_) threaded_nbrb_try_dequeue((queue_)) #define threaded_queue_dequeue_set(queue_, array_, size_) threaded_nbrb_dequeue_set((queue_),(array_),(size_)) #define threaded_queue_wait_empty(queue_) threaded_nbrb_wait_empty((queue_)) #define threaded_queue_size(queue_) threaded_nbrb_size((queue_)) /* * The queue will block (write) if bigger than this. * Note that if the key is already bigger it will blocked (write) until * the content is emptied by the readers. */ #define threaded_queue_set_maxsize(queue_, max_size_) threaded_nbrb_set_maxsize((queue_), (max_size_)) #elif THREADED_QUEUE_MODE == THREADED_QUEUE_DLL_CW #define THREADED_QUEUE dll_cw #include typedef struct threaded_dll_cw threaded_queue; #define THREADED_QUEUE_NULL THREADED_SLL_CW_NULL #define threaded_queue_init(queue_,max_size_) threaded_dll_cw_init((queue_),(max_size_)) #define threaded_queue_finalize(queue_) threaded_dll_cw_finalize((queue_)) #define threaded_queue_enqueue(queue_,constant_pointer_) threaded_dll_cw_enqueue((queue_),(constant_pointer_)) #define threaded_queue_try_enqueue(queue_,constant_pointer_) threaded_dll_cw_try_enqueue((queue_),(constant_pointer_)) #define threaded_queue_peek(queue_) threaded_dll_cw_peek((queue_)) #define threaded_queue_try_peek(queue_) threaded_dll_cw_try_peek((queue_)) #define threaded_queue_dequeue(queue_) threaded_dll_cw_dequeue((queue_)) #define threaded_queue_try_dequeue(queue_) threaded_dll_cw_try_dequeue((queue_)) #define threaded_queue_dequeue_set(queue_, array_, size_) threaded_dll_cw_dequeue_set((queue_),(array_),(size_)) #define threaded_queue_wait_empty(queue_) threaded_dll_cw_wait_empty((queue_)) #define threaded_queue_size(queue_) threaded_dll_cw_size((queue_)) /* * The queue will block (write) if bigger than this. * Note that if the key is already bigger it will blocked (write) until * the content is emptied by the readers. */ #define threaded_queue_set_maxsize(queue_, max_size_) threaded_dll_cw_set_maxsize((queue_), (max_size_)) #else #error THREADED_QUEUE_MODE has not been set to a supported value #endif #endif /* _THREADED_QUEUE_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/string_set.h0000644000077100007710000000012412650131756024157 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.539344 30 ctime=1454597651.136344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/string_set.h0000664000077100007710000001164612650131756023774 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief * * A collection of strings based on the AVL * * @{ * *----------------------------------------------------------------------------*/ #ifndef _STRING_SET_H #define _STRING_SET_H #ifdef __cplusplus extern "C" { #endif /* * A digest is stored prefixed with its length ([1;255]) */ /* * A structure to hold both children with direct access */ typedef struct string_node string_node; struct string_children { struct string_node* left; struct string_node* right; }; /* * An union to have access to the children with direct or indexed access */ typedef union string_children_union string_children_union; union string_children_union { struct string_children lr; struct string_node * child[2]; }; /* * The node structure CANNOT have a varying size on a given collection * This means that the digest size is a constant in the whole tree */ struct string_node { union string_children_union children; /* 2 ptrs */ const char* key; /* 1 ptr */ u16 value; /* 2 b */ s8 balance; /* 1 b */ }; /* 27 OR 15 bytes (64/32) */ /* * AVL definition part begins here */ /* * The maximum depth of a tree. * 40 is enough for storing 433494436 items (worst case) * * Depth 0 is one node. * * Worst case : N is enough for sum[n = 0,N](Fn) where F is Fibonacci * Best case : N is enough for (2^(N+1))-1 */ #define AVL_MAX_DEPTH 20 /* 64 */ /* * The previx that will be put in front of each function name */ #define AVL_PREFIX string_set_ typedef string_node* string_set; /* * The type that hold the node */ #define AVL_NODE_TYPE string_node /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_TREE_TYPE AVL_NODE_TYPE* /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_CONST_TREE_TYPE AVL_NODE_TYPE * const /* * How to find the root in the tree */ #define AVL_TREE_ROOT(__tree__) (*(__tree__)) /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE const char* #define AVL_REFERENCE_IS_CONST TRUE #define AVL_REFERENCE_IS_POINTER TRUE /* * The node has got a pointer to its parent * * 0 : disable * !=0 : enable */ #define AVL_HAS_PARENT_POINTER 0 #ifdef __cplusplus } #endif #include #ifdef __cplusplus extern "C" { #endif /* * I recommand setting a define to identify the C part of the template * So it can be used to undefine what is not required anymore for every * C file but that one. * */ #define STRING_SET_EMPTY NULL #ifndef _STRING_SET_C #undef AVL_MAX_DEPTH #undef AVL_PREFIX #undef AVL_NODE_TYPE #undef AVL_TREE_TYPE #undef AVL_CONST_TREE_TYPE #undef AVL_TREE_ROOT #undef AVL_REFERENCE_TYPE #undef AVL_HAS_PARENT_POINTER #undef AVL_REFERENCE_IS_CONST #undef AVL_REFERENCE_IS_POINTER #undef _AVL_H_INC #endif /* _STRING_SET_C */ #ifdef __cplusplus } #endif #endif /* _STRING_SET_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/bytearray_input_stream.h0000644000077100007710000000012412650131756026572 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.556344 30 ctime=1454597650.872344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/bytearray_input_stream.h0000664000077100007710000000531512650131756026403 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _BYTEARRAY_INPUT_STREAM_H #define _BYTEARRAY_INPUT_STREAM_H #include #ifdef __cplusplus extern "C" { #endif void bytearray_input_stream_init_const(input_stream* out_stream, const u8* array, u32 size); void bytearray_input_stream_init(u8* array, u32 size, input_stream* out_stream, bool owned); void bytearray_input_stream_reset(input_stream* stream); u32 bytearray_input_stream_size(input_stream* stream); const u8* bytearray_input_stream_buffer(input_stream* stream); u8* bytearray_input_stream_detach(input_stream* stream); #ifdef __cplusplus } #endif #endif /* _BYTEARRAY_INPUT_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/u64_set.h0000644000077100007710000000012412650131756023267 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.581344 30 ctime=1454597651.199344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/u64_set.h0000664000077100007710000001252112650131756023075 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief * * A collection of strings based on the AVL * * @{ * *----------------------------------------------------------------------------*/ #ifndef _U64_SET_H #define _U64_SET_H #ifdef __cplusplus extern "C" { #endif /* * A digest is stored prefixed with its length ([1;255]) */ /* * A structure to hold both children with direct access */ typedef struct u64_node u64_node; struct u64_children { struct u64_node* left; struct u64_node* right; }; /* * An union to have access to the children with direct or indexed access */ typedef union u64_children_union u64_children_union; union u64_children_union { struct u64_children lr; struct u64_node * child[2]; }; /* * The node structure CANNOT have a varying size on a given collection * This means that the digest size is a constant in the whole tree */ struct u64_node { union u64_children_union children; /* 2 ptrs */ void* value; /* 1 ptr */ u64 key; /* 4 b */ s8 balance; /* 1 b */ }; /* 29 OR 17 bytes (64/32) */ /* * AVL definition part begins here */ /* * The maximum depth of a tree. * 40 is enough for storing 433494436 items (worst case) * * Depth 0 is one node. * * Worst case : N is enough for sum[n = 0,N](Fn) where F is Fibonacci * Best case : N is enough for (2^(N+1))-1 */ #define AVL_MAX_DEPTH 24 /* 64 */ /* * The previx that will be put in front of each function name */ #define AVL_PREFIX u64_set_ /* * The type that hold the node */ #define AVL_NODE_TYPE u64_node /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_TREE_TYPE AVL_NODE_TYPE* typedef AVL_TREE_TYPE u64_set; /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_CONST_TREE_TYPE AVL_NODE_TYPE * const /* * How to find the root in the tree */ #define AVL_TREE_ROOT(__tree__) (*(__tree__)) /* * Self explanatory */ /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE u64 #define AVL_REFERENCE_IS_POINTER FALSE #define AVL_REFERENCE_IS_CONST FALSE /* * The node has got a pointer to its parent * * 0 : disable * !=0 : enable */ #define AVL_HAS_PARENT_POINTER 0 #ifdef __cplusplus } #endif #include #ifdef __cplusplus extern "C" { #endif /* * I recommand setting a define to identify the C part of the template * So it can be used to undefine what is not required anymore for every * C file but that one. * */ #ifndef _U64_SET_C #undef AVL_MAX_DEPTH #undef AVL_PREFIX #undef AVL_NODE_TYPE #undef AVL_TREE_TYPE #undef AVL_CONST_TREE_TYPE #undef AVL_TREE_ROOT #undef AVL_REFERENCE_TYPE #undef AVL_HAS_PARENT_POINTER #undef AVL_REFERENCE_IS_POINTER #undef AVL_REFERENCE_IS_CONST #undef _AVL_H_INC #endif /* _U64_SET_C */ #define U64_SET_EMPTY {NULL} void *u64_set_avl_iterator_hasnext_next_value(u64_set_avl_iterator *iterp); #define FOREACH_U64_SET(cast__,var__,u64_set__) u64_set_avl_iterator PREPROCESSOR_CONCAT_EVAL(foreach_u64_set_iter,__LINE__); u64_set_avl_iterator_init((u64_set__), &PREPROCESSOR_CONCAT_EVAL(foreach_u64_set_iter,__LINE__)); for(cast__ var__;((var__) = (cast__)u64_set_avl_iterator_hasnext_next_value(&PREPROCESSOR_CONCAT_EVAL(foreach_u64_set_iter,__LINE__))) != NULL;) #ifdef __cplusplus } #endif #endif /* _U64_SET_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/typebitmap.h0000644000077100007710000000012412650131756024154 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.538344 30 ctime=1454597651.192344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/typebitmap.h0000664000077100007710000000674612650131756023776 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _TYPEBITMAP_H #define _TYPEBITMAP_H #include #include #ifdef __cplusplus extern "C" { #endif typedef struct type_bit_maps_context type_bit_maps_context; /* * Maximum type bitmap size = * * (1+1+32) * 256 = 8704 * */ #define TYPE_BIT_MAPS_MAX_RDATA_SIZE 8704 struct type_bit_maps_context { u32 type_bit_maps_size; s32 last_type_window; u8 window_size[256]; u8 type_bitmap_field[8192]; }; /* * Once initialized properly, a bitmap context can be written as an (NSEC, NSEC3) bitmap using this function */ void type_bit_maps_write(u8* output, type_bit_maps_context* context); /* * Converts a (compressed) bitmap to its bit field (expanded) */ s32 type_bit_maps_expand(type_bit_maps_context* context, u8* type_bitmap, u32 size); /* * Takes two (compressed) bitmaps and merge them. * Used for DNSSEC */ bool type_bit_maps_merge(type_bit_maps_context* context, u8* type_bitmap_a, u32 a_size, u8* type_bitmap_b, u32 b_size); /* * Takes two bitmaps and merge them into a stream * Used by the zone reader */ void type_bit_maps_output_stream_write(output_stream* os, type_bit_maps_context* context); /* * Returns TRUE if the type is enabled in the packed_type_bitmap * (The buffer format matches the type bitmap in the NSEC/NSEC3 wire format) */ bool type_bit_maps_gettypestatus(u8* packed_type_bitmap, u32 size, u16 type); #ifdef __cplusplus } #endif #endif /* _NSEC_COMMON_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/bytearray_output_stream.h0000644000077100007710000000012412650131756026773 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.559344 30 ctime=1454597650.876344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/bytearray_output_stream.h0000664000077100007710000000751212650131756026605 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #pragma once #include #ifdef __cplusplus extern "C" { #endif /* * The buffer will be freed (free) on close. */ #define BYTEARRAY_OWNED 1 /* * The buffer's size can be changed. */ #define BYTEARRAY_DYNAMIC 2 /* * The internal context has been allocated by a malloc (the default except if the _static variant is used) * YOU MOSTLY WILL NOT USE THAT FLAG */ #define BYTEARRAY_ZALLOC_CONTEXT 4 typedef char bytearray_output_stream_context[sizeof(void*) + 9]; void bytearray_output_stream_init(output_stream* out_stream, u8* array,u32 size); void bytearray_output_stream_init_ex(output_stream* out_stream, u8* array,u32 size, u8 flags); /* * most of bytearray_output_stream usages function-enclosed : init, work on, close * this variant of initialisation avoids an malloc */ void bytearray_output_stream_init_ex_static(output_stream* out_stream, u8* array,u32 size, u8 flags, bytearray_output_stream_context *ctx); void bytearray_output_stream_reset(output_stream* out_stream); u32 bytearray_output_stream_size(output_stream* out_stream); u8* bytearray_output_stream_buffer(output_stream* out_stream); u8* bytearray_output_stream_detach(output_stream* out_stream); void bytearray_output_stream_set(output_stream* out_stream, u8 *buffer, u32 buffer_size, bool owned); /** * @param out_stream * @param by * @return the actual rewind_count */ u32 bytearray_output_stream_rewind(output_stream* out_stream, u32 rewind_count); u8* bytearray_output_stream_zdup(output_stream* out_stream); u8* bytearray_output_stream_dup(output_stream* out_stream); #ifdef __cplusplus } #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/message_verify_rrsig.h0000644000077100007710000000012412650131756026214 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.599344 30 ctime=1454597651.054344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/message_verify_rrsig.h0000664000077100007710000000771112650131756026027 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #ifndef __MESSAGE_VERIFY_H__ #define __MESSAGE_VERIFY_H__ #include #include #define MESSAGE_VERIFY_RRSIG_NOTSIGNED 1 #define MESSAGE_VERIFY_RRSIG_WRONG 2 #define MESSAGE_VERIFY_RRSIG_VERIFIED 4 #define MESSAGE_VERIFY_RRSIG_TIMEFRAME 8 #define MESSAGE_VERIFY_RRSIG_NOKEY 16 // CANNOT BE BIGGER THAN 32 BITS struct message_verify_rrsig_type_summary_s { u8 verifiable_count; // verified + wrong u8 unverifiable_count; // unknown key u8 verified_count; u8 wrong_count; }; typedef struct message_verify_rrsig_type_summary_s message_verify_rrsig_type_summary_s; struct message_verify_rrsig_detail_s { // this part MUST match the 18 bytes of wire image of an RRSIG u16 type_covered; u8 algorithm; u8 labels; u32 original_ttl; u32 expiration; u32 inception; // 16 bytes u16 tag; // 18 // u16 signature_size; // 20 u8 result; // 21 u8 section; // 22 // 23 24 are currently lost to memory alignment const u8 *signer_name; const u8 *signature; const u8 *fqdn; }; typedef struct message_verify_rrsig_detail_s message_verify_rrsig_detail_s; #define MESSAGE_VERIFY_RRSIG_RESULT_TYPE_SUMMARY 0 #define MESSAGE_VERIFY_RRSIG_RESULT_TYPE_VERIFY 1 #define MESSAGE_VERIFY_RRSIG_FEEDBACK_CONTINUE 0 #define MESSAGE_VERIFY_RRSIG_FEEDBACK_STOP 1 #define MESSAGE_VERIFY_RRSIG_FEEDBACK_ERROR 2 struct message_verify_rrsig_result_s { union { message_verify_rrsig_type_summary_s *summary; message_verify_rrsig_detail_s *detail; void *any; } data; u8 result_type; u8 section; u16 ctype; }; typedef struct message_verify_rrsig_result_s message_verify_rrsig_result_s; typedef ya_result message_verify_rrsig_result(const message_data *mesg, const struct dnskey_keyring *keyring, const message_verify_rrsig_result_s *result, void *args); ya_result message_verify_rrsig(const message_data *mesg, struct dnskey_keyring *keyring, message_verify_rrsig_result *feedback, void *args); #endif // __MESSAGE_VERIFY_H__ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/limited_input_stream.h0000644000077100007710000000012412650131756026217 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.602344 30 ctime=1454597651.013344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/limited_input_stream.h0000664000077100007710000000533512650131756026032 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _LIMITED_INPUT_STREAM_H #define _LIMITED_INPUT_STREAM_H #include #ifdef __cplusplus extern "C" { #endif /** * * Puts a filter around a stream in order to limit the number of bytes that can be read from it. * * @param filtered the input stream that will be filtered (and it's content unusable after filtering) * @param stream the input stream that'll contain the filter * @param buffer_size the maximum number of bytes that can be read from the filtered input stream * */ void limited_input_stream_init(input_stream* filtered,input_stream *stream, u64 stream_size); #ifdef __cplusplus } #endif #endif /* _LIMITED_INPUT_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dnsformat.h0000644000077100007710000000012412650131756023773 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.487344 30 ctime=1454597650.943344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dnsformat.h0000664000077100007710000000462312650131756023605 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup format C-string formatting * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _DNSFORMAT_H #define _DNSFORMAT_H /* * Format extensions related to dns * * dnsname : u8* dns name * dnslabel : u8* dns label (pascal string) * class : u16* zone class * type : u16* record type */ #ifdef __cplusplus extern "C" { #endif void dnsformat_class_init(); #ifdef __cplusplus } #endif #endif /* _DNSFORMAT_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/logger_channel_file.h0000644000077100007710000000012412650131756025744 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.497344 30 ctime=1454597651.028344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/logger_channel_file.h0000664000077100007710000000516612650131756025561 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logger Logging functions * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _LOGGER_CHANNEL_FILE_H #define _LOGGER_CHANNEL_FILE_H #include #include #ifdef __cplusplus extern "C" { #endif ya_result logger_channel_file_open(const char *fullpath, uid_t uid, gid_t gid, u16 mode, bool forceflush, logger_channel *chan); /** * * changes the name after a reopen, does not rename the file itself * * @param chan * @param newpath * @return */ ya_result logger_channel_file_rename(logger_channel *chan, const char *newpath); #ifdef __cplusplus } #endif #endif /* _LOGGER_CHANNEL_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/threaded_ringbuffer_cw.h0000644000077100007710000000012412650131756026460 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.541344 30 ctime=1454597651.173344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/threaded_ringbuffer_cw.h0000664000077100007710000001030112650131756026260 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * This version of the ring buffer uses the condition-wait mechanism instead of the 3-mutex one. * I'll have to bench both versions but the main incentive is to get rid of complains from helgrind * * @{ * *----------------------------------------------------------------------------*/ #ifndef _THREADED_RINGBUFFER_CW_H #define _THREADED_RINGBUFFER_CW_H #include #include #ifdef __cplusplus extern "C" { #endif typedef struct threaded_ringbuffer_cw threaded_ringbuffer_cw; struct threaded_ringbuffer_cw_node; /* NOTE: The algorithm does not need these to be volatile */ struct threaded_ringbuffer_cw { void** buffer; void** buffer_limit; void** write_slot; void** read_slot; pthread_mutex_t mutex; pthread_cond_t cond_read; pthread_cond_t cond_write; u32 max_size; u32 size; }; #define THREADED_RINGBUFFER_CW_NULL {0,0,0,0,PTHREAD_MUTEX_INITIALIZER,PTHREAD_COND_INITIALIZER,PTHREAD_COND_INITIALIZER,0,0} void threaded_ringbuffer_cw_init(threaded_ringbuffer_cw *queue, int max_size); void threaded_ringbuffer_cw_finalize(threaded_ringbuffer_cw *queue); void threaded_ringbuffer_cw_enqueue(threaded_ringbuffer_cw *queue,void* constant_pointer); bool threaded_ringbuffer_cw_try_enqueue(threaded_ringbuffer_cw *queue,void* constant_pointer); void* threaded_ringbuffer_cw_peek(threaded_ringbuffer_cw *queue); void* threaded_ringbuffer_cw_try_peek(threaded_ringbuffer_cw *queue); void* threaded_ringbuffer_cw_dequeue(threaded_ringbuffer_cw *queue); void* threaded_ringbuffer_cw_try_dequeue(threaded_ringbuffer_cw *queue); u32 threaded_ringbuffer_cw_dequeue_set(threaded_ringbuffer_cw *queue, void** array, u32 array_size); void threaded_ringbuffer_cw_wait_empty(threaded_ringbuffer_cw *queue); int threaded_ringbuffer_cw_size(threaded_ringbuffer_cw *queue); int threaded_ringbuffer_cw_room(threaded_ringbuffer_cw *queue); /* * The queue will block (write) if bigger than this. * Note that if the key is already bigger it will blocked (write) until * the content is emptied by the readers. */ ya_result threaded_ringbuffer_cw_set_maxsize(threaded_ringbuffer_cw *queue, int max_size); #ifdef __cplusplus } #endif #endif /* _THREADED_QUEUE_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/threaded_ringbuffer.h0000644000077100007710000000012412650131756025767 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.581344 30 ctime=1454597651.170344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/threaded_ringbuffer.h0000664000077100007710000000755012650131756025603 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _THREADED_RINGBUFFER_H #define _THREADED_RINGBUFFER_H #include #include #ifdef __cplusplus extern "C" { #endif typedef struct threaded_ringbuffer threaded_ringbuffer; struct threaded_ringbuffer_node; /* NOTE: The algorithm does not need these to be volatile */ struct threaded_ringbuffer { void** buffer; void** buffer_limit; void** write_slot; void** read_slot; pthread_mutex_t mutex; pthread_mutex_t mutex_enqueue; pthread_mutex_t mutex_dequeue; u32 max_size; u32 size; }; #define THREADED_RINGBUFFER_NULL {0,0,0,0,PTHREAD_MUTEX_INITIALIZER,PTHREAD_MUTEX_INITIALIZER,PTHREAD_MUTEX_INITIALIZER,0,0} void threaded_ringbuffer_init(threaded_ringbuffer* queue, int max_size); void threaded_ringbuffer_finalize(threaded_ringbuffer* queue); void threaded_ringbuffer_enqueue(threaded_ringbuffer* queue,void* constant_pointer); bool threaded_ringbuffer_try_enqueue(threaded_ringbuffer* queue,void* constant_pointer); void* threaded_ringbuffer_peek(threaded_ringbuffer* queue); void* threaded_ringbuffer_try_peek(threaded_ringbuffer* queue); void* threaded_ringbuffer_dequeue(threaded_ringbuffer* queue); void* threaded_ringbuffer_try_dequeue(threaded_ringbuffer *queue); u32 threaded_ringbuffer_dequeue_set(threaded_ringbuffer* queue, void** array, u32 array_size); void threaded_ringbuffer_wait_empty(threaded_ringbuffer* queue); int threaded_ringbuffer_size(threaded_ringbuffer* queue); /* * The queue will block (write) if bigger than this. * Note that if the key is already bigger it will blocked (write) until * the content is emptied by the readers. */ ya_result threaded_ringbuffer_set_maxsize(threaded_ringbuffer *queue, int max_size); #ifdef __cplusplus } #endif #endif /* _THREADED_QUEUE_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/list-sl.h0000644000077100007710000000012412650131756023365 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.572344 30 ctime=1454597651.021344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/list-sl.h0000664000077100007710000001521012650131756023171 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief A node-based single linked list * * A node-based single linked list * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef LIST_SL_H_ #define LIST_SL_H_ /* ------------------------------------------------------------ * * INCLUDES */ #include #include /* ------------------------------------------------------------ * * STRUCTS */ /** * Linked list for interface data * * (looks like a no-header no-sentinel single-linked list of strings) * * head : the base structure of the list * item : the concept of what is being stored in the list * node : holds the item * data : the reference to the item (which can be called data because it's type-less) * */ typedef struct list_sl_node_s list_sl_node_s; struct list_sl_node_s { struct list_sl_node_s *next; void *data; }; /// The sentiel is a butchered node, meant to avoid the (useless) data field. typedef struct list_sl_node_sentiel_s list_sl_node_sentiel_s; struct list_sl_node_sentiel_s { struct list_sl_node_s *next; }; typedef struct list_sl_s list_sl_s; struct list_sl_s { list_sl_node_s *first; list_sl_node_sentiel_s sentinel; u32 size; }; /* ------------------------------------------------------------ * * PROTOTYPES */ /** * Initialises a list. * * @param list */ static inline void list_sl_init(list_sl_s *list) { list->first = (list_sl_node_s*)&list->sentinel; list->sentinel.next = NULL; list->size = 0; } /** * Adds an item at the head of the list. * * @param list * @param data */ static inline void list_sl_insert(list_sl_s *list, void *data) { list_sl_node_s *node; ZALLOC_OR_DIE(list_sl_node_s*, node, list_sl_node_s, GENERIC_TAG); node->next = list->first; node->data = data; list->first = node; list->size++; } /** * * Adds an item to the list. * Effectively inserts the item. * * @param list * @param data */ static inline void list_sl_add(list_sl_s *list, void *data) { list_sl_insert(list, data); } /* static inline void list_sl_add_list(list_sl_s *list, list_sl_s *list_to_append) { } */ /** * Remove the first item from the list. * Deletes the node but not the data. * The data is returned. * * @param list * @return the data or NULL if the list is empty */ static inline void* list_sl_remove_first(list_sl_s *list) { if(list->size > 0) { list_sl_node_s *node = list->first; void *data = node->data; list->first = node->next; list->size--; ZFREE(node,list_sl_node_s); return data; } else { return NULL; } } /** * * Adds an item to the list, seen as a stack. * Effectively inserts the item. * * @param list * @param data */ static inline void list_sl_push(list_sl_s *list, void *data) { list_sl_insert(list, data); } /** * * Adds an item to the list, seen as a stack. * Effectively inserts the item. * * @param list * @param data */ static inline void* list_sl_pop(list_sl_s *list) { void *data = list_sl_remove_first(list); return data; } /** * Remove the first item that points to data; * * @param list * @param data * @return TRUE if an item has been deleted */ bool list_sl_remove(list_sl_s *list, void *data); /** * Remove all items from the list. * Deletes the nodes but not the data. * * @param list */ void list_sl_clear(list_sl_s *list); /** * Iterates through the items of the function, calling the comparator. * * The comparator must return: * * COLLECTION_ITEM_SKIP : go to next item * COLLECTION_ITEM_STOP : stop processing, return NULL * COLLECTION_ITEM_PROCESS_THEN_STOP : stop processing, return node data * * @param list * @param comparator * * @return a matching node or NULL */ void *list_sl_search(list_sl_s *list, result_callback_function *comparator, void *parm); /** * Iterates through the items of the function, calling the comparator. * * The comparator must return: * * COLLECTION_ITEM_SKIP : go to next item * COLLECTION_ITEM_PROCESS : delete, then go to next item * COLLECTION_ITEM_STOP : stop processing * COLLECTION_ITEM_PROCESS_THEN_STOP : delete, then stop processing * * @param list * @param comparator * * @return TRUE if at least one item has been deleted, FALSE otherwise. */ bool list_sl_remove_match(list_sl_s *list, result_callback_function *comparator, void *parm); /** * * Returns the size of the list * * @param list * @return the size of the list */ static inline u32 list_sl_size(const list_sl_s *list) { return list->size; } /* ------------------------------------------------------------ */ #endif /* LIST_SL_H_ */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dnscore-config.h0000644000077100007710000000013212654662676024713 xustar000000000000000030 mtime=1454597566.333344535 30 atime=1454597566.328344535 30 ctime=1454597650.935344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dnscore-config.h0000664000077100007710000002347712654662676024536 0ustar00yadifayadifa00000000000000/* include/dnscore/dnscore-config.h. Generated from dnscore-config.h.in by configure. */ /* include/dnscore/dnscore-config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ /* number of harware core if the auto-detect fails */ #define DEFAULT_ASSUMED_CPU_COUNT 2 /* always on */ #define HAS_ACL_SUPPORT 1 /* bfd debug support disabled. */ #define HAS_BFD_DEBUG_SUPPORT 0 /* i386, Athlon, Opteron, Core2, i3, i5, i7, ... */ #define HAS_CPU_AMDINTEL 1 /* T1000 has a Niagara cpu */ /* #undef HAS_CPU_NIAGARA */ /* remote control disabled. */ #define HAS_CTRL 0 /* dynamic provisioning disabled. */ #define HAS_CTRL_DYNAMIC_PROVISIONING 0 /* always on */ #define HAS_DNSSEC_SUPPORT 1 /* always off */ #define HAS_DROPALL_SUPPORT 0 /* dynamic update support disabled. */ #define HAS_DYNUPDATE_SUPPORT 1 /* YADIFA will now accept ASCII7 characters in DNS names (not recommended) disabled. */ #define HAS_FULL_ASCII7 0 /* where to put the log files */ #define HAS_LOGDIR 0 /* write the pid in each line of log disabled. */ #define HAS_LOG_PID_ALWAYS_ON 0 /* write the thread id in each line of log disabled. */ #define HAS_LOG_THREAD_ID_ALWAYS_ON 0 /* malloc debug support disabled. */ #define HAS_MALLOC_DEBUG_SUPPORT 0 /* DNS master disabled. */ #define HAS_MASTER_SUPPORT 1 /* Define this to enable slow but safe unaligned memory accesses */ #define HAS_MEMALIGN_ISSUES 0 /* use messages instead of send (needed if you use more than one IP aliased on the same network interface) disabled. */ #define HAS_MESSAGES_SUPPORT 0 /* always off */ #define HAS_MIRROR_SUPPORT 0 /* mutex debug support disabled. */ #define HAS_MUTEX_DEBUG_SUPPORT 0 /* Allows AXFR answer from master without AA bit set (Microsoft DNS) disabled. */ #define HAS_NON_AA_AXFR_SUPPORT 0 /* always on */ #define HAS_NSEC3_SUPPORT 1 /* always on */ #define HAS_NSEC_SUPPORT 1 /* NSID support disabled. */ #define HAS_NSID_SUPPORT 1 /* The system supports thread names */ #define HAS_PTHREAD_SETNAME_NP 1 /* The system supports spinlocks */ #define HAS_PTHREAD_SPINLOCK 1 /* always off */ #define HAS_RDTSC 0 /* always off */ #define HAS_RRCACHE_ENABLED 0 /* DNS Response Rate Limiter disabled. */ #define HAS_RRL_SUPPORT 1 /* RRSIG verification and generation for zones disabled. */ #define HAS_RRSIG_MANAGEMENT_SUPPORT 1 /* The sockaddr_in6 struct has an sin6_len field */ #define HAS_SOCKADDR_IN6_SIN6_LEN 0 /* The sockaddr_in struct has an sin_len field */ #define HAS_SOCKADDR_IN_SIN_LEN 0 /* The sockaddr struct has an sa_len field */ #define HAS_SOCKADDR_SA_LEN 0 /* always off */ #define HAS_TCL 0 /* The system supports timegm */ #define HAS_TIMEGM 1 /* always on */ #define HAS_TSIG_SUPPORT 1 /* where to put the log files */ /* #undef HAS_WITH_LOGDIR */ /* zalloc debug support disabled. */ #define HAS_ZALLOC_DEBUG_SUPPORT 0 /* zalloc statistics support disabled. */ #define HAS_ZALLOC_STATISTICS_SUPPORT 0 /* zalloc memory system disabled. */ #define HAS_ZALLOC_SUPPORT 1 /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 /* Define to 1 if you have the header file. */ #define HAVE_BYTESWAP_H 1 /* Define to 1 if you have the `bzero' function. */ #define HAVE_BZERO 1 /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_ENDIAN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the `fork' function. */ #define HAVE_FORK 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_I386_LIMITS_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_I386_TYPES_H */ /* Define to 1 if the system has the type `int64_t'. */ #define HAVE_INT64_T 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `c' library (-lc). */ #define HAVE_LIBC 1 /* Define to 1 if you have the `dnscore' library (-ldnscore). */ /* #undef HAVE_LIBDNSCORE */ /* Define to 1 if you have the `dnsdb' library (-ldnsdb). */ /* #undef HAVE_LIBDNSDB */ /* Define to 1 if you have the `dnslg' library (-ldnslg). */ /* #undef HAVE_LIBDNSLG */ /* Define to 1 if you have the `dnszone' library (-ldnszone). */ /* #undef HAVE_LIBDNSZONE */ /* Define to 1 if you have the `pthread' library (-lpthread). */ #define HAVE_LIBPTHREAD 1 /* Define to 1 if you have the header file. */ #define HAVE_LINUX_LIMITS_H 1 /* Define to 1 if the system has the type `long long'. */ #define HAVE_LONG_LONG 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_ENDIAN_H */ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_NETINET6_IN6_H */ /* Define to 1 if you have the header file. */ #define HAVE_NETINET_IN_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_PPC_LIMITS_H */ /* Define to 1 if you have the header file. */ #define HAVE_PTHREAD_H 1 /* Define to 1 if you have the `select' function. */ #define HAVE_SELECT 1 /* Define to 1 if you have the `socket' function. */ #define HAVE_SOCKET 1 /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ /* #undef HAVE_STAT_EMPTY_STRING_BUG */ /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDIO_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYSLOG_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_BYTEORDER_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_ENDIAN_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_SELECT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SYSLIMITS_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if the system has the type `uint64_t'. */ #define HAVE_UINT64_T 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if the system has the type `u_char'. */ #define HAVE_U_CHAR 1 /* Define to 1 if you have the `vfork' function. */ #define HAVE_VFORK 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_VFORK_H */ /* Define to 1 if `fork' works. */ #define HAVE_WORKING_FORK 1 /* Define to 1 if `vfork' works. */ #define HAVE_WORKING_VFORK 1 /* BSD */ #define IS_BSD_FAMILY 0 /* OSX */ #define IS_DARWIN_OS 0 /* LINUX */ #define IS_LINUX_FAMILY 1 /* SOLARIS */ #define IS_SOLARIS_FAMILY 0 /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Name of package */ #define PACKAGE "dnscore" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "bugreport@yadifa.eu" /* Define to the full name of this package. */ #define PACKAGE_NAME "dnscore" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "dnscore 2.1.6-5826" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "dnscore" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ #define PACKAGE_VERSION "2.1.6-5826" /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* Define to the type of arg 1 for `select'. */ #define SELECT_TYPE_ARG1 int /* Define to the type of args 2, 3 and 4 for `select'. */ #define SELECT_TYPE_ARG234 (fd_set *) /* Define to the type of arg 5 for `select'. */ #define SELECT_TYPE_ARG5 (struct timeval *) /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ #define VERSION "2.1.6-5826" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN /* # undef WORDS_BIGENDIAN */ # endif #endif /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `int' if does not define. */ /* #undef mode_t */ /* Define to `int' if does not define. */ /* #undef pid_t */ /* Define to `unsigned int' if does not define. */ /* #undef size_t */ /* Define as `fork' if `vfork' does not work. */ /* #undef vfork */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/base32hex.h0000644000077100007710000000012412650131756023562 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.606344 30 ctime=1454597650.853344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/base32hex.h0000664000077100007710000000706012650131756023372 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup base Base conversion functions * @ingroup dnscore * @brief Base 32 hex codec * * @{ * *----------------------------------------------------------------------------*/ #ifndef _BASE32HEX_H #define _BASE32HEX_H #include #include #ifdef __cplusplus extern "C" { #endif #define BASE32HEX_DECODED_CHUNK 5 #define BASE32HEX_ENCODED_CHUNK 8 #define BASE32HEX_ENCODED_LEN(bin_size_) ((((bin_size_)+(BASE32HEX_DECODED_CHUNK-1))/BASE32HEX_DECODED_CHUNK)*BASE32HEX_ENCODED_CHUNK) #define BASE32HEX_DECODED_LEN(b32_size_) ((((b32_size_)/BASE32HEX_ENCODED_CHUNK))*BASE32HEX_DECODED_CHUNK) /** * Encodes bytes into base32hex * The output size must be at least size_in * 8/5 * * @param buffer_in bytes to convert * @param size_in number of bytes * @param buffer_out output buffer of a size >= size_in * 8/5 * * @return output size */ u32 base32hex_encode(const u8* buffer_in,u32 size_in,char* buffer_out); /** * encodes the buffer into base32hex to the output stream * * @param os output stream * @param buffer_in buffer to encode * @param size_in size of the buffer * * @return bytes written */ ya_result output_stream_write_base32hex(output_stream *os, const u8 *buffer_in, u32 size_in); /** * Decodes base32hex into bytes * The output size must be at least size_in * 5/8 * * @param buffer_in base32hex text * @param size_in number of chars * @param buffer_out output buffer of a size >= size_in * 5/8 * * @return output size */ ya_result base32hex_decode(const char *buffer_in, u32 size_in, u8 *buffer_out); #ifdef __cplusplus } #endif #endif /* _BASE32_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/mutex.h0000644000077100007710000000012412650131756023140 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.564344 30 ctime=1454597651.062344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/mutex.h0000664000077100007710000003073312650131756022753 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _MUTEX_H #define _MUTEX_H /** * This helper header allows to chose the kind of mutex used. * This is part of the sendto queue experiment. */ #include #include #include #include #include #if defined(__MACH__) #include #endif #ifdef __cplusplus extern "C" { #endif #ifndef DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #error "DNSCORE_HAS_MUTEX_DEBUG_SUPPORT must be set to either 0 or 1" #endif #ifndef MUTEX_USE_SPINLOCK #define MUTEX_USE_SPINLOCK 0 // keep it that way #endif #if MUTEX_USE_SPINLOCK && DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #error "Cannot mix spinlock and mutex debug support" #endif // these two are for error reporting in debug builds #define MUTEX_LOCKED_TOO_MUCH_TIME_US 5000000 #define MUTEX_WAITED_TOO_MUCH_TIME_US 2000000 // DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #if !MUTEX_USE_SPINLOCK // do not use SPINLOCK #if !DNSCORE_HAS_MUTEX_DEBUG_SUPPORT typedef pthread_mutex_t mutex_t; #define MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER #define mutex_lock(mtx) pthread_mutex_lock(mtx) #define mutex_trylock(mtx) (pthread_mutex_trylock(mtx)==0) #define mutex_unlock(mtx) pthread_mutex_unlock(mtx) #else struct mutex_t { pthread_mutex_t mtx; volatile stacktrace trace; volatile pthread_t id; volatile u64 timestamp; bool recursive; char _MTXs[4]; }; typedef struct mutex_t mutex_t; #define MUTEX_INITIALIZER {PTHREAD_MUTEX_INITIALIZER, 0, 0, 0, FALSE, {'M', 'T', 'X', sizeof(mutex_t)}} extern logger_handle *g_system_logger; extern volatile bool mutex_ultraverbose; void mutex_locked_set_add(mutex_t *mtx); void mutex_locked_set_del(mutex_t *mtx); void mutex_locked_set_monitor(); void mutex_lock(mutex_t *mtx); static inline bool mutex_trylock(mutex_t *mtx) { if(mutex_ultraverbose) { logger_handle_msg(g_system_logger, MSG_DEBUG7, "mutex_trylock(%p)", mtx); } int err = pthread_mutex_trylock(&mtx->mtx); if((err != 0) && (err != EBUSY)) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_trylock(%p): %r", mtx, MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } if(err == 0) { mtx->trace = debug_stacktrace_get(); mtx->id = pthread_self(); mtx->timestamp = timeus(); mutex_locked_set_add(mtx); } if(mutex_ultraverbose) { logger_handle_msg(g_system_logger,MSG_DEBUG7, "mutex_trylock(%p): %s", mtx, (err == 0)?"locked":"failed"); } return err == 0; } static inline void mutex_unlock(mutex_t *mtx) { if(mutex_ultraverbose) { logger_handle_msg(g_system_logger,MSG_DEBUG7, "mutex_unlock(%p)", mtx); } mutex_locked_set_del(mtx); stacktrace o_trace = mtx->trace; pthread_t o_id = mtx->id; u64 o_timestamp = mtx->timestamp; mtx->trace = NULL; mtx->id = 0; mtx->timestamp = 0; int err = pthread_mutex_unlock(&mtx->mtx); if(err != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_unlock(%p = {%p,%llu}) self=%p: %r", mtx, (intptr)o_id, o_timestamp, (intptr)pthread_self(), MAKE_ERRNO_ERROR(err)); debug_stacktrace_log(g_system_logger, MSG_ERR, o_trace); logger_flush(); abort(); } } #endif void mutex_init_recursive(mutex_t *mtx); void mutex_init(mutex_t *mtx); void mutex_destroy(mutex_t *mtx); #else typedef pthread_spinlock_t mutex_t; #define MUTEX_INITIALIZER 0 #define mutex_init(mtx) pthread_spin_init((mtx), 0) #define mutex_destroy(mtx) pthread_spin_destroy(mtx) #define mutex_lock(mtx) pthread_spin_lock(mtx) #define mutex_trylock(mtx) (pthread_spin_trylock(mtx)==0) #define mutex_unlock(mtx) pthread_spin_unlock(mtx) #endif typedef pthread_cond_t cond_t; #define COND_INITIALIZER PTHREAD_COND_INITIALIZER static inline void cond_init(cond_t *cond) { pthread_cond_init(cond, NULL); } #if !DNSCORE_HAS_MUTEX_DEBUG_SUPPORT static inline void cond_wait(cond_t *cond, mutex_t *mtx) { pthread_cond_wait(cond, mtx); } #else static inline void cond_wait(cond_t *cond, mutex_t *mtx) { pthread_cond_wait(cond, &mtx->mtx); } #endif #if !_POSIX_TIMERS u64 timeus(); #endif static inline void cond_timedwait(cond_t *cond, mutex_t *mtx, u64 usec) { struct timespec ts; #if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0)) || defined(__MACH__) clock_gettime(CLOCK_REALTIME, &ts); usec *= 1000; ts.tv_nsec += usec; if(ts.tv_nsec > 1000000000LL) { ts.tv_sec += ts.tv_nsec / 1000000000LL; ts.tv_nsec = ts.tv_nsec % 1000000000LL; } #else usec += timeus(); usec *= 1000; ts.tv_nsec = usec % 1000000000LL; ts.tv_sec = usec / 1000000000LL; #endif #if !DNSCORE_HAS_MUTEX_DEBUG_SUPPORT pthread_cond_timedwait(cond, mtx, &ts); #else pthread_cond_timedwait(cond, &mtx->mtx, &ts); #endif } static inline void cond_notify_one(cond_t *cond) { pthread_cond_signal(cond); } static inline void cond_notify(cond_t *cond) { pthread_cond_broadcast(cond); } static inline void cond_finalize(cond_t *cond) { pthread_cond_destroy(cond); } struct smp_int { pthread_mutex_t mutex; volatile int value; }; #define SMP_INT_INITIALIZER {PTHREAD_MUTEX_INITIALIZER,0} typedef struct smp_int smp_int; static inline void smp_int_init(smp_int *v) { pthread_mutex_init(&v->mutex, NULL); v->value = 0; } static inline void smp_int_init_set(smp_int *v, int value) { pthread_mutex_init(&v->mutex, NULL); v->value = value; } static inline void smp_int_set(smp_int *v, int i) { pthread_mutex_lock(&v->mutex); v->value = i; pthread_mutex_unlock(&v->mutex); } static inline void smp_int_inc(smp_int *v) { pthread_mutex_lock(&v->mutex); v->value++; pthread_mutex_unlock(&v->mutex); } static inline void smp_int_add(smp_int *v, int value) { pthread_mutex_lock(&v->mutex); v->value += value; pthread_mutex_unlock(&v->mutex); } static inline int smp_int_inc_get(smp_int *v) { u32 ret; pthread_mutex_lock(&v->mutex); ret = ++v->value; pthread_mutex_unlock(&v->mutex); return ret; } static inline void smp_int_dec(smp_int *v) { pthread_mutex_lock(&v->mutex); v->value--; pthread_mutex_unlock(&v->mutex); } static inline void smp_int_sub(smp_int *v, int value) { pthread_mutex_lock(&v->mutex); v->value -= value; pthread_mutex_unlock(&v->mutex); } static inline int smp_int_dec_get(smp_int *v) { int ret; pthread_mutex_lock(&v->mutex); ret = --v->value; pthread_mutex_unlock(&v->mutex); return ret; } static inline bool smp_int_setifequal(smp_int *v, int from, int to) { bool didit = FALSE; pthread_mutex_lock(&v->mutex); if(v->value == from) { v->value = to; didit = TRUE; } pthread_mutex_unlock(&v->mutex); return didit; } static inline int smp_int_get(smp_int *v) { int ret; pthread_mutex_lock(&v->mutex); ret = v->value; pthread_mutex_unlock(&v->mutex); return ret; } static inline void smp_int_destroy(smp_int *v) { pthread_mutex_destroy(&v->mutex); } /** * A group mutex is a mutex that can be used by a group with or without exclusive access. * A mutex is private if the msb is set, it means only one of that group can own it * A mutex is shared if the msb is not set, it means many owner of the same type can own it */ #define GROUP_MUTEX_NOBODY 0x00 #define GROUP_MUTEX_READ 0x01 // default #define GROUP_MUTEX_WRITE 0x82 // default #define GROUP_MUTEX_PRIVATE 0x80 // THIS IS A MASK, ADD IT TO THE OWNER ID #define GROUP_MUTEX_DESTROY 0xfe typedef struct group_mutex_t group_mutex_t; struct group_mutex_t { mutex_t mutex; cond_t cond; #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT stacktrace trace; volatile pthread_t id; volatile u64 timestamp; #endif volatile s32 count; volatile u8 owner; }; #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #define GROUP_MUTEX_INITIALIZER {MUTEX_INITIALIZER, COND_INITIALIZER, NULL, 0, 0, 0, 0} #else #define GROUP_MUTEX_INITIALIZER {MUTEX_INITIALIZER, COND_INITIALIZER, 0, 0} #endif void group_mutex_init(group_mutex_t* mtx); void group_mutex_lock(group_mutex_t *mtx, u8 owner); bool group_mutex_trylock(group_mutex_t *mtx, u8 owner); void group_mutex_unlock(group_mutex_t *mtx, u8 owner); bool group_mutex_transferlock(group_mutex_t *mtx, u8 owner, u8 newowner); void group_mutex_destroy(group_mutex_t* mtx); bool group_mutex_islocked(group_mutex_t* mtx); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT void group_mutex_locked_set_monitor(); #endif /** * The shared group mutex is a group mutex that only uses N mutex(es) and N condition(s). * This is especially useful when millions of instances are required. * The mutex is used commonly by each structure as its own. * The downside is that every waiting task on the same mutex will be woken up each time one of them broadcasts the condition. * * The current implementation uses N=1 */ struct shared_group_shared_mutex_t { mutex_t mutex; cond_t cond; volatile s32 rc; }; typedef struct shared_group_shared_mutex_t shared_group_shared_mutex_t; #define SHARED_GROUP_SHARED_MUTEX_INTIALIZER {MUTEX_INITIALIZER, COND_INITIALIZER, 0} struct shared_group_mutex_t { shared_group_shared_mutex_t *shared_mutex; #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT stacktrace trace; volatile pthread_t id; volatile u64 timestamp; #endif volatile s32 count; volatile u8 owner; }; #define SHARED_GROUP_MUTEX_INTIALIZER THIS_CANNOT_WORK typedef struct shared_group_mutex_t shared_group_mutex_t; void shared_group_shared_mutex_init(shared_group_shared_mutex_t* smtx); void shared_group_shared_mutex_init_recursive(shared_group_shared_mutex_t* smtx); void shared_group_shared_mutex_destroy(shared_group_shared_mutex_t* smtx); void shared_group_mutex_init(shared_group_mutex_t* mtx, shared_group_shared_mutex_t* smtx, const char *name); void shared_group_mutex_lock(shared_group_mutex_t *mtx, u8 owner); bool shared_group_mutex_trylock(shared_group_mutex_t *mtx, u8 owner); void shared_group_mutex_unlock(shared_group_mutex_t *mtx, u8 owner); bool shared_group_mutex_transferlock(shared_group_mutex_t *mtx, u8 owner, u8 newowner); void shared_group_mutex_destroy(shared_group_mutex_t* mtx); bool shared_group_mutex_islocked(shared_group_mutex_t* mtx); bool shared_group_mutex_islocked_by(shared_group_mutex_t *mtx, u8 owner); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT void shared_group_mutex_locked_set_monitor(); #endif #ifdef __cplusplus } #endif #endif /* _MUTEX_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dnsname_set.h0000644000077100007710000000012412650131756024276 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.488344 30 ctime=1454597650.965344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dnsname_set.h0000664000077100007710000001061512650131756024106 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _DNSNAME_SET_H #define _DNSNAME_SET_H #include #ifdef __cplusplus extern "C" { #endif #define DNSNAME_SET_MEMORY_POOL_SIZE 512 /* * A structure to hold both children with direct access */ typedef struct dnsname_node dnsname_node; struct dnsname_children { struct dnsname_node* left; struct dnsname_node* right; }; /* * An union to have access to the children with direct or indexed access */ typedef union dnsname_children_union dnsname_children_union; union dnsname_children_union { struct dnsname_children lr; struct dnsname_node * child[2]; }; /* * The node structure CANNOT have a varying size on a given collection * This means that the digest size is a constant in the whole tree */ struct dnsname_node { union dnsname_children_union children; const u8* key; }; typedef struct dnsname_set dnsname_set; struct dnsname_set { dnsname_node pool[DNSNAME_SET_MEMORY_POOL_SIZE]; dnsname_node *next_free; dnsname_node *head; }; typedef struct dnsname_set_iterator dnsname_set_iterator; struct dnsname_set_iterator { dnsname_node* next; dnsname_node* limit; }; static inline void dnsname_set_init(dnsname_set* set) { set->next_free = set->pool; set->head = NULL; } static inline bool dnsname_set_insert(dnsname_set* set, const u8 *name) { if(set->next_free >= &set->pool[DNSNAME_SET_MEMORY_POOL_SIZE]) { return FALSE; } dnsname_node** nodep; dnsname_node* node; nodep = &set->head; node = *nodep; while(node != NULL) { int cmp = dnsname_compare(name, node->key); if(cmp == 0) { return TRUE; } nodep = &node->children.child[(cmp > 0) & 1]; node = *nodep; } *nodep = set->next_free++; node = *nodep; node->children.lr.left = NULL; node->children.lr.right = NULL; node->key = (u8*)name; return TRUE; } static inline void dnsname_set_iterator_init(dnsname_set* set, dnsname_set_iterator* iter) { iter->next = set->pool; iter->limit = set->next_free; } static inline bool dnsname_set_iterator_hasnext(dnsname_set_iterator* iter) { return iter->next < iter->limit; } static inline dnsname_node* dnsname_set_iterator_next_node(dnsname_set_iterator* iter) { return iter->next++; } #ifdef __cplusplus } #endif #endif /* _DNSNAME_SET_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/output_stream.h0000644000077100007710000000012412650131756024711 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.505344 30 ctime=1454597651.069344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/output_stream.h0000664000077100007710000001253412650131756024523 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @ingroup dnscore * */ /*----------------------------------------------------------------------------*/ #ifndef _OUTPUT_STREAM_H #define _OUTPUT_STREAM_H #include #include #ifdef __cplusplus extern "C" { #endif typedef struct output_stream output_stream; typedef ya_result output_stream_write_method(output_stream* stream,const u8* buffer,u32 len); typedef ya_result output_stream_flush_method(output_stream* stream); typedef void output_stream_close_method(output_stream* stream); typedef ya_result output_stream_skip_method(output_stream* stream,u32 byte_count); typedef struct output_stream_vtbl output_stream_vtbl; struct output_stream_vtbl { output_stream_write_method* write; output_stream_flush_method* flush; output_stream_close_method* close; const char* __class__; /* MUST BE A UNIQUE POINTER, ie: One defined in the class's .c file The name should be unique in order to avoid compiler tricks */ /* Add your inheritable methods here */ }; struct output_stream { void* data; const output_stream_vtbl* vtbl; }; #define output_stream_class(os__) ((os__)->vtbl) #define output_stream_class_name(os__) ((os__)->vtbl->__class__) #define output_stream_write(os__,buffer__,len__) (os__)->vtbl->write((os__),(const u8*)(buffer__),(len__)) #define output_stream_flush(os__) (os__)->vtbl->flush(os__) #define output_stream_close(os__) (os__)->vtbl->close(os__) #define output_stream_skip(os__,len__) (os__)->vtbl->skip((os__),(len__)) #define output_stream_valid(os__) ((os__)->vtbl != NULL) ya_result output_stream_write_nu32(output_stream* os, u32 value); ya_result output_stream_write_nu16(output_stream* os, u16 value); /* * ya_result output_stream_write_u8(output_stream* os, u8 value); */ static inline ya_result output_stream_write_u8(output_stream* os, u8 value) { return output_stream_write(os, &value, 1); } ya_result output_stream_write_u16(output_stream* os, u16 value); /* * PACKED unsigned 32 bits * * The integer is divided into 7 bits packets (lsb -> msb) * The 8th bit is set until the end is reached * * [ 0.. 127] => [ 0x00 .. 0x7f] * [128..16384] => [0x80 0x01 .. 0xff 0x7f] * */ ya_result output_stream_write_pu32(output_stream* os, u32 value); ya_result output_stream_write_dnsname(output_stream* os, const u8* name); ya_result output_stream_write_dnslabel_vector(output_stream* os, dnslabel_vector_reference labels, s32 top); ya_result output_stream_write_dnslabel_stack(output_stream* os, dnslabel_stack_reference labels, s32 top); ya_result output_stream_decode_base64(output_stream* os, const char * string, u32 length); ya_result output_stream_decode_base32(output_stream* os, const char * string, u32 length); ya_result output_stream_decode_base32hex(output_stream* os, const char * string, u32 length); ya_result output_stream_decode_base16(output_stream* os, const char * string, u32 length); /* Found on typebitmap.h */ #define output_stream_write_type_bit_maps type_bit_maps_output_stream_write output_stream *output_stream_alloc(); /** * This tools allows a safer misuse (and detection) of closed streams * It sets the stream to a sink that warns abouts its usage and for which every call that can fail fails. */ void output_stream_set_void(output_stream *stream); ya_result output_stream_write_fully(output_stream *stream, const void *buffer_start, u32 len_start); #ifdef __cplusplus } #endif #endif /* _OUTPUT_STREAM_H */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/basic-priority-queue.h0000644000077100007710000000012412650131756026060 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.572344 30 ctime=1454597650.861344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/basic-priority-queue.h0000664000077100007710000000737212650131756025676 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief A node-based single linked list * * A node-based single linked list * * @{ */ /*----------------------------------------------------------------------------*/ #pragma once /* ------------------------------------------------------------ * * INCLUDES */ #include /* ------------------------------------------------------------ * * STRUCTS */ /** * Linked list for interface data * * (looks like a no-header no-sentinel single-linked list of strings) * * * head : the base structure of the list * item : the concept of what is being stored in the list * node : holds the item * data : the reference to the item (which can be called data because it's type-less) * */ typedef struct bpqueue_node_s bpqueue_node_s; struct bpqueue_node_s { struct bpqueue_node_s *next; void *data; u32 priority; }; typedef struct bpqueue_s bpqueue_s; struct bpqueue_s { bpqueue_node_s *first; bpqueue_node_s *last; u32 size; }; #define EMPTY_BPQUEUE {NULL, NULL, 0} /* ------------------------------------------------------------ * * PROTOTYPES */ /** * Initialises a list. * * @param list */ void bpqueue_init(bpqueue_s *list); /** * Adds an item at the head of the list. * * @param list * @param data */ void bpqueue_enqueue(bpqueue_s *list, void *data, u32 priority); /** * Remove the first item from the list. * Deletes the node but not the data. * The data is returned. * * @param list * @return the data or NULL if the list is empty */ void *bpqueue_dequeue(bpqueue_s *list); /** * Remove all items from the list. * Deletes the nodes but not the data. * * @param list */ void bpqueue_clear(bpqueue_s *list); /** * * Returns the size of the list * * @param list * @return the size of the list */ static inline u32 bpqueue_size(const bpqueue_s *list) { return list->size; } yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/clone_input_output_stream.h0000644000077100007710000000012412650131756027310 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.535344 30 ctime=1454597650.887344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/clone_input_output_stream.h0000664000077100007710000000514212650131756027117 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _CLONE_INPUT_OUTPUT_STREAM_H #define _CLONE_INPUT_OUTPUT_STREAM_H #include #include #ifdef __cplusplus extern "C" { #endif /** * Can only fail if in_filtered has not been set */ ya_result clone_input_output_stream_init(input_stream *cis, input_stream* in_cloned, output_stream* out_copy); input_stream *clone_input_output_stream_get_cloned(input_stream* cis); output_stream *clone_input_output_stream_get_copy(input_stream* cis); #ifdef __cplusplus } #endif #endif /* _clone_OUTPUT_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/parser.h0000644000077100007710000000012412650131756023272 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.554344 30 ctime=1454597651.084344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/parser.h0000664000077100007710000003541612650131756023110 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #ifndef PARSER_H #define PARSER_H #include #include #include #include #ifdef __cplusplus extern "C" { #endif struct parser_delimiter_s { char begin; // " ' < char end; // " ' > u8 id; u8 reserved; }; typedef struct parser_delimiter_s parser_delimiter_s; #define PARSER_INCLUDE_DEPTH_MAX 256 #define PARSER_LINE_LENGTH_MAX 65535 #define PARSER_CHAR_TYPE_NORMAL 0 #define PARSER_CHAR_TYPE_ESCAPE_CHARACTER 1 #define PARSER_CHAR_TYPE_COMMENT_MARKER 2 #define PARSER_CHAR_TYPE_STRING_DELIMITER 3 #define PARSER_CHAR_TYPE_MULTILINE_DELIMITER 4 #define PARSER_CHAR_TYPE_MULTILINE_DELIMITER_END 5 #define PARSER_CHAR_TYPE_BLANK_MARKER 6 #define PARSER_CHAR_TYPE_EOL 7 #define PARSER_CHAR_TYPE_IGNORE 255 #define PARSER_STATUS_NORMAL 0 #define PARSER_STATUS_STRING 1 #define PARSER_STATUS_MULTILINE 2 #define PARSER_EOF 1 #define PARSER_EOL 2 #define PARSER_COMMENT 4 #define PARSER_WORD 8 #define PARSER_BLANK_START 16 #define PARSER_ERROR_BASE 0x800D0000 #define PARSER_ERROR_CODE(code_) ((s32)(PARSER_ERROR_BASE+(code_))) #define PARSER_SYNTAX_ERROR_MULTILINE PARSER_ERROR_CODE(0x0001) #define PARSER_SYNTAX_ERROR_EXPECTED_EOL PARSER_ERROR_CODE(0x0002) #define PARSER_SYNTAX_ERROR_LINE_TOO_BIG PARSER_ERROR_CODE(0x0003) #define PARSER_BUFFER_TOO_SMALL PARSER_ERROR_CODE(0x0004) #define PARSER_NO_INPUT PARSER_ERROR_CODE(0x0005) #define PARSER_ODD_CHAR_NUMBER PARSER_ERROR_CODE(0x0006) #define PARSER_LINE_ENDED_WITH_ESCAPE PARSER_ERROR_CODE(0x0007) #define PARSER_UNEXPECTED_STRING_DELIMITER PARSER_ERROR_CODE(0x0008) #define PARSER_EXPECTED_STRING_END_DELIMITER PARSER_ERROR_CODE(0x0009) #define PARSER_INCLUDE_DEPTH_TOO_BIG PARSER_ERROR_CODE(0x000A) #define PARSER_UNKNOWN_TIME_UNIT PARSER_ERROR_CODE(0x000B) #define PARSER_NO_MARK_SET PARSER_ERROR_CODE(0x000C) #define PARSER_REACHED_END_OF_LINE PARSER_ERROR_CODE(0x000D) #define PARSER_FOUND_WORD PARSER_ERROR_CODE(0x000E) #define PARSER_REACHED_END_OF_FILE PARSER_ERROR_CODE(0x000F) struct parser_token_s { const char *word; u32 word_len; }; typedef struct parser_token_s parser_token_s; struct parser_s { // SETTINGS // ie: "" '' <> [] parser_delimiter_s *string_delimiters; // ie: () parser_delimiter_s *multiline_delimiters; // ie: # ; const char *comment_marker; // ie: SPACE TAB const char *blank_marker; // ie: BACKSLASH const char *escape_characters; // STATE MACHINE char *needle; char *needle_mark; char *limit; char *text; u32 text_length; u32 string_delimiters_count; u32 multiline_delimiters_count; u32 comment_marker_count; u32 blank_marker_count; u32 escape_characters_count; u32 line_number; u32 input_stream_stack_size; char multiline; // TODO: stack of multilines char cutchar; // input_stream *input_stream_stack[PARSER_INCLUDE_DEPTH_MAX]; u32 line_number_stack[PARSER_INCLUDE_DEPTH_MAX]; char char_type[256]; char delimiter_close[256]; char line_buffer[PARSER_LINE_LENGTH_MAX]; char line_buffer_zero; char extra_buffer[PARSER_LINE_LENGTH_MAX]; char extra_buffer_zero; char additional_buffer[PARSER_LINE_LENGTH_MAX]; char additional_buffer_zero; }; typedef struct parser_s parser_s; void parser_init_error_codes(); ya_result parser_init(parser_s *parser, const char *string_delimiters, // by 2 const char *multiline_delimiters, // by 2 const char *comment_markers, // by 1 const char *blank_makers, // by 1 const char *escape_characters // by 1 ); ya_result parser_finalize(parser_s *parser); ya_result parser_next_token(parser_s *parser); ya_result parser_next_characters(parser_s *parser); ya_result parser_next_characters_nospace(parser_s *parser); ya_result parser_concat_next_tokens(parser_s *parser); ya_result parser_concat_next_tokens_nospace(parser_s *parser); void parser_set_eol(parser_s *parser); static inline u32 parser_text_length(const parser_s *parser) { return parser->text_length; } static inline const char * parser_text(const parser_s *parser) { return parser->text; } /** * * sets a terminating zero at the end of the current text returned by parser_text(parser) * can only work once * parser_text_unasciiz(parser) MUST be called before parsing the remaining of the input * * @param parser * @return */ static inline bool parser_text_asciiz(parser_s *parser) { if(parser->cutchar == '\0') { parser->cutchar = parser->text[parser->text_length]; parser->text[parser->text_length] = '\0'; return TRUE; } return FALSE; } /** * * see parser_text_unasciiz * * @param parser * @return */ static inline bool parser_text_unasciiz(parser_s *parser) { if(parser->cutchar != '\0') { parser->text[parser->text_length] = parser->cutchar; parser->cutchar = '\0'; return TRUE; } return FALSE; } static inline u8 parser_text_delimiter(const parser_s *parser) { return 0; // not implemented } ya_result parser_push_stream(parser_s *p, input_stream *is); input_stream *parser_pop_stream(parser_s *p); static inline u32 parser_stream_count(const parser_s *p) { return p->input_stream_stack_size; } /** * * Set the rewind position in the parser * * @param p */ static inline void parser_mark(parser_s *p) { p->needle_mark = p->needle; } static inline ya_result parser_rewind(parser_s *p) { if(p->needle_mark != NULL) { p->needle = p->needle_mark; return SUCCESS; } else { return PARSER_NO_MARK_SET; } } static inline u32 parser_get_line_number(const parser_s *p) { return p->line_number; } /////////////////////////////////////////////////////////////////////////////// static inline ya_result parser_next_word(parser_s *p) { ya_result return_code; for(;;) { if(FAIL(return_code = parser_next_token(p))) { return return_code; } if(return_code & PARSER_WORD) { return 1; } if(return_code & (PARSER_EOL|PARSER_EOF)) { if(return_code & PARSER_EOL) { return PARSER_REACHED_END_OF_LINE; } else { return PARSER_REACHED_END_OF_FILE; } } } } static inline ya_result parser_get_u16(const char *text, u32 text_len, u16 *out_value) { u32 tmp_u32; ya_result return_code = parse_u32_check_range_len_base10(text, text_len, &tmp_u32, 0, MAX_U16); *out_value = (u16)tmp_u32; return return_code; } static inline ya_result parser_copy_next_u16(parser_s *p, u16 *out_value) { ya_result return_code = parser_next_word(p); if(ISOK(return_code)) { const char *text = parser_text(p); u32 text_len = parser_text_length(p); u32 tmp_u32; return_code = parse_u32_check_range_len_base10(text, text_len, &tmp_u32, 0, MAX_U16); *out_value = (u16)tmp_u32; } return return_code; } static inline ya_result parser_copy_next_u8(parser_s *p, u8 *out_value) { ya_result return_code = parser_next_word(p); if(ISOK(return_code)) { const char *text = parser_text(p); u32 text_len = parser_text_length(p); u32 tmp_u32; return_code = parse_u32_check_range_len_base10(text, text_len, &tmp_u32, 0, MAX_U8); *out_value = (u8)tmp_u32; } return return_code; } static inline ya_result parser_get_u8(const char *text, u32 text_len, u8 *out_value) { u32 tmp_u32; ya_result return_code = parse_u32_check_range_len_base10(text, text_len, &tmp_u32, 0, MAX_U8); *out_value = (u8)tmp_u32; return return_code; } static inline ya_result parser_expect_eol(parser_s *p) { ya_result return_code; for(;;) { return_code = parser_next_token(p); if(return_code & PARSER_WORD) { return PARSER_FOUND_WORD; } if(return_code & (PARSER_EOL|PARSER_EOF)) { return SUCCESS; } } } static inline bool parse_word_match(const char *text, u32 text_len, const char *match, u32 match_len) { if(text_len == match_len) { bool ret = (memcmp(text, match, text_len) == 0); return ret; } return FALSE; } static inline ya_result parser_copy_next_word(parser_s *p, char *out_text, u32 out_text_len) { ya_result return_code = parser_next_word(p); if(ISOK(return_code)) { u32 len = parser_text_length(p); if(len < out_text_len) { memcpy(out_text, parser_text(p), len); out_text[len] = '\0'; return_code = len; } else { return_code = PARSER_BUFFER_TOO_SMALL; } } return return_code; } static inline ya_result parser_copy_next_class(parser_s *p, u16 *out_value) { ya_result return_code; char text[32]; if(ISOK(return_code = parser_copy_next_word(p, text, sizeof(text)))) { return_code = get_class_from_name(text, out_value); } return return_code; } static inline ya_result parser_copy_next_type(parser_s *p, u16 *out_value) { ya_result return_code; char text[32]; if(ISOK(return_code = parser_copy_next_word(p, text, sizeof(text)))) { return_code = get_type_from_name(text, out_value); } return return_code; } ya_result parser_copy_next_ttl(parser_s *p, s32 *out_value); static inline ya_result parser_copy_next_fqdn(parser_s *p, u8 *out_value) { ya_result return_code = parser_next_word(p); if(ISOK(return_code)) { const char *text = parser_text(p); u32 text_len = parser_text_length(p); return_code = cstr_to_dnsname_with_check_len(out_value, text, text_len); } return return_code; } static inline ya_result parser_copy_next_fqdn_with_origin(parser_s *p, u8 *out_value, const u8 *origin) { ya_result return_code = parser_next_word(p); if(ISOK(return_code)) { const char *text = parser_text(p); u32 text_len = parser_text_length(p); return_code = cstr_to_dnsname_with_check_len_with_origin(out_value, text, text_len, origin); } return return_code; } static inline ya_result parser_copy_next_fqdn_locase_with_origin(parser_s *p, u8 *out_value, const u8 *origin) { ya_result return_code = parser_next_word(p); if(ISOK(return_code)) { const char *text = parser_text(p); u32 text_len = parser_text_length(p); return_code = cstr_to_locase_dnsname_with_check_len_with_origin(out_value, text, text_len, origin); } return return_code; } static inline ya_result parser_copy_next_yyyymmddhhmmss(parser_s *p, u32 *out_value) { ya_result return_code = parser_next_word(p); if(ISOK(return_code)) { const char *text = parser_text(p); u32 text_len = parser_text_length(p); return_code = parse_yyyymmddhhmmss_check_range_len(text, text_len, out_value); } return return_code; } static inline ya_result parser_get_u32(const char *text, u32 text_len, u32 *out_value) { ya_result return_code = parse_u32_check_range_len_base10(text, text_len, out_value, 0, MAX_U32); return return_code; } static inline ya_result parser_get_s32(const char *text, u32 text_len, s32 *out_value) { ya_result return_code = parse_s32_check_range_len_base10(text, text_len, out_value, MIN_S32, MAX_S32); return return_code; } static inline ya_result parser_copy_next_s32(parser_s *p, s32 *out_value) { ya_result return_code = parser_next_word(p); if(ISOK(return_code)) { const char *text = parser_text(p); u32 text_len = parser_text_length(p); return_code = parse_s32_check_range_len_base10(text, text_len, out_value, MIN_S32, MAX_S32); } return return_code; } static inline ya_result parser_copy_next_u32(parser_s *p, u32 *out_value) { ya_result return_code = parser_next_word(p); if(ISOK(return_code)) { const char *text = parser_text(p); u32 text_len = parser_text_length(p); return_code = parse_u32_check_range_len_base10(text, text_len, out_value, 0, MAX_U32); } return return_code; } ya_result parser_type_bit_maps_initialize(parser_s *p, type_bit_maps_context* context); #ifdef __cplusplus } #endif #endif /* PARSER_H */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/threaded_nbrb.h0000644000077100007710000000012412650131756024561 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.605344 30 ctime=1454597651.162344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/threaded_nbrb.h0000664000077100007710000000433112650131756024367 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * @{ * *----------------------------------------------------------------------------*/ #ifndef _THREADED_NB_RINGBUFFER_H #define _THREADED_NB_RINGBUFFER_H #include #include #endif /* _THREADED_QUEUE_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/alarm.h0000644000077100007710000000012412650131756023072 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.520344 30 ctime=1454597650.828344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/alarm.h0000664000077100007710000001225412650131756022703 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup alarm * @ingroup dnscore * @brief Alarm functions * * @{ */ #ifndef _ALARM_H #define _ALARM_H #include typedef ya_result alarm_function_callback(void*, bool cancel); /* * Duplicates stays duplicated */ #define ALARM_DUP_NOP 0 /* * If there is a earlier duplicate it is removed, * if there is a later duplate this one is dropped. */ #define ALARM_DUP_REMOVE_EARLIER 1 /* * If there is a later duplicate it is removed, * if there is a earlier duplate this one is dropped. */ #define ALARM_DUP_REMOVE_LATEST 2 /** * You know what a mask is. It's not used yet because theer is no need (yet). */ #define ALARM_DUP_MASK 3 /* alarm handle */ typedef s32 alarm_t; #define ALARM_HANDLE_INVALID ((alarm_t)(~0)) struct alarm_event_node { struct alarm_event_node *hndl_next; struct alarm_event_node *hndl_prev; struct alarm_event_node *time_next; struct alarm_event_node *time_prev; u32 epoch; u32 key; /* typically a merge of a target ID and an operation flag * * ie: zone-alarm-id | signature-update-flag * * Id give 4 bits for the operations (I think there are actually 2 or 3) * assume 16 millions zones, 4 bits left ... */ alarm_function_callback *function; void *args; const char *text; /* human readable for logging */ alarm_t handle; /* reserved */ u8 flags; /* how to handle DUPs */ }; typedef struct alarm_event_node alarm_event_node; void alarm_init(); void alarm_finalise(); /** * Alarm events MUST be allocated through this. * * @return a pointer to the alarm event structure. */ alarm_event_node *alarm_event_alloc(); /** * Alarm events MUST be freed to this IF AND ONLY IF THEY HAVEN'T BEEN USED IN alarm_set * * @param node a pointer to the alarm event structure. */ void alarm_event_free(alarm_event_node *node); /** * Opens an alarm handle. * * @parm owner_dnsname a dnsname to show to the owner (typically a zone name or the database) * * @return the alarm handle. */ alarm_t alarm_open(const u8 *owner_dnsname); /** * Closes an alarm handle. Releases all its events. * * @parm hndl the alarm handle */ void alarm_close(alarm_t hndl); /** * * Sets an alarm event. desc has to be properly setup (everything * * @param hndl * @param desc */ void alarm_set(alarm_t hndl, alarm_event_node *desc); /** * * Called to resolve all alarm events until a given epoch. * * DO NOT USE THIS. ITS USAGE IS RESERVED FOR THE ALARM THREAD. */ void alarm_run_tick(u32 epoch); /** * These three are harmful. Use with care. * They are only meant to be used in an independent thread (tcp, remote controller) to send the status of a zone. * * The usage is: lock, get first, process the list, unlock * * No other alarm_ function can be called between lock and unlock */ void alarm_lock(); void alarm_unlock(); alarm_event_node *alarm_get_first(alarm_t hndl); #ifdef __cplusplus } #endif #endif /* _DNSCORE_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/host_address.h0000644000077100007710000000012412650131756024460 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.602344 30 ctime=1454597650.994344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/host_address.h0000664000077100007710000001711612650131756024273 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscoretools Generic Tools * @ingroup dnscore * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef HOST_ADDRESS_H #define HOST_ADDRESS_H #include #include #include #include #define HOSTADDR_TAG 0x5244444154534f48 #define SOCKADD4_TAG 0x344444414b434f53 #define SOCKADD6_TAG 0x364444414b434f53 struct addrinfo; struct sockaddr; #define HOST_ADDRESS_IPV4 0x04 #define HOST_ADDRESS_IPV6 0x06 #define HOST_ADDRESS_DNAME 0xfe #define HOST_ADDRESS_NONE 0x00 typedef union addressv4 addressv4; union addressv4 { u8 bytes[4]; u32 value; }; /* * Returns true if all the address bits are set respectively to 0 */ #define IPV6_ADDRESS_ALL0(_a_) (((_a_).lohi[0] == 0) && ((_a_).lohi[1] == 0)) /* * Returns true if all the address bits are set respectively to 1 */ #define IPV6_ADDRESS_ALL1(_a_) (((_a_).lohi[0] == ~0) && ((_a_).lohi[1] == ~0)) /* * Flag values for the host_address_to_str(...) function */ #define HOST_ADDRESS_TO_STR_PORT 1 // "1.2.3.4:1234" #define HOST_ADDRESS_TO_STR_FULLPORT 2 // "1.2.3.4 port 1234" #define HOST_ADDRESS_TO_STR_TSIG 4 // "1.2.3.4*mykey." #define HOST_ADDRESS_TO_STR_FULLTSIG 8 // "1.2.3.4 key mykey." #define HOST_ADDRESS_TO_STR_SHOW_PORT_ZERO 8 // else hides it typedef union addressv6 addressv6; union addressv6 { u8 bytes[16]; u32 dwords[4]; u64 lohi[2]; }; /* * The host_address is also used for notify. * It needs to be able to store names as well */ typedef union addressdname addressdname; union addressdname { u8 *dname; }; /* * Represents an ip:port. Linkable. * First made for the notification list. */ //typedef struct tsig_item tsig_item; #if DNSCORE_HAS_TSIG_SUPPORT struct tsig_item; #endif typedef struct host_address host_address; struct host_address { struct host_address *next; #if DNSCORE_HAS_TSIG_SUPPORT const struct tsig_item *tsig; /* pointer to the structure used for TSIG, to be used in relevant cases */ #endif union { addressv4 v4; addressv6 v6; addressdname dname; } ip; u16 port; u8 version; }; #define HOST_ADDRESS_EMPTY {NULL, NULL, .ip.v4.value=0, 0, HOST_ADDRESS_NONE} host_address *host_address_alloc(); host_address *host_address_copy(const host_address *address); host_address *host_address_copy_list(const host_address *address); /** * Clears the content of a host_address (mostly : deletes the dname if it's * what it contains. * * @param the host address */ void host_address_clear(host_address *address); /** * Deletes a single host addresse * * @param the host address */ void host_address_delete(host_address *address); /** * Deletes a list of host addresses * * @param the first host address from the list */ void host_address_delete_list(host_address *address); void host_set_default_port_value(host_address *address, u16 port); u32 host_address_count(const host_address *address); static inline bool host_address_empty(host_address *address) { return (address == NULL); } ya_result host_address2addrinfo(struct addrinfo **sa, const host_address *address); ya_result host_address2allocated_sockaddr(struct sockaddr **sap, const host_address *address); ya_result host_address2sockaddr(socketaddress *sap, const host_address *address); /** * It does not set the "next" pointer, NONE of the "set" functions do. * * @param sa * @param address * @return */ ya_result host_address_set_with_sockaddr(host_address *address, const socketaddress *sa); bool host_address_list_contains_ip(host_address *address, const socketaddress *sa); #if DNSCORE_HAS_TSIG_SUPPORT bool host_address_list_contains_ip_tsig(host_address *address, const socketaddress *sa, const struct tsig_item *tsig); #endif bool host_address_list_contains_host(host_address *address, const host_address *ha); bool host_address_list_equals(const host_address *a, const host_address *b); bool host_address_equals(const host_address *a, const host_address *b); s32 host_address_compare(const host_address *a, const host_address *b); bool host_address_match(const host_address *a, const host_address *b); void host_address_set_ipv4(host_address *address, const u8 *ipv4, u16 port); void host_address_set_ipv6(host_address *address, const u8 *ipv6, u16 port); /** * It does not set the "next" pointer, NONE of the "set" functions do. * An address set like this will need to be freed with host_address_clear() * or deleted with host_address_delete or host_address_delete_list * * @param address * @param dname * @param port */ void host_address_set_dname(host_address *address, const u8 *dname, u16 port); ya_result host_address_append_ipv4(host_address *address, const u8 *ipv4, u16 port); ya_result host_address_append_ipv6(host_address *address, const u8 *ipv6, u16 port); ya_result host_address_append_dname(host_address *address, const u8 *dname, u16 port); ya_result host_address_append_host_address(host_address *address, const host_address *ha); ya_result host_address_append_hostent(host_address *address, struct hostent *he, u16 port); host_address *host_address_remove_host_address(host_address **address, host_address *ha_match); bool host_address_update_host_address_list(host_address **dp, host_address *s); static inline const host_address *host_address_get_at_index(const host_address *ha_list, u32 idx) { while((idx > 0) && (ha_list != NULL)) { ha_list = ha_list->next; idx--; } return ha_list; } /** * * host_address_to_str * * writes an address to a string, with optional details * * @param address * @param str * @param len * @param flags * @return */ ya_result host_address_to_str(const host_address *address, char *str, int len, u8 flags); #endif /* HOST_ADDRESS_H */ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/io_stream.h0000644000077100007710000000012412650131756023760 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.542344 30 ctime=1454597651.009344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/io_stream.h0000664000077100007710000000600212650131756023563 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * @{ */ #ifndef _IO_STREAM_H #define _IO_STREAM_H #include #include #ifdef __cplusplus extern "C" { #endif typedef struct io_stream io_stream; struct io_stream { input_stream in; output_stream out; }; static inline void io_stream_link(io_stream *ios, input_stream *is, output_stream *os) { ios->in.data = is->data; ios->in.vtbl = is->vtbl; ios->out.data = os->data; ios->out.vtbl = os->vtbl; } static inline ya_result io_stream_read(io_stream *ios, u8 *buffer, u32 len) { return ios->in.vtbl->read(&ios->in, buffer, len); } static inline ya_result io_stream_skip(io_stream *ios, u32 len) { return ios->in.vtbl->skip(&ios->in, len); } static inline ya_result io_stream_write(io_stream *ios, u8 *buffer, u32 len) { return ios->out.vtbl->write(&ios->out, buffer, len); } static inline ya_result io_stream_flush(io_stream *ios) { return ios->out.vtbl->flush(&ios->out); } static inline void io_stream_close(io_stream *ios) { ios->in.vtbl->close(&ios->in); ios->out.vtbl->close(&ios->out); } #ifdef __cplusplus } #endif #endif /* _IO_STREAM_H */ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/logger_channel_syslog.h0000644000077100007710000000012412650131756026345 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.592344 30 ctime=1454597651.035344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/logger_channel_syslog.h0000664000077100007710000000464312650131756026161 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logger Logging functions * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _LOGGER_CHANNEL_SYSLOG_H #define _LOGGER_CHANNEL_SYSLOG_H #include #ifdef __cplusplus extern "C" { #endif /* * NOTE: ONLY ONE SYSLOG CHANNEL SHOULD BE OPEN !!! */ void logger_channel_syslog_open(const char* ident, int options, int facility, logger_channel *chan); #ifdef __cplusplus } #endif #endif /* _LOGGER_CHANNEL_SYSLOG_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/message_dnsupdate.h0000644000077100007710000000012412650131756025471 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.487344 30 ctime=1454597651.050344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/message_dnsupdate.h0000664000077100007710000000562412650131756025305 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef MESSAGE_DNSUPDATE_H_ #define MESSAGE_DNSUPDATE_H_ #ifdef __cplusplus extern "C" { #endif #if 1 #include #include #include #include #include #include #include #include #include #include #include #include #include void message_dnsupdate_data_append_message_dnsupdate_data(message_dnsupdate_data *entry, message_dnsupdate_data *new_entry); void message_dnsupdate_data_create(message_dnsupdate_data* entry, u32 zttl, u16 ztype, u16 zclass, const u8 *zname, u16 zrdata_len, char *zrdata); #endif #ifdef __cplusplus } #endif #endif /* MESSAGE_DNSUPDATE_H_ */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/config-cmdline.h0000644000077100007710000000012412650131756024654 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.506344 30 ctime=1454597650.898344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/config-cmdline.h0000664000077100007710000000625412650131756024470 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/sys_types.h" #ifndef CONFIG_CMDLINE_C extern const char CMDLINE_CONTAINER[]; #endif /** * This define has to be put in a CMDLINE table so the help can be handled * automatically. * * Requires registration of the command line using config_register_cmdline */ #define CMDLINE_VERSION_HELP(cmdline) \ CMDLINE_SECTION( CMDLINE_CONTAINER) \ CMDLINE_BOOL( "help", 'h', "help" )\ CMDLINE_BOOL( "help", '?', "help" )\ CMDLINE_BOOL( "version", 'V', "version" ) /** * * Registers the command line section/container with the configuration mechanism. * Allows handling of help and version command line parameters. * * @param priority * @return */ ya_result config_register_cmdline(u8 priority); /** * * Returns TRUE iff a help parameter was found in the command line * * @return TRUE iff a help parameter was found in the command line */ bool cmdline_help_get(); /** * Returns the number of times a version parameter was found on the command line * * @return the number of times a version parameter was found on the command line */ u8 cmdline_version_get(); /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/concat_input_stream.h0000644000077100007710000000012412650131756026037 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.589344 30 ctime=1454597650.894344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/concat_input_stream.h0000664000077100007710000000471412650131756025652 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _CONCAT_INPUT_STREAM_H #define _CONCAT_INPUT_STREAM_H #include #ifdef __cplusplus extern "C" { #endif /** * * @param cis */ void concat_input_stream_init(input_stream *cis); /** * * @param cis * @param added_stream */ void concat_input_stream_add(input_stream *cis, input_stream *added_stream); #ifdef __cplusplus } #endif #endif /* _CONCAT_INPUT_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/debug.h0000644000077100007710000000012412650131756023064 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.516344 30 ctime=1454597650.917344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/debug.h0000664000077100007710000002043412650131756022674 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup debug Debug functions * @ingroup dnscore * @brief Debug functions. * * Definitions of debug functions/hooks, mainly memory related. * * THIS MEMORY DEBUGGER MUST BE INCLUDED WITH EVERY SINGLE (C) FILE. * IF DEBUGGING MEMORY ALLOCATION IS USED, IT HAS TO BE ENABLED EVERYWHERE OR NOWHERE. * * @{ */ #ifndef _DEBUG_H #define _DEBUG_H #ifndef _SYSTYPES_H #error PLEASE DO NOT INCLUDE debug.h DIRECTLY. USE sys_types.h. #endif #ifdef DEBUG #include #endif #include #include #include /** @note : DO NOT INCLUDE THIS HERE WITHOUT SOME KIND OF PROTECTION #include */ #include #if !defined(DEBUG) #define yassert(x) #else void log_assert__(bool b, const char *txt, const char *file, int line); #if !__clang_analyzer__ #define yassert(cond__) log_assert__((cond__), #cond__, __FILE__, __LINE__);assert((cond__)) #else #define yassert(cond__) assert(cond__) #endif #endif #ifdef __cplusplus extern "C" { #endif #define GENERIC_TAG 0x434952454e4547 /* GENERIC */ #define ZDB_STRDUP_TAG 0x505544525453 /* "STRDUP" */ void debug_dump(void* data_pointer_,size_t size,size_t line_size,bool hex,bool text); void debug_dump_ex(void* data_pointer_, size_t size_, size_t line_size, bool hex, bool text, bool address); struct logger_handle; bool debug_log_stacktrace(struct logger_handle *handle, u32 level, const char *prefix); #ifdef DEBUG /* * DO NOT FORGET THAT THE "L" FUNCTIONS DO REQUIRE A DEBUG_LEVEL #define * BEFORE THE "debug.h" INCLUDE ! */ #define DEBUGLNF(...) osformatln(termerr,__VA_ARGS__) #define DEBUGF(...) osformat(termerr,__VA_ARGS__) #define OSDEBUG(term, ...) osformat((term),__VA_ARGS__) #define LDEBUG(level, ...) if(DEBUG_LEVEL>=(level)) osformat(termerr,__VA_ARGS__) #define OSLDEBUG(term, level, ...) if(DEBUG_LEVEL>=(level)) osformat((term),__VA_ARGS__) #else #define DEBUGLNF(...) #define DEBUGF(...) #define OSDEBUG(...) #define LDEBUG(...) #define OSLDEBUG(...) #endif #ifndef DNSCORE_HAS_MALLOC_DEBUG_SUPPORT #error "bogus include sequence" #endif #if DNSCORE_HAS_MALLOC_DEBUG_SUPPORT #ifndef MALLOC_OR_DIE #error "something fishy is happening. MALLOC_OR_DIE has not been defined yet." #endif #ifndef REALLOC_OR_DIE #error "something fishy is happening. REALLOC_OR_DIE has not been defined yet." #endif #undef MALLOC_OR_DIE #undef REALLOC_OR_DIE void* debug_malloc( size_t size_,const char* file, int line #if ZDB_DEBUG_TAG_BLOCKS!=0 ,u64 tag #endif ); void* debug_calloc( size_t size_,const char* file, int line #if ZDB_DEBUG_TAG_BLOCKS!=0 ,u64 tag #endif ); void* debug_realloc( void* ptr_, size_t size_, const char* file, int line ); bool debug_mallocated(void* ptr); #define assert_mallocated(ptr) yassert(debug_mallocated(ptr)) void debug_free(void* ptr,const char* file, int line); void debug_mtest(void* ptr); void debug_stat(bool dump); char* debug_strdup(const char*); u32 debug_get_block_count(); #ifdef strdup #undef strdup #endif #define strdup debug_strdup #if ZDB_DEBUG_TAG_BLOCKS == 0 #define malloc(len) debug_malloc((len),__FILE__,__LINE__) #define calloc(len) debug_calloc((len),__FILE__,__LINE__) #define free(p) debug_free((p),__FILE__,__LINE__) #define realloc(p,len) debug_realloc((p),(len),__FILE__,__LINE__) #define MALLOC_OR_DIE(cast,target,size,tag) if(((target)=(cast)debug_malloc(size,__FILE__,__LINE__))==NULL){perror(__FILE__);exit(EXIT_CODE_OUTOFMEMORY_ERROR); /* NOT TAGGED*/ } #define REALLOC_OR_DIE(cast,src_and_target,newsize,tag) if(((src_and_target)=(cast)debug_realloc((src_and_target),(newsize),__FILE__,__LINE__))==NULL){perror(__FILE__);exit(EXIT_CODE_OUTOFMEMORY_ERROR); /* NOT TAGGED */ } #else #define ZDB_MALLOC_TAG 0x434f4c4c414d #define malloc(len) debug_malloc((len),__FILE__,__LINE__,ZDB_MALLOC_TAG) #define free(p) debug_free((p),__FILE__,__LINE__) #define realloc(p,len) debug_realloc((p),(len),__FILE__,__LINE__) #define MALLOC_OR_DIE(cast,target,size,tag) if(((target)=(cast)debug_malloc(size,__FILE__,__LINE__,(tag)))==NULL){perror(__FILE__);exit(EXIT_CODE_OUTOFMEMORY_ERROR); /* TAGGED */} #define REALLOC_OR_DIE(cast,src_and_target,newsize,tag) if(((src_and_target)=(cast)debug_realloc((src_and_target),(newsize),__FILE__,__LINE__))==NULL){perror(__FILE__);exit(EXIT_CODE_OUTOFMEMORY_ERROR); /* NOT TAGGED */ } #endif #else #define debug_mtest(x) #define debug_stat(x) #define debug_mallocated(x) TRUE #define assert_mallocated(x) /* * MALLOC_OR_DIE and REALLOC_OR_DIE have already been defined in sys_types.h */ #endif struct debug_bench_s { struct debug_bench_s *next; const char *name; u64 time_min; u64 time_max; u64 time_total; u64 time_count; }; typedef struct debug_bench_s debug_bench_s; // declares timeus() u64 timeus(); void debug_bench_register(debug_bench_s *bench, const char *name); #define debug_bench_start(bench__) timeus() #define debug_bench_stop(bench__, from__) debug_bench_commit((bench__), timeus() - (from__)); void debug_bench_commit(debug_bench_s *bench, u64 delta); void debug_bench_logdump_all(); typedef intptr* stacktrace; struct output_stream; struct logger_handle; stacktrace debug_stacktrace_get(); void debug_stacktrace_log(struct logger_handle *handle, u32 level, stacktrace trace); void debug_stacktrace_print(struct output_stream *os, stacktrace trace); /** * clears all stacktraces from memory * should only be called at shutdown */ void debug_stacktrace_clear(); #ifdef DEBUG /* * These debugging tools ensure that ONE and only ONE thread is working on the structure. * It detects race issues. */ typedef struct debug_unicity debug_unicity; struct debug_unicity { pthread_mutex_t mutex; u8 counter; }; void debug_unicity_init(debug_unicity *dus); void debug_unicity_acquire(debug_unicity *dus); void debug_unicity_release(debug_unicity *dus); /* No, they are never destroyed */ #define UNICITY_DEFINE(x) static debug_unicity debug_unicity##x = {PTHREAD_MUTEX_INITIALIZER, 0}; #define UNICITY_ACQUIRE(x) debug_unicity_acquire(&debug_unicity##x); #define UNICITY_RELEASE(x) debug_unicity_release(&debug_unicity##x); #else #define UNICITY_DEFINE(x) #define UNICITY_ACQUIRE(x) #define UNICITY_RELEASE(x) #endif /* * This is a helper for valgrind * Reads the bytes and prints them using putchar * Called to hunt unintialised bytes */ void debug_vg(const void* b, int len); #ifdef __cplusplus } #endif #endif /* _DEBUG_H */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dnskey.h0000644000077100007710000000012412650131756023273 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.585344 30 ctime=1454597650.946344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dnskey.h0000664000077100007710000002637512650131756023115 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnskey DNSSEC keys functions * @ingroup dnsdbdnssec * @brief * * * @{ */ #ifndef _DNSKEY_H #define _DNSKEY_H #include #include #include #include #include #include #include #include #define DNSSEC_MINIMUM_KEY_SIZE 512 #define DNSSEC_MAXIMUM_KEY_SIZE (8192 + 128) #define DNSSEC_DEFAULT_KEYSTORE_PATH "." #define DNSSEC_MINIMUM_KEY_SIZE_BYTES ((DNSSEC_MINIMUM_KEY_SIZE+7)/8) #define DNSSEC_MAXIMUM_KEY_SIZE_BYTES ((DNSSEC_MAXIMUM_KEY_SIZE+7)/8) #ifdef WORDS_BIGENDIAN #define DNSKEY_FLAGS_KSK 0x0101 // NATIVE #define DNSKEY_FLAGS_ZSK 0x0100 // NATIVE #else #define DNSKEY_FLAGS_KSK 0x0101 // NATIVE #define DNSKEY_FLAGS_ZSK 0x0001 // NATIVE #endif /* * Extract fields from a packed record * */ #define DNSKEY_FLAGS_FROM_RDATA(x__) (GET_U16_AT((x__)[0])) #define DNSKEY_FLAGS(x__) (GET_U16_AT((x__).rdata_start[0])) #define DNSKEY_PROTOCOL(x__) ((x__).rdata_start[2]) #define DNSKEY_ALGORITHM(x__) ((x__).rdata_start[3]) /* * Computes the key tag from a packed record */ #define DNSKEY_TAG(x__) (dnskey_get_key_tag_from_rdata(&(x__).rdata_start[0],(x__).rdata_size)) #ifdef __cplusplus extern "C" { #endif #define DNSKEY_RDATA_TAG 0x445259454b534e44 /* DNSKEYRD */ struct structdescriptor { const char* name; size_t address; int type; }; #define STRUCTDESCRIPTOR_BN 1 struct dnssec_key_vtbl; typedef struct dnssec_key_vtbl dnssec_key_vtbl; typedef struct dnssec_key_contextmethods dnssec_key_contextmethods; union dnssec_key_data { void* any; RSA* rsa; DSA* dsa; }; typedef union dnssec_key_data dnssec_key_data; typedef struct dnssec_key dnssec_key; #define DNSKEY_KEY_IS_PRIVATE 1 #define DNSKEY_KEY_TAG_SET 2 // not always needed #define DNSKEY_KEY_IS_FROM_DISK 4 // for generated keys #define DNSKEY_KEY_IS_MARKED 8 // for marking a key (key manager update algorithm) #define DNSKEY_KEY_IS_VALID 16 // the key is public with all its fields set /* Hash should be tag<<8 | algorithm */ struct dnssec_key { struct dnssec_key* next; const dnssec_key_vtbl* vtbl; char* origin; u8* owner_name; // = zone origin dnssec_key_data key; // RSA* or DSA* s64 timestamp; // the file modification time of the private key (to avoid reloading) int nid; // NID_sha1, NID_md5 u32 epoch_created; u32 epoch_publish; // if not published yet, at that time, it needs to be added in the zone u32 epoch_activate; // if not activated yet, at that time, it needs to be used for signatures u32 epoch_revoke; // not handled yet u32 epoch_inactive; // if active, at that time, it needs to stop being used for signatures u32 epoch_delete; // if still in the zone, at that time, it needs to be removed from the zone u16 flags; u16 tag; u8 algorithm; int status; /* * Later, add a list of (wannabe) signers and for each of these * if said signature has been verified, not verified or is wrong */ }; typedef struct dnssec_key_sll dnssec_key_sll; struct dnssec_key_sll { struct dnssec_key_sll* next; dnssec_key* key; }; typedef void dnskey_key_free_method(dnssec_key* key); typedef u32 dnskey_key_rdatasize_method(dnssec_key* key); typedef u32 dnskey_key_writerdata_method(dnssec_key* key,u8* output); typedef ya_result dnssec_key_sign_digest_method(dnssec_key* key,u8* digest,u32 digest_len,u8* output); typedef bool dnssec_key_verify_digest_method(dnssec_key* key,u8* digest,u32 digest_len,u8* signature,u32 signature_len); typedef bool dnssec_key_equals_method(dnssec_key* key_a,dnssec_key* key_b); typedef const struct structdescriptor *dnssec_key_get_fields_descriptor_method(dnssec_key* key); //typedef bool dnssec_key_is_private_method(dnssec_key* key); struct dnssec_key_vtbl { dnssec_key_sign_digest_method* dnssec_key_sign_digest; dnssec_key_verify_digest_method* dnssec_key_verify_digest; dnskey_key_rdatasize_method* dnskey_key_rdatasize; dnskey_key_writerdata_method* dnskey_key_writerdata; dnskey_key_free_method* dnskey_key_free; dnssec_key_equals_method* dnssec_key_equals; dnssec_key_get_fields_descriptor_method* dnssec_key_get_fields_descriptor; //dnssec_key_is_private_method* dnssec_key_is_private; const char *__class__; }; dnssec_key *dnskey_newemptyinstance(u8 algorithm,u16 flags,const char *origin); /** * Generate a (public) key using the RDATA * * @param rdata * @param rdata_size * @param origin * @param out_key * @return */ ya_result dnskey_new_from_rdata(const u8 *rdata, u16 rdata_size, const char *origin, dnssec_key **out_key); void dnskey_free(dnssec_key *key); /** * * Compares two keys for equality * Uses the tag, flags, algorithm and origin. * * @param a * @param b * * @return TRUE iff the keys are the same. */ static inline bool dnssec_key_tag_field_set(const dnssec_key *key) { return (key->status & DNSKEY_KEY_TAG_SET) != 0; } u16 dnssec_key_get_tag(dnssec_key *key); u8 dnssec_key_get_algorithm(dnssec_key *key); const u8 *dnssec_key_get_domain(dnssec_key *key); bool dnssec_key_is_private(dnssec_key *key); /** * Adds/Remove a key from a key chain. * The 'next' field of the key is used. * A key can only be in one chain at a time. * This is meant to be used in the keystore. * * @param keyp */ void dnskey_key_add_in_chain(dnssec_key *key, dnssec_key **keyp); /** * Adds/Remove a key from a key chain. * The 'next' field of the key is used. * A key can only be in one chain at a time. * This is meant to be used in the keystore. * * @param keyp */ void dnskey_key_remove_from_chain(dnssec_key *key, dnssec_key **keyp); /** Key tag */ u16 dnskey_get_key_tag_from_rdata(const u8* dnskey_rdata,u32 dnskey_rdata_size); // For compatibility with <= 2.1.4 static inline u16 dnskey_getkeytag(const u8* dnskey_rdata,u32 dnskey_rdata_size) { u16 ret = dnskey_get_key_tag_from_rdata(dnskey_rdata, dnskey_rdata_size); return ret; } static inline u16 dnskey_get_flags_from_rdata(const u8* dnskey_rdata) { return GET_U16_AT_P(dnskey_rdata); } static inline u8 dnskey_get_protocol_from_rdata(const u8* dnskey_rdata) { return dnskey_rdata[2]; } static inline u8 dnskey_get_algorithm_from_rdata(const u8* dnskey_rdata) { return dnskey_rdata[3]; } /** Key tag */ unsigned int dnskey_get_key_tag_from_rdata_reference(unsigned char key[], /* the RDATA part of the DNSKEY RR */ unsigned int keysize /* the RDLENGTH */ ); /** * Generate the RDATA of a DS records using the RDATA from a DSNKEY record * * @param digest_type the type of DS * @param dnskey_fqdn the domain of the record * @param dnskey_rdata the rdata of the DNSKEY * @param dnskey_rdata_size the size of the rdata of the DNSKEY * @param out_rdata the output buffer that has to be the right size (known given digest_type) * @return */ ya_result dnskey_generate_ds_rdata(u8 digest_type, const u8 *dnskey_fqdn, const u8 *dnskey_rdata,u16 dnskey_rdata_size, u8 *out_rdata); /** * * Compares two keys for equality * * @param a * @param b * @return */ bool dnssec_key_equals(dnssec_key* a, dnssec_key* b); /////////////////////////////////////////////////////////////////////////////// ya_result dnskey_digest_init(digest_s *ctx, u8 algorithm); /** * * @param f_ output file * @param num_ the number to write * @param tmp_in_ temporary buffer * @param tmp_in_size temporary buffer size * @param tmp_out_ output buffer * @param tmp_out_size output buffer size * @return */ ya_result dnskey_write_bignum_as_base64(FILE *f_, const BIGNUM* num_, u8 *tmp_in_, u32 tmp_in_size, char *tmp_out_, u32 tmp_out_size); /** * Returns the most relevant publication time. * * publish > activate > created > now * * @param key * @return */ u32 dnskey_get_publish_epoch(dnssec_key *key); /** * Returns the most relevant activation time. * * activate > publish > created > now * * @param key * @return */ u32 dnskey_get_activate_epoch(dnssec_key *key); /** * Returns the most relevant revocation time. * * revoke > never * * @param key * @return */ u32 dnskey_get_revoke_epoch(dnssec_key *key); /** * Returns the most relevant inactivation time. * * inactive > delete > never * * @param key * @return */ u32 dnskey_get_inactive_epoch(dnssec_key *key); /** * Returns the most relevant delete time. * * delete > inactive > never * * @param key * @return */ u32 dnskey_get_delete_epoch(dnssec_key *key); /////////////////////////////////////////////////////////////////////////////// static inline u16 ds_get_wire_keytag_from_rdata(const u8 *rdata) { u16 ds_keytag = GET_U16_AT_P(rdata); return ds_keytag; } static inline u16 ds_get_keytag_from_rdata(const u8 *rdata) { u16 ds_keytag = ntohs(ds_get_wire_keytag_from_rdata(rdata)); return ds_keytag; } static inline u8 ds_get_algorithm_from_rdata(const u8 *rdata) { u8 ds_algorithm = rdata[2]; return ds_algorithm; } static inline u8 ds_get_digesttype_from_rdata(const u8 *rdata) { u8 ds_digesttype = rdata[3]; return ds_digesttype; } /////////////////////////////////////////////////////////////////////////////// #ifdef __cplusplus } #endif #endif /* _DNSKEY_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/sys_error.h0000644000077100007710000000012412650131756024025 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.578344 30 ctime=1454597651.140344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/sys_error.h0000664000077100007710000003601712650131756023641 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscoreerror Error * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef ERROR_H_ #define ERROR_H_ /* ------------------------------------------------------------ * * INCLUDES */ /* * Please only include "native" stuff. sys_error.h should NOT depend * on anything else (beside sys_types but sys_types.h already includes * sys_error.h) */ #include #include #include #include #include #include /* * 8000 ERRNO * 8001 SERVER * 8002 CORE * 8003 DNS * 8004 DATABASE * 8005 DNSSEC * 8006 ACL * 8007 CONFIG? * 8008 YDF * 8009 EAI * 800A ZONE FILE READ * 800B SANITY * 800C NEW CONFIG * 800D PARSER * C000 DNS RCODE */ #if !defined(_SYSTYPES_H) #error Included from a disallowed place. #endif #define SUCCESS 0 #define OK 0 // The basic error code /// @note Everywhere in the source, "return ERROR;" should be replaced by something more specific #define ERROR -1 #define NOK -1 /* Two macros to easily check an error status */ #define FAIL(result) ((result)<0) #define ISOK(result) ((result)>=0) /* 16 most significant bits : GROUP, the sign bit being ALWAYS set * 16 least significant bits : ID */ #define ERRNO_ERROR_BASE 0x80000000 #define ERRNO_ERROR ((s32)(ERRNO_ERROR_BASE+errno)) #define MAKE_ERRNO_ERROR(err_) ((s32)(ERRNO_ERROR_BASE+(err_))) #define EXITFAIL(x) if((x)<0) {DIE(ERROR);exit(EXIT_FAILURE);} #define DNSMSG_ERROR_BASE 0xc0000000 #define MAKE_DNSMSG_ERROR(err_) ((s32)(DNSMSG_ERROR_BASE+(err_))) /* ----------------------------------------------------------------------------- * * STRUCTS */ typedef int32_t ya_result; #define SERVER_ERROR_BASE 0x80010000 #define SERVER_ERROR_CODE(code_) ((s32)(SERVER_ERROR_BASE+(code_))) #define SERVER_ERROR_GETCODE(error_) ((error_)&0xffff) #define CORE_ERROR_BASE 0x80020000 #define CORE_ERROR_CODE(code_) ((s32)(CORE_ERROR_BASE+(code_))) #define LOGGER_INITIALISATION_ERROR CORE_ERROR_CODE(1) #define COMMAND_ARGUMENT_EXPECTED CORE_ERROR_CODE(2) #define OBJECT_NOT_INITIALIZED CORE_ERROR_CODE(3) #define FORMAT_ALREADY_REGISTERED CORE_ERROR_CODE(4) #define STOPPED_BY_APPLICATION_SHUTDOWN CORE_ERROR_CODE(5) #define INVALID_STATE_ERROR CORE_ERROR_CODE(6) #define FEATURE_NOT_IMPLEMENTED_ERROR CORE_ERROR_CODE(7) #define UNEXPECTED_NULL_ARGUMENT_ERROR CORE_ERROR_CODE(8) #define INVALID_ARGUMENT_ERROR CORE_ERROR_CODE(9) #define UNABLE_TO_COMPLETE_FULL_READ CORE_ERROR_CODE(11) #define UNEXPECTED_EOF CORE_ERROR_CODE(12) #define UNSUPPORTED_TYPE CORE_ERROR_CODE(13) #define UNKNOWN_NAME CORE_ERROR_CODE(14) /* name->value table */ #define BIGGER_THAN_MAX_PATH CORE_ERROR_CODE(15) #define UNABLE_TO_COMPLETE_FULL_WRITE CORE_ERROR_CODE(16) #define BUFFER_WOULD_OVERFLOW CORE_ERROR_CODE(17) #define CHROOT_NOT_A_DIRECTORY CORE_ERROR_CODE(18) #define CHROOT_ALREADY_JAILED CORE_ERROR_CODE(19) #define IP_VERSION_NOT_SUPPORTED CORE_ERROR_CODE(20) #define COLLECTION_DUPLICATE_ENTRY CORE_ERROR_CODE(21) #define INVALID_PATH CORE_ERROR_CODE(22) #define PID_LOCKED CORE_ERROR_CODE(23) #define ZALLOC_ERROR_MMAPFAILED CORE_ERROR_CODE(24) #define ZALLOC_ERROR_OUTOFMEMORY CORE_ERROR_CODE(25) #define PARSEB16_ERROR CORE_ERROR_CODE(0x1001) #define PARSEB32_ERROR CORE_ERROR_CODE(0x1002) #define PARSEB32H_ERROR CORE_ERROR_CODE(0x1003) #define PARSEB64_ERROR CORE_ERROR_CODE(0x1004) #define PARSEINT_ERROR CORE_ERROR_CODE(0x1005) #define PARSEDATE_ERROR CORE_ERROR_CODE(0x1006) #define PARSEIP_ERROR CORE_ERROR_CODE(0x1007) #define PARSEWORD_NOMATCH_ERROR CORE_ERROR_CODE(0x1081) #define PARSESTRING_ERROR CORE_ERROR_CODE(0x1082) #define PARSE_BUFFER_TOO_SMALL_ERROR CORE_ERROR_CODE(0x1083) #define PARSE_INVALID_CHARACTER CORE_ERROR_CODE(0x1084) #define PARSE_INVALID_ARGUMENT CORE_ERROR_CODE(0x1085) #define CONFIG_SECTION_CALLBACK_ALREADY_SET CORE_ERROR_CODE(0x1801) #define CONFIG_SECTION_CALLBACK_NOT_SET CORE_ERROR_CODE(0x1802) #define CONFIG_SECTION_CALLBACK_NOT_FOUND CORE_ERROR_CODE(0x1803) #define CONFIG_NOT_A_REGULAR_FILE CORE_ERROR_CODE(0x1804) #define CONFIG_TOO_MANY_HOSTS CORE_ERROR_CODE(0x1805) #define CONFIG_FQDN_NOT_ALLOWED CORE_ERROR_CODE(0x1806) #define CONFIG_PORT_NOT_ALLOWED CORE_ERROR_CODE(0x1807) #define CONFIG_EXPECTED_VALID_PORT_VALUE CORE_ERROR_CODE(0x1808) #define CONFIG_TSIG_NOT_ALLOWED CORE_ERROR_CODE(0x1809) #define CONFIG_INTERNAL_ERROR CORE_ERROR_CODE(0x180a) #define CONFIG_IPV4_NOT_ALLOWED CORE_ERROR_CODE(0x180b) #define CONFIG_IPV6_NOT_ALLOWED CORE_ERROR_CODE(0x180c) #define CONFIG_KEY_UNKNOWN CORE_ERROR_CODE(0x180d) #define CONFIG_KEY_PARSE_ERROR CORE_ERROR_CODE(0x180e) #define THREAD_CREATION_ERROR CORE_ERROR_CODE(0x2001) #define THREAD_DOUBLEDESTRUCTION_ERROR CORE_ERROR_CODE(0x2002) #define SERVICE_ID_ERROR CORE_ERROR_CODE(0x2003) #define SERVICE_WITHOUT_ENTRY_POINT CORE_ERROR_CODE(0x2004) #define SERVICE_ALREADY_INITIALISED CORE_ERROR_CODE(0x2005) #define SERVICE_ALREADY_RUNNING CORE_ERROR_CODE(0x2006) #define SERVICE_NOT_RUNNING CORE_ERROR_CODE(0x2007) #define SERVICE_NOT_INITIALISED CORE_ERROR_CODE(0x2008) #define SERVICE_HAS_RUNNING_THREADS CORE_ERROR_CODE(0x2009) #define SERVICE_ALREADY_PAUSED CORE_ERROR_CODE(0x200a) #define TSIG_DUPLICATE_REGISTRATION CORE_ERROR_CODE(0x3001) #define TSIG_UNABLE_TO_SIGN CORE_ERROR_CODE(0x3002) #define NET_UNABLE_TO_RESOLVE_HOST CORE_ERROR_CODE(0x4001) #define TCP_RATE_TOO_SLOW CORE_ERROR_CODE(0x4002) #define CHARON_ERROR_FILE_LOCKED CORE_ERROR_CODE(0x5001) #define CHARON_ERROR_NOT_AUTHORISED CORE_ERROR_CODE(0x5002) #define CHARON_ERROR_UNKNOWN_ID CORE_ERROR_CODE(0x5003) #define CHARON_ERROR_EXPECTED_MAGIC_HEAD CORE_ERROR_CODE(0x5004) #define CHARON_ERROR_INVALID_HEAD CORE_ERROR_CODE(0x5006) #define CHARON_ERROR_INVALID_TAIL CORE_ERROR_CODE(0x5007) #define CHARON_ERROR_INVALID_COMMAND CORE_ERROR_CODE(0x5008) #define CHARON_ERROR_COMMAND_SEQ_MISMATCHED CORE_ERROR_CODE(0x5009) #define LOGGER_CHANNEL_ALREADY_REGISTERED CORE_ERROR_CODE(0x6001) #define LOGGER_CHANNEL_NOT_REGISTERED CORE_ERROR_CODE(0x6002) #define LOGGER_CHANNEL_HAS_LINKS CORE_ERROR_CODE(0x6003) #define ALARM_REARM CORE_ERROR_CODE(0xff00) // KEEP, used by alarm callback functions to automatically re-arm #define DNS_ERROR_BASE 0x80030000 #define DNS_ERROR_CODE(code_) ((s32)(DNS_ERROR_BASE+(code_))) #define DOMAIN_TOO_LONG DNS_ERROR_CODE(1) /* FQDN is longer than 255 */ #define INCORRECT_IPADDRESS DNS_ERROR_CODE(2) /* Incorrect ip address */ #define INCORRECT_RDATA DNS_ERROR_CODE(3) #define ZONEFILE_UNSUPPORTED_TYPE DNS_ERROR_CODE(11) /* Type is unknown */ #define LABEL_TOO_LONG DNS_ERROR_CODE(12) /* label is longer than 63 */ #define INVALID_CHARSET DNS_ERROR_CODE(13) /* */ #define ZONEFILE_INVALID_TYPE DNS_ERROR_CODE(14) /* Type is unknown */ #define DOMAINNAME_INVALID DNS_ERROR_CODE(16) /* invalid dnsname usually : double dot */ #define TSIG_BADKEY DNS_ERROR_CODE(17) /* Unknown key name in TSIG record */ #define TSIG_BADTIME DNS_ERROR_CODE(18) /* TSIG timestamp outisde of the time window */ #define TSIG_BADSIG DNS_ERROR_CODE(19) /* TSIG timestamp outisde of the time window */ #define TSIG_FORMERR DNS_ERROR_CODE(20) #define TSIG_SIZE_LIMIT_ERROR DNS_ERROR_CODE(21) #define UNPROCESSABLE_MESSAGE DNS_ERROR_CODE(22) #define INVALID_PROTOCOL DNS_ERROR_CODE(24) #define INVALID_RECORD DNS_ERROR_CODE(25) #define UNSUPPORTED_RECORD DNS_ERROR_CODE(26) #define ZONE_ALREADY_UP_TO_DATE DNS_ERROR_CODE(27) #define UNKNOWN_DNS_TYPE DNS_ERROR_CODE(28) #define UNKNOWN_DNS_CLASS DNS_ERROR_CODE(29) #define INVALID_MESSAGE DNS_ERROR_CODE(30) #define MESSAGE_HAS_WRONG_ID DNS_ERROR_CODE(31) #define MESSAGE_IS_NOT_AN_ANSWER DNS_ERROR_CODE(32) #define MESSAGE_UNEXPECTED_ANSWER_DOMAIN DNS_ERROR_CODE(33) #define MESSAGE_UNEXPECTED_ANSWER_TYPE_CLASS DNS_ERROR_CODE(34) #define MESSAGE_CONTENT_OVERFLOW DNS_ERROR_CODE(35) #define RRSIG_COVERED_TYPE_DIFFERS DNS_ERROR_CODE(36) #define RRSIG_OUTPUT_DIGEST_SIZE_TOO_BIG DNS_ERROR_CODE(37) #define RRSIG_UNSUPPORTED_COVERED_TYPE DNS_ERROR_CODE(38) #define RRSIG_VERIFICATION_FAILED DNS_ERROR_CODE(39) /// @note EAI error codes are used for getaddrinfo /// /// @note EAI_ERROR_BADFLAGS error code is used for getaddrinfo through EAI_ERROR_CODE /// @note EAI_ERROR_NONAME error code is used for getaddrinfo through EAI_ERROR_CODE /// @note EAI_ERROR_AGAIN error code is used for getaddrinfo through EAI_ERROR_CODE /// @note EAI_ERROR_FAIL error code is used for getaddrinfo through EAI_ERROR_CODE /// @note EAI_ERROR_FAMILY error code is used for getaddrinfo through EAI_ERROR_CODE /// @note EAI_ERROR_SOCKTYPE error code is used for getaddrinfo through EAI_ERROR_CODE /// @note EAI_ERROR_SERVICE error code is used for getaddrinfo through EAI_ERROR_CODE /// @note EAI_ERROR_MEMORY error code is used for getaddrinfo through EAI_ERROR_CODE /// @note EAI_ERROR_SYSTEM error code is used for getaddrinfo through EAI_ERROR_CODE /// @note EAI_ERROR_OVERFLOW error code is used for getaddrinfo through EAI_ERROR_CODE #define EAI_ERROR_BASE 0x80090000 #define EAI_ERROR_CODE(code_) ((s32)(EAI_ERROR_BASE+(code_))) #define EAI_ERROR_BADFLAGS EAI_ERROR_CODE(-EAI_BADFLAGS) /* minus because EAI_ values are < 0 */ #define EAI_ERROR_NONAME EAI_ERROR_CODE(-EAI_NONAME) #define EAI_ERROR_AGAIN EAI_ERROR_CODE(-EAI_AGAIN) #define EAI_ERROR_FAIL EAI_ERROR_CODE(-EAI_FAIL) #define EAI_ERROR_FAMILY EAI_ERROR_CODE(-EAI_FAMILY) #define EAI_ERROR_SOCKTYPE EAI_ERROR_CODE(-EAI_SOCKTYPE) #define EAI_ERROR_SERVICE EAI_ERROR_CODE(-EAI_SERVICE) #define EAI_ERROR_MEMORY EAI_ERROR_CODE(-EAI_MEMORY) #define EAI_ERROR_SYSTEM EAI_ERROR_CODE(-EAI_SYSTEM) #define EAI_ERROR_OVERFLOW EAI_ERROR_CODE(-EAI_OVERFLOW) #define EXIT_CODE_SELFCHECK_ERROR 249 #define EXIT_CODE_OUTOFMEMORY_ERROR 250 #define EXIT_CODE_THREADCREATE_ERROR 251 #define EXIT_CODE_FORMAT_ERROR 252 #define EXIT_CODE_LOGLEVEL_ERROR 253 #define EXIT_CODE_LOGQUIT_ERROR 254 /* ----------------------------------------------------------------------------- * * PROTOTYPES */ void dief(ya_result error_code, const char *format, ...); /** * * Release the memory used by the error table * */ void error_unregister_all(); void error_register(ya_result code, const char *text); /** * @brief Returns the string associated to an error code * * Returns the string associated to an error code * * @param[in] err the ya_result error code * * @return a pointer to the error message */ const char* error_gettext(ya_result code); struct output_stream; void error_writetext(struct output_stream *os, ya_result code); void dnscore_register_errors(); #define DIE(code) dief((code), "%s:%i\n", __FILE__, __LINE__) #define DIE_MSG(msg) dief(ERROR, "%s:%i %s\n", __FILE__, __LINE__, (msg)) #endif /* ERROR_H_ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/config_file_reader.h0000644000077100007710000000012412650131756025564 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.552344 30 ctime=1454597650.902344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/config_file_reader.h0000664000077100007710000000556512650131756025404 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once #include #include /** * * Parses an input stream for a section/container defined by its config sectiondescriptor. * The input stream will be closed by the function. * * @param stream_name a name to identify the stream in case of error * @param ins the input stream to parse * @param csd the descriptor of the section to parse * @param cfgerr if not NULL, the error reporting structure to fill in case of error * * @return an error code */ ya_result config_file_reader_parse_stream(const char* stream_name, input_stream *ins, struct config_section_descriptor_s *csd, config_error_s *cfgerr); /** * * Parses a file for a section/container defined by its config sectiondescriptor. * * @param fullpath the file path * @param csd the descriptor of the section to parse * @param cfgerr if not NULL, the error reporting structure to fill in case of error * * @return an error code */ ya_result config_file_reader_open(const char* fullpath, struct config_section_descriptor_s *csd, config_error_s *cfgerr); yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/random.h0000644000077100007710000000012412650131756023256 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.600344 30 ctime=1454597651.114344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/random.h0000664000077100007710000000512312650131756023064 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscoretools Generic Tools * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _RANDOM_H #define _RANDOM_H #include #include #include #ifdef __cplusplus extern "C" { #endif typedef void* random_ctx; /** * For IDs ensure that seed is enough randomised. * * @param seed * @return */ random_ctx random_init(u32 seed); /** * Chooses a seed with little change of collision. * @return */ random_ctx random_init_auto(); u32 random_next(random_ctx ctx); void random_finalize(random_ctx ctx); #ifdef __cplusplus } #endif #endif /* _RANDOM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/sys_types.h0000644000077100007710000000012412650131756024040 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.491344 30 ctime=1454597651.147344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/sys_types.h0000664000077100007710000004063112650131756023651 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup systemtypes Definition of types in order to ensure architecture-independence * @ingroup dnscore * @brief Definition of types in order to ensure architecture-independence * * @{ */ #ifndef _SYSTYPES_H #define _SYSTYPES_H #include #include #include #include #if defined __FreeBSD__ #include #ifndef __BYTE_ORDER #if defined(_BYTE_ORDER) #define __BIG_ENDIAN _BIG_ENDIAN #define __LITTLE_ENDIAN _LITTLE_ENDIAN #define __BYTE_ORDER _BYTE_ORDER #elif defined(WORDS_BIGENDIAN) #define __BIG_ENDIAN 4321 #define __LITTLE_ENDIAN 1234 #define __BYTE_ORDER __BIG_ENDIAN #else #error "endianness detection code will most likely fail" #endif #endif #elif defined __APPLE__ #include #ifndef __BYTE_ORDER #if defined(BYTE_ORDER) #define __BIG_ENDIAN BIG_ENDIAN #define __LITTLE_ENDIAN LITTLE_ENDIAN #define __BYTE_ORDER BYTE_ORDER #elif defined(WORDS_BIGENDIAN) #define __BIG_ENDIAN 4321 #define __LITTLE_ENDIAN 1234 #define __BYTE_ORDER __BIG_ENDIAN #else #error "endianness detection code will most likely fail" #endif #endif #elif defined __sun #include #ifndef __BYTE_ORDER #if defined(__BYTE_ORDER__) #define __BIG_ENDIAN __ORDER_BIG_ENDIAN__ #define __LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__ #define __BYTE_ORDER __BYTE_ORDER__ #else // assume big endian #define __BIG_ENDIAN 4321 #define __LITTLE_ENDIAN 1234 #define __BYTE_ORDER __BIG_ENDIAN #endif #endif #elif defined __OpenBSD__ #include #ifndef __BYTE_ORDER #if defined(BYTE_ORDER) #define __BIG_ENDIAN BIG_ENDIAN #define __LITTLE_ENDIAN LITTLE_ENDIAN #define __BYTE_ORDER BYTE_ORDER #else // assume big endian #define __BIG_ENDIAN 4321 #define __LITTLE_ENDIAN 1234 #define __BYTE_ORDER __BIG_ENDIAN #endif #endif #else #include #include #endif #define VERSION_2_0_0 0x020000000000LL #define VERSION_2_1_0 0x020100000000LL #define VERSION_2_2_0 0x020200000000LL #include #include #include /** @note must be used for u_char on Mac OS X */ #ifdef __cplusplus extern "C" { #endif #ifndef HAS_DYNAMIC_PROVISIONING #define HAS_DYNAMIC_PROVISIONING 1 #endif #ifndef PATH_MAX #define PATH_MAX 1024 #endif #if defined(__bool_true_false_are_defined) && __bool_true_false_are_defined != 0 #ifndef TRUE #define TRUE true #endif #ifndef FALSE #define FALSE false #endif #else typedef int bool; #ifndef TRUE #define TRUE (0==0) #endif #ifndef FALSE #define FALSE (0==1) #endif #endif /* This is the basic type definition set */ /* Tweaks will be added for each setup (using the preprocessor) */ typedef unsigned char u8; typedef signed char s8; typedef unsigned short u16; typedef short s16; typedef unsigned int u32; typedef int s32; #if defined(HAVE_UINT64_T) && defined(HAVE_INT64_T) typedef uint64_t u64; typedef int64_t s64; #elif defined(HAVE_LONG_LONG) typedef unsigned long long u64; typedef signed long long s64; #elif defined(_LONGLONG) && ( _LONGLONG == 1 ) // FreeBSD 9.1 gcc 4.2.1 typedef unsigned long long u64; typedef signed long long s64; #elif defined(__SIZEOF_LONG_LONG__) && (__SIZEOF_LONG_LONG__ == 8) typedef unsigned long long u64; typedef signed long long s64; #elif defined(__LONG_LONG_MAX__) && (__LONG_LONG_MAX__ == 9223372036854775807LL) typedef unsigned long long u64; typedef signed long long s64; #elif defined(_LONGLONG_TYPE) typedef unsigned long long u64; typedef signed long long s64; #else #error NO UNSIGNED 64 BITS TYPE KNOWN ON THIS 64 BITS ARCHITECTURE (u64 + s64) #endif typedef void callback_function(void*); typedef ya_result result_callback_function(void*, void*); /* AIX : __64BIT__ HP: __LP64__ SUN: __sparcv9, _LP64 SGI: _MIPS_SZLONG==64 NT: _M_IA64 */ #ifndef __SIZEOF_POINTER__ #if defined(__LP64__)||defined(__LP64)||defined(_LP64)||defined(__64BIT__)||defined(MIPS_SZLONG)||defined(_M_IA64) #define __SIZEOF_POINTER__ 8 #else #define __SIZEOF_POINTER__ 4 #endif #endif #if __SIZEOF_POINTER__ == 4 typedef unsigned int intptr; #elif __SIZEOF_POINTER__ == 8 #if defined(HAVE_UINT64_T) typedef uint64_t intptr; #elif defined(HAVE_LONG_LONG) typedef unsigned long long intptr; #elif defined(__LONG_LONG_MAX__) && (__LONG_LONG_MAX__ == 9223372036854775807LL) typedef unsigned long long intptr; #elif defined(__SIZEOF_LONG_LONG__) && (__SIZEOF_LONG_LONG__ == 8) typedef unsigned long long intptr; #elif defined(_LONGLONG) && ( _LONGLONG == 1 ) // FreeBSD 9.1 gcc 4.2.1 typedef unsigned long long intptr; #elif defined(_LONGLONG_TYPE) typedef unsigned long long intptr; #else #error NO UNSIGNED 64 BITS TYPE KNOWN ON THIS 64 BITS ARCHITECTURE (intptr) #endif #else // __SIZEOF_POINTER not 4 nor 8 #error __SIZEOF_POINTER__ value not handled (only 4 and 8 are) #endif /** * This macro returns the first address aligned to 8 bytes from the parameter * addresss. * */ #define ALIGN8(__from_address__) (((__from_address__)+7)&~7) /** * This macro returns the first address aligned to 16 bytes from the parameter * addresss. * */ #define ALIGN16(__from_address__) (((__from_address__)+15)&~15) /* * Macros used to access bytes inside a buffer. * * ie: U32_AT(packet[8]), assuming that packet is a byte buffer, will access * the 8th byte inside packet as a (native) unsigned 32bits integer. */ #define U8_AT(address__) (*((u8*)&(address__))) #define GET_U8_AT(address__) (*((u8*)&(address__))) #define SET_U8_AT(address__,value__) (*((u8*)&(address__)) = (value__)) #ifndef WORDS_BIGENDIAN #if __BYTE_ORDER == __BIG_ENDIAN #define WORDS_BIGENDIAN 1 #endif #else // WORDS_BIGENDIAN defined #if __BYTE_ORDER == __LITTLE_ENDIAN #error "confusing endianness" #endif #endif #define AVOID_ANTIALIASING 1 #if HAS_MEMALIGN_ISSUES == 0 #if AVOID_ANTIALIASING static inline u16 GET_U16_AT_P(const void* address) { const u16 *p = (const u16*)address; return *p; } static inline void SET_U16_AT_P(void* address, u16 value) { u16 *p = (u16*)address; *p = value; } static inline u32 GET_U32_AT_P(const void* address) { const u32 *p = (const u32*)address; return *p; } static inline void SET_U32_AT_P(void* address, u32 value) { u32 *p = (u32*)address; *p = value; } static inline u64 GET_U64_AT_P(const void* address) { const u64 *p = (const u64*)address; return *p; } static inline void SET_U64_AT_P(void* address, u64 value) { u64 *p = (u64*)address; *p = value; } #define GET_U16_AT(address__) GET_U16_AT_P(&(address__)) #define SET_U16_AT(address__,value__) SET_U16_AT_P(&(address__),(value__)) #define GET_U32_AT(address__) GET_U32_AT_P(&(address__)) #define SET_U32_AT(address__,value__) SET_U32_AT_P(&(address__),(value__)) #define GET_U64_AT(address__) GET_U64_AT_P(&(address__)) #define SET_U64_AT(address__,value__) SET_U64_AT_P(&(address__),(value__)) #else #define GET_U16_AT(address) (*((u16*)&(address))) #define SET_U16_AT(address,value) *((u16*)&(address))=(value) #define GET_U32_AT(address) (*((u32*)&(address))) #define SET_U32_AT(address,value) *((u32*)&(address))=(value) #define GET_U64_AT(address) (*((u64*)&(address))) #define SET_U64_AT(address,value) *((u64*)&(address))=(value) #endif #else /* sparc ... */ /* * Why in caps ? Traditionnaly it was an helper macro. Macros are in caps except when they hide a virtual call. * */ static inline u16 GET_U16_AT_P(const void* p) { const u8* p8=(const u8*)p; u16 v; #ifdef WORDS_BIGENDIAN v=p8[0]; v<<=8; v|=p8[1]; #else v=p8[1]; v<<=8; v|=p8[0]; #endif return v; } #define GET_U16_AT(x) GET_U16_AT_P(&(x)) static inline void SET_U16_AT_P(void* p, u16 v) { u8* p8=(u8*)p; #ifdef WORDS_BIGENDIAN p8[0]=v>>8; p8[1]=v; #else p8[0]=v; p8[1]=v>>8; #endif } #define SET_U16_AT(x___,y___) SET_U16_AT_P(&(x___),(y___)) static inline u32 GET_U32_AT_P(const void* p) { const u8* p8=(const u8*)p; u32 v; #ifdef WORDS_BIGENDIAN v=p8[0]; v<<=8; v|=p8[1]; v<<=8; v|=p8[2]; v<<=8; v|=p8[3]; #else v=p8[3]; v<<=8; v|=p8[2]; v<<=8; v|=p8[1]; v<<=8; v|=p8[0]; #endif return v; } #define GET_U32_AT(x) GET_U32_AT_P(&(x)) static inline void SET_U32_AT_P(void* p, u32 v) { u8* p8=(u8*)p; #ifdef WORDS_BIGENDIAN p8[0]=v>>24; p8[1]=v>>16; p8[2]=v>>8; p8[3]=v; #else p8[0]=v; p8[1]=v>>8; p8[2]=v>>16; p8[3]=v>>24; #endif } #define SET_U32_AT(x___,y___) SET_U32_AT_P(&(x___),(y___)) static inline u64 GET_U64_AT_P(const void* p) { const u8* p8=(const u8*)p; u32 v; #ifdef WORDS_BIGENDIAN v=p8[0]; v<<=8; v|=p8[1]; v<<=8; v|=p8[2]; v<<=8; v|=p8[3]; v<<=8; v|=p8[4]; v<<=8; v|=p8[5]; v<<=8; v|=p8[6]; v<<=8; v|=p8[7]; #else v=p8[7]; v<<=8; v|=p8[6]; v<<=8; v|=p8[5]; v<<=8; v|=p8[4]; v<<=8; v=p8[3]; v<<=8; v|=p8[2]; v<<=8; v|=p8[1]; v<<=8; v|=p8[0]; #endif return v; } #define GET_U64_AT(x) GET_U64_AT_P(&(x)) static inline void SET_U64_AT_P(void* p, u64 v) { u8* p8=(u8*)p; #ifdef WORDS_BIGENDIAN p8[0]=v>>56; p8[1]=v>>48; p8[2]=v>>40; p8[3]=v>>32; p8[4]=v>>24; p8[5]=v>>16; p8[6]=v>>8; p8[7]=v; #else p8[0]=v; p8[1]=v>>8; p8[2]=v>>16; p8[3]=v>>24; p8[4]=v>>32; p8[5]=v>>40; p8[6]=v>>48; p8[7]=v>>56; #endif } #define SET_U64_AT(x___,y___) SET_U64_AT_P(&(x___),(y___)) #endif #if __SIZEOF_POINTER__ == 4 #define SET_PTR_AT_P SET_U32_AT_P #define SET_PTR_AT SET_U32_AT #define GET_PTR_AT_P GET_U32_AT_P #define GET_PTR_AT GET_U32_AT #elif __SIZEOF_POINTER__ == 8 #define SET_PTR_AT_P SET_U64_AT_P #define SET_PTR_AT SET_U64_AT #define GET_PTR_AT_P GET_U64_AT_P #define GET_PTR_AT GET_U64_AT #else #error "unsupported pointer size" #endif #define MAX_U8 ((u8)0xff) #define MAX_U16 ((u16)0xffff) #define MAX_U32 ((u32)0xffffffffUL) #define MAX_U64 ((u64)0xffffffffffffffffULL) #define MAX_S8 ((s8)0x7f) #define MAX_S16 ((s16)0x7fff) #define MAX_S32 ((s32)0x7fffffffL) #define MAX_S64 ((s64)0x7fffffffffffffffLL) #define MIN_S8 ((s8)0xff) #define MIN_S16 ((s16)0xffff) #define MIN_S32 ((s32)0xffffffffL) #define MIN_S64 ((s64)0xffffffffffffffffLL) #define CLEARED_SOCKET (-1) #ifndef htobe64 #if defined __APPLE__ #define __bswap_16 _OSSwapInt16 #define __bswap_32 _OSSwapInt32 #define __bswap_64 _OSSwapInt64 #elif defined __sun && defined(__GNUC__) #define __bswap_16 __builtin_bswap16 #define __bswap_32 __builtin_bswap32 #define __bswap_64 __builtin_bswap64 #endif /* Conversion interfaces. */ # if __BYTE_ORDER == __LITTLE_ENDIAN # define htobe16(x) __bswap_16 (x) # define htole16(x) (x) # define be16toh(x) __bswap_16 (x) # define le16toh(x) (x) # define htobe32(x) __bswap_32 (x) # define htole32(x) (x) # define be32toh(x) __bswap_32 (x) # define le32toh(x) (x) # define htobe64(x) __bswap_64 (x) # define htole64(x) (x) # define be64toh(x) __bswap_64 (x) # define le64toh(x) (x) # else # define htobe16(x) (x) # define htole16(x) __bswap_16 (x) # define be16toh(x) (x) # define le16toh(x) __bswap_16 (x) # define htobe32(x) (x) # define htole32(x) __bswap_32 (x) # define be32toh(x) (x) # define le32toh(x) __bswap_32 (x) # define htobe64(x) (x) # define htole64(x) __bswap_64 (x) # define be64toh(x) (x) # define le64toh(x) __bswap_64 (x) # endif // __BYTE_ORDER #endif // htobe64 /**/ /// Used for collection callback processing (list) /// Their support by a collection is not guaranteed /// @note PROCESS_THEN_STOP = PROCESS|STOP #define COLLECTION_ITEM_SKIP 0 #define COLLECTION_ITEM_PROCESS 1 #define COLLECTION_ITEM_STOP 2 #define COLLECTION_ITEM_PROCESS_THEN_STOP (COLLECTION_ITEM_PROCESS|COLLECTION_ITEM_STOP) /**/ typedef u32 process_flags_t; #ifdef WORDS_BIGENDIAN #define NU16(value) ((u16)(value)) #define NU32(value) ((u32)(value)) #else #define NU16(value) ((u16)(((((u16)(value))>>8)&0xff)|(((u16)(value))<<8))) #define NU32(value) ((u32)(( (((u32)(value)) >> 24) & 0xff) | ((((u32)(value)) >> 8) & 0xff00) | ((((u32)(value)) << 8) & 0xff0000) | (((u32)(value)) << 24))) #endif #define VERSION_U32(h__,l__) (((h__) << 16) || (l__)) #define VERSION_U16(h__,l__) (((h__) << 8) || (l__)) #define VERSION_U8(h__,l__) (((h__) << 4) || (l__)) #define NETWORK_ONE_16 NU16(0x0001) #define IS_WILD_LABEL(u8dnslabel_) ( GET_U16_AT(*(u8dnslabel_)) == NU16(0x012a)) /* 01 2a = 1 '*' */ /* sys_types.h is included everywhere. This ensure the debug hooks will be too. */ #ifndef DEBUG #define MALLOC_OR_DIE(cast,target,size,tag) if(((target)=(cast)malloc(size))==NULL){perror(__FILE__);exit(EXIT_CODE_OUTOFMEMORY_ERROR);} #else #define MALLOC_OR_DIE(cast,target,size,tag) if(((target)=(cast)malloc(size))!=NULL){memset((void*)(target),0xac,(size));}else{perror(__FILE__);exit(EXIT_CODE_OUTOFMEMORY_ERROR);} #endif #define REALLOC_OR_DIE(cast,src_and_target,newsize,tag) if(((src_and_target)=(cast)realloc((src_and_target),(newsize)))==NULL){perror(__FILE__);exit(EXIT_CODE_OUTOFMEMORY_ERROR);} // the string if not NULL, else a empty string #define STRNULL(__str__) (((__str__)!=NULL)?(__str__):"") // the fqdn if not NULL, else "." #define FQDNNULL(__str__) (((__str__)!=NULL)?(__str__):(const u8*)"") #define TOSTRING(s) TOSTRING_(s) #define TOSTRING_(s) #s #define PREPROCESSOR_INT2STR(x) #x #define PREPROCESSOR_EVAL(a__) a__ #define PREPROCESSOR_CONCAT(a__,b__) a__##b__ #define PREPROCESSOR_CONCAT_EVAL_(a__,b__) a__##b__ #define PREPROCESSOR_CONCAT_EVAL(a__,b__) PREPROCESSOR_CONCAT_EVAL_(a__,b__) #define BOOL2INT(b_) ((b_)?1:0) #define BOOL2STR(b_) ((b_)?"true":"false") #define BOOL2CHR(b_) ((b_)?'y':'n') #include #define MIN(a,b) (((a)<=(b))?(a):(b)) #define MAX(a,b) (((a)>=(b))?(a):(b)) #define BOUND(a,b,c) (((b)<=(a))?(a):(((b)>=(c))?(c):(b))) #define ZEROMEMORY(buffer__,size__) memset(buffer__, 0, size__) #define MEMCOPY(target__,source__,size__) memcpy((target__),(source__),(size__)) // a magic number as 32 bits #define MAGIC4(b0_,b1_,b2_,b3_) NU32((((u32)b0_)<<24)|(((u32)b1_)<<16)|(((u32)b2_)<<8)|((u32)b3_)) struct type_class_ttl_rdlen /* @TODO move to a more appropriate place */ { u16 qtype; u16 qclass; u32 ttl; u16 rdlen; }; #if USES_ICC == 1 #ifndef inline #define inline __inline #endif #else #ifndef inline #define inline __inline__ #endif #endif #ifndef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #endif #ifdef __cplusplus } #endif #endif /* _DBTYPES_H */ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/tcp_io_stream.h0000644000077100007710000000012412650131756024626 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.579344 30 ctime=1454597651.151344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/tcp_io_stream.h0000664000077100007710000000764512650131756024447 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * @{ */ #ifndef _TCP_INPUT_STREAM_H #define _TCP_INPUT_STREAM_H #include #include #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif ya_result gethostaddr(const char* host, u16 port, struct sockaddr *sa, int family); ya_result tcp_input_output_stream_connect_sockaddr(const struct sockaddr *sa, input_stream *istream_, output_stream *ostream_, struct sockaddr *bind_from, u8 to_sec); ya_result tcp_input_output_stream_connect_ex(const char *server, u16 port, input_stream *istream_, output_stream *ostream_, struct sockaddr *bind_from, u8 to_sec); ya_result tcp_input_output_stream_connect(const char *server, u16 port, input_stream *istream, output_stream *ostream); ya_result tcp_input_output_stream_connect_host_address(const host_address *ha, input_stream *istream_, output_stream *ostream_, u8 to_sec); ya_result tcp_io_stream_connect_ex(const char *server, u16 port, io_stream *ios, struct sockaddr *bind_from); ya_result tcp_io_stream_connect(const char *server, u16 port, io_stream *ios); void tcp_set_sendtimeout(int fd, int seconds, int useconds); void tcp_get_sendtimeout(int fd, int *seconds, int *useconds); void tcp_set_recvtimeout(int fd, int seconds, int useconds); void tcp_get_recvtimeout(int fd, int *seconds, int *useconds); void tcp_set_linger(int fd, bool enable, int seconds); /** * Nagle * * @param fd * @param enable */ void tcp_set_nodelay(int fd, bool enable); void tcp_set_cork(int fd, bool enable); static inline void tcp_set_graceful_close(int fd) // no-wait possible { tcp_set_linger(fd, FALSE, 0); } static inline void tcp_set_abortive_close(int fd) // closes now { tcp_set_linger(fd, TRUE, 0); } static inline void tcp_set_agressive_close(int fd, int seconds) // closes up to seconds after the close ... { tcp_set_linger(fd, TRUE, seconds); } void tcp_init_with_env(); #ifdef __cplusplus } #endif #endif /* _TCP_INTPUT_STREAM_H */ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dnsname.h0000644000077100007710000000012412650131756023423 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.515344 30 ctime=1454597650.961344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dnsname.h0000664000077100007710000004176712650131756023247 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscore * @ingroup dnscore * @brief Functions used to manipulate dns formatted names and labels * * DNS names are stored in many ways: * _ C string : ASCII with a '\0' sentinel * _ DNS wire : label_length_byte + label_bytes) ending with a label_length_byte with a value of 0 * _ simple array of pointers to labels * _ simple stack of pointers to labels (so the same as above, but with the order reversed) * _ sized array of pointers to labels * _ sized stack of pointers to labels (so the same as above, but with the order reversed) * * @{ */ #pragma once #include #include /** * The maximum number of domains-subdomains handled by the database. * This should not be set to a value greater than 128 (128 covers (\001 'a') * 255 ) * * Recommended value: 128 * */ #define SRV_UNDERSCORE_SUPPORT 1 #define DNSNAME_MAX_SECTIONS ((MAX_DOMAIN_LENGTH + 1) / 2) // dns equal chars comparison should give 0x00 or 0x20 // the '_' breaks this so there is a slightly different (slightly slower) way to handle it // IMPORTANT NOTE 1 : MACROS ARE WRITTEN TO USE THEIR PARAMETERS EXACTLY ONCE // IMPORTANT NOTE 2 : LOCASEEQUAL only works on the DNS chars AND with the first parameter being a lo-case string (like in the database) #if SRV_UNDERSCORE_SUPPORT == 0 #define LOCASE(c__) ((char)(c__)|(char)0x20) static inline bool LOCASEEQUALS(char ca__,char cb__) { return ((((char)(ca__)-(char)(cb__))&0xdf) == 0); } static inline bool LOCASEEQUALSBY2(const u8* name_a, const u8* name_b) { return (((GET_U16_AT(name_a[0]) - GET_U16_AT(name_b[0])) & ((u16)0xdfdf)) == 0); } static inline bool LOCASEEQUALSBY3(const u8* name_a, const u8* name_b) { return LOCASEEQUALSBY2(name_a, name_b) && LOCASEEQUALS(name_a[2], name_b[2]); } static inline bool LOCASEEQUALSBY4(const u8* name_a, const u8* name_b) { return (((GET_U32_AT(name_a[0]) - GET_U32_AT(name_b[0])) & ((u16)0xdfdfdfdf)) == 0); } #else // slightly modified to take '_' into account #define LOCASE(c__) (((((char)(c__)+(char)0x01)|(char)0x20))-(char)0x01) static inline bool LOCASEEQUALS(u8 a, u8 b) { return ((((u8)(a+0x01)-(u8)(b+0x01))&0xdf) == 0); } static inline bool LOCASEEQUALSBY2(const u8* name_a, const u8* name_b) { return (( ( (GET_U16_AT(name_a[0]) + 0x0101) - (GET_U16_AT(name_b[0]) + 0x0101)) & ((u16)0xdfdf)) == 0); } static inline bool LOCASEEQUALSBY3(const u8* name_a, const u8* name_b) { return LOCASEEQUALSBY2(name_a, name_b) && LOCASEEQUALS(name_a[2], name_b[2]); } static inline bool LOCASEEQUALSBY4(const u8* name_a, const u8* name_b) { return (( ( (GET_U32_AT(name_a[0]) + 0x01010101) - (GET_U32_AT(name_b[0]) + 0x01010101)) & ((u32)0xdfdfdfdf)) == 0); } #endif #define ZDB_NAME_TAG 0x454d414e42445a /* "ZDBNAME" */ #define ZDB_LABEL_TAG 0x4c424c42445a /* "ZDBLBL" */ #ifdef __cplusplus extern "C" { #endif /* * A dnslabel_array is basically a dnslabel*[] * There are two kind of arrays : * * dnslabel_stack: * * [0000] "." label * [0001] "tdl" label * [0002] "domain" label <- top * * dnslabel_vector: * * [0000] "domain" label * [0001] "tdl" label * [0002] "." label <- top * */ /* * The plan was to typedef an array into a stack or a vector. * But in order to help the compiler complaining about mixing both, * I have to define them separatly * */ typedef u8* dnslabel_stack[DNSNAME_MAX_SECTIONS]; /* This + 1 is just to make sure both are different to the compiler's eyes */ typedef u8* dnslabel_vector[DNSNAME_MAX_SECTIONS + 1]; typedef u8** dnslabel_stack_reference; typedef u8** dnslabel_vector_reference; typedef u8*const* const_dnslabel_stack_reference; typedef u8*const* const_dnslabel_vector_reference; #ifdef DEBUG #define DEBUG_RESET_dnsname(name) memset(&(name),0x5b,sizeof(dnsname_stack)) #else #define DEBUG_RESET_dnsname(name) #endif typedef struct dnsname_stack dnsname_stack; struct dnsname_stack { s32 size; dnslabel_stack labels; }; typedef struct dnsname_vector dnsname_vector; struct dnsname_vector { s32 size; dnslabel_vector labels; }; /***************************************************************************** * * BUFFER * *****************************************************************************/ /** @brief Converts a C string to a dns name. * * Converts a C string to a dns name. * * @param[in] name_parm a pointer to a buffer that will get the full dns name * @param[in] str a pointer to the source c-string * * @return Returns the length of the string up to the last '\0' */ /* TWO use */ ya_result cstr_to_dnsname(u8* name_parm, const char* str); /** @brief Converts a C string to a lower-case dns name. * * Converts a C string to a lower-case dns name. * * @param[in] name_parm a pointer to a buffer that will get the full dns name * @param[in] str a pointer to the source c-string * * @return Returns the length of the string up to the last '\0' */ ya_result cstr_to_locase_dnsname(u8* name_parm, const char* str); /** @brief Converts a text buffer to a dns name. * * Converts a text buffer to a dns name. * * @param[in] name_parm a pointer to a buffer that will get the full dns name * @param[in] str a pointer to the source buffer * @param[in] str_len the length of the source buffer * * @return Returns the length of the string up to the last '\0' */ ya_result charp_to_dnsname(u8* name_parm, const char* str, u32 str_len); /** @brief Converts a text buffer to a lower-case dns name. * * Converts a text buffer to a lower-case dns name. * * @param[in] name_parm a pointer to a buffer that will get the full dns name * @param[in] str a pointer to the source buffer * @param[in] str_len the length of the source buffer * * @return Returns the length of the string up to the last '\0' */ ya_result charp_to_locase_dnsname(u8* name_parm, const char* str, u32 str_len); /** @brief Converts a text buffer to a lower-case dns name and checks for validity * * Converts a text buffer to a lower-case dns name. * * @param[in] name_parm a pointer to a buffer that will get the full dns name * @param[in] str a pointer to the source buffer * @param[in] str_len the length of the source buffer * * @return Returns the length of the string up to the last '\0' */ ya_result charp_to_locase_dnsname_with_check(u8* name_parm, const char* str, u32 str_len); /** * @brief Converts a C string to a dns name and checks for validity * * Converts a C string to a dns name. * * @param[in] name_parm a pointer to a buffer that will get the full dns name * @param[in] str a pointer to the source c-string * * @return Returns the length of the string up to the last '\0' */ ya_result cstr_to_dnsname_with_check(u8* name_parm, const char* str); /** * @brief Converts a C string to a dns rname and checks for validity * * Converts a C string to a dns rname. * * @param[in] name_parm a pointer to a buffer that will get the full dns name * @param[in] str a pointer to the source c-string * * @return Returns the length of the string up to the last '\0' */ ya_result cstr_to_dnsrname_with_check(u8* name_parm, const char* str); ya_result cstr_to_dnsname_with_check_len(u8* name_parm, const char* text, u32 text_len); ya_result cstr_to_locase_dnsname_with_check_len(u8* name_parm, const char* text, u32 text_len); ya_result cstr_to_dnsname_with_check_len_with_origin(u8* name_parm, const char* text, u32 text_len, const u8 *origin); ya_result cstr_to_locase_dnsname_with_check_len_with_origin(u8* name_parm, const char* text, u32 text_len, const u8 *origin); /* ONE use */ ya_result cstr_get_dnsname_len(const char* str); /** @brief Converts a dns name to a C string * * Converts a dns name to a C string * * @param[in] name a pointer to the source dns name * @param[in] str a pointer to a buffer that will get the c-string * * @return Returns the length of the string */ /* SIX uses */ u32 dnsname_to_cstr(char* str, const u8* name); /** @brief Tests if two DNS labels are equals * * Tests if two DNS labels are equals * * @param[in] name_a a pointer to a dnsname to compare * @param[in] name_b a pointer to a dnsname to compare * * @return Returns TRUE if names are equal, else FALSE. */ /* ELEVEN uses */ bool dnslabel_equals(const u8* name_a, const u8* name_b); int dnsname_compare(const u8* name_a, const u8* name_b); bool dnsname_is_subdomain(const u8* subdomain, const u8* domain); /** @brief Tests if two DNS labels are (case-insensitive) equals * * Tests if two DNS labels are (case-insensitive) equals * * @param[in] name_a a pointer to a lo-case dnsname to compare * @param[in] name_b a pointer to a any-case dnsname to compare * * @return Returns TRUE if names are equal, else FALSE. */ bool dnslabel_equals_ignorecase_left(const u8* name_a, const u8* name_b); /** @brief Tests if two DNS names are equals * * Tests if two DNS labels are equals * * @param[in] name_a a pointer to a dnsname to compare * @param[in] name_b a pointer to a dnsname to compare * * @return Returns TRUE if names are equal, else FALSE. */ /* TWO uses */ bool dnsname_equals(const u8* name_a, const u8* name_b); /** @brief Tests if two DNS names are (ignore case) equals * * Tests if two DNS labels are (ignore case) equals * * @param[in] name_a a pointer to a dnsname to compare * @param[in] name_b a pointer to a dnsname to compare * * @return Returns TRUE if names are equal, else FALSE. */ /* TWO uses */ bool dnsname_equals_ignorecase(const u8* name_a, const u8* name_b); /** @brief Returns the full length of a dns name * * Returns the full length of a dns name * * @param[in] name a pointer to the dnsname * * @return The length of the dnsname, "." ( zero ) included */ /* SEVENTEEN uses (more or less) */ u32 dnsname_len(const u8* name); /* ONE use */ u32 dnsname_getdepth(const u8* name); /* ONE use */ u32 dnsname_copy(u8* dst, const u8* src); /* malloc & copies a dnsname */ u8* dnsname_dup(const u8* src); /** @brief Canonizes a dns name. * * Canonizes a dns name. (Lo-case) * * @param[in] src a pointer to the dns name * @param[out] dst a pointer to a buffer that will hold the canonized dns name * * @return The length of the dns name */ /* TWELVE uses */ u32 dnsname_canonize(const u8* src, u8* dst); /** * char DNS charset test * * @param c * @return TRUE iff c in in the DNS charset * */ bool dnsname_is_charspace(u8 c); /** * label DNS charset test * * @param label * @return TRUE iff each char in the label in in the DNS charset * */ bool dnslabel_verify_charspace(const u8 *label); /** * dns name DNS charset test * * @param name_wire * @return TRUE if each char in the name is in the DNS charset * */ bool dnsname_verify_charspace(const u8 *name_wire); /** * label DNS charset test and set to lower case * * @param label * @return TRUE iff each char in the label in in the DNS charset * */ bool dnslabel_locase_verify_charspace(u8 *label); /** * dns name DNS charset test and set to lower case * * LOCASE is done using |32 * * @param name_wire * @return TRUE iff each char in the name in in the DNS charset * */ bool dnsname_locase_verify_charspace(u8 *name_wire); /** * dns name DNS charset test and set to lower case * * LOCASE is done using tolower(c) * * @param name_wire * @return TRUE iff each char in the name in in the DNS charset * */ bool dnsname_locase_verify_extended_charspace(u8 *name_wire); /***************************************************************************** * * VECTOR * *****************************************************************************/ /* ONE use */ u32 dnslabel_vector_to_cstr(const_dnslabel_vector_reference name, s32 top, char *str); /* TWO use */ u32 dnslabel_vector_to_dnsname(const_dnslabel_vector_reference name, s32 top, u8 *str_start); /* ONE use */ u32 dnslabel_vector_dnslabel_to_dnsname(const u8 *prefix, const dnsname_vector *namestack, s32 bottom, u8 *str); static inline u32 dnslabel_copy(u8 *target, const u8 *src) { u32 len = src[0] + 1; memcpy(target, src, len); return len; } u32 dnslabel_vector_len(const_dnslabel_vector_reference name, s32 top); /* ONE use */ u32 dnsname_vector_sub_to_dnsname(const dnsname_vector *name, s32 from, u8 *name_start); /** @brief Divides a name into sections * * Divides a name into sections. * Writes a pointer to each label of the dnsname into an array * "." is never put in there. * * @param[in] name a pointer to the dnsname * @param[out] sections a pointer to the target array of pointers * * @return The index of the top-level label ("." is never put in there) */ /* TWO uses */ s32 dnsname_to_dnslabel_vector(const u8* dns_name, dnslabel_vector_reference labels); s32 dnsname_to_dnslabel_stack(const u8* dns_name, dnslabel_stack_reference labels); /** @brief Divides a name into sections * * Divides a name into sections. * Writes a pointer to each label of the dnsname into an array * "." is never put in there. * * @param[in] name a pointer to the dnsname * @param[out] sections a pointer to the target array of pointers * * @return The index of the top-level label ("." is never put in there) */ /* TWENTY-ONE uses */ s32 dnsname_to_dnsname_vector(const u8* dns_name, dnsname_vector* name); u32 dnsname_vector_copy(dnsname_vector *dst, const dnsname_vector* src); u32 dnsname_vector_len(dnsname_vector *name_vector); /***************************************************************************** * * STACK * *****************************************************************************/ /** @brief Converts a stack of dns labels to a C string * * Converts a stack of dns labels to a C string * * @param[in] name a pointer to the dnslabel stack * @param[in] top the index of the top of the stack * @param[in] str a pointer to a buffer that will get the c-string * * @return Returns the length of the string */ /* ONE use */ u32 dnslabel_stack_to_cstr(const const_dnslabel_stack_reference name, s32 top, char* str); /* ONE use */ u32 dnslabel_stack_to_dnsname(const const_dnslabel_stack_reference name, s32 top, u8* str_start); /* ONE use */ u32 dnsname_stack_to_dnsname(const dnsname_stack* name_stack, u8* name_start); /* ONE use, returns the fqdn len */ u32 dnsname_stack_len(const dnsname_stack* name_stack); /* TWO uses (debug) */ u32 dnsname_stack_to_cstr(const dnsname_stack* name, char* str); /* ONE use */ bool dnsname_equals_dnsname_stack(const u8* str, const dnsname_stack* name); bool dnsname_under_dnsname_stack(const u8* str, const dnsname_stack* name); /* FOUR uses */ s32 dnsname_stack_push_label(dnsname_stack* dns_name, u8* dns_label); /* FOUR uses */ s32 dnsname_stack_pop_label(dnsname_stack* name); s32 dnsname_to_dnsname_stack(const u8* dns_name, dnsname_stack* name); /** @brief Allocates and duplicates a name with ZALLOC. * * Allocates and duplicates a name ZALLOC. * * @param[in] name a pointer to the dnsname * * @return A new instance of the dnsname. */ u8 *dnsname_zdup(const u8 *name); void dnsname_zfree(u8 *name); /** @brief Allocates and duplicates a label with ZALLOC. * * Allocates and duplicates a label with ZALLOC. * * @param[in] name a pointer to the label * * @return A new instance of the label */ u8 *dnslabel_zdup(const u8 *name); void dnslabel_zfree(u8 *name); #ifdef __cplusplus } #endif /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/fdtools.h0000644000077100007710000000012412650131756023450 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.595344 30 ctime=1454597650.976344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/fdtools.h0000664000077100007710000001207112650131756023256 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscoretools Generic Tools * @ingroup dnscore * @brief * * @{ */ #ifndef _FDTOOLS_H #define _FDTOOLS_H #include #include #ifndef _DIRENT_HAVE_D_TYPE #ifndef DT_UNKNOWN #define DT_UNKNOWN 0 #endif #ifndef DT_REG #define DT_REG 8 #endif #ifndef DT_DIR #define DT_DIR 10 #endif #endif #ifdef __cplusplus extern "C" { #endif #define US_RATE(x) (0.000001 * (x)) /** * Writes fully the buffer to the fd * It will only return a short count for system errors. * ie: fs full, non-block would block, fd invalid/closed, ... */ ssize_t writefully(int fd, const void *buf, size_t count); /** * Reads fully the buffer from the fd * It will only return a short count for system errors. * ie: fs full, non-block would block, fd invalid/closed, ... */ ssize_t readfully(int fd, void *buf, size_t count); ssize_t writefully_limited(int fd, const void *buf, size_t count, double minimum_rate); ssize_t readfully_limited(int fd, void *buf, size_t count, double minimum_rate); /** * Reads an ASCII text line from fd, stops at EOF or '\n' */ ssize_t readtextline(int fd, char *buf, size_t count); /** * Deletes a file (see man 2 unlink). * Handles EINTR and other retry errors. * * @param fd * @return */ int unlink_ex(const char *folder, const char *filename); /** * Opens a file. (see man 2 open) * Handles EINTR and other retry errors. * * @param fd * @return */ ya_result open_ex(const char *pathname, int flags); /** * Opens a file, create if it does not exist. (see man 2 open with O_CREAT) * Handles EINTR and other retry errors. * * @param fd * @return */ ya_result open_create_ex(const char *pathname, int flags, mode_t mode); /** * Opens a file, create if it does not exist. (see man 2 open with O_CREAT) * Handles EINTR and other retry errors. * This version of open_create_ex does NOT log anything, which is very important sometimes in the logger thread * * @param fd * @return */ ya_result open_create_ex_nolog(const char *pathname, int flags, mode_t mode); /** * Closes a file descriptor (see man 2 close) * Handles EINTR and other retry errors. * At return the file will be closed or not closable. * * @param fd * @return */ ya_result close_ex(int fd); /** * Returns the size of a file * * @param name * @return */ s64 filesize(const char *name); /** * * 0 : not a link * 1 : a link * < 0 : error */ ya_result file_is_link(const char *name); /** * * @param pathname * @param mode * @return */ #define MKDIR_EX_PATH_TO_FILE 1 // ie: pathname points to a file, so skip the file part int mkdir_ex(const char *pathname, mode_t mode, u32 flags); /** * Fixes an issue with the dirent not always set as expected. * * The type can be set to DT_UNKNOWN instead of file or directory. * In that case the function will call stats to get the type. */ u8 dirent_get_file_type(const char* folder, struct dirent *entry); #define READDIR_CALLBACK_CONTINUE 0 #define READDIR_CALLBACK_ENTER 1 #define READDIR_CALLBACK_EXIT 2 typedef ya_result readdir_callback(const char *basedir, const char* file, u8 filetype, void *args); ya_result readdir_forall(const char *basedir, readdir_callback *func, void *args); #ifdef __cplusplus } #endif #endif /* _FDTOOLS_H */ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/debug_config.h0000644000077100007710000000012412650131756024411 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.568344 30 ctime=1454597650.920344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/debug_config.h0000664000077100007710000000767412650131756024234 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup debug Debug functions * @ingroup dnscore * @brief Debug functions settings * * @{ */ #ifndef _DEBUG_CONFIG_H #define _DEBUG_CONFIG_H #ifdef __cplusplus extern "C" { #endif /** * These settings COULD be set by the configure * But given the nature of these flags, I don't think it would be a good idea. * */ /** * * DEBUG: Enables (1) or disables (0) the internal memory debugging. * * Recommended value: 0 * */ /** * Freed memory is trashed */ #define ZDB_DEBUG_MALLOC_TRASHMEMORY 1 /** * * DEBUG: Enables (1) or disables (0) the additional memory debugging. * This feature has been used to configure the ZMALLOC page sizes for * each line size. * * Recommended value: 1 */ #define ZDB_DEBUG_ENHANCED_STATISTICS 1 /** * * DEBUG: Sets the maximum block size (8 bytes granularity) that is taken * in account in the ZDB_DEBUG_ENHANCED_STATISTICS==1 mode. * Blocks bigger than this are all grouped in a "+++" group. * * Recommended value: 256 */ #define ZDB_DEBUG_ENHANCED_STATISTICS_MAX_MONITORED_SIZE 8192 /** * * DEBUG: Enables (1) or disables (0) dumping each time a malloc of a free * is called. * Recommende value: FALSE */ #define ZDB_DEBUG_SHOW_ALLOCS FALSE /** * DEBUG: Sets a limit on the memory available for the database. * Debug overhead is not taken in account here. * * 1GB should be enough. * * Recommended value: 0x40000000 * */ #define ZDB_DEBUG_ALLOC_MAX 0x200000000LL // 8GB /** * DEBUG: Enables block chaining (RECOMMENDED) * * Recommended value: 1 */ #define ZDB_DEBUG_CHAIN_ALLOCATED_BLOCKS 1 /** * DEBUG: Enable memory block tagging * * Recommended value: 1 */ #define ZDB_DEBUG_TAG_BLOCKS 1 /** * DEBUG: Each block has got an "unique" serial id of 64 bits. * * Recommended value: 1 */ #define ZDB_DEBUG_SERIALNUMBERIZE_BLOCKS 1 /** * DEBUG: measure timings on open/close/... */ #define ZDB_DEBUG_KEEP_STACKTRACE 1 #define DEBUG_BENCH_FD 1 #ifndef DEBUG #undef DEBUG_BENCH_FD #define DEBUG_BENCH_FD 0 #endif #ifdef __cplusplus } #endif #endif /* _DEBUG_CONFIG_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/buffer_input_stream.h0000644000077100007710000000012412650131756026041 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.565344 30 ctime=1454597650.865344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/buffer_input_stream.h0000664000077100007710000000630412650131756025651 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _BUFFER_INPUT_STREAM_H #define _BUFFER_INPUT_STREAM_H #include #ifdef __cplusplus extern "C" { #endif #define BUFFER_INPUT_STREAM_DEFAULT_BUFFER_SIZE 4096 void buffer_input_stream_init(input_stream* filtered_in, input_stream* stream_out, int buffer_size); /* * Function specific to the buffer_input_stream to read a line up to the '\n' */ ya_result buffer_input_stream_read_line(input_stream* stream, char* buffer, u32 len); /* ya_result buffer_input_stream_init(input_stream* stream,input_stream* fildered); */ input_stream *buffer_input_stream_get_filtered(input_stream* bis); /** * Rewinds the input stream back of a given number of bytes * * @param bos * @param bytes_back * * @return bytes_back : the operation was successful * > 0 : the maximum number of bytes available for rewind at the time of the call */ ya_result buffer_input_stream_rewind(input_stream* bos, u32 bytes_back); /** * Returns true iff the input stream is a buffer input stream * * @param bos * @return */ bool is_buffer_input_stream(input_stream *bos); #ifdef __cplusplus } #endif #endif /* _BUFFER_INPUT_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/allocator.h0000644000077100007710000000012412650131756023756 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.599344 30 ctime=1454597650.831344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/allocator.h0000664000077100007710000000542012650131756023564 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @ingroup dnscore * */ /*----------------------------------------------------------------------------*/ #ifndef __ALLOCATOR_H__ #define __ALLOCATOR_H__ #include struct allocator_s; /** * allocator method signatures */ typedef void *allocate_method(struct allocator_s *allocator, u32 size); typedef void free_method(struct allocator_s *allocator, void *ptr); // for destruction /** * allocator vtbl */ struct allocator_vtbl { allocate_method *allocate_method; free_method *free_method; const char *__class__; }; typedef struct allocator_vtbl allocator_vtbl; /** * allocator common structure */ struct allocator_s { const allocator_vtbl *vtbl; }; typedef struct allocator_s allocator_s; #define aalloc(ac__,size__) (ac__)->vtbl->allocate_method(ac__,size__) #define afree(ac__,ptr__) (ac__)->vtbl->free_method((ac__),(ptr__)) #ifndef ALLOCATOR_C extern allocator_s libc_allocator; #endif #endif // __ALLOCATOR_H__ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/packet_writer.h0000644000077100007710000000012412650131756024641 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.591344 30 ctime=1454597651.080344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/packet_writer.h0000664000077100007710000001126612650131756024454 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnspacket DNS Messages * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _PACKET_WRITER_H #define _PACKET_WRITER_H #include #include #ifdef __cplusplus extern "C" { #endif typedef struct packet_dictionary_node packet_dictionary_node; struct packet_dictionary_node // 16 / 28 { packet_dictionary_node* next; packet_dictionary_node* child; u8* label; u32 offset; }; typedef struct packet_writer packet_writer; struct packet_writer { packet_dictionary_node* head; // 4 8 packet_dictionary_node* pool_head; // 8 16 u8* packet; // 12 24 u32 packet_offset; // 16 28 u32 packet_limit; // 20 32 packet_dictionary_node pool[4096]; // 65556 114720 or 131104 (depending on struct alignment) }; /** * * creates an new packet * * @param pc * @param packet * @param limit */ void packet_writer_create(packet_writer* pc, u8* packet, u16 limit); /** * * initialises a writer based on an existing message * * @param pc * @param packet a packet containing a valid message * @param packet_offset * @param size_limit * @return */ ya_result packet_writer_init(packet_writer* pc, u8* packet, u32 packet_offset, u32 size_limit); /** * @note uncompressed names will not be compressed, of course *** BUT *** * they will not be used in the compression dictionnary either */ ya_result packet_writer_add_fqdn_uncompressed(packet_writer* pc, const u8* fqdn); ya_result packet_writer_add_fqdn(packet_writer* pc, const u8* fqdn); ya_result packet_writer_add_rdata(packet_writer* pc, u16 rr_type, const u8* rdata, u16 rdata_len); ya_result packet_writer_add_record(packet_writer* pc, const u8* fqdn, u16 rr_type, u16 rr_class, u32 ttl, const u8* rdata, u16 rdata_len); static inline s32 packet_writer_remaining_capacity(packet_writer* pc) { return (s32)pc->packet_limit - (s32)pc->packet_offset; } static inline void packet_writer_set_u16(packet_writer* pc, u16 value, u32 offset) { SET_U16_AT(pc->packet[offset], value); } static inline void packet_writer_add_u16(packet_writer* pc, u16 value) { SET_U16_AT(pc->packet[pc->packet_offset], value); pc->packet_offset += 2; } static inline void packet_writer_add_u32(packet_writer* pc, u32 value) { SET_U32_AT(pc->packet[pc->packet_offset], value); pc->packet_offset += 4; } static inline void packet_writer_add_bytes(packet_writer* pc, const u8* buffer, u32 len) { MEMCOPY(&pc->packet[pc->packet_offset], buffer, len); pc->packet_offset += len; } ya_result write_tcp_packet(packet_writer *pw, output_stream *tcpos); #ifdef __cplusplus } #endif #endif /* _PACKET_WRITER_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/logger-output-stream.h0000644000077100007710000000012412650131756026104 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.592344 30 ctime=1454597651.043344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/logger-output-stream.h0000664000077100007710000000443212650131756025714 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #pragma once #include #ifdef __cplusplus extern "C" { #endif ya_result logger_output_stream_open(output_stream* stream, logger_handle *handle, u16 level, u32 max_line_size); #ifdef __cplusplus } #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/network.h0000644000077100007710000000012412650131756023467 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.517344 30 ctime=1454597651.065344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/network.h0000664000077100007710000000642512650131756023303 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup network Network functions * @ingroup dnscore * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef NETWORK_H #define NETWORK_H #include /* Required for BSD */ #include #include #include #include #define SOCKADD4_TAG 0x344444414b434f53 #define SOCKADD6_TAG 0x364444414b434f53 /* * In order to avoid casting, this is the type that should be used to store sockaddr */ typedef union socketaddress socketaddress; union socketaddress { struct sockaddr sa; struct sockaddr_in sa4; struct sockaddr_in6 sa6; struct sockaddr_storage ss; }; static inline bool sockaddr_equals(struct sockaddr *a, struct sockaddr *b) { if(a->sa_family == b->sa_family) { switch (a->sa_family) { case AF_INET: { struct sockaddr_in *sa4 = (struct sockaddr_in *)a; struct sockaddr_in *sb4 = (struct sockaddr_in *)b; return memcmp(&sa4->sin_addr.s_addr, &sb4->sin_addr.s_addr, 4) == 0; } case AF_INET6: { struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *)a; struct sockaddr_in6 *sb6 = (struct sockaddr_in6 *)b; return memcmp(&sa6->sin6_addr, &sb6->sin6_addr, 16) == 0; } } } return FALSE; } #endif /* HOST_ADDRESS_H */ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/server-setup.h0000644000077100007710000000012412650131756024442 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.524344 30 ctime=1454597651.129344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/server-setup.h0000664000077100007710000000457012650131756024255 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #pragma once #define SETUP_CORE_LIMITS 1 #define SETUP_ROOT_CHANGE 2 #define SETUP_ID_CHANGE 4 #define SETUP_CREATE_PID_FILE 8 void server_setup_daemon_go(); ya_result server_setup_env(pid_t *pid, char **pid_file_pathp, uid_t uid, gid_t gid, u32 setup_flags); /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/counter_output_stream.h0000644000077100007710000000012412650131756026450 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.503344 30 ctime=1454597650.909344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/counter_output_stream.h0000664000077100007710000000520512650131756026257 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _COUNTER_OUTPUT_STREAM_H #define _COUNTER_OUTPUT_STREAM_H #include #ifdef __cplusplus extern "C" { #endif typedef struct counter_output_stream_data counter_output_stream_data; struct counter_output_stream_data { output_stream* filtered; u64 write_count; u64 written_count; ya_result result; u8 flags; }; void counter_output_stream_init(output_stream* filtered, output_stream* stream,counter_output_stream_data* counter_data); #ifdef __cplusplus } #endif #endif /* _counter_output_stream_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/zonefile_reader.h0000644000077100007710000000012412650131756025133 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.556344 30 ctime=1454597651.210344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/zonefile_reader.h0000664000077100007710000001371212650131756024744 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ /* It's a suggestion for a common interface for stored files. * I'd add an "add" and "remove" status on a record in order to * accommodate dynupdate features. * */ #ifndef _ZONEFILE_READER_H #define _ZONEFILE_READER_H #error DONT USE YET #include #define ZONEFILE_OPERATION_ADD 0x00 /* The next record is meant to be added */ #define ZONEFILE_OPERATION_REMOVE 0x01 /* The next record is meant to be removed */ #define ZONEFILE_OPERATION_LABELCHANGED 0x02 /* The caller should reload the label */ #define ZONEFILE_OPERATION_TYPECHANGED 0x04 /* The caller should reload the type */ #define ZONEFILE_OPERATION_EOF 0x80 /* End of file */ #ifdef __cplusplus extern "C" { #endif typedef struct zonefile_reader zonefile_reader; /* * Opens a zone file using the filename (mostly used for TXT zone files) * The next dnsname is made ready */ typedef ya_result zonefile_openfile_method(zonefile_reader* reader, const char* filename); /* * Opens a zone file using the origin (used for any internal file) * The next dnsname is made ready */ typedef ya_result zonefile_openzone_method(zonefile_reader* reader,const u8* origin,u16 zclass); /* * Go to the next dnrecord if any * * return the operation */ typedef ya_result zonefile_nextrecord_method(zonefile_reader* reader); /* * Closes the file(s) */ typedef ya_result zonefile_close_method(zonefile_reader* reader); /* * Returns true if the format name is supported by the current implementation */ typedef bool zonefile_supports_method(zonefile_reader* reader,const char* format); /* * Returns the current operation */ typedef ya_result zonefile_getcurrenoperation_method(zonefile_reader* reader); /* * Returns the current class (should be constant for the whole zone */ typedef u16 zonefile_getcurrentclass_method(zonefile_reader* reader); /* * Returns the current type */ typedef u16 zonefile_getcurrenttype_method(zonefile_reader* reader); /* * Returns the current ttl */ typedef u32 zonefile_getcurrentttl_method(zonefile_reader* reader); /* * Returns the current rdata_size */ typedef u16 zonefile_getcurrentrdatasize_method(zonefile_reader* reader); /* * Returns the current rdata */ typedef const u8* zonefile_getcurrentrdata_method(zonefile_reader* reader); struct zonefile_reader { void* data; zonefile_openfile_method* openfile; zonefile_openzone_method* openzone; zonefile_nextrecord_method* nextrecord; zonefile_getcurrentclass_method* getcurrentclass; zonefile_getcurrenttype_method* getcurrenttype; zonefile_getcurrentttl_method* getcurrentttl; zonefile_getcurrentrdatasize_method* getcurrentrdatasize; zonefile_getcurrentrdata_method* getcurrentrdata; zonefile_close_method* close; zonefile_supports_method* supports; }; #define zonefile_openfile(zf,filename) (zf)->openfile_method(zf,filename) #define zonefile_openzone(zf,origin) (zf)->openzone_method(zf,origin) #define zonefile_close(zf) (zf)->close_method(zf) #define zonefile_supports(zf) (zf)->zonefile_supports_method_method(zf) #define zonefile_nextrecord(zf) (zf)->zonefile_nextrecord_method(zf) #define zonefile_getcurrentclass(zf) (zf)->zonefile_getcurrentclass_method(zf) #define zonefile_getcurrenttype(zf) (zf)->zonefile_getcurrenttype_method(zf) #define zonefile_getcurrentttl(zf) (zf)->zonefile_getcurrentttl_method(zf) #define zonefile_getcurrentrdatasize(zf) (zf)->zonefile_getcurrentrdatasize_method(zf) #define zonefile_getcurrentrdata(zf) (zf)->zonefile_getcurrentrdata_method(zf) #ifdef __cplusplus } #endif #endif /* _ZONEFILE_READER_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/parsing.h0000644000077100007710000000012412650131756023441 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.491344 30 ctime=1454597651.088344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/parsing.h0000664000077100007710000001705712650131756023260 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscoretools Generic Tools * @ingroup dnscore * @brief * * @{ */ #ifndef _PARSING_H #define _PARSING_H #include #include #ifdef __cplusplus extern "C" { #endif /** \brief A string will be checked * * The number will be extracted from the string if present. This number can * be 10-based, or hex-based, or...\n * The base must be between 2 and 36 and the number must be be between the min * values and max value * * @param[in] src string with number part in it * @param[out] dst number found * @param[in] min * @param[in] max * @param[in] base * * @retval OK * @retval NOK, if no digits found, or number not in the range */ ya_result parse_u32_check_range(const char *src, u32 *dst, u32 min, u32 max, u8 base); ya_result parse_u32_check_range_len_base10(const char *src, u32 src_len, u32 *dst, u32 min, u32 max); ya_result parse_s32_check_range_len_base10(const char *src, u32 src_len, s32 *dst, s32 min, s32 max); /** \brief Converts a chain of pascal strings to a string * * Converts a chain of pascal strings to a string * * @param[in] src string in the form [len+chars]* * @param[out] dst string * * @retval OK * @retval NOK, if something is broken */ ya_result parse_pstring(char **srcp_in_out, size_t src_len, u8 *dst, size_t dst_len); /** \brief Converts a string to an epoch * * Converts a string to an epoch * * @param[in] src string in the form YYYYMMDDhhmmss * @param[out] dst value of the source converted into GMT epoch * * @retval OK * @retval NOK, if no digits found, or number not in the range */ ya_result parse_yyyymmddhhmmss_check_range_len(const char *src, u32 src_len, u32 *dst); ya_result parse_yyyymmddhhmmss_check_range(const char *src, u32 *dst); /** \brief Copies and trim a string * * Copies a string while remove head & tail spaces and reducing any blank run to a single space * The source does not need to be asciiz * The destination will be asciiz * * @param[in] src string * @param[in] src_len size of the string (the zero sentinel is not checked) * @param[in] dst buffer that will receive the output string * @param[in] dst_len size of the buffer * * @retval >= 0, the length of the dst string * @retval ERROR, dst_len was too small */ ya_result parse_copy_trim_spaces(const char *src, u32 src_len, char *dst, u32 dst_len); ya_result parse_remove_spaces(char *inout_txt); /** \brief Skips a specific keyword from a string, case insensitive * * Skips a specific keyword from a string, case insensitive, skips white spaces before and after the match * * @param[in] src string * @param[in] src_len size of the string (the zero sentinel is not checked) * @param[in] words array of strings that will be looked for * @param[in] word_count the size of the array * @param[in] matched_word a pointer to an integer that will hold the matched word index or -1 (can be NULL) * * @retval >= 0, the number of bytes until the next word * @retval ERROR, dst_len was too small */ ya_result parse_skip_word_specific(const char *src, u32 src_len, const char **words, u32 word_count, s32 *matched_word); const char * parse_skip_until_chars(const char *src, const char *chars, u32 chars_len); /** \brief Skips a specific keyword from a string, case insensitive * * Skips a specific keyword from a string, case insensitive, skips white spaces before and after the match * * @param[in] src string * @param[in] src_len size of the string (the zero sentinel is not checked) * @param[in] dst buffer that will receive the binary version of the ip * @param[in] dst_len the size of the buffer, minimum 4 for ipv4 and minimum 16 for ipv6 * * @retval >= 0, the number of bytes written (4 for ipv4 and 16 for ipv6) * @retval ERROR, dst_len was too small or the src was not a valid ip */ ya_result parse_ip_address(const char *src, u32 src_len, u8 *dst, u32 dst_len); /** * Returns a pointer to the first non-blank character on an ASCIIZ string * blank = space-char & tab * space = space-char & tab & form feed & cr & lf * * @param txt * @return */ static inline const char *parse_skip_spaces(const char *txt) { while(isspace(*txt) && (*txt != '\0')) { txt++; } return txt; } /** * Returns a pointer to the first blank character on an ASCIIZ string * blank = space-char & tab * space = space-char & tab & form feed & cr & lf * * @param txt * @return */ static inline const char *parse_next_blank(const char *txt) { while(!isblank(*txt) && (*txt != '\0')) { txt++; } return txt; } /** * Returns a pointer to the first space character on an ASCIIZ string * blank = space-char & tab * space = space-char & tab & form feed & cr & lf * * @param txt * @return */ static inline const char *parse_next_space(const char *txt) { while(!isspace(*txt) && (*txt != '\0')) { txt++; } return txt; } /** * Copies the next word into dst * * @param txt * @return strlen(dst) */ static inline s32 parse_copy_word(char *dst, size_t dst_size, const char *txt) { char *base = dst; const char * const limit = &txt[MIN(strlen(txt), dst_size)]; while(!isspace(*txt) && (txt < limit)) { *dst++ = *txt++; } *dst = '\0'; return dst - base; } static inline s32 parse_copy_next_word(char *dst, size_t dst_size, const char *txt) { const char *non_blank_txt = parse_skip_spaces(txt); s32 n = parse_copy_word(dst, dst_size, non_blank_txt); if(n >= 0) { n += non_blank_txt - txt; } return n; } s32 parse_next_token(char *dest, size_t dest_size, const char *from, const char *delim); #ifdef __cplusplus } #endif #endif /* _PARSING_H */ /** @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/print_stream.h0000644000077100007710000000012412650131756024505 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.565344 30 ctime=1454597651.102344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/print_stream.h0000664000077100007710000000500212650131756024307 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _PRINT_STREAM_H #define _PRINT_STREAM_H #include #ifdef __cplusplus extern "C" { #endif ya_result os_print(output_stream_ptr stream,const char* text); ya_result os_println(output_stream_ptr stream,const char* text); ya_result os_format(output_stream_ptr stream,const char* text,...); ya_result os_formatln(output_stream_ptr stream,const char* text,...); #ifdef __cplusplus } #endif #endif /* _OUTPUT_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/dnscore-config-features.h0000644000077100007710000000013212654663022026511 xustar000000000000000030 mtime=1454597650.717344534 30 atime=1454597650.656344534 30 ctime=1454597650.824344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/dnscore-config-features.h0000664000077100007710000000076512654663022026327 0ustar00yadifayadifa00000000000000#pragma once #define DNSCORE_HAS_TSIG_SUPPORT 1 #define DNSCORE_HAS_RDTSC 0 #define DNSCORE_HAS_ACL_SUPPORT 1 #define DNSCORE_HAS_NSEC3_SUPPORT 1 #define DNSCORE_HAS_NSEC_SUPPORT 1 #define DNSCORE_HAS_ZALLOC_SUPPORT 1 #define DNSCORE_HAS_ZALLOC_DEBUG_SUPPORT 0 #define DNSCORE_HAS_ZALLOC_STATISTICS_SUPPORT 0 #define DNSCORE_HAS_MALLOC_DEBUG_SUPPORT 0 #define DNSCORE_HAS_MUTEX_DEBUG_SUPPORT 0 // version 2.1.6.0-0 #define DNSCORE_VERSION 0x020106000000LL// include/dnscore/dnscore-config-features.h yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/timeformat.h0000644000077100007710000000012412650131756024145 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.498344 30 ctime=1454597651.185344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/timeformat.h0000664000077100007710000001320012650131756023746 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup format C-string formatting * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _TIMEFORMAT_H #define _TIMEFORMAT_H /* * Format extensions related to dns * * dnsname : u8* dns name * dnslabel : u8* dns label (pascal string) * class : u16* zone class * type : u16* record type */ #include #ifdef __cplusplus extern "C" { #endif /** * writers of formats * * */ // dtus 0000-00-00 00:00:00.000000 void datetimeus_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters); // dtms 0000-00-00 00:00:00.000 void datetimems_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters); // dts 0000-00-00 00:00:00 void datetime_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters); // date 0000-00-00 void date_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters); // time 00:00:00 void time_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters); // epoch 0000-00-00 00:00:00 void epoch_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters); #define DATETIMEUS_DEF2(variable,realvariable) format_writer variable##_format_writer = {datetimeus_format_handler_method, (void*)(intptr)realvariable} #define DATETIMEUS_DEF(variable) format_writer variable##_format_writer = {datetimeus_format_handler_method, (void*)(intptr)variable} #define DATETIMEUS_REF(variable) &variable##_format_writer #define DATETIMEMS_DEF2(variable,realvariable) format_writer variable##_format_writer = {datetimems_format_handler_method, (void*)(intptr)realvariable} #define DATETIMEMS_DEF(variable) format_writer variable##_format_writer = {datetimems_format_handler_method, (void*)(intptr)variable} #define DATETIMEMS_REF(variable) &variable##_format_writer #define DATETIME_DEF2(variable,realvariable) format_writer variable##_format_writer = {datetime_format_handler_method, (void*)(intptr)realvariable} #define DATETIME_DEF(variable) format_writer variable##_format_writer = {datetime_format_handler_method, (void*)(intptr)variable} #define DATETIME_REF(variable) &variable##_format_writer #define DATE_DEF2(variable,realvariable) format_writer variable##_format_writer = {date_format_handler_method, (void*)(intptr)realvariable} #define DATE_DEF(variable) format_writer variable##_format_writer = {date_format_handler_method, (void*)(intptr)variable} #define DATE_REF(variable) &variable##_format_writer #define TIME_DEF2(variable,realvariable) format_writer variable##_format_writer = {time_format_handler_method, (void*)(intptr)realvariable} #define TIME_DEF(variable) format_writer variable##_format_writer = {time_format_handler_method, (void*)(intptr)variable} #define TIME_REF(variable) &variable##_format_writer #define EPOCH_DEF2(variable,realvariable) format_writer variable##_format_writer = {epoch_format_handler_method, (void*)(intptr)realvariable} #define EPOCH_DEF(variable) format_writer variable##_format_writer = {epoch_format_handler_method, (void*)(intptr)variable} #define EPOCH_REF(variable) &variable##_format_writer void timeformat_class_init(); #ifdef __cplusplus } #endif #endif /* _DNSFORMAT_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/empty-input-stream.h0000644000077100007710000000012412650131756025562 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.547344 30 ctime=1454597650.972344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/empty-input-stream.h0000664000077100007710000000433612650131756025375 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #pragma once #include #ifdef __cplusplus extern "C" { #endif void empty_input_stream_init(input_stream *stream); #ifdef __cplusplus } #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/pid.h0000644000077100007710000000012412650131756022552 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.596344 30 ctime=1454597651.091344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/pid.h0000664000077100007710000000472012650131756022362 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #pragma once #include #include #include ya_result pid_check_running_program(const char *program_name, const char *pid_file_path); ya_result pid_file_create(pid_t *pid, const char *pid_file_path, uid_t uid, gid_t gid); pid_t pid_file_read(const char *pid_file_path); void pid_file_destroy(const char *pid_file); /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/threaded_nb_mm.h0000644000077100007710000000012412650131756024726 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.553344 30 ctime=1454597651.158344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/threaded_nb_mm.h0000664000077100007710000000505412650131756024537 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief "no-wait" stack allocator * meant to be used with the "no-wait" queue * * @{ * *----------------------------------------------------------------------------*/ #ifndef __THREADED_NB_MM_H__ #define __THREADED_NB_MM_H__ #include typedef struct threaded_nb_mm threaded_nb_mm; struct threaded_nb_mm { u8 * volatile items; volatile void **item_head; u32 item_size; u32 item_count; }; void threaded_nb_mm_init(threaded_nb_mm *mm, u32 count, u32 size); void* threaded_nb_mm_alloc(threaded_nb_mm *mm); void threaded_nb_mm_free(threaded_nb_mm *mm, void *p); void threaded_nb_mm_finalize(threaded_nb_mm *mm); #endif /** * @} */ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/file_input_stream.h0000644000077100007710000000012412650131756025507 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.498344 30 ctime=1454597650.980344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/file_input_stream.h0000664000077100007710000000560012650131756025315 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _FILE_INPUT_STREAM_H #define _FILE_INPUT_STREAM_H #include #ifdef __cplusplus extern "C" { #endif ya_result file_input_stream_open(const char *filename, input_stream *stream); ya_result file_input_stream_open_ex(const char *filename, int flags, input_stream *stream); /* Create an input stream and assigns the fd to it. */ ya_result fd_input_stream_attach(input_stream *stream, int fd); void fd_input_stream_detach(input_stream *stream); ya_result fd_input_stream_get_filedescriptor(input_stream* stream); ya_result fd_input_stream_seek(input_stream* stream, u64 offset); bool is_fd_input_stream(input_stream* stream); void file_input_steam_advise_sequential(input_stream* stream); #ifdef __cplusplus } #endif #endif /* _FILE_INPUT_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/mt_output_stream.h0000644000077100007710000000012412650131756025411 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.504344 30 ctime=1454597651.058344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/mt_output_stream.h0000664000077100007710000000502212650131756025215 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _MT_OUTPUT_STREAM_H #define _MT_OUTPUT_STREAM_H #include #include #ifdef __cplusplus extern "C" { #endif /** * Can only fail if in_filtered has not been set */ ya_result mt_output_stream_init(output_stream *in_filtered, output_stream *out_stream); output_stream *mt_output_stream_get_filtered(output_stream *bos); bool is_mt_output_stream(const output_stream *bos); #ifdef __cplusplus } #endif #endif /* _MT_OUTPUT_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/base16.h0000644000077100007710000000012412650131756023057 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.512344 30 ctime=1454597650.846344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/base16.h0000664000077100007710000000560112650131756022666 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup base Base conversion functions * @ingroup dnscore * @brief Base 16 codec * * @{ * *----------------------------------------------------------------------------*/ #ifndef _BASE16_H #define _BASE16_H #include #ifdef __cplusplus extern "C" { #endif /** * Encodes bytes into base16 * The output size must be at least size_in * 2 * * @param buffer_in bytes to convert * @param size_in number of bytes * @param buffer_out output buffer of a size >= size_in * 2 * * @return output size */ u32 base16_encode(const u8* buffer_in,u32 size_in,char* buffer_out); /** * Decodes base16 into bytes * The output size must be at least size_in / 2 * * @param buffer_in base16 text * @param size_in number of chars * @param buffer_out output buffer of a size >= size_in / 2 * * @return output size */ ya_result base16_decode(const char* buffer_in,u32 size_in,u8* buffer_out); #ifdef __cplusplus } #endif #endif /* _BASE16_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/osx_clock_gettime.h0000644000077100007710000000012412650131756025500 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.524344 30 ctime=1454597651.214344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/osx_clock_gettime.h0000664000077100007710000000450212650131756025306 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #pragma once #include #include #include #if !(defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0)) && defined(__MACH__) #ifndef CLOCK_REALTIME #define CLOCK_REALTIME 0 #endif typedef int clockid_t; int clock_gettime(clockid_t clk_id, struct timespec *tp); #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/buffer_output_stream.h0000644000077100007710000000012412650131756026242 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.527344 30 ctime=1454597650.868344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/buffer_output_stream.h0000664000077100007710000000551412650131756026054 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _BUFFER_OUTPUT_STREAM_H #define _BUFFER_OUTPUT_STREAM_H #include #ifdef __cplusplus extern "C" { #endif /** * * Bufferise the in_filtered output stream wrapping it in out_stream * * Can only fail if in_filtered has not been set properly * * @param in_filtered the stream to bufferise * @param out_stream the resulting stream * @param in_buffer_size the size of the buffer * * @return SUCCESS except if in_filtered has not been opened */ ya_result buffer_output_stream_init(output_stream* in_filtered, output_stream* out_stream, int in_buffer_size); /***/ output_stream *buffer_output_stream_get_filtered(output_stream *bos); bool is_buffer_output_stream(output_stream* os); #ifdef __cplusplus } #endif #endif /* _BUFFER_OUTPUT_STREAM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/include/dnscore/PaxHeaders.8028/fingerprint.h0000644000077100007710000000012412650131756024325 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.615344 30 ctime=1454597650.987344534 yadifa-2.1.6-5826/lib/dnscore/include/dnscore/fingerprint.h0000664000077100007710000002276712650131756024150 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscore * @ingroup dnscore * @brief fingerprints, mapping between answer code and dns code * * @{ * *----------------------------------------------------------------------------*/ #ifndef _FINGERPRINT_H #define _FINGERPRINT_H #include #ifdef __cplusplus extern "C" { #endif /* This makes the finger print of the name server */ enum finger_print { /* * Obsolete */ FP_DATABASE_ERR = RCODE_SERVFAIL, /* NOT USED */ FP_ANCOUNT_NOT_0 = RCODE_FORMERR, /* NOT USED */ FP_TC_BIT_SET = RCODE_FORMERR, /* NOT USED */ FP_QR_BIT_SET = RCODE_FORMERR, FP_Z_BITS_SET = RCODE_FORMERR, /* NOT USED */ FP_RCODE_BITS_SET = RCODE_FORMERR, /* NOT USED */ FP_ZOCOUNT_NOT_1 = RCODE_FORMERR, /* NOT USED */ FP_CH_REFUSED = RCODE_FORMERR, /* NOT USED */ FP_NOT_SUPP_CLASS = RCODE_NOTIMP, /* NOT USED, same remark as for FP_NOT_SUPP_TYPE */ FP_NSCOUNT_NOT_0 = RCODE_FORMERR, /* Message processing. Not used anymore (conflicts with updates) */ /* * Message processing */ FP_PACKET_DROPPED = RCODE_FORMERR, /* */ FP_MESG_OK = RCODE_NOERROR, /* The message processing didn't found anything wrong with * the query. */ FP_QDCOUNT_BIG_1 = RCODE_FORMERR, /* The message processing rejected the query because #QD>1 * which is not supported by yadifa */ FP_QDCOUNT_IS_0 = RCODE_FORMERR, /* The message processing rejected the query because #QD==0 */ FP_ARCOUNT_NOT_0 = RCODE_FORMERR, /* The message processing rejected the query because #AR>0 * This only makes sense if there is no TSIG nor EDNS support * implemented. And even then : is there no conflict with updates ? */ FP_QNAME_COMPRESSED = RCODE_NOTIMP, /* The message processing found out that the queried name was * too long (labels too big or name too big) */ FP_NAME_TOO_LARGE = RCODE_FORMERR, /* The message processing found out that the queried name was * too long (labels too big or name too big) */ FP_NAME_FORMAT_ERROR = RCODE_FORMERR, /* Bad compression of a NAME */ FP_INCORR_PROTO = RCODE_FORMERR, /* The message processing found out that something "wrong" * was queried (ie: AXFR/IXFR on UDP). * THIS NEEDS TO BE CHECKED (xXFR on UDP is not always wrong) */ FP_NOT_SUPP_OPC = RCODE_NOTIMP, /* The message processing found an unsupported opcode in the * query */ FP_XFR_REFUSED = RCODE_NOTAUTH, /* The transfer (AXFR/IXFR) has been refused by ACL */ FP_XFR_UP_TO_DATE = RCODE_NOERROR, /* no XFR necessary */ FP_XFR_BROKENZONE = RCODE_SERVFAIL, /* the zone is in an invalid state */ FP_XFR_QUERYERROR = RCODE_FORMERR, FP_TSIG_ERROR = RCODE_NOTAUTH, /* The message processing handled the included TSIG but rejected * it */ FP_TSIG_UNEXPECTED = RCODE_FORMERR, /* The message processing did not expect the included TSIG */ FP_TSIG_BROKEN = RCODE_FORMERR, /* The TSIG cannot be read properly */ FP_TSIG_IS_NOT_LAST = RCODE_FORMERR, /* There is a record after the TSIG */ FP_EDNS_BAD_VERSION = RCODE_BADVERS, /* Found an EDNS version that is not 0 * */ FP_NOT_SUPP_TYPE = RCODE_FORMERR, /* AXFR udp query, OPT query */ FP_SLAVE_NOTIFIES_MASTER = RCODE_REFUSED, FP_NONMASTER_NOTIFIES_SLAVE = RCODE_REFUSED, /* notify from something not in the masters list */ FP_NOTIFY_UNKNOWN_ZONE = RCODE_NOTAUTH, FP_UNEXPECTED_RR_IN_QUERY = RCODE_FORMERR, /* trash in the packet */ FP_ERROR_READING_QUERY = RCODE_FORMERR, /* * Database */ FP_ACCESS_REJECTED = RCODE_REFUSED, /* access to the database has been rejected */ FP_NOTIFY_REJECTED = RCODE_REFUSED, /* access to the database has been rejected */ FP_NOTIFY_QUERYERROR = RCODE_FORMERR, FP_CLASS_NOTFOUND = RCODE_REFUSED, /* class not supported/not in the database */ FP_BASIC_LABEL_NOTFOUND = RCODE_NXDOMAIN, /* The label has not been found inside the zone database */ FP_BASIC_LABEL_DELEGATION = RCODE_NOERROR, /* The label was part of a delegation */ FP_BASIC_RECORD_NOTFOUND = RCODE_NOERROR, /* we didn't found a resource record */ FP_BASIC_RECORD_FOUND = RCODE_NOERROR, /* we found a resource record */ FP_CNAME_LOOP = RCODE_NOERROR, /* we detected a loop in the CNAMEs */ FP_CNAME_BROKEN = RCODE_SERVFAIL, /* we detected an issue in the database */ FP_CNAME_MAXIMUM_DEPTH = RCODE_NOERROR, /* we reached the maximum allowed depth on a CNAME chain */ FP_NSEC3_RECORD_NOTFOUND = RCODE_NOERROR, /* we didn't found a record and we can prove it with nsec3 */ FP_NSEC3_LABEL_NOTFOUND = RCODE_NXDOMAIN, /* we didn't found a domain and we can prove it with nsec3 */ FP_NSEC_RECORD_NOTFOUND = RCODE_NOERROR, /* we didn't found a record and we can prove it with nsec3 */ FP_NSEC_LABEL_NOTFOUND = RCODE_NXDOMAIN, /* we didn't found a domain and we can prove it with nsec3 */ FP_CANNOT_DYNUPDATE = RCODE_REFUSED, /* the zone has been frozen (maintenance or admin) and cannot * accept an update until being unfrozen */ FP_UPDATE_UNKNOWN_ZONE = RCODE_NOTZONE, /* dynupdate on a zone we are not AA of */ FP_NOZONE_FOUND = RCODE_REFUSED, /* When a dynamic update does not find the zone it's supposed * to update. */ FP_INVALID_ZONE = RCODE_SERVFAIL, FP_IXFR_UDP = RCODE_NOTIMP, FP_FEATURE_DISABLED = RCODE_NOTIMP }; typedef enum finger_print finger_print; #ifdef __cplusplus } #endif #endif /* _FINGERPRINT_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/aclocal.m40000644000077100007710000000013212654662577020422 xustar000000000000000030 mtime=1454597503.036344535 30 atime=1454597503.035344535 30 ctime=1454597650.816344534 yadifa-2.1.6-5826/lib/dnscore/aclocal.m40000664000077100007710000012636712654662577020247 0ustar00yadifayadifa00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_AR([ACT-IF-FAIL]) # ------------------------- # Try to determine the archiver interface, and trigger the ar-lib wrapper # if it is needed. If the detection of archiver interface fails, run # ACT-IF-FAIL (default is to abort configure with a proper error message). AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], [AC_LANG_PUSH([C]) am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a ]) AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) m4_default([$1], [AC_MSG_ERROR([could not determine $AR interface])]) ;; esac AC_SUBST([AR])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file 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. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/ltmain.sh0000644000077100007710000000013012473714653020370 xustar000000000000000029 mtime=1424988587.71705841 29 atime=1424988587.71705841 30 ctime=1454597651.285344534 yadifa-2.1.6-5826/lib/dnscore/ltmain.sh0000644000077100007710000117077112473714653020214 0ustar00yadifayadifa00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.6 package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # 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 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # 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 "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # 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 3 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --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 --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message 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. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # 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= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE 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. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # 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 () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` 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 "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # 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. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # 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 func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # 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= pie_flag= 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) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append 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,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append 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. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; 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 no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock 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 yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; 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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [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: $progname [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 -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler 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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [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 -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -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 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -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 -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -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] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) 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: $progname [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." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" 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 -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # 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 else 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 else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" 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" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; 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. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append 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 -e "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. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_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 test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append 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 func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_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 func_basename "$file" destfile=$func_basename_result 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 func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "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) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # 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/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) 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*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; 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 "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # 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. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd 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 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac 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_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= 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 func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result 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 func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_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've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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. sed_quote_subst='$sed_quote_subst' # Be 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 variables: generated_by_libtool_version='$macro_version' 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 file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ 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 "\ # 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 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # 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 \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} 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 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #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 # define FOPEN_WB "wb" # 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 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ 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]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); 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 = (size_t) (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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } 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 (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" 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 func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" 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 # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir 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 func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework 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*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # 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-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext 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 ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" 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. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'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\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. 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 $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; 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 $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append 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 notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; 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 .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # 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 yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else 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 use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # 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 func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" 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. func_append dlprefiles " $lib $dependency_libs" else func_append 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 func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && 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 func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || 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 *"$absdir:"*) ;; *) func_append 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && 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 built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; 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 lib = "$linkmode" && test yes = "$hardcode_into_libs"; 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 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* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' 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 prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; 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 (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; 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 elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; 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 yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; 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 [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; 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 prog = "$linkmode"; 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 unsupported != "$hardcode_direct"; 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 yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; 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 cannot 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 yes = "$module"; 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 no = "$build_old_libs"; 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 lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # 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 "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=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 "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # 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 func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; 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 test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # 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=$1 number_minor=$2 number_revision=$3 # # 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 # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; esac ;; no) current=$1 revision=$2 age=$3 ;; 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]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" 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 func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result 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 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; 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 no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; 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 | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "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 func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; 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 "*) ;; *) func_append 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 "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-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 yes = "$build_libtool_need_lc"; then func_append 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. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi 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 "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append 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 func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; 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 ;; esac ;; 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 with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; 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 no = "$build_old_libs"; 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 no = "$allow_undefined"; 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 no = "$build_old_libs"; 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 # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append 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 yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append 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 "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append 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 relink = "$opt_mode" || 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 shift realname=$1 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 func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "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" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && 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 : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # 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 func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result 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~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "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 $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } 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\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && 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 fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( 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 relink = "$opt_mode"; then $opt_dry_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 func_show_eval '${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 func_show_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 yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_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= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${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" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append 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 "*) ;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append 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 yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } 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 func_append 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 func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result 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 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # 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 func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$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 eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$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= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; 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 "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; 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) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_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 no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false 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) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; 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 $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where 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 build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/VERSION0000644000077100007710000000012412652141712017610 xustar000000000000000027 mtime=1453900746.981001 27 atime=1454597464.617344 30 ctime=1454597650.820344534 yadifa-2.1.6-5826/lib/dnscore/VERSION0000664000077100007710000000000612652141712017411 0ustar00yadifayadifa000000000000002.1.6 yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/configure.ac0000644000077100007710000000013212654662532021037 xustar000000000000000030 mtime=1454597466.812344534 30 atime=1454597466.811344534 30 ctime=1454597650.813344534 yadifa-2.1.6-5826/lib/dnscore/configure.ac0000664000077100007710000001422712654662532020653 0ustar00yadifayadifa00000000000000dnl ############################################################################ dnl dnl Copyright (c) 2011-2016, EURid. All rights reserved. dnl The YADIFA TM software product is provided under the BSD 3-clause license: dnl dnl Redistribution and use in source and binary forms, with or without dnl modification, are permitted provided that the following conditions dnl are met: dnl dnl * Redistributions of source code must retain the above copyright dnl notice, this list of conditions and the following disclaimer. dnl * Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in dnl the documentation and/or other materials provided with the dnl distribution. dnl * Neither the name of EURid nor the names of its contributors may be dnl used to endorse or promote products derived from this software dnl without specific prior written permission. dnl dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN dnl CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE dnl POSSIBILITY OF SUCH DAMAGE. dnl dnl ############################################################################## AC_PREREQ(2.61) AC_REVISION([$Revision: 5826 $]) AC_INIT([dnscore],m4_esyscmd([svn info 2> /dev/null | grep 'Last Changed Rev: ' | sed -re 's/.*: (.*)/Revision: \1 $/' -e 's/^/$/' >> revision.txt;echo $(cat VERSION)-$(grep \$Revision: * | sed -e 's/^.*\$Revision: *//' -e 's/\$.*//' -e 's/ *//' | sort -n | /usr/bin/tail -1 | tr -d '\n') | tr -d '\n']),[bugreport@yadifa.eu]) echo echo echo "DNSCORE START" echo "-------------" echo echo m4_include([../../m4/eurid.m4]) m4_include([../../m4/yadifa.m4]) AC_CONFIG_AUX_DIR([.]) AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror tar-pax]) AC_CONFIG_HEADER([include/dnscore/dnscore-config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_DEFUN([SYSCONF], [/$prefix/PACKAGE/PACKAGE.conf]) AC_CANONICAL_BUILD # Checks for programs. dnl m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AM_PROG_AR AC_PROG_CC AM_PROG_CC_C_O LT_INIT([disable-shared]) AC_DARWIN_LIBTOOL AC_PROG_LIBTOOL dnl Checks for libraries. AC_CHECK_LIB([c], [printf]) AC_CHECK_LIB([pthread], [pthread_mutex_init]) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h]) # Check for Darwin or Linux AC_CHECK_HEADERS([linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h]) # Check for Darwin or Linux AC_CHECK_HEADERS([sys/types.h i386/types.h]) # AC_CHECK_HEADERS([sys/socket.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_BIGENDIAN AC_TYPE_MODE_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_STRUCT_TM dnl AC_PROG_RANLIB AC_CHECK_TYPES(uint64_t) AC_CHECK_TYPES(int64_t) AC_CHECK_TYPES(long long) AC_CHECK_TYPES(u_char) dnl include strdup AC_MSG_CHECKING(if has strdup) AM_CONDITIONAL([HAS_STRDUP], [false]) cat > strdup_test.c <<_ACEOF #include #include int main(int argc, char** argv) { char* p = strdup("test"); return 0; } _ACEOF ${CC} ${CFLAGS} strdup_test.c -o strdup_test if [[ $? -eq 0 ]]; then has_strdup=1; echo "yes" else echo "no" fi rm -f strdup_test strdup_test.c AM_CONDITIONAL([HAS_STRDUP], [test $has_strdup = yes]) AC_SYS_LARGEFILE AC_COMPILER_CHECK AC_PTHREAD_SPINLOCK_CHECK AC_PTHREAD_SETNAME_NP_CHECK AC_TIMEGM_CHECK AC_YADIFA_FEATURES AC_YADIFA_ADD_LIBS AC_CHECK_LTO CPPFLAGS="$CPPFLAGS -DDNSCORE_BUILD" dnl Checks for library functions. AC_FUNC_FORK dnl AC_FUNC_MALLOC does weird things: dnl http://sources.redhat.com/ml/automake/2003-05/msg00023.html dnl http://www.mail-archive.com/autoconf@gnu.org/msg08935.html dnl AC_FUNC_MALLOC goals: dnl malloc(0) will not return NULL dnl realloc(NULL,x) will not crash (occurs on rare systems) dnl dnl AC_FUNC_MALLOC AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_FUNC_STAT AC_CHECK_FUNCS([bzero memset select socket]) AC_CONFIG_FILES([Makefile]) dnl AC_YADIFA_SUMMARY AC_OUTPUT dnl ---------------------------------------------------------------------------- AC_MAKE_BUILDINFO echo echo "SUMMARY for DNSCORE:" echo "--------------------" echo echo "CC .................................. : $CC" echo "LD .................................. : $LD" echo "AR .................................. : $AR" echo "CFLAGS .............................. : $CFLAGS" echo "CPPFLAGS ............................ : $CPPFLAGS" echo "LDFLAGS ............................. : $LDFLAGS" echo "LIBS ................................ : $LIBS" echo echo "ZALLOC .............................. : $enable_zalloc" echo "ZALLOC STATISTICS ................... : $enable_zalloc_statistics" echo "ZALLOC DEBUG ........................ : $enable_zalloc_debug" echo "ACL ................................. : $enable_acl" echo "TSIG ................................ : $enable_tsig" echo "MASTER .............................. : $enable_master" echo "DYNUPDATE ........................... : $enable_dynupdate" echo "RRSIG MANAGEMENT .................... : $enable_rrsig_management" echo "CTRL ................................ : $enable_ctrl" echo "NSEC ................................ : $enable_nsec" echo "NSEC3 ............................... : $enable_nsec3" echo "RRL ................................. : $enable_rrl" echo if [[ ! "${OPENSSL}" = "" ]] then echo "Using OpenSLL from .................. : ${OPENSSL}" fi echo echo "Install prefix ...................... : $prefix" echo "Install sysconf ..................... : $sysconfdir" echo echo echo "DNSCORE DONE" echo "------------" echo echo yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/config.sub0000644000077100007710000000013212473710127020522 xustar000000000000000030 mtime=1424986199.159058409 30 atime=1424986199.159058409 30 ctime=1454597651.274344534 yadifa-2.1.6-5826/lib/dnscore/config.sub0000755000077100007710000010622312473710127020335 0ustar00yadifayadifa00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-12-03' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/m40000644000077100007710000000013212654663022017007 xustar000000000000000030 mtime=1454597650.809344534 30 atime=1454597650.778344534 30 ctime=1454597650.809344534 yadifa-2.1.6-5826/lib/dnscore/m4/0000775000077100007710000000000012654663022016672 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnscore/m4/PaxHeaders.8028/ltsugar.m40000644000077100007710000000013012473714653021013 xustar000000000000000029 mtime=1424988587.49005841 29 atime=1424988587.49005841 30 ctime=1454597650.801344534 yadifa-2.1.6-5826/lib/dnscore/m4/ltsugar.m40000644000077100007710000001044012473714653020620 0ustar00yadifayadifa00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) yadifa-2.1.6-5826/lib/dnscore/m4/PaxHeaders.8028/ltversion.m40000644000077100007710000000013012473714653021357 xustar000000000000000029 mtime=1424988587.51105841 29 atime=1424988587.51105841 30 ctime=1454597650.805344534 yadifa-2.1.6-5826/lib/dnscore/m4/ltversion.m40000644000077100007710000000127312473714653021170 0ustar00yadifayadifa00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file 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. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) yadifa-2.1.6-5826/lib/dnscore/m4/PaxHeaders.8028/libtool.m40000644000077100007710000000013012473714653020776 xustar000000000000000029 mtime=1424988587.40405841 29 atime=1424988587.40305841 30 ctime=1454597650.794344534 yadifa-2.1.6-5826/lib/dnscore/m4/libtool.m40000644000077100007710000112507312473714653020615 0ustar00yadifayadifa00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS yadifa-2.1.6-5826/lib/dnscore/m4/PaxHeaders.8028/ltoptions.m40000644000077100007710000000013012473714653021365 xustar000000000000000029 mtime=1424988587.46805841 29 atime=1424988587.46805841 30 ctime=1454597650.798344534 yadifa-2.1.6-5826/lib/dnscore/m4/ltoptions.m40000644000077100007710000003426212473714653021202 0ustar00yadifayadifa00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) yadifa-2.1.6-5826/lib/dnscore/m4/PaxHeaders.8028/lt~obsolete.m40000644000077100007710000000013012473714653021704 xustar000000000000000029 mtime=1424988587.53205841 29 atime=1424988587.53205841 30 ctime=1454597650.809344534 yadifa-2.1.6-5826/lib/dnscore/m4/lt~obsolete.m40000644000077100007710000001377412473714653021526 0ustar00yadifayadifa00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/install-sh0000644000077100007710000000013212473710127020543 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597651.281344534 yadifa-2.1.6-5826/lib/dnscore/install-sh0000755000077100007710000003452312473710127020361 0ustar00yadifayadifa00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # 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. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # 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_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 is_target_a_directory=possibly 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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi 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 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac 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 if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 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 problematic for 'test' and other utilities. 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 # 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 "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` 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-writable 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 oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && 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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/NEWS0000644000077100007710000000012412610121331017224 xustar000000000000000027 mtime=1444979417.160777 27 atime=1454597464.798344 30 ctime=1454597651.255344534 yadifa-2.1.6-5826/lib/dnscore/NEWS0000664000077100007710000000001312610121331017023 0ustar00yadifayadifa00000000000000see README yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/src0000644000077100007710000000013212654663023017257 xustar000000000000000030 mtime=1454597651.671344534 30 atime=1454597650.778344534 30 ctime=1454597651.671344534 yadifa-2.1.6-5826/lib/dnscore/src/0000775000077100007710000000000012654663023017142 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/logger_channel_stream.c0000644000077100007710000000012412650131756024022 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.694344 30 ctime=1454597651.490344534 yadifa-2.1.6-5826/lib/dnscore/src/logger_channel_stream.c0000664000077100007710000001170212650131756023630 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logger Logging functions * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include #include "dnscore/logger_channel_stream.h" #include "dnscore/output_stream.h" #include "dnscore/format.h" /* * The new logger model does not requires MT protection on the channels */ typedef struct stream_data stream_data; struct stream_data { output_stream os; bool force_flush; }; static ya_result logger_channel_stream_constmsg(logger_channel* chan, int level, char* text, u32 text_len, u32 date_offset) { stream_data* sd = (stream_data*)chan->data; output_stream_write(&sd->os, (const u8*)text, text_len); ya_result ret = output_stream_write(&sd->os, (const u8*)"\n", 1); if(sd->force_flush) { output_stream_flush(&sd->os); } return ret; } static ya_result logger_channel_stream_vmsg(logger_channel* chan, int level, char* text, va_list args) { stream_data* sd = (stream_data*)chan->data; vosformat(&sd->os, text, args); ya_result ret = output_stream_write(&sd->os, (const u8*)"\n", 1); if(sd->force_flush) { output_stream_flush(&sd->os); } return ret; } static ya_result logger_channel_stream_msg(logger_channel* chan, int level, char* text, ...) { va_list args; va_start(args, text); ya_result ret = logger_channel_stream_vmsg(chan, level, text, args); va_end(args); return ret; } static void logger_channel_stream_flush(logger_channel* chan) { stream_data* sd = (stream_data*)chan->data; output_stream_flush(&sd->os); } static void logger_channel_stream_close(logger_channel* chan) { stream_data* sd = (stream_data*)chan->data; output_stream_flush(&sd->os); output_stream_close(&sd->os); chan->vtbl = NULL; sd->os.data = NULL; sd->os.vtbl = NULL; free(chan->data); chan->data = NULL; } static ya_result logger_channel_stream_reopen(logger_channel* chan) { stream_data* sd = (stream_data*)chan->data; output_stream_flush(&sd->os); return SUCCESS; } static const logger_channel_vtbl stream_vtbl = { logger_channel_stream_constmsg, logger_channel_stream_msg, logger_channel_stream_vmsg, logger_channel_stream_flush, logger_channel_stream_close, logger_channel_stream_reopen, "stream_channel" }; /* * Takes ownership of the stream. * The stream will be unusable by the caller at the return of this function */ void logger_channel_stream_open(output_stream* os, bool forceflush, logger_channel* chan) { stream_data* sd; MALLOC_OR_DIE(stream_data*, sd, sizeof (stream_data), 0x4d5254534e414843); /* CHANSTRM */ sd->os.data = os->data; sd->os.vtbl = os->vtbl; sd->force_flush = forceflush; /* NOTE: Do NOT use a black hole. * Let the application crashes if it tries to use a stream it does not own anymore */ os->data = NULL; os->vtbl = NULL; chan->data = sd; chan->vtbl = &stream_vtbl; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/zalloc.c0000644000077100007710000000012412650131756020764 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.696344 30 ctime=1454597651.652344534 yadifa-2.1.6-5826/lib/dnscore/src/zalloc.c0000664000077100007710000003735012650131756020601 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup zmalloc The database specialized allocation function * @ingroup dnsdb * @brief The database specialized allocation function * * @{ */ #include "dnscore/dnscore-config.h" #include "dnscore/dnscore-config.h" #include #include #include #include #include #define _ZALLOC_C #include #include #include #include extern logger_handle* g_system_logger; #define MODULE_MSG_HANDLE g_system_logger #if HAS_ZALLOC_DEBUG_SUPPORT #define ZALLOC_DEBUG 1 #define ZDB_DEBUG_ZALLOC_TRASHMEMORY 1 #else #define ZALLOC_DEBUG 0 #define ZDB_DEBUG_ZALLOC_TRASHMEMORY 0 #endif #if HAS_ZALLOC_STATISTICS_SUPPORT #define ZALLOC_STATISTICS 1 #else #define ZALLOC_STATISTICS 0 #endif /* * */ #if DNSCORE_HAS_ZALLOC_SUPPORT #define ZMALLOC_TAG 0x434f4c4c414d5a //#define ZALLOC_MMAP_BLOC_SIZE 0x20000 // 128K : for small usages //#define ZALLOC_MMAP_BLOC_SIZE 0x300000 // 3M : not enough to be in a 4M page, still a lot #define ZALLOC_MMAP_BLOC_SIZE 0x1000000 // 16M : enough for lots of records, but too much for smaller setups // except if the LAZY define is set ... #define ZALLOC_LAZY 1 /// @note edf -- do NOT disable this #if !ZALLOC_LAZY #pragma message("zalloc: there is no reason to disable the ZALLOC_LAZY variant beside for testing.") #endif #ifndef MAP_ANONYMOUS /* * MAP_ANON is the deprecated synonym of MAP_ANONYMOUS * Mac OS X has MAP_ANON but not MAP_ANONYMOUS */ #ifdef MAP_ANON #define MAP_ANONYMOUS MAP_ANON #else #error MMAP MAP_ANONYMUS not supported. Please disable zalloc usage until an alternative way is implemented. #endif #endif typedef u8* page; // least common multiple static u32 lcm(u32 a, u32 b) { int i = a; int j = b; while(a != b) { if(a < b) { a += i; } else { b += j; } } return a; } /** * Page size by slot size, PLEASE do not edit this. * * page_size[n] / 4096 MUST be a positive integer. * * The values are calibrated for the database memory usage distribution. * */ #ifndef ZALLOC_DEBUG #define ADJUSTED_ALLOC_PG_SIZE_COUNT ZALLOC_PG_SIZE_COUNT #else #define ADJUSTED_ALLOC_PG_SIZE_COUNT (ZALLOC_PG_SIZE_COUNT + 1) #endif static u32 page_size[ADJUSTED_ALLOC_PG_SIZE_COUNT]; static void* line_sll[ADJUSTED_ALLOC_PG_SIZE_COUNT]; static s32 line_count[ADJUSTED_ALLOC_PG_SIZE_COUNT]; static s32 heap_total[ADJUSTED_ALLOC_PG_SIZE_COUNT]; #if ZALLOC_LAZY static u8* lazy_next[ADJUSTED_ALLOC_PG_SIZE_COUNT]; static u32 lazy_count[ADJUSTED_ALLOC_PG_SIZE_COUNT]; static u32 smallest_size[ADJUSTED_ALLOC_PG_SIZE_COUNT]; #endif static pthread_mutex_t line_mutex[ADJUSTED_ALLOC_PG_SIZE_COUNT]; #if ZALLOC_STATISTICS static volatile u64 zalloc_memory_allocated = 0; static volatile u32 mmap_count = 0; static mutex_t zalloc_statistics_mtx = MUTEX_INITIALIZER; #endif static int system_page_size = 0; static volatile bool zalloc_init_done = FALSE; int zalloc_init() { if(zalloc_init_done) { return SUCCESS; } zalloc_init_done = TRUE; // lcm is in this file system_page_size = getpagesize(); yassert(system_page_size > 0); for(u32 i = 0; i < ADJUSTED_ALLOC_PG_SIZE_COUNT; i++) { u32 lcm_page_chunk = lcm(system_page_size, (i + 1) * 8); u32 chosen_size = ((ZALLOC_MMAP_BLOC_SIZE + lcm_page_chunk - 1) / lcm_page_chunk) * lcm_page_chunk; page_size[i] = chosen_size; line_sll[i] = NULL; line_count[i] = 0; heap_total[i] = 0; #if ZALLOC_LAZY lazy_next[i] = NULL; lazy_count[i] = 0; smallest_size[i] = lcm_page_chunk; #endif pthread_mutex_init(&line_mutex[i], NULL); } return SUCCESS; } void zalloc_finalise() { } /** * INTERNAL * * Allocates a bunch of memory for a page_index * * page2 has a lazy initialisation feature supposed to be enabled at compile time (can be off for testing & debugging) * * zalloc_lines is as nice with the memory than zalloc_lines with --enable-tiny-footprint set in ./configure but can handle * much more memory (the 3.8M test is not a problem) */ static void zalloc_lines(u32 page_index) { page map_pointer; u32 chunk_size = (page_index + 1) << 3; // size of one bloc #if ZALLOC_LAZY if(lazy_next[page_index] == NULL) { #endif u32 size = page_size[page_index]; map_pointer = (page)mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); #if ZALLOC_STATISTICS pthread_mutex_lock(&zalloc_statistics_mtx); mmap_count++; pthread_mutex_unlock(&zalloc_statistics_mtx); #endif if(map_pointer == MAP_FAILED) { osformatln(termerr, "zalloc_lines(%u,%u) mmap failed with %r", size, chunk_size, ERRNO_ERROR); DIE(ZALLOC_ERROR_MMAPFAILED); } #ifdef MADV_NOHUGEPAGE if(madvise(map_pointer, size, MADV_NOHUGEPAGE) < 0) { int err = errno; if(err != EINVAL) { osformatln(termerr, "zalloc_lines(%u,%u) madvise(%p,%x,%i) failed with %r", size, chunk_size, map_pointer, size, MADV_NOHUGEPAGE, ERRNO_ERROR); } #ifdef DEBUG else { osformatln(termout, "zalloc_lines(%u,%u) madvise(%p,%x,%i) failed with %r", size, chunk_size, map_pointer, size, MADV_NOHUGEPAGE, ERRNO_ERROR); } #endif } #endif /* * current issue: the new memory allocation does not take advantage of the lazy mechanism * I should only prepare one part = lcm(system_page_size,chunk_size) at a time. * when the page is filled, I fill another one. */ #if ZALLOC_LAZY // give the page to the (supposedly empty) lazy handling lazy_count[page_index] = size / smallest_size[page_index]; lazy_next[page_index] = map_pointer; } else { map_pointer = lazy_next[page_index]; } // lazy_next[i] is set, only prepare it if(--lazy_count[page_index] > 0) { lazy_next[page_index] += smallest_size[page_index]; } else { lazy_next[page_index] = NULL; } u32 count = (smallest_size[page_index] / chunk_size); #else // old mechanism : setup the whole mapped memory at once // next data // count u32 count = (size / chunk_size); #endif line_count[page_index] += count; heap_total[page_index] += count; /* Builds the block chain for the new page set */ u8* data = map_pointer; void** header = (void**)map_pointer; while(--count > 0) { data += chunk_size; *header = data; header = (void**)data; } *header = (void*)(~0); // the last header points to an impossible address line_sll[page_index] = map_pointer; } /** * @brief Allocates one slot in a memory set * * Allocates one slot in a memory set. * * The size of a slot is page_index*8 * * @param[in] page_index the index of the memory set * * @return a pointer to the allocated memory */ void* zalloc_line(u32 page_index) { yassert(page_index < ZALLOC_PG_SIZE_COUNT); #if ZALLOC_DEBUG page_index++; // debug requires 8 more bytes #endif pthread_mutex_lock(&line_mutex[page_index]); if(line_count[page_index] == 0) { zalloc_lines(page_index); } line_count[page_index]--; yassert(line_count[page_index] >= 0); void **ret = line_sll[page_index]; line_sll[page_index] = *ret; *ret = NULL; /* erases ZALLOC pointer */ #if ZALLOC_DEBUG u64* hdr = (u64*)ret; // the allocated memory is at hdr *hdr = (page_index - 1) | 0x2a110c0000000000LL; // the allocated slot number (offset by DEBUG) ret = (void**)(hdr + 1); // the address returned (without the DEBUG header) #endif #if ZDB_DEBUG_ZALLOC_TRASHMEMORY memset(ret, 0xac, ((page_index + 1) << 3) - sizeof(u64)); #endif #if ZALLOC_STATISTICS pthread_mutex_lock(&zalloc_statistics_mtx); zalloc_memory_allocated += (page_index + 1) << 3; pthread_mutex_unlock(&zalloc_statistics_mtx); #endif pthread_mutex_unlock(&line_mutex[page_index]); return ret; } /** * @brief Frees one slot in a memory set * * Frees one slot in a memory set * * The size of a slot is page_index*8 * * @param[in] ptr a pointer to the memory to free * @param[in] page_index the index of the memory set * */ static void zfree_line_report(int page_index) { log_err("zfree_line: page #%d count (%d) > total (%d)", page_index, line_count[page_index], heap_total[page_index]); logger_flush(); s32 count = line_count[page_index]; if(count > 0) { void** ret = line_sll[page_index]; for(s32 i = 0; i < count; i++) { if(ret != NULL) { log_err("[%3x][%6x] %p", page_index, i, ret); void **old = ret; (void) old; ret = (void**)*ret; // do not: *old = NULL; } else { log_err("[%3x][%6x] NULL", page_index, i); ret = (void**)*ret; } } logger_flush(); } } void zfree_line(void* ptr, u32 page_index) { yassert(page_index < ZALLOC_PG_SIZE_COUNT); if(ptr != NULL) { #if ZALLOC_DEBUG page_index++; #endif pthread_mutex_lock(&line_mutex[page_index]); #if ZALLOC_DEBUG u64* hdr = (u64*)ptr; hdr--; u64 magic = *hdr; if((magic & 0xffffffff00000000LL) != 0x2a110c0000000000LL) { abort(); } magic &= 0xffffffffLL; if(magic != page_index - 1) { abort(); } ptr = hdr; #endif #if ZDB_DEBUG_ZALLOC_TRASHMEMORY memset(ptr, 0xfe, (page_index + 1) << 3); #endif #if ZALLOC_STATISTICS pthread_mutex_lock(&zalloc_statistics_mtx); zalloc_memory_allocated -= (page_index + 1) << 3; pthread_mutex_unlock(&zalloc_statistics_mtx); #endif void** ret = (void**)ptr; *ret = line_sll[page_index]; line_sll[page_index] = ret; line_count[page_index]++; if(line_count[page_index] > heap_total[page_index]) { zfree_line_report(page_index); } pthread_mutex_unlock(&line_mutex[page_index]); } } /** * DEBUG */ u64 zheap_line_total(u32 page_index) { if(page_index < ADJUSTED_ALLOC_PG_SIZE_COUNT) { pthread_mutex_lock(&line_mutex[page_index]); u64 return_value = heap_total[page_index]; pthread_mutex_unlock(&line_mutex[page_index]); return return_value; } return 0; } u64 zheap_line_avail(u32 page_index) { if(page_index < ADJUSTED_ALLOC_PG_SIZE_COUNT) { pthread_mutex_lock(&line_mutex[page_index]); u64 return_value = line_count[page_index]; pthread_mutex_unlock(&line_mutex[page_index]); return return_value; } return 0; } s64 zallocatedtotal() { #if ZALLOC_STATISTICS u64 return_value = zalloc_memory_allocated; return return_value; #else return -1; #endif } /** * @brief Allocates unaligned memory of an arbitrary size using zalloc_line and malloc * * Allocates unaligned memory of an arbitrary size using zalloc_line and malloc * * @param[in] size the size to allocated * * @return a pointer to the allocated memory */ void* zalloc_unaligned(u32 size) { yassert(size > 0); u8* p; size++; if(size <= 254) { u8 page_index = (size - 1) >> 3; p = (u8*)zalloc_line(page_index); *p = page_index; } else { #if !DNSCORE_HAS_MALLOC_DEBUG_SUPPORT p = (u8*)malloc(size); #else #if ZDB_DEBUG_TAG_BLOCKS == 0 p = (u8*)debug_malloc(size, __FILE__, __LINE__); #else p = (u8*)debug_malloc(size, __FILE__, __LINE__, ZMALLOC_TAG); #endif #endif // DNSCORE_HAS_MALLOC_DEBUG_SUPPORT if(p == NULL) { DIE(ZALLOC_ERROR_OUTOFMEMORY); } *p = 0xff; #if ZDB_DEBUG_ZALLOC_TRASHMEMORY memset(p + 1, 0xca, size); #endif } return ++p; } /** * @brief Frees unaligned memory of an arbitrary size using zfree_line and free * * Allocates unaligned memory of an arbitrary size using zalloc_line and malloc * * @param[in] ptr a pointer to the memory to free * */ void zfree_unaligned(void* ptr) { if(ptr != NULL) { u8* p = (u8*)ptr; u8 idx = *--p; if(idx <= 254) { zfree_line(p, idx); } else { free(p); } } } void zalloc_print_stats(output_stream *os) { #if ZALLOC_STATISTICS osformatln(os, "zdb alloc: page-sizes=%u (max %u bytes) allocated=%llu bytes mmap=%u", ADJUSTED_ALLOC_PG_SIZE_COUNT, (ADJUSTED_ALLOC_PG_SIZE_COUNT << 3), zalloc_memory_allocated, mmap_count); if(zalloc_init_done) { osprintln(os, "[ size ] blocsize -remain- -total-- -alloc-- --bytes--"); for(int i = 0; i < ADJUSTED_ALLOC_PG_SIZE_COUNT; i++) { osformatln(os, "[%6i] %-8u %-8u %-8u %-8u %-9u", (i + 1) << 3, page_size[i], line_count[i], heap_total[i], heap_total[i] - line_count[i], (heap_total[i] - line_count[i]) * (i + 1) << 3); } } #else osprintln(os, "zdb alloc: statistics not compiled in"); #endif } #else /** * ZALLOC NOT BUILT-IN : DOES NOTHING WORTH MENTIONNING */ int zalloc_init() { return FEATURE_NOT_IMPLEMENTED_ERROR; } /** * ZALLOC NOT BUILT-IN : DOES NOTHING WORTH MENTIONNING */ s64 zallocatedtotal() { return -1; } /** * ZALLOC NOT BUILT-IN : DOES NOTHING WORTH MENTIONNING */ void zalloc_print_stats(output_stream *os) { (void)os; } #endif /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/allocator.c0000644000077100007710000000012412650131756021460 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.772344 30 ctime=1454597651.297344534 yadifa-2.1.6-5826/lib/dnscore/src/allocator.c0000664000077100007710000000464512650131756021276 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #define ALLOCATOR_C #include "dnscore/dnscore-config.h" #include "dnscore/allocator.h" void* libc_malloc(allocator_s *unused, u32 size) { (void)unused; void *ptr = malloc(size); return ptr; } void libc_free(allocator_s *unused, void *ptr) { (void)unused; free(ptr); } static allocator_vtbl libc_allocator_vtbl = { libc_malloc, libc_free, "libc_allocator" }; allocator_s libc_allocator = { &libc_allocator_vtbl }; /** * @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/base32.c0000644000077100007710000000012412650131756020557 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.730344 30 ctime=1454597651.308344534 yadifa-2.1.6-5826/lib/dnscore/src/base32.c0000664000077100007710000002642212650131756020372 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup base Base conversion functions * @ingroup dnscore * @brief Base 32 codec * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include "dnscore/base32.h" /* * */ #define BASE32_PADDING '=' static const char __BASE32__[256] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '2', '3', '4', '5', '6', '7', }; /** * Encodes bytes into base32 * The output size must be at least size_in * 8/5 * * @param buffer_in bytes to convert * @param size_in number of bytes * @param buffer_out output buffer of a size >= size_in * 8/5 * * @return output size */ u32 base32_encode(const u8* buffer_in, u32 size_in, char* buffer_out) { char* ptr = buffer_out; while(size_in >= 5) { u8 b0 = *buffer_in++; u8 b1 = *buffer_in++; u8 b2 = *buffer_in++; u8 b3 = *buffer_in++; u8 b4 = *buffer_in++; *ptr++ = __BASE32__[ b0 >> 3 ]; *ptr++ = __BASE32__[(u8)((b0 << 2) | (b1 >> 6))]; *ptr++ = __BASE32__[ b1 >> 1 ]; *ptr++ = __BASE32__[(u8)((b1 << 4) | (b2 >> 4))]; *ptr++ = __BASE32__[(u8)((b2 << 1) | (b3 >> 7))]; *ptr++ = __BASE32__[ b3 >> 2 ]; *ptr++ = __BASE32__[(u8)((b3 << 3) | (b4 >> 5))]; *ptr++ = __BASE32__[ b4 ]; size_in -= 5; } switch(size_in) { case 4: { u8 b0 = *buffer_in++; u8 b1 = *buffer_in++; u8 b2 = *buffer_in++; u8 b3 = *buffer_in++; *ptr++ = __BASE32__[ b0 >> 3 ]; *ptr++ = __BASE32__[(u8)((b0 << 2) | (b1 >> 6))]; *ptr++ = __BASE32__[ b1 >> 1 ]; *ptr++ = __BASE32__[(u8)((b1 << 4) | (b2 >> 4))]; *ptr++ = __BASE32__[(u8)((b2 << 1) | (b3 >> 7))]; *ptr++ = __BASE32__[ b3 >> 2 ]; *ptr++ = __BASE32__[(u8)(b3 << 3)]; *ptr++ = BASE32_PADDING; break; } case 3: { u8 b0 = *buffer_in++; u8 b1 = *buffer_in++; u8 b2 = *buffer_in++; *ptr++ = __BASE32__[ b0 >> 3 ]; *ptr++ = __BASE32__[(u8)((b0 << 2) | (b1 >> 6))]; *ptr++ = __BASE32__[ b1 >> 1 ]; *ptr++ = __BASE32__[(u8)((b1 << 4) | (b2 >> 4))]; *ptr++ = __BASE32__[(u8)(b2 << 1)]; *ptr++ = BASE32_PADDING; *ptr++ = BASE32_PADDING; *ptr++ = BASE32_PADDING; break; } case 2: { u8 b0 = *buffer_in++; u8 b1 = *buffer_in++; *ptr++ = __BASE32__[ b0 >> 3 ]; *ptr++ = __BASE32__[(u8)((b0 << 2) | (b1 >> 6))]; *ptr++ = __BASE32__[ b1 >> 1 ]; *ptr++ = __BASE32__[(u8)(b1 << 4)]; *ptr++ = BASE32_PADDING; *ptr++ = BASE32_PADDING; *ptr++ = BASE32_PADDING; *ptr++ = BASE32_PADDING; break; } case 1: { u8 b0 = *buffer_in++; *ptr++ = __BASE32__[ b0 >> 3 ]; *ptr++ = __BASE32__[(u8)(b0 << 2) ]; *ptr++ = BASE32_PADDING; *ptr++ = BASE32_PADDING; *ptr++ = BASE32_PADDING; *ptr++ = BASE32_PADDING; *ptr++ = BASE32_PADDING; *ptr++ = BASE32_PADDING; break; } } return (u32)(ptr - buffer_out); } #define __DEBASE32__STOP__ 0x80 static const u8 __DEBASE32__[256] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0 - 7 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 8 - 15 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 16 - 23 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 24 - 31 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 32 - 39 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 40 - 47 ...+.../ */ 0xff, 0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* 01234567 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, /* 89...=.. */ 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, /* .ABCDEFG */ 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, /* HIJKLMNO */ 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, /* PQRSTUVW */ 0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, /* XYZ..... */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* .abcdefg */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* hijklmno */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* pqrstuvw */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* xyz..... */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; /** * Decodes base32 into bytes * The output size must be at least size_in * 5/8 * * @param buffer_in base32 text * @param size_in number of chars * @param buffer_out output buffer of a size >= size_in * 5/8 * * @return output size */ ya_result base32_decode(const char* buffer_in, u32 size_in, u8* buffer_out) { if((size_in & 7) != 0) { return PARSEB32_ERROR; // wrong number of bytes } u8* in = (u8*)buffer_in; u8* out = buffer_out; while(size_in > 8) { u8 a = __DEBASE32__[*in++]; u8 b = __DEBASE32__[*in++]; u8 c = __DEBASE32__[*in++]; u8 d = __DEBASE32__[*in++]; u8 e = __DEBASE32__[*in++]; u8 f = __DEBASE32__[*in++]; u8 g = __DEBASE32__[*in++]; u8 h = __DEBASE32__[*in++]; if(((a | b | c | d | e | f | g | h)&0x40) != 0x00) { /* PARSE ERROR */ return PARSEB32_ERROR; } *out++ = (a << 3) | (b >> 2); *out++ = (b << 6) | (c << 1) | (d >> 4); *out++ = (d << 4) | (e >> 1); *out++ = (e << 7) | (f << 2) | (g >> 3); *out++ = (g << 5) | h; size_in -= 8; } if(size_in != 0) /* It's either 0 or 4 */ { u8 a = __DEBASE32__[*in++]; u8 b = __DEBASE32__[*in++]; if(((a | b)&0xc0) != 0x00) { /* PARSE ERROR */ return PARSEB32_ERROR; } *out++ = (a << 3) | (b >> 2); u8 c = __DEBASE32__[*in++]; u8 d = __DEBASE32__[*in++]; if((c != __DEBASE32__STOP__) && (d != __DEBASE32__STOP__)) { if(((c | d)&0x40) != 0) { return PARSEB32_ERROR; } *out++ = (b << 6) | (c << 1) | (d >> 4); u8 e = __DEBASE32__[*in++]; if(e != __DEBASE32__STOP__) { if((e & 0x40) != 0) { return PARSEB32_ERROR; } *out++ = (d << 4) | (e >> 1); u8 f = __DEBASE32__[*in++]; u8 g = __DEBASE32__[*in++]; if((f != __DEBASE32__STOP__) && (g != __DEBASE32__STOP__)) { if(((f | g)&0x40) != 0) { return PARSEB32_ERROR; } *out++ = (e << 7) | (f << 2) | (g >> 3); u8 h = __DEBASE32__[*in++]; if(h != __DEBASE32__STOP__) { if((h & 0x40) != 0) { return PARSEB32_ERROR; } *out++ = (g << 5) | h; } } } } } return out - buffer_out; } /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/dns_resource_record.c0000644000077100007710000000012412650131756023531 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.740344 30 ctime=1454597651.408344534 yadifa-2.1.6-5826/lib/dnscore/src/dns_resource_record.c0000664000077100007710000001402612650131756023341 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscore * @ingroup dnscore * @brief Wire resource record reader * * Wire resource record reader * * @{ */ #include "dnscore/dnscore-config.h" #include "dnscore/dnscore-config.h" #include #include void dns_resource_record_init(dns_resource_record *rr) { #ifdef DEBUG memset(rr, 0xff, sizeof(dns_resource_record)); #endif rr->rdata = NULL; rr->rdata_size = 0; rr->rdata_buffer_size = 0; } void dns_resource_record_clear(dns_resource_record *rr) { if(rr->rdata != NULL) { #if DEBUG memset(rr->rdata, 0xfe, rr->rdata_size); #endif free(rr->rdata); rr->rdata = NULL; rr->rdata_size = 0; rr->rdata_buffer_size = 0; } } /** * * This utility function reads an uncompressed record from a stream. * Compression has to be handled by the underlying input_stream * If an error code is returned, then most likely the stream is broken. * * @param is * @param rr * * @return an error code or the number of bytes read */ ya_result dns_resource_record_read(dns_resource_record *rr, input_stream *is) { ya_result return_value; if(FAIL(return_value = input_stream_read_dnsname(is, &rr->name[0]))) { return return_value; } if(return_value == 0) { return 0; } rr->name_len = return_value; if(FAIL(return_value = input_stream_read_fully(is, &rr->tctr, 10))) /* cannot use sizeof(tctr) */ { return return_value; } rr->rdata_size = htons(rr->tctr.rdlen); if(rr->rdata_buffer_size < rr->rdata_size) { u8 *tmp; // do the computations into 32 bits words u32 rdata_size = rr->rdata_size; u32 buffer_size = MIN((rdata_size + 255) & 0xff00, 0xffff); #if DEBUG memset(rr->rdata, 0xfe, rr->rdata_buffer_size); #endif rr->rdata_buffer_size = buffer_size; MALLOC_OR_DIE(u8*, tmp, rr->rdata_buffer_size, GENERIC_TAG); free(rr->rdata); rr->rdata = tmp; } if(FAIL(return_value = input_stream_read_fully(is, rr->rdata, rr->rdata_size))) { return return_value; } #if DEBUG memset(&rr->rdata[rr->rdata_size], 0xee, rr->rdata_buffer_size - rr->rdata_size); #endif return rr->name_len + 10 + rr->rdata_size; /* total bytes read */ } /** * * This utility function writes an uncompressed record to a stream. * Compression has to be handled by the underlying output_stream * If an error code is returned, then most likely the stream is broken. * * @param os * @param rr * * @return an error code or the number of bytes written */ ya_result dns_resource_record_write(dns_resource_record *rr, output_stream *os) { ya_result return_value; if(FAIL(return_value = output_stream_write(os, rr->name, rr->name_len))) { return return_value; } if(FAIL(return_value = output_stream_write(os, (u8*)&rr->tctr, 10))) { return return_value; } if(FAIL(return_value = output_stream_write(os, rr->rdata, rr->rdata_size))) { return return_value; } return rr->name_len + 10 + rr->rdata_size; /* total bytes read */ } bool dns_resource_record_equals(dns_resource_record *a, dns_resource_record *b) { if((a->rdata_size == b->rdata_size) && (a->name_len == b->name_len)) { if(memcmp(&a->tctr, &b->tctr, sizeof(a->tctr)) == 0) { if(dnsname_equals(a->name, b->name)) { if(memcmp(a->rdata, b->rdata, a->rdata_size) == 0) { return TRUE; } } } } return FALSE; } bool dns_resource_record_match(dns_resource_record *a, dns_resource_record *b) { if((a->rdata_size == b->rdata_size) && (a->name_len == b->name_len)) { if((a->tctr.qtype == b->tctr.qtype) && (a->tctr.qclass == b->tctr.qclass) && (a->tctr.rdlen == b->tctr.rdlen)) { if(dnsname_equals(a->name, b->name)) { if(memcmp(a->rdata, b->rdata, a->rdata_size) == 0) { return TRUE; } } } } return FALSE; } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/message_verify_rrsig.c0000644000077100007710000000012412650131756023716 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.771344 30 ctime=1454597651.517344534 yadifa-2.1.6-5826/lib/dnscore/src/message_verify_rrsig.c0000664000077100007710000005660512650131756023537 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include "dnscore/sys_types.h" #include "dnscore/message_verify_rrsig.h" #include "dnscore/packet_reader.h" #include "dnscore/format.h" #include "dnscore/ptr_set.h" extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger #define TYPE_FQDN_HAS_RECORDS 1 #define TYPE_FQDN_HAS_SIGNATURES 2 //#define TYPE_FQDN_HAS_VERIFIED_SIGNATURES 4 //#define TYPE_FQDN_HAS_WRONG_SIGNATURES 8 //#define TYPE_FQDN_HAS_UNKNOWN_SIGNATURES 16 static s32 message_verify_rrsig_compute_digest(const u8 *owner, u16 rtype, u16 rclass, const u8 *rrsig_rdata, u32 rrsig_rdata_size, ptr_vector *rrset_canonised_rdata, u8 *out_digest, u32 out_digest_size) { log_debug6("message_verify_rrsig_compute_digest(%{dnsname},%{dnstype},%{dnsclass},@%p,%u,@%p,@%p)", owner, &rtype, &rclass, rrsig_rdata, rrsig_rdata_size, rrset_canonised_rdata, out_digest); u8 rr_header[2 + 2 + 4]; if(rrsig_rdata_size < 18) { return INCORRECT_RDATA; } if(rtype != GET_U16_AT(rrsig_rdata[0])) { return RRSIG_COVERED_TYPE_DIFFERS; } s32 owner_len = dnsname_len(owner); u32 rttl = GET_U32_AT(rrsig_rdata[4]); SET_U16_AT(rr_header[0], rtype); SET_U16_AT(rr_header[2], rclass); SET_U32_AT(rr_header[4], rttl); digest_s ctx; ya_result err; if(FAIL(err = dnskey_digest_init(&ctx, rrsig_rdata[2]))) { log_err("message_verify_rrsig_compute_digest: %r", err); return err; } if(digest_get_size(&ctx) > out_digest_size) { return RRSIG_OUTPUT_DIGEST_SIZE_TOO_BIG; } out_digest_size = digest_get_size(&ctx); /* * Type covered | algorithm | labels | original_ttl | exp | inception | tag | origin * */ u32 rrsig_rdata_prefix_size = 18 + dnsname_len(&rrsig_rdata[18]); digest_update(&ctx, rrsig_rdata, rrsig_rdata_prefix_size); #ifdef DEBUG log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG6, rrsig_rdata, rrsig_rdata_prefix_size, 32); #endif for(s32 i = 0; i <= rrset_canonised_rdata->offset; i++) { digest_update(&ctx, owner, owner_len); #ifdef DEBUG log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG6, owner, owner_len, 32); #endif digest_update(&ctx, rr_header, sizeof(rr_header)); #ifdef DEBUG log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG6, rr_header, sizeof(rr_header), 32); #endif u8 *rdata_size_rdata = (u8*)rrset_canonised_rdata->data[i]; u16 rdata_size = ntohs(GET_U16_AT(rdata_size_rdata[0])); digest_update(&ctx, rdata_size_rdata, rdata_size + 2); #ifdef DEBUG log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG6, rdata_size_rdata, rdata_size + 2, 32); #endif } /* * Retrieve the digest */ digest_final(&ctx, out_digest, out_digest_size); #ifdef DEBUG log_debug6("digest:"); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG6, out_digest, out_digest_size, 32); #endif #if RRSIG_DUMP!=0 log_debug5("rrsig: digest:"); log_memdump_ex(MODULE_MSG_HANDLE, MSG_DEBUG5, digest_out, out_digest_size, 32, OSPRINT_DUMP_HEX); #endif return out_digest_size; } static int message_verify_canonize_sort_rdata_compare(const void *a, const void *b) { u8* ptr_a = *((u8**)a); u8* ptr_b = *((u8**)b); u16 rr_a_size = ntohs(GET_U16_AT(ptr_a[0])); u16 rr_b_size = ntohs(GET_U16_AT(ptr_b[0])); int ret; ptr_a += 2; ptr_b += 2; int diff_len = rr_a_size - rr_b_size; if(diff_len != 0) { u16 len = MIN(rr_a_size, rr_b_size); ret = memcmp(ptr_a, ptr_b, len); if(ret == 0) { ret = diff_len; } } else { ret = memcmp(ptr_a, ptr_b, rr_a_size); } return ret; } static ya_result message_verify_rrsig_result_default_handler(const message_data *mesg, const struct dnskey_keyring *keyring, const message_verify_rrsig_result_s *result, void *args) { return MESSAGE_VERIFY_RRSIG_FEEDBACK_CONTINUE; } static void message_verify_rrsig_free_rrset(void *data) { free(data); } static int message_verify_rrsig_node_compare(const void *key_a, const void *key_b) { const u8 *fqdn_a = key_a; const u8 *fqdn_b = key_b; s32 type_a = GET_U16_AT_P(fqdn_a); s32 type_b = GET_U16_AT_P(fqdn_b); s32 ret = type_a - type_b; if(ret == 0) { fqdn_a += 2; fqdn_b += 2; ret = dnsname_compare(fqdn_a, fqdn_b); } return ret; } static void message_verify_rrsig_init(ptr_set *section_type_fqdn) { ptr_set_avl_init(section_type_fqdn); section_type_fqdn->compare = message_verify_rrsig_node_compare; } static void message_verify_rrsig_set_flag(ptr_set *section_type_fqdn, const u8 *type_record_fqdn, u32 type_record_fqdn_len, u8 flag_bits) { // create the type-fqdn entry if needed ptr_node *type_fqdn_node = ptr_set_avl_find(section_type_fqdn, type_record_fqdn); if(type_fqdn_node == NULL) { #ifdef DEBUG log_debug7("message_verify_rrsig: new node %{dnsname} %{dnstype}", type_record_fqdn + 2, type_record_fqdn); #endif u8 *type_record_fqdn_copy; MALLOC_OR_DIE(u8*,type_record_fqdn_copy, type_record_fqdn_len, GENERIC_TAG); memcpy(type_record_fqdn_copy, type_record_fqdn, type_record_fqdn_len); type_fqdn_node = ptr_set_avl_insert(section_type_fqdn, type_record_fqdn_copy); type_fqdn_node->value = NULL; // has records, has verified signatures, has wrong signatures, has unknown signatures // the next phase will scan for each of there types instead } intptr flag = (intptr)type_fqdn_node->value; #ifdef DEBUG log_debug7("message_verify_rrsig: set node %{dnsname} %{dnstype} %x => %x", type_record_fqdn + 2, type_record_fqdn, flag, flag | flag_bits); #endif flag |= flag_bits; type_fqdn_node->value = (void*)flag; } static void message_verify_rrsig_clear_callback(void *node) { ptr_node *type_fqdn_node = (ptr_node*) node; free(type_fqdn_node->key); } static void message_verify_rrsig_clear(ptr_set *section_type_fqdn) { // create the type-fqdn entry if needed ptr_set_avl_callback_and_destroy(section_type_fqdn, message_verify_rrsig_clear_callback); } ya_result message_verify_rrsig(const message_data *mesg, struct dnskey_keyring *keyring, message_verify_rrsig_result *feedback, void *args) { // for the answer, authority and additional sections // count the RRSIG in the section for which we have a key // for all rrset but the RRSIG one // if the rrset has no signature // feedback ... // elseif the rrset has at least one signature that can be verified // for each non-verifiable signature // feedback ... // rof // canonize the rrset // for each verifiable signature // verify the signature // feedback ... // rof // fi // rof // rof if(keyring == NULL) { return 0; } message_verify_rrsig_result_s result; time_t now; u32 total_wrong_signatures = 0; ya_result return_code; packet_unpack_reader_data pr; ya_result feedback_result = MESSAGE_VERIFY_RRSIG_FEEDBACK_CONTINUE; u32 type_record_fqdn_len; u8 type_record_fqdn[2 + 256]; u8 record_buffer[8192]; if(feedback == NULL) { feedback = message_verify_rrsig_result_default_handler; } result.data.any = NULL; result.result_type = 0; result.section = 0; result.ctype = 0; packet_reader_init(&pr, mesg->buffer, mesg->received); pr.offset = DNS_HEADER_LENGTH; if(FAIL(return_code = packet_reader_skip_fqdn(&pr))) { return return_code; } if(FAIL(return_code = packet_reader_skip(&pr, 4))) { return return_code; } now = time(NULL); // for sections for(u8 section = 1; section < 3; section++) // addtitionals are not processed { result.section = section; result.ctype = TYPE_NONE; u32 section_start = pr.offset; ptr_set section_type_fqdn; message_verify_rrsig_init(§ion_type_fqdn); for(u16 count = ntohs(MESSAGE_SECTION_COUNT(mesg->buffer, section)); count > 0; --count) { // count RRSIG / types if(FAIL(return_code = packet_reader_read_fqdn(&pr, &type_record_fqdn[2], sizeof(type_record_fqdn) - 2))) { message_verify_rrsig_clear(§ion_type_fqdn); return return_code; } type_record_fqdn_len = return_code + 2; u16 rtype; if(FAIL(return_code = packet_reader_read_u16(&pr, &rtype))) { message_verify_rrsig_clear(§ion_type_fqdn); return return_code; } if(FAIL(return_code = packet_reader_skip(&pr, 2 + 4))) { message_verify_rrsig_clear(§ion_type_fqdn); return return_code; } // FQDN + TYPE ( + CLASS ) = key of what can be signed u16 rdata_size; if(FAIL(return_code = packet_reader_read_u16(&pr, &rdata_size))) { message_verify_rrsig_clear(§ion_type_fqdn); return return_code; } rdata_size = ntohs(rdata_size); if(rtype == TYPE_RRSIG) { if(rdata_size < 18) { message_verify_rrsig_clear(§ion_type_fqdn); return INCORRECT_RDATA; } u16 ctype; if(FAIL(return_code = packet_reader_read(&pr, &ctype, 2))) { message_verify_rrsig_clear(§ion_type_fqdn); return return_code; } if(ctype == TYPE_RRSIG) { message_verify_rrsig_clear(§ion_type_fqdn); return RRSIG_UNSUPPORTED_COVERED_TYPE; } if(FAIL(return_code = packet_reader_skip(&pr, rdata_size - 2))) { message_verify_rrsig_clear(§ion_type_fqdn); return return_code; } SET_U16_AT_P(type_record_fqdn, ctype); message_verify_rrsig_set_flag(§ion_type_fqdn, type_record_fqdn, type_record_fqdn_len, TYPE_FQDN_HAS_SIGNATURES); } else { if(FAIL(return_code = packet_reader_skip(&pr, rdata_size))) { message_verify_rrsig_clear(§ion_type_fqdn); return return_code; } SET_U16_AT_P(type_record_fqdn, rtype); message_verify_rrsig_set_flag(§ion_type_fqdn, type_record_fqdn, type_record_fqdn_len, TYPE_FQDN_HAS_RECORDS); } } // count // at most 5956 records (beside the query) in a message // all the records of the section have been parsed (once) // signatures have been counted (verifiable & unknown) // for each type encountered ... message_verify_rrsig_type_summary_s type_info = {0, 0, 0, 0}; ptr_set_avl_iterator section_types_fqdn_iter; ptr_set_avl_iterator_init(§ion_type_fqdn, §ion_types_fqdn_iter); while(ptr_set_avl_iterator_hasnext(§ion_types_fqdn_iter)) { ptr_node *types_fqdn_node = ptr_set_avl_iterator_next_node(§ion_types_fqdn_iter); const u8 * type_fqdn = (u8*)types_fqdn_node->key; u16 ctype = GET_U16_AT_P(type_fqdn); type_fqdn += 2; u8 flags = (u8)(intptr)types_fqdn_node->value; // double cast just to explicitely show what is happening #ifdef DEBUG log_debug6("message_verify_rrsig: %{dnsname} %{dnstype} (%x)", type_fqdn, &ctype, flags); #endif result.ctype = ctype; if( (flags & (TYPE_FQDN_HAS_RECORDS | TYPE_FQDN_HAS_SIGNATURES)) != (TYPE_FQDN_HAS_RECORDS | TYPE_FQDN_HAS_SIGNATURES) ) { // no signatures or no records if(flags & TYPE_FQDN_HAS_SIGNATURES) { // not signed } else { // signature without record ? } continue; } // all/some verifiable : report the verified ones // build the RRSET (canonised) // verify // => // rewind to the beginning of the section pr.offset = section_start; ptr_vector rrset = EMPTY_PTR_VECTOR; for(u16 count = ntohs(MESSAGE_SECTION_COUNT(mesg->buffer, section));count > 0; --count) { // count RRSIG / types if(ISOK(return_code = packet_reader_read_record(&pr, record_buffer, sizeof(record_buffer)))) { u8 *fqdn = record_buffer; if(dnsname_equals(fqdn, type_fqdn)) { struct type_class_ttl_rdlen *tctr = (struct type_class_ttl_rdlen*)&fqdn[dnsname_len(fqdn)]; if(tctr->qtype == ctype) // and fqdn is good ... { // append the record data to the array u8 *rdata = (u8*)tctr; rdata += 10; u8 *rdata_network_size_rdata; u16 rdata_size = ntohs(tctr->rdlen); MALLOC_OR_DIE(u8*, rdata_network_size_rdata, rdata_size + 2, GENERIC_TAG); SET_U16_AT(rdata_network_size_rdata[0], tctr->rdlen); memcpy(&rdata_network_size_rdata[2], rdata, rdata_size); ptr_vector_append(&rrset, rdata_network_size_rdata); } } } else { ptr_vector_free_empties(&rrset, message_verify_rrsig_free_rrset); ptr_vector_destroy(&rrset); message_verify_rrsig_clear(§ion_type_fqdn); return return_code; // impossible at this point } } // rrset contains all the RDATA for the fqdn/type ptr_vector_qsort(&rrset, message_verify_canonize_sort_rdata_compare); #ifdef DEBUG for(int i = 0; i <= rrset.offset; i++) { u8* rdata = rrset.data[i]; u16 rdata_size = ntohs(GET_U16_AT(rdata[0])); rdata += 2; rdata_desc rdatadesc = {ctype, rdata_size, rdata}; log_debug6(" + %{typerdatadesc}", &rdatadesc); } #endif // we know the label & cie // we have the rdata on canonized order // now ... verify u32 saved_offset = pr.offset; u8 sha1_digest[DIGEST_BUFFER_SIZE]; // rewind to the beginning of the section pr.offset = section_start; for(u16 count = ntohs(MESSAGE_SECTION_COUNT(mesg->buffer, section));count > 0;--count) { // get RRSIG covering RRSET if(ISOK(return_code = packet_reader_read_record(&pr, record_buffer, sizeof(record_buffer)))) { u8 *fqdn = record_buffer; struct type_class_ttl_rdlen *tctr = (struct type_class_ttl_rdlen*)&fqdn[dnsname_len(fqdn)]; if( (tctr->qtype == TYPE_RRSIG) && dnsname_equals(type_fqdn, fqdn) ) { // append the record data to the array u16 rdata_size = ntohs(tctr->rdlen); u8 *rdata = (u8*)tctr; rdata += 10; if((GET_U16_AT(rdata[0]) == ctype) && (rdata_size > 18)) // if type covered is the one we are processing ... { #ifdef DEBUG rdata_desc rdatadesc = {TYPE_RRSIG, rdata_size, rdata}; log_debug6("with %{dnsname} %{typerdatadesc}", fqdn, &rdatadesc); #endif message_verify_rrsig_detail_s rrsig_header; memcpy(&rrsig_header, rdata, 18); rrsig_header.result = 0; rrsig_header.section = section; rrsig_header.signer_name = &rdata[18]; rrsig_header.fqdn = fqdn; result.data.detail = &rrsig_header; result.result_type = MESSAGE_VERIFY_RRSIG_RESULT_TYPE_VERIFY; u32 inception = ntohl(rrsig_header.inception); u32 expiration = ntohl(rrsig_header.expiration); if((now >= inception) && (now <= expiration)) { u16 tag = ntohs(rrsig_header.tag); dnssec_key* key = dnskey_keyring_get(keyring, rrsig_header.algorithm, tag, rrsig_header.signer_name); if(key != NULL) { type_info.verifiable_count++; s32 digest_size = message_verify_rrsig_compute_digest(fqdn, ctype, tctr->qclass, rdata, rdata_size, &rrset, sha1_digest, sizeof(sha1_digest)); assert(digest_size > 0); u32 rrsig_signer_name_len = dnsname_len(rrsig_header.signer_name); u32 rrsig_header_len = 18 + rrsig_signer_name_len; u8 *signature = &rdata[rrsig_header_len]; u32 signature_len = rdata_size - rrsig_header_len; if(key->vtbl->dnssec_key_verify_digest(key, sha1_digest, digest_size, signature, signature_len)) { // verified signature with origin/algorithm/tag type_info.verified_count++; rrsig_header.result |= MESSAGE_VERIFY_RRSIG_VERIFIED; } else { // corrupted/wrong signature with origin/algorithm/tag total_wrong_signatures++; type_info.wrong_count++; rrsig_header.result |= MESSAGE_VERIFY_RRSIG_WRONG; } } else { type_info.unverifiable_count++; rrsig_header.result |= MESSAGE_VERIFY_RRSIG_NOKEY; } } else { // wrong time frame type_info.wrong_count++; rrsig_header.result |= MESSAGE_VERIFY_RRSIG_TIMEFRAME; } if((feedback_result = feedback(mesg, keyring, &result, args)) != MESSAGE_VERIFY_RRSIG_FEEDBACK_CONTINUE) { break; } } } } } // for each signature covering the type // break goes here pr.offset = saved_offset; ptr_vector_free_empties(&rrset, message_verify_rrsig_free_rrset); ptr_vector_destroy(&rrset); } // for all types/fqdn // summary of the results for the type result.data.summary = &type_info; result.result_type = MESSAGE_VERIFY_RRSIG_RESULT_TYPE_SUMMARY; if((feedback_result = feedback(mesg, keyring, &result, args)) != MESSAGE_VERIFY_RRSIG_FEEDBACK_CONTINUE) { // ends the section loop //section = 4; // breaks the current loop message_verify_rrsig_clear(§ion_type_fqdn); break; } // clear the types of the section message_verify_rrsig_clear(§ion_type_fqdn); } // for all sections // done if((total_wrong_signatures == 0) && (feedback_result != MESSAGE_VERIFY_RRSIG_FEEDBACK_ERROR)) { return SUCCESS; } else { return RRSIG_VERIFICATION_FAILED; } } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/format.c0000644000077100007710000000012412650131756020770 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.787344 30 ctime=1454597651.453344534 yadifa-2.1.6-5826/lib/dnscore/src/format.c0000664000077100007710000014120412650131756020577 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup format C-string formatting * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include #include #include #include #include "dnscore/ctrl-rfc.h" // Enables or disables the feature #define HAS_DLADDR_SUPPORT 0 #ifdef __linux__ #ifdef __GNUC__ // #pragma message "linux + gnu: Enabling enhanced function address translation" #define __USE_GNU #define _GNU_SOURCE #include #undef HAS_DLADDR_SUPPORT #define HAS_DLADDR_SUPPORT 0 // keep it disabled for the rest of the binary #endif #endif /* Added this for FreeBSD */ #ifdef __FreeBSD__ #include #include #include #elif defined __OpenBSD__ #include #endif /**/ #include #include #include "dnscore/format.h" #include "dnscore/bytearray_output_stream.h" #include "dnscore/counter_output_stream.h" #include "dnscore/ptr_vector.h" #include "dnscore/base64.h" #include "dnscore/base16.h" #include "dnscore/base32hex.h" #include "dnscore/sys_error.h" #define SENTINEL '%' #define NULL_STRING_SUBSTITUTE "(NULL)" #define NULL_STRING_SUBSTITUTE_LEN (sizeof(NULL_STRING_SUBSTITUTE)-1) #define CHR0 '\0' static const u8* STREOL = (const u8*)"\n"; //static const u8* STRCHR0 = (const u8*)"\0"; static const u8* STRMINUS = (const u8*)"-"; /* * Linear access to the format handlers. Accessed through a dichotomy. */ static ptr_vector format_handler_descriptor_table = {NULL, -1, -1}; //static bool g_format_usable = FALSE; static int format_handler_compare(const char* str1, s32 str1_len, const char* str2, s32 str2_len) { s32 len = MIN(str1_len, str2_len); int ret = memcmp(str1, str2, len); if(ret == 0) { ret = str1_len - str2_len; } return ret; } static int format_handler_qsort_compare(const void* a_, const void* b_) { format_handler_descriptor* a = *(format_handler_descriptor**)a_; format_handler_descriptor* b = *(format_handler_descriptor**)b_; return format_handler_compare(a->name, a->name_len, b->name, b->name_len); } static format_handler_descriptor* format_get_format_handler(const char* name, u32 name_len) { if(format_handler_descriptor_table.data == NULL) { return NULL; /* Not initialized */ } format_handler_descriptor* fh = NULL; u32 low = 0; u32 high = format_handler_descriptor_table.offset + 1; while(high - low > 3) { u32 mid = (high + low) / 2; fh = format_handler_descriptor_table.data[mid]; int cmp = format_handler_compare(name, name_len, fh->name, fh->name_len); if(cmp == 0) { return fh; } if(cmp > 0) { low = mid + 1; } else { high = mid; } } for(; low < high; low++) { fh = format_handler_descriptor_table.data[low]; int cmp = format_handler_compare(fh->name, fh->name_len, name, name_len); if(cmp == 0) { return fh; } } return NULL; } /* Example of custom format handler -> */ /* * The dummy format handler simply prints the pointer in hexadecimal / lo-case */ static void dummy_format_handler_method(const void* val, output_stream* stream, s32 padding, char pad_char, bool left_justified, void* reserved_for_method_parameters) { intptr ival = (intptr)val; format_hex_u64_lo(ival, stream, padding, pad_char, left_justified); } static format_handler_descriptor dummy_format_handler_descriptor ={ "Unsupported", 11, dummy_format_handler_method }; /* <- Example of custom format handler */ void format_class_init() { if(format_handler_descriptor_table.data != NULL) { return; } ptr_vector_init(&format_handler_descriptor_table); } void format_class_finalize() { ptr_vector_destroy(&format_handler_descriptor_table); } bool format_available() { return format_handler_descriptor_table.data != NULL; } ya_result format_registerclass(const format_handler_descriptor* fhd) { if(format_get_format_handler(fhd->name, fhd->name_len) != NULL) { return FORMAT_ALREADY_REGISTERED; /* Already registered */ } ptr_vector_append(&format_handler_descriptor_table, (format_handler_descriptor*)fhd); ptr_vector_qsort(&format_handler_descriptor_table, format_handler_qsort_compare); return SUCCESS; } /*typedef size_t formatter(char* output, size_t max_chars, bool left-aligned, void* value_to_convert,int arg_count,va_list args);*/ typedef void u64_formatter_function(u64, output_stream*, s32, char, bool); static const char __HEXA__[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}; static const char __hexa__[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; static void do_padding(output_stream* stream, s32 padding, char pad_char) { output_stream_write_method* os_write = stream->vtbl->write; while(padding-- > 0) { os_write(stream, (u8*) & pad_char, 1); } } static void format_unsigned(const char* input, size_t size, output_stream* stream, s32 padding, char pad_char, bool left_justified) { padding -= size; if(left_justified) { output_stream_write(stream, (const u8*)input, size); do_padding(stream, padding, pad_char); } else { do_padding(stream, padding, pad_char); output_stream_write(stream, (const u8*)input, size); } /* Done */ } static void format_signed(const char* input, size_t size, output_stream* stream, s32 padding, char pad_char, bool left_justified, bool sign) { padding -= size; if(left_justified) { if(sign) { output_stream_write(stream, STRMINUS, 1); } output_stream_write(stream, (const u8*)input, size); do_padding(stream, padding, pad_char); } else { if(sign && pad_char == '0') { output_stream_write(stream, STRMINUS, 1); } do_padding(stream, padding, pad_char); if(sign && pad_char != '0') { output_stream_write(stream, STRMINUS, 1); } output_stream_write(stream, (const u8*)input, size); } /* Done */ } static void format_hex_u64_common(const char* hexa_table, u64 val, output_stream* stream, s32 padding, char pad_char, bool left_justified) { char tmp[__SIZEOF_POINTER__ * 2]; char* next = &tmp[sizeof (tmp)]; do { *--next = hexa_table[val & 0x0f]; val >>= 4; } while(val != 0); format_unsigned(next, &tmp[sizeof (tmp)] - next, stream, padding, pad_char, left_justified); } void format_oct_u64(u64 val, output_stream* stream, s32 padding, char pad_char, bool left_justified) { char tmp[20]; char* next = &tmp[sizeof (tmp)]; do { *--next = '0' + (val & 7); val >>= 3; } while(val != 0); /* next points at the first char of the 10-based representation of the integer */ format_unsigned(next, &tmp[sizeof (tmp)] - next, stream, padding, pad_char, left_justified); } void format_dec_u64(u64 val, output_stream* stream, s32 padding, char pad_char, bool left_justified) { char tmp[20]; char* next = &tmp[sizeof (tmp)]; do { *--next = '0' + (val % 10); val /= 10; } while(val != 0); /* next points at the first char of the 10-based representation of the integer */ format_unsigned(next, &tmp[sizeof (tmp)] - next, stream, padding, pad_char, left_justified); } void format_dec_s64(s64 val, output_stream* stream, s32 padding, char pad_char, bool left_justified) { char tmp[20]; char* next = &tmp[sizeof (tmp)]; bool sign; if((sign = (val < 0))) { val = -val; } u64 uval = (u64)val; do { *--next = '0' + (uval % 10); uval /= 10; } while(uval != 0); format_signed(next, &tmp[sizeof (tmp)] - next, stream, padding, pad_char, left_justified, sign); } void format_hex_u64_lo(u64 val, output_stream* stream, s32 padding, char pad_char, bool left_justified) { format_hex_u64_common(__hexa__, val, stream, padding, pad_char, left_justified); } void format_hex_u64_hi(u64 val, output_stream* stream, s32 padding, char pad_char, bool left_justified) { format_hex_u64_common(__HEXA__, val, stream, padding, pad_char, left_justified); } static void format_double_make_format(char* p, s32 padding, s32 float_padding, char pad_char, bool left_justified, bool long_double) { *p++ = '%'; if(!left_justified) { *p++ = '-'; } if(pad_char != ' ') { *p++ = pad_char; } if(padding >= 0) { p += sprintf(p, "%i", padding); } if(float_padding >= 0) { *p++ = '.'; p += sprintf(p, "%i", float_padding); } if(long_double) { *p++ = 'L'; } *p++ = 'f'; *p++ = CHR0; } static void format_longdouble(long double val, output_stream* stream, s32 padding, s32 float_padding, char pad_char, bool left_justified) { char fmt[32]; char tmp[64]; format_double_make_format(fmt, padding, float_padding, pad_char, left_justified, TRUE); int len = snprintf(tmp, sizeof (tmp), fmt, val); output_stream_write(stream, (const u8*)tmp, len); } static void format_double(double val, output_stream* stream, s32 padding, s32 float_padding, char pad_char, bool left_justified) { char fmt[32]; char tmp[64]; format_double_make_format(fmt, padding, float_padding, pad_char, left_justified, FALSE); int len = snprintf(tmp, sizeof (tmp), fmt, val); output_stream_write(stream, (const u8*)tmp, len); } void format_asciiz(const char* val, output_stream* stream, s32 padding, char pad_char, bool left_justified) { if(val == NULL) { val = NULL_STRING_SUBSTITUTE; } size_t val_len = strlen(val); padding -= val_len; if(left_justified) { output_stream_write(stream, (const u8*)val, val_len); do_padding(stream, padding, pad_char); } else { do_padding(stream, padding, pad_char); output_stream_write(stream, (const u8*)val, val_len); } } ya_result vosformat(output_stream* os_, const char* fmt, va_list args) { counter_output_stream_data cosd; output_stream os; counter_output_stream_init(os_, &os, &cosd); const char* next = fmt; s32 padding = -1; s32 float_padding = -1; u8 type_size = sizeof (int); char pad_char = ' '; bool left_justified = TRUE; char c; for(;;) { c = *next; if(c == 0) { /* copy the rest, return */ size_t size = next - fmt; output_stream_write(&os, (const u8*)fmt, size); ya_result ret; if(ISOK(cosd.result)) { ret = cosd.write_count; } else { ret = cosd.result; } /** * NOTE: counter_output_stream has changed a bit since its first version. * * * It does not closes the fitlered stream on "close" * It does not flushes the filtered stream on "close" either. * It only flushes the filtered stream when explicitly asked with "flush" * * It is thus useless to call close here (we just loose the time for the call) * */ /* output_stream_close(&os); */ return ret; } if(c == SENTINEL) { /* copy the rest, format */ size_t size = next - fmt; output_stream_write(&os, (const u8*)fmt, size); next++; fmt += size; /* format */ c = *next++; if(c == '%') { /* * warning: ‘char’ is promoted to ‘int’ when passed through ‘...’ * (so you should pass ‘int’ not ‘char’ to ‘va_arg’) * if this code is reached, the program will abort * * => int */ format_asciiz("%", &os, padding, pad_char, left_justified); fmt = next; padding = 0; type_size = sizeof (int); pad_char = ' '; left_justified = TRUE; continue; } /* Justify */ if(c == '-') { left_justified = FALSE; c = *next++; } /* Padding */ if(c == '0') { pad_char = c; left_justified = FALSE; c = *next++; } /* Padding */ if(isdigit(c)) { char padding_string[10]; char* p = padding_string; int n = 9; do { *p++ = c; c = *next++; } while(isdigit(c) && (n > 0)); *p = CHR0; padding = atoi(padding_string); } if(c == '.') { char padding_string[10]; char* p = padding_string; int n = 9; c = *next++; do { *p++ = c; c = *next++; } while(isdigit(c) && (n > 0)); *p = CHR0; float_padding = atoi(padding_string); } /* Type size */ if(c == 'h') { c = *next++; type_size = sizeof (u16); if(c == 'h') { c = *next++; type_size = sizeof (u8); } } else if(c == 'l') { c = *next++; type_size = sizeof (u32); if(c == 'l') { c = *next++; type_size = sizeof (u64); } } else if(c == 'L') { c = *next++; type_size = sizeof (long double); } /* Type */ switch(c) { case 't': { int val = (int)va_arg(args, int); do_padding(&os, val, '\t'); break; } case 'T': { int val = (int)va_arg(args, int); do_padding(&os, val, ' '); break; } case 'i': { s64 val; switch(type_size) { case sizeof (s8): { /* * warning: ‘u8’ is promoted to ‘int’ when passed through ‘...’ * (so you should pass ‘int’ not ‘u8’ to ‘va_arg’) * if this code is reached, the program will abort * * => int */ val = (s8)va_arg(args, int); break; } case sizeof (s16): { /* * warning: ‘u16’ is promoted to ‘int’ when passed through ‘...’ * (so you should pass ‘int’ not ‘u16’ to ‘va_arg’) * if this code is reached, the program will abort * * => int */ val = (s16)va_arg(args, int); break; } case sizeof (s32): { val = (s32)va_arg(args, s32); break; } case sizeof (s64): { val = va_arg(args, s64); break; } default: { /* Invalid formatting : FULL STOP */ flushout(); flusherr(); fprintf(stderr, "Invalid type size '%i' in string '%s'", type_size, fmt); /* Keep native */ fflush(stderr); exit(EXIT_CODE_FORMAT_ERROR); } } format_dec_s64(val, &os, padding, pad_char, left_justified); break; } case 'r': { ya_result val = va_arg(args, ya_result); error_writetext(&os, val); break; } case 'x': case 'X': case 'u': case 'd': case 'o': { u64_formatter_function* formatter; u64 val; if(c == 'u' || c == 'd') { formatter = format_dec_u64; } else if(c == 'X') { formatter = format_hex_u64_hi; } else if(c == 'x') { formatter = format_hex_u64_lo; } else { formatter = format_oct_u64; } switch(type_size) { case sizeof (u8): { /* * warning: ‘u8’ is promoted to ‘int’ when passed through ‘...’ * (so you should pass ‘int’ not ‘u8’ to ‘va_arg’) * if this code is reached, the program will abort * * => int */ val = va_arg(args, int); break; } case sizeof (u16): { /* * warning: ‘u16’ is promoted to ‘int’ when passed through ‘...’ * (so you should pass ‘int’ not ‘u16’ to ‘va_arg’) * if this code is reached, the program will abort * * => int */ val = va_arg(args, int); break; } case sizeof (u32): { val = va_arg(args, u32); break; } case sizeof (u64): { val = va_arg(args, u64); break; } default: { /* Invalid formatting : FULL STOP */ flushout(); flusherr(); fprintf(stderr, "Invalid type size '%i' in string '%s'", type_size, fmt); /* Keep native */ fflush(stderr); exit(EXIT_CODE_FORMAT_ERROR); } } formatter(val, &os, padding, pad_char, left_justified); break; } case 'P': { intptr val = va_arg(args, intptr); #if HAS_DLADDR_SUPPORT != 0 Dl_info info; if(val != 0) { if(dladdr((void*)val, &info) != 0) { if(info.dli_sname != NULL) { format_asciiz(info.dli_sname, &os, padding, pad_char, left_justified); break; } else if(info.dli_fname != NULL) { format_asciiz(info.dli_fname, &os, padding, pad_char, left_justified); val -= (intptr)info.dli_fbase; output_stream_write_u8(&os, (u8)':'); } } } #endif format_hex_u64_hi(val, &os, __SIZEOF_POINTER__ * 2, '0', FALSE); break; } case 'p': { intptr val = va_arg(args, intptr); format_hex_u64_hi(val, &os, __SIZEOF_POINTER__ * 2, '0', FALSE); break; } case 'f': { if(type_size == sizeof (long double)) { long double val = va_arg(args, long double); format_longdouble(val, &os, padding, float_padding, pad_char, left_justified); } else { double val = va_arg(args, double); format_double(val, &os, padding, float_padding, pad_char, left_justified); } break; } case 's': { const char* val; val = va_arg(args, const char*); format_asciiz(val, &os, padding, pad_char, left_justified); break; } case 'c': { /* I'm using the string formatter. It's slower than it could but ... */ char tmp[2]; tmp[1] = CHR0; /* * warning: ‘char’ is promoted to ‘int’ when passed through ‘...’ * (so you should pass ‘int’ not ‘char’ to ‘va_arg’) * if this code is reached, the program will abort * * => int */ tmp[0] = va_arg(args, int); format_asciiz(tmp, &os, padding, pad_char, left_justified); break; } case '{': { const char* type_name = next; do { c = *next++; if(c == 0) { flushout(); flusherr(); fprintf(stderr, "PANIC: Invalid format type in string '%s' : '}' expected.", fmt); /* Keep native */ fflush(stderr); exit(EXIT_CODE_FORMAT_ERROR); } } while(c != '}'); /* type_name -> next contains the type name and arguments * arguments can be integers */ size_t type_name_len = next - 1 - type_name; format_handler_descriptor* desc = format_get_format_handler(type_name, type_name_len); if(desc == NULL) { /* Uses the "dummy" handler */ desc = &dummy_format_handler_descriptor; } void* ptr = va_arg(args, void*); desc->format_handler(ptr, &os, padding, pad_char, left_justified, NULL); break; } case 'w': { void* ptr = va_arg(args, void*); format_writer *fw = (format_writer*)ptr; fw->callback(fw->value, &os, padding, pad_char, left_justified, NULL); break; } } fmt = next; padding = -1; float_padding = -1; type_size = sizeof (int); pad_char = ' '; left_justified = TRUE; continue; } next++; /* look for the sentinel */ } } ya_result osprint(output_stream* stream, const char* text) { return output_stream_write(stream, (const u8*)text, strlen(text)); } ya_result osprintln(output_stream* stream, const char* text) { ya_result n = strlen(text); output_stream_write(stream, (const u8*)text, n); output_stream_write(stream, STREOL, 1); return n + 1; } ya_result osformat(output_stream* stream, const char* fmt, ...) { va_list args; va_start(args, fmt); ya_result err = vosformat(stream, fmt, args); va_end(args); return err; } ya_result osformatln(output_stream* stream, const char* fmt, ...) { va_list args; va_start(args, fmt); ya_result err1 = vosformat(stream, fmt, args); va_end(args); if(ISOK(err1)) { ya_result err2 = output_stream_write(stream, STREOL, 1); if(ISOK(err2)) { return err1 + err2; } return err2; } return err1; } ya_result print(const char* text) { return output_stream_write(termout, (const u8*)text, strlen(text)); } ya_result println(const char* text) { ya_result n = strlen(text); output_stream_write(termout, (const u8*)text, n); output_stream_write(termout, STREOL, 1); return n + 1; } int format(const char* fmt, ...) { va_list args; va_start(args, fmt); ya_result err = vosformat(termout, fmt, args); va_end(args); return err; } ya_result formatln(const char* fmt, ...) { va_list args; va_start(args, fmt); ya_result err1 = vosformat(termout, fmt, args); va_end(args); if(ISOK(err1)) { ya_result err2 = output_stream_write(termout, STREOL, 1); if(ISOK(err2)) { return err1 + err2; } return err2; } return err1; } int vsnformat(char* out, size_t out_size, const char* fmt, va_list args) { if(out_size == 0) { return 0; } output_stream baos; bytearray_output_stream_context baos_context; bytearray_output_stream_init_ex_static(&baos, (u8*)out, out_size - 1, 0, &baos_context); int ret = vosformat(&baos, fmt, args); if(ret < out_size) { out[ret] = CHR0; } else { out[out_size - 1] = CHR0; } output_stream_close(&baos); return ret; } /** * This formatter will return an allocated (malloc) string as a result of the format * * @param outp * @param out_size * @param fmt * @param args * @return */ int vasnformat(char** outp, size_t out_size, const char* fmt, va_list args) { output_stream baos; bytearray_output_stream_context baos_context; bytearray_output_stream_init_ex_static(&baos, NULL, out_size, 0, &baos_context); int ret = vosformat(&baos, fmt, args); if(ISOK(ret) && ((out_size == 0) || (ret < out_size))) { output_stream_write_u8(&baos, 0); *outp =(char*)bytearray_output_stream_dup(&baos); } else { *outp = NULL; } output_stream_close(&baos); return ret; } /** * This formatter will return an allocated (malloc) string as a result of the format * * @param outp * @param out_size * @param fmt * @param ... * @return */ int asnformat(char** outp, size_t out_size, const char* fmt, ...) { int ret; va_list args; va_start(args, fmt); ret = vasnformat(outp, out_size, fmt, args); va_end(args); return ret; } /** * This formatter will return an allocated (malloc) string as a result of the format * * @param outp * @param fmt * @param ... * @return */ int asformat(char** outp, const char* fmt, ...) { int ret; va_list args; va_start(args, fmt); ret = vasnformat(outp, 0, fmt, args); va_end(args); return ret; } int snformat(char* out, size_t out_size, const char* fmt, ...) { int ret; va_list args; va_start(args, fmt); ret = vsnformat(out, out_size, fmt, args); va_end(args); return ret; } int osprint_base64(output_stream* os, const u8* rdata_pointer, u32 rdata_size) { char buffer[65]; int total = 0; u32 n; while(rdata_size > 48) { n = base64_encode(rdata_pointer, 48, buffer); buffer[n++] = ' '; output_stream_write(os, (u8*)buffer, n); total += n; rdata_pointer += 48; rdata_size -= 48; } n = base64_encode(rdata_pointer, rdata_size, buffer); output_stream_write(os, (u8*)buffer, n); total += n; return total; } int osprint_base16(output_stream* os, const u8* rdata_pointer, u32 rdata_size) { char buffer[65]; int total = 0; u32 n; while(rdata_size > 32) { n = base16_encode(rdata_pointer, 32, buffer); buffer[n++] = ' '; output_stream_write(os, (u8*)buffer, n); total += n; rdata_pointer += 32; rdata_size -= 32; } n = base16_encode(rdata_pointer, rdata_size, buffer); output_stream_write(os, (u8*)buffer, n); total += n; return total; } int fformat(FILE* out, const char* fmt, ...) { char tmp[4096]; #ifdef DEBUG memset(tmp, '!', sizeof (tmp)); #endif int ret; va_list args; va_start(args, fmt); ret = vsnformat(tmp, sizeof (tmp), fmt, args); fputs(tmp, out); va_end(args); return ret; } /*------------------------------------------------------------------------------ * FUNCTIONS */ void osprint_u32(output_stream* os, u32 value) { format_dec_u64(value, os, 9, ' ', FALSE); } void osprint_u16(output_stream* os, u16 value) { format_dec_u64(value, os, 5, ' ', FALSE); } void osprint_u32_hex(output_stream* os, u32 value) { format_hex_u64_common(__hexa__, value, os, 8, '0', FALSE); } void print_char(char value) { char tmp[1]; tmp[0] = value; output_stream_write(&__termout__, (u8*)tmp, 1); } void osprint_char(output_stream* os, char value) { char tmp[1]; tmp[0] = value; output_stream_write(os, (u8*)tmp, 1); } ya_result osprint_type_bitmap(output_stream* os, const u8* rdata_pointer, u16 rdata_size) { /* * WindowIndex + WindowSize + bits => a minimum of 3 bytes */ while(rdata_size >= 3) { u16 type_hi = *rdata_pointer++; u8 count = *rdata_pointer++; rdata_size -= 2; if(rdata_size < count) { return INCORRECT_RDATA; } rdata_size -= count; /*type_hi <<= 8;*/ u16 type_lo = 0; while(count-- > 0) { u8 bitmap = *rdata_pointer++; u32 b; for(b = 8; b > 0; b--) { if((bitmap & 0x80) != 0) { /* Enabled */ u16 type = type_hi + type_lo; osformat(os, " %{dnstype}", &type); } bitmap <<= 1; type_lo+=0x100; } } } return SUCCESS; } ya_result osprint_rdata(output_stream* os, u16 type, const u8* rdata_pointer, u16 rdata_size) { switch(type) { case TYPE_A: { if(rdata_size == 4) { osformat(os, "%d.%d.%d.%d", rdata_pointer[0], rdata_pointer[1], rdata_pointer[2], rdata_pointer[3]); return SUCCESS; } return INCORRECT_RDATA; } case TYPE_AAAA: { u16* rdata_u16 = (u16*)rdata_pointer; if(rdata_size == 16) { char ip6txt[INET6_ADDRSTRLEN]; inet_ntop(AF_INET6, rdata_u16, ip6txt, sizeof(ip6txt)); osprint(os, ip6txt); return SUCCESS; } return INCORRECT_RDATA; } case TYPE_MX: osformat(os, "%hd ", ntohs(GET_U16_AT(*rdata_pointer))); rdata_pointer += 2; rdata_size -= 2; /* NO BREAK HERE, I WANT TO FALLTHROUGH */; case TYPE_NS: case TYPE_CNAME: case TYPE_DNAME: case TYPE_PTR: case TYPE_MB: case TYPE_MD: case TYPE_MF: case TYPE_MG: case TYPE_MR: { /* ONE NAME record */ if(rdata_size > 0) { osformat(os, "%{dnsname}", rdata_pointer); return SUCCESS; } return INCORRECT_RDATA; } case TYPE_HINFO: case TYPE_MINFO: { /* Two Pascal String records */ /* * is a single length octet followed by that number * of characters. is treated as binary information, * and can be up to 256 characters in length (including the length octet). * */ int i; for(i = 0; i < 2; i++) { u32 len = (*rdata_pointer) + 1; if(len > rdata_size) { return INCORRECT_RDATA; } osformat(os, "%{dnslabel}", rdata_pointer); rdata_size -= len; rdata_pointer += len; } return SUCCESS; } case TYPE_SOA: { osformat(os, "%{dnsname} ", rdata_pointer); u32 len = dnsname_len(rdata_pointer); rdata_size -= len; if(rdata_size > 0) { rdata_pointer += len; const u8 *label = rdata_pointer; u8 label_len = *label; static u8 dot = (u8)'.'; static u8 escape = (u8)'\\'; if(label_len > 0) { label++; do { do { if(!dnsname_is_charspace(*label)) { output_stream_write(os, &escape, 1); } output_stream_write(os, label++, 1); } while(--label_len > 0); output_stream_write(os, &dot, 1); label_len = *label++; } while(label_len > 0); len = label - rdata_pointer; } else { output_stream_write(os, &dot, 1); len = 1; } rdata_size -= len; if(rdata_size == 20) { rdata_pointer += len; osformat(os, " %u %u %u %u %u", ntohl(GET_U32_AT(rdata_pointer[ 0])), ntohl(GET_U32_AT(rdata_pointer[ 4])), ntohl(GET_U32_AT(rdata_pointer[ 8])), ntohl(GET_U32_AT(rdata_pointer[12])), ntohl(GET_U32_AT(rdata_pointer[16]))); return SUCCESS; } } return INCORRECT_RDATA; } case TYPE_RRSIG: { struct tm exp; struct tm inc; time_t t = (time_t)ntohl(GET_U32_AT(rdata_pointer[8])); gmtime_r(&t, &exp); t = (time_t)ntohl(GET_U32_AT(rdata_pointer[12])); gmtime_r(&t, &inc); u16 covered_type = (GET_U16_AT(rdata_pointer[0])); /** @note NATIVETYPE */ osformat(os, "%{dnstype} %u %u %u %04u%02u%02u%02u%02u%02u %04u%02u%02u%02u%02u%02u %u ", &covered_type, U8_AT(rdata_pointer[2]), U8_AT(rdata_pointer[3]), ntohl(GET_U32_AT(rdata_pointer[4])), exp.tm_year + 1900, exp.tm_mon + 1, exp.tm_mday, exp.tm_hour, exp.tm_min, exp.tm_sec, inc.tm_year + 1900, inc.tm_mon + 1, inc.tm_mday, inc.tm_hour, inc.tm_min, inc.tm_sec, ntohs(GET_U16_AT(rdata_pointer[16]))); rdata_pointer += RRSIG_RDATA_HEADER_LEN; rdata_size -= RRSIG_RDATA_HEADER_LEN; osformat(os, "%{dnsname} ", rdata_pointer); u32 len = dnsname_len(rdata_pointer); rdata_pointer += len; rdata_size -= len; if(rdata_size > 0) { osprint_base64(os, rdata_pointer, rdata_size); } return SUCCESS; } case TYPE_DNSKEY: case TYPE_KEY: { osformat(os, "%u %u %u ", ntohs(GET_U16_AT(rdata_pointer[0])), U8_AT(rdata_pointer[2]), U8_AT(rdata_pointer[3])); rdata_pointer += 4; rdata_size -= 4; osprint_base64(os, rdata_pointer, rdata_size); return SUCCESS; } case TYPE_DS: { osformat(os, "%u %u %u ", ntohs(GET_U16_AT(rdata_pointer[0])), U8_AT(rdata_pointer[2]), U8_AT(rdata_pointer[3])); rdata_pointer += 4; rdata_size -= 4; while(rdata_size-- > 0) { osformat(os, "%02X", *rdata_pointer++); } return SUCCESS; } case TYPE_NSEC: { osformat(os, "%{dnsname} ", rdata_pointer); u32 len = dnsname_len(rdata_pointer); rdata_pointer += len; rdata_size -= len; ya_result return_code; if(ISOK(return_code = osprint_type_bitmap(os, rdata_pointer, rdata_size))) { return SUCCESS; } return return_code; } case TYPE_NSEC3: case TYPE_NSEC3PARAM: { osformat(os, "%hhd %hhd %hd ", rdata_pointer[0], (type != TYPE_NSEC3PARAM) ? rdata_pointer[1] : 0, ntohs(GET_U16_AT(rdata_pointer[2]))); u8 len = rdata_pointer[4]; rdata_pointer += 5; rdata_size -= 5; if(len == 0) { osprint(os, "-"); } else { rdata_size -= len; while(len-- > 0) { osformat(os, "%02x", *rdata_pointer++); } } if(type == TYPE_NSEC3) { osprint(os, " "); len = *rdata_pointer++; rdata_size -= 1 + len; ya_result return_code; if(FAIL(return_code = output_stream_write_base32hex(os, rdata_pointer, len))) { return return_code; } rdata_pointer += len; return_code = osprint_type_bitmap(os, rdata_pointer, rdata_size); return return_code; } return SUCCESS; } case TYPE_TLSA: { osformat(os, "%hhd %hhd %hhd ", rdata_pointer[0], rdata_pointer[1], rdata_pointer[2]); return osprint_base16(os, &rdata_pointer[3], rdata_size - 3); } case TYPE_SSHFP: { osformat(os, "%hhd %hhd ", rdata_pointer[0], rdata_pointer[1]); return osprint_base16(os, &rdata_pointer[2], rdata_size - 2); } case TYPE_SRV: { u16 priority = GET_U16_AT(rdata_pointer[0]); u16 weight = GET_U16_AT(rdata_pointer[2]); u16 port = GET_U16_AT(rdata_pointer[4]); const u8 *fqdn = (const u8*)&rdata_pointer[6]; return osformat(os, "%hd %hd %hd %{dnsname}", priority, weight, port, fqdn); } case TYPE_ZONE_TYPE: { u8 zone_type = rdata_pointer[0]; char *txt; switch(zone_type) { case ZT_HINT: { txt = "hint"; break; } case ZT_MASTER: { txt = "master"; break; } case ZT_SLAVE: { txt = "slave"; break; } case ZT_STUB: { txt = "stub"; break; } default: { txt = "undefined"; break; } } return osprint(os, txt); } case TYPE_ZONE_MASTER: case TYPE_ZONE_SLAVES: case TYPE_ZONE_NOTIFY: { u8 flags = rdata_pointer[0]; const u8 *src = &rdata_pointer[1]; ya_result total = 0; switch(flags & 0x0f) { case 4: { // 4 bytes total += osformat(os, "%d.%d.%d.%d", src[0], src[1], src[2], src[3]); src += 4; break; } case 6: { // 16 bytes char ip6txt[INET6_ADDRSTRLEN]; inet_ntop(AF_INET6, &src, ip6txt, sizeof(ip6txt)); total += osprint(os, ip6txt); src += 16; break; } } if((flags & REMOTE_SERVER_FLAGS_PORT_MASK) != 0) { u16 port = GET_U16_AT(*src); total += osformat(os, " %hd", port); src += 2; } if((flags & REMOTE_SERVER_FLAGS_KEY_MASK) != 0) { total += osformat(os, " %{dnsname}", src); } return total; } case TYPE_TXT: { u8 c; while(rdata_size > 0) { c = *rdata_pointer++; if(c > 0) { c = MIN(c, rdata_size); output_stream_write(os, rdata_pointer, c); output_stream_write(os, (u8*)" ", 1); } rdata_size--; rdata_pointer += c; rdata_size -= c; } return SUCCESS; } case TYPE_CTRL_ZONERELOAD: { /* ONE NAME record */ if(rdata_size > 0) { osformat(os, "%{dnsname}", rdata_pointer); return SUCCESS; } return INCORRECT_RDATA; } case TYPE_A6: case TYPE_AFSDB: case TYPE_TSIG: case TYPE_IXFR: case TYPE_AXFR: case TYPE_SIG: case TYPE_ANY: default: osformat(os, "\\# %u ", rdata_size); /* rfc 3597 */ osprint_base16(os, rdata_pointer, rdata_size); return SUCCESS; } return INCORRECT_RDATA; } ya_result print_rdata(u16 type, u8* rdata_pointer, u16 rdata_size) { return osprint_rdata(termout, type, rdata_pointer, rdata_size); } void osprint_dump(output_stream *os, const void* data_pointer_, size_t size_, size_t line_size, u32 flags) { const u8* data_pointer = (const u8*)data_pointer_; s32 size = size_; bool address = (flags & OSPRINT_DUMP_ADDRESS) != 0; bool hex = (flags & OSPRINT_DUMP_HEX) != 0; bool text = (flags & OSPRINT_DUMP_TEXT) != 0; int group = flags & OSPRINT_DUMP_LAYOUT_GROUP_MASK; group >>= OSPRINT_DUMP_LAYOUT_GROUP_SHIFT; int separator = flags & OSPRINT_DUMP_LAYOUT_SEPARATOR_MASK; separator >>= OSPRINT_DUMP_LAYOUT_SEPARATOR_SHIFT; int dump_size; int i; char hexbyte[2]; do { dump_size = MIN(line_size, size); const u8* data; if(address) { format_hex_u64_hi((intptr)data_pointer, os, __SIZEOF_POINTER__ * 2, '0', FALSE); output_stream_write(os, (const u8*)" | ", 3); } if(hex) { data = data_pointer; for(i = 0; i < dump_size; i++) { u8 val = *data++; hexbyte[0] = __hexa__[val >> 4]; hexbyte[1] = __hexa__[val & 0x0f]; output_stream_write(os, (u8*)hexbyte, 2); if((i & group) == group) { output_stream_write_u8(os, (u8)' '); } if((i & separator) == separator) { output_stream_write_u8(os, (u8)' '); } } for(; i < line_size; i++) { output_stream_write(os, (const u8*)" ", 2); // these are two spaces if((i & group) == group) { output_stream_write_u8(os, (u8)' '); } if((i & separator) == separator) { output_stream_write_u8(os, (u8)' '); } } } if(text) { if(hex) { output_stream_write(os, (const u8*)" | ", 4); } data = data_pointer; for(i = 0; i < dump_size; i++) { char c = *data++; if(c < ' ') { c = '.'; } output_stream_write_u8(os, (u8)c); } } data_pointer += dump_size; size -= dump_size; if(size != 0) { output_stream_write_u8(os, (u8)'\n'); } } while(size > 0); } void osprint_question(output_stream* os, u8* qname, u16 qclass, u16 qtype) { osformat(os, ";; QUESTION SECTION:\n%{dnsname} %{dnsclass} %{dnstype}\n\n", qname, &qclass, &qtype); } void print_question(u8* qname, u16 qclass, u16 qtype) { osprint_question(termout, qname, qclass, qtype); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/counter_output_stream.c0000644000077100007710000000012412650131756024152 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.633344 30 ctime=1454597651.378344534 yadifa-2.1.6-5826/lib/dnscore/src/counter_output_stream.c0000664000077100007710000000711212650131756023760 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/counter_output_stream.h" static ya_result counter_write(output_stream* stream, const u8* buffer, u32 len) { counter_output_stream_data* data = (counter_output_stream_data*)stream->data; data->write_count += len; if(ISOK(data->result)) { data->result = output_stream_write(data->filtered, buffer, len); if(ISOK(data->result)) { data->written_count += data->result; } } return data->result; } static ya_result counter_flush(output_stream* stream) { counter_output_stream_data* data = (counter_output_stream_data*)stream->data; if(ISOK(data->result)) { data->result = output_stream_flush(data->filtered); } return data->result; } static void counter_close(output_stream* stream) { // counter_output_stream_data* data = (counter_output_stream_data*)stream->data; output_stream_set_void(stream); } static const output_stream_vtbl counter_output_stream_vtbl ={ counter_write, counter_flush, counter_close, "counter_output_stream", }; void counter_output_stream_init(output_stream* filtered, output_stream* stream, counter_output_stream_data* counter_data) { yassert(filtered != stream); counter_output_stream_data* data = counter_data; data->filtered = filtered; data->write_count = 0; data->written_count = 0; data->result = SUCCESS; stream->data = data; stream->vtbl = &counter_output_stream_vtbl; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/message_dnsupdate.c0000644000077100007710000000012412650131756023173 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.793344 30 ctime=1454597651.509344534 yadifa-2.1.6-5826/lib/dnscore/src/message_dnsupdate.c0000664000077100007710000002475412650131756023014 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * @{ * *----------------------------------------------------------------------------*/ //#include "dnscore/message_dnsupdate.h" #include "dnscore/dnscore-config.h" #include "dnscore/message.h" #include "dnscore/format.h" extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger /* * RFC 2136 : * CLASS TYPE RDATA Meaning --------------------------------------------------------- ANY ANY empty Delete all RRsets from a name ANY rrset empty Delete an RRset NONE rrset rr Delete an RR from an RRset zone rrset rr Add to an RRset * */ /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ /*------------------------------------------------------------------------------ * STATIC PROTOTYPES */ /*------------------------------------------------------------------------------ * FUNCTIONS */ /** @brief Function ... * * ... * * @param ... * * @retval OK * @retval NOK */ void message_make_dnsupdate_init(message_data *mesg, u16 id, const u8 *zzone, u16 zclass, u16 max_size, packet_writer *uninitialised_pw) { assert(uninitialised_pw != NULL); /* 1. INITIALIZE PACKET */ #ifdef WORDS_BIGENDIAN SET_U64_AT(mesg->buffer[0], 0x0000280000010000LL); SET_U32_AT(mesg->buffer[8], 0); #else SET_U64_AT(mesg->buffer[0], 0x0000010000280000LL); SET_U32_AT(mesg->buffer[8], 0); #endif MESSAGE_SET_ID(mesg->buffer, id); mesg->ar_start = NULL; #if DNSCORE_HAS_TSIG_SUPPORT mesg->tsig.tsig = NULL; #endif mesg->size_limit = max_size; mesg->rcode_ext = 0; if(max_size > UDPPACKET_MAX_LENGTH) { mesg->edns = TRUE; } packet_writer_create(uninitialised_pw, mesg->buffer, mesg->size_limit); /* 2. DO ZONE SECTION */ packet_writer_add_fqdn(uninitialised_pw, zzone); /* type in Zone Section must be SOA */ packet_writer_add_u16(uninitialised_pw, TYPE_SOA); packet_writer_add_u16(uninitialised_pw, zclass); mesg->send_length = uninitialised_pw->packet_offset; mesg->status = FP_MESG_OK; } ya_result message_make_dnsupdate_delete_all_rrsets(message_data *mesg, packet_writer *pw, const u8 *fqdn) { ya_result return_code; s32 offset = pw->packet_offset; if(ISOK(return_code = packet_writer_add_fqdn(pw, fqdn))) { if(packet_writer_remaining_capacity(pw) >= 10) { packet_writer_add_u16(pw, TYPE_ANY); // type packet_writer_add_u16(pw, CLASS_ANY); // class packet_writer_add_u32(pw, 0); // ttl = 0 packet_writer_add_u16(pw, 0); // empty rdata MESSAGE_SET_UP(mesg->buffer, ntohs(htons(MESSAGE_UP(mesg->buffer)) + 1)); return SUCCESS; } return_code = ERROR; } pw->packet_offset = offset; return return_code; } ya_result message_make_dnsupdate_delete_rrset(message_data *mesg, packet_writer *pw, const u8 *fqdn, u16 rtype) { ya_result return_code; s32 offset = pw->packet_offset; if(ISOK(return_code = packet_writer_add_fqdn(pw, fqdn))) { if(packet_writer_remaining_capacity(pw) >= 10) { packet_writer_add_u16(pw, rtype); // type packet_writer_add_u16(pw, CLASS_ANY); // class packet_writer_add_u32(pw, 0); // ttl = 0 packet_writer_add_u16(pw, 0); // empty rdata MESSAGE_SET_UP(mesg->buffer, ntohs(htons(MESSAGE_UP(mesg->buffer)) + 1)); return SUCCESS; } return_code = ERROR; } pw->packet_offset = offset; return return_code; } ya_result message_make_dnsupdate_delete_record(message_data *mesg, packet_writer *pw, const u8 *fqdn, u16 rtype, u16 rdata_size, const u8 *rdata) { ya_result return_code; s32 offset = pw->packet_offset; if(ISOK(return_code = packet_writer_add_fqdn(pw, fqdn))) { if(packet_writer_remaining_capacity(pw) >= 10 + rdata_size) { packet_writer_add_u16(pw, rtype); // type packet_writer_add_u16(pw, CLASS_NONE); // class packet_writer_add_u32(pw, 0); // ttl = 0 //packet_writer_add_u16(pw, htons(rdata_size)); // empty rdata if(ISOK(return_code = packet_writer_add_rdata(pw, rtype, rdata, rdata_size))) // empty rdata { MESSAGE_SET_UP(mesg->buffer, ntohs(htons(MESSAGE_UP(mesg->buffer)) + 1)); return SUCCESS; } } return_code = ERROR; } pw->packet_offset = offset; return return_code; } ya_result message_make_dnsupdate_add_record(message_data *mesg, packet_writer *pw, const u8 *fqdn, u16 rtype, u16 rclass, u32 rttl, u16 rdata_size, const u8 *rdata) { #ifdef DEBUG if(rttl > 86400 * 31) { log_warn("message_make_dnsupdate_add_record: sending an insane TTL of %u (%x)", rttl, rttl); } #endif /* 3. DO PREREQUISITE SECTION */ /* 4. DO UPDATE SECTION */ ya_result return_code; s32 offset = pw->packet_offset; if(ISOK(return_code = packet_writer_add_fqdn(pw, fqdn))) { if(packet_writer_remaining_capacity(pw) >= 10 + rdata_size) { packet_writer_add_u16(pw, rtype); // type packet_writer_add_u16(pw, rclass); // class packet_writer_add_u32(pw, htonl(rttl)); // rttl //packet_writer_add_u16(pw, htons(rdata_size)); // empty rdata if(ISOK(return_code = packet_writer_add_rdata(pw, rtype, rdata, rdata_size))) // empty rdata { MESSAGE_SET_UP(mesg->buffer, ntohs(htons(MESSAGE_UP(mesg->buffer)) + 1)); return SUCCESS; } } return_code = ERROR; } pw->packet_offset = offset; return return_code; } ya_result message_make_dnsupdate_finalize(message_data *mesg, packet_writer *pw) { mesg->send_length = pw->packet_offset; // handle EDNS0 if(mesg->edns) { if(packet_writer_remaining_capacity(pw) >= 11) { /* #AR = 1 */ mesg->buffer[DNS_HEADER_LENGTH - 1] = 1; /* AR count was 0, now it is 1 */ /* append opt *//* */ u8 *buffer = &mesg->buffer[mesg->send_length]; buffer[ 0] = 0; buffer[ 1] = 0; buffer[ 2] = 0x29; buffer[ 3] = mesg->size_limit >> 8; buffer[ 4] = mesg->size_limit; buffer[ 5] = (mesg->status >> 4); //buffer[ 6] = mesg->rcode_ext >> 24; buffer[ 6] = mesg->rcode_ext >> 16; buffer[ 7] = mesg->rcode_ext >> 8; buffer[ 8] = mesg->rcode_ext; buffer[ 9] = 0; buffer[10] = 0; // no NSID support here mesg->send_length += 11; } else { return MESSAGE_CONTENT_OVERFLOW; } } return SUCCESS; } void message_dnsupdate_data_show(message_dnsupdate_data *entry) { u16 count = 0; while (entry != NULL) { count++; format("COUNT : %d\n", count); format("ENTRY TTL : %d\n", (entry->zttl)); format("ENTRY CLASS : %d\n", ntohs(entry->zclass)); format("ENTRY TYPE : %d\n", ntohs(entry->ztype)); format("ENTRY NAME : %{dnsname}\n", entry->zname); // format("ENTRY POINTER: %p :: %p :::\n", entry, entry->next); format("\n"); entry = entry->next; } } void message_dnsupdate_data_init(message_dnsupdate_data* new_entry) { #ifdef DEBUG memset(new_entry, 0xff, sizeof(message_dnsupdate_data)); #endif new_entry->next = NULL; new_entry->zttl = 0; new_entry->ztype = 0; new_entry->zclass = 0; #ifdef DEBUG memset(new_entry->zname, 0xff, sizeof(new_entry->zname)); memset(new_entry->zrdata, 0xff, sizeof(new_entry->zrdata)); #endif new_entry->zname[0] = 0; new_entry->zname[1] = 0; } void message_dnsupdate_data_append_message_dnsupdate_data(message_dnsupdate_data *entry, message_dnsupdate_data *new_entry) { for(;;) { if(entry->next == NULL) { break; } entry = entry->next; } entry->next = new_entry; // MALLOC_OR_DIE(message_dnsupdate_data *, new_entry, sizeof(message_dnsupdate_data), MESSAGE_DNSUPDATE_DATA_TAG); } /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/file_output_stream.c0000644000077100007710000000012412650131756023412 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.689344 30 ctime=1454597651.449344534 yadifa-2.1.6-5826/lib/dnscore/src/file_output_stream.c0000664000077100007710000001725712650131756023233 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include #include #include #include #include "dnscore/file_output_stream.h" #include "dnscore/fdtools.h" /* * This structure is supposed to match the output_stream one * It helps using the void* data as an int without a INT_AT(x) kind of macro */ typedef struct file_output_stream file_output_stream; struct file_output_stream { union { void *voidp; int fd; } data; const output_stream_vtbl* vtbl; }; static ya_result file_write(output_stream* stream_, const u8* buffer, u32 len) { const file_output_stream* stream = (file_output_stream*)stream_; const u8* start = buffer; while(len > 0) { ssize_t ret = write(stream->data.fd, buffer, len); if(ret <= 0) { int err = errno; if(err == EINTR) { continue; } if(err == EAGAIN) /// @todo edf 20150218 -- OSX 10.9.4 generates this on unexpected streams { #if __FreeBSD__ || __OpenBSD__ || __APPLE__ int oldflags = fcntl (stream->data.fd, F_GETFL, 0); if(oldflags < 0) { // maybe ? err = errno; break; } #endif continue; } /* error */ return MAKE_ERRNO_ERROR(err); } buffer += ret; len -= ret; } return buffer - start; } static ya_result file_flush(output_stream* stream_) { file_output_stream* stream = (file_output_stream*)stream_; if(fsync(stream->data.fd) == 0) /* or fdatasync ... maybe it would be slightly better */ { return SUCCESS; } return ERRNO_ERROR; } static void file_close(output_stream* stream_) { file_output_stream* stream = (file_output_stream*)stream_; /* don't, it's only for a test that I did this assert((stream->data.fd < 0)||(stream->data.fd >2)); */ if(stream->data.fd != -1) /* harmless close but still ... */ { close_ex(stream->data.fd); } output_stream_set_void(stream_); } static const output_stream_vtbl file_output_stream_vtbl ={ file_write, file_flush, file_close, "file_output_stream", }; ya_result file_output_stream_open(const char* filename, output_stream* stream) { return file_output_stream_open_ex(filename, O_RDWR, 0600, stream); } ya_result file_output_stream_create(const char* filename, mode_t mode, output_stream* stream) { return file_output_stream_open_ex(filename, O_RDWR | O_CREAT | O_TRUNC, mode, stream); } ya_result file_output_stream_open_ex(const char* filename, int flags, mode_t mode, output_stream* stream_) { yassert(sizeof (void*) >= sizeof (int)); int fd = open_create_ex(filename, flags, mode); if(fd < 0) { return ERRNO_ERROR; } #if (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L) && !defined(__gnu__hurd__) posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL); #endif file_output_stream* stream = (file_output_stream*)stream_; stream->data.fd = fd; stream->vtbl = &file_output_stream_vtbl; return SUCCESS; } ya_result file_output_stream_open_ex_nolog(const char* filename, int flags, mode_t mode, output_stream* stream_) { yassert(sizeof (void*) >= sizeof (int)); int fd = open_create_ex_nolog(filename, flags, mode); if(fd < 0) { return ERRNO_ERROR; } #if (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L) && !defined(__gnu__hurd__) posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL); #endif file_output_stream* stream = (file_output_stream*)stream_; stream->data.fd = fd; stream->vtbl = &file_output_stream_vtbl; return SUCCESS; } void file_output_stream_close_nolog(output_stream* stream_) { file_output_stream* stream = (file_output_stream*)stream_; /* don't, it's only for a test that I did this assert((stream->data.fd < 0)||(stream->data.fd >2)); */ if(stream->data.fd != -1) /* harmless close but still ... */ { close_ex(stream->data.fd); } output_stream_set_void(stream_); } ya_result fd_output_stream_attach(output_stream* stream_, int fd) { yassert(sizeof(void*) >= sizeof(int)); file_output_stream* stream = (file_output_stream*)stream_; stream->data.fd = fd; stream->vtbl = &file_output_stream_vtbl; return SUCCESS; } void fd_output_stream_detach(output_stream* stream_) { yassert(sizeof(void*) >= sizeof(int)); file_output_stream* stream = (file_output_stream*)stream_; stream->data.fd = -1; } ya_result fd_output_stream_get_filedescriptor(output_stream* stream) { file_output_stream *fos = (file_output_stream*)stream; return fos->data.fd; } bool is_fd_output_stream(output_stream* stream_) { file_output_stream* stream = (file_output_stream*)stream_; return (stream != NULL) && (stream->vtbl == &file_output_stream_vtbl); } s64 fd_output_stream_get_size(output_stream* stream_) { file_output_stream* stream = (file_output_stream*)stream_; struct stat s; if(fstat(stream->data.fd, &s) >= 0) { if(S_ISREG(s.st_mode)) { return s.st_size; } } return (s64)ERRNO_ERROR; } void file_output_steam_advise_sequential(output_stream* stream_) { file_output_stream* stream = (file_output_stream*)stream_; #if (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L) && !defined(__gnu__hurd__) if(stream->data.fd >= 0) { posix_fadvise(stream->data.fd, 0, 0, POSIX_FADV_SEQUENTIAL); } #endif } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/bytezarray_output_stream.c0000644000077100007710000000012412650131756024667 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.780344 30 ctime=1454597651.337344534 yadifa-2.1.6-5826/lib/dnscore/src/bytezarray_output_stream.c0000664000077100007710000001674212650131756024506 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/bytezarray_output_stream.h" #include "dnscore/zalloc.h" #define BYTE_ARRAY_OUTPUT_STREAM_TAG 0x534f4142 /* BAOS */ #define BYTE_ARRAY_OUTPUT_STREAM_DATA_TAG 0x41544144534f4142 /* BAOSDATA */ #define BYTE_ARRAY_OUTPUT_STREAM_BUFF_TAG 0x46465542534f4142 /* BAOSBUFF */ #define BYTEARRAY_STARTSIZE 1024 typedef struct bytezarray_output_stream_data bytezarray_output_stream_data; /** * @NOTE: if this changes, take care that bytezarray_output_stream_context in the header file has at least the SAME SIZE */ struct bytezarray_output_stream_data { u8* buffer; u32 buffer_size; u32 buffer_offset; u8 flags; }; static ya_result bytezarray_output_stream_write(output_stream* stream, const u8* buffer, u32 len) { if(len == 0) { return 0; } bytezarray_output_stream_data* data = (bytezarray_output_stream_data*)stream->data; u32 remaining = data->buffer_size - data->buffer_offset; if(len > remaining) { /* Either we can resize, either we have to trunk */ if((data->flags & BYTEARRAY_DYNAMIC) != 0) { u8* newbuffer; u32 newsize = data->buffer_size; do { newsize = newsize * 2; } while(newsize < data->buffer_size + len); ZALLOC_ARRAY_OR_DIE(u8*, newbuffer, newsize, BYTE_ARRAY_OUTPUT_STREAM_TAG); MEMCOPY(newbuffer, data->buffer, data->buffer_offset); if((data->flags & BYTEARRAY_OWNED) != 0) { ZFREE_ARRAY(data->buffer, data->buffer_size); } data->buffer = newbuffer; data->buffer_size = newsize; data->flags |= BYTEARRAY_OWNED; } else { len = remaining; } } MEMCOPY(&data->buffer[data->buffer_offset], buffer, len); data->buffer_offset += len; return len; } static ya_result bytezarray_output_stream_flush(output_stream* stream) { return SUCCESS; } static void bytezarray_output_stream_close(output_stream* stream) { bytezarray_output_stream_data* data = (bytezarray_output_stream_data*)stream->data; if((data->flags & BYTEARRAY_OWNED) != 0) { #ifdef DEBUG memset(data->buffer, 0xe5, data->buffer_size); #endif ZFREE_ARRAY(data->buffer, data->buffer_size); } if((data->flags & BYTEARRAY_ZALLOC_CONTEXT) != 0) { ZFREE(data, bytezarray_output_stream_data); } output_stream_set_void(stream); } static const output_stream_vtbl bytezarray_output_stream_vtbl = { bytezarray_output_stream_write, bytezarray_output_stream_flush, bytezarray_output_stream_close, "bytezarray_output_stream", }; void bytezarray_output_stream_init_ex_static(output_stream* out_stream, u8* array,u32 size, u8 flags, bytezarray_output_stream_context *ctx) { bytezarray_output_stream_data *data = (bytezarray_output_stream_data*)ctx; if(array == NULL) { flags |= BYTEARRAY_OWNED; if(size == 0) { flags |= BYTEARRAY_DYNAMIC; size = BYTEARRAY_STARTSIZE; } ZALLOC_ARRAY_OR_DIE(u8*, array, size, BYTE_ARRAY_OUTPUT_STREAM_BUFF_TAG); } data->buffer = array; data->buffer_size = size; data->buffer_offset = 0; data->flags = flags; out_stream->data = data; out_stream->vtbl = &bytezarray_output_stream_vtbl; } void bytezarray_output_stream_init_ex(output_stream* out_stream, u8* array, u32 size, u8 flags) { bytezarray_output_stream_data* data; ZALLOC_OR_DIE(bytezarray_output_stream_data*, data, bytezarray_output_stream_data, BYTE_ARRAY_OUTPUT_STREAM_DATA_TAG); flags |= BYTEARRAY_ZALLOC_CONTEXT; bytezarray_output_stream_init_ex_static(out_stream, array, size, flags, (bytezarray_output_stream_context*)data); } void bytezarray_output_stream_init(output_stream* out_stream, u8* array, u32 size) { bytezarray_output_stream_init_ex(out_stream, array, size, 0); } void bytezarray_output_stream_reset(output_stream* stream) { bytezarray_output_stream_data* data = (bytezarray_output_stream_data*)stream->data; data->buffer_offset = 0; } u32 bytezarray_output_stream_size(output_stream* stream) { bytezarray_output_stream_data* data = (bytezarray_output_stream_data*)stream->data; return data->buffer_offset; } u32 bytezarray_output_stream_buffer_size(output_stream* stream) { bytezarray_output_stream_data* data = (bytezarray_output_stream_data*)stream->data; return data->buffer_size; } u8* bytezarray_output_stream_buffer(output_stream* stream) { bytezarray_output_stream_data* data = (bytezarray_output_stream_data*)stream->data; return data->buffer; } u8* bytezarray_output_stream_detach(output_stream* stream) { bytezarray_output_stream_data* data = (bytezarray_output_stream_data*)stream->data; data->flags &= ~BYTEARRAY_OWNED; return data->buffer; } void bytezarray_output_stream_set(output_stream* stream, u8 *buffer, u32 buffer_size, bool owned) { bytezarray_output_stream_data* data = (bytezarray_output_stream_data*)stream->data; if((data->buffer != buffer) && ((data->flags & BYTEARRAY_OWNED) != 0)) { ZFREE_ARRAY(data->buffer, data->buffer_size); } data->buffer = buffer; data->buffer_offset = buffer_size; data->buffer_size = buffer_size; data->flags = (data->flags & BYTEARRAY_ZALLOC_CONTEXT) | ((owned)?BYTEARRAY_OWNED:0); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/output_stream.c0000644000077100007710000000012412650131756022413 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.633344 30 ctime=1454597651.528344534 yadifa-2.1.6-5826/lib/dnscore/src/output_stream.c0000664000077100007710000002713712650131756022232 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * Implementation of routines for the resource_record struct * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnscore/dnscore-config.h" #include #include #include #include #include "dnscore/dnscore.h" #include "dnscore/dnsname.h" #include "dnscore/output_stream.h" #include "dnscore/base64.h" #include "dnscore/base32.h" #include "dnscore/base32hex.h" #include "dnscore/base16.h" #define MODULE_MSG_HANDLE g_system_logger #define OSTREAM_TAG 0x4d41455254534f ya_result output_stream_write_nu32(output_stream* os, u32 value) { u8 buffer[4]; /* ------------------------------------------------------------ */ buffer[0] = value >> 24; buffer[1] = value >> 16; buffer[2] = value >> 8; buffer[3] = value; return output_stream_write(os, buffer, 4); } ya_result output_stream_write_nu16(output_stream* os, u16 value) { u8 buffer[2]; /* ------------------------------------------------------------ */ buffer[0] = value >> 8; buffer[1] = value; return output_stream_write(os, buffer, 2); } ya_result output_stream_write_u16(output_stream* os, u16 value) { return output_stream_write(os, (u8*) & value, 2); } /* Inlined ya_result output_stream_write_u8(output_stream* os, u8 value) { return output_stream_write(os, &value, 1); } */ ya_result output_stream_decode_base64(output_stream* os, const char * string, u32 length) { char buffer[64]; u8 buffer_bin[48]; u32 needle = 0; ya_result return_code = OK; /* ------------------------------------------------------------ */ while(length-- > 0) { char c = *string++; if(isspace(c)) { continue; } buffer[needle++] = c; if(needle == 64) { if(FAIL(return_code = base64_decode(buffer, needle, buffer_bin))) { return return_code; } if(FAIL(return_code = output_stream_write(os, buffer_bin, return_code))) { return return_code; } needle = 0; } } if(needle > 0) { if((needle & 3) != 0) { return PARSEB64_ERROR; } if(FAIL(return_code = base64_decode(buffer, needle, buffer_bin))) { return return_code; } if(FAIL(return_code = output_stream_write(os, buffer_bin, return_code))) { return return_code; } } return return_code; } ya_result output_stream_decode_base32(output_stream* os, const char * string, u32 length) { char buffer[64]; u8 buffer_bin[40]; u32 needle = 0; ya_result return_code = OK; /* ------------------------------------------------------------ */ while(length-- > 0) { char c = *string++; if(isspace(c)) { continue; } buffer[needle++] = c; if(needle == sizeof (buffer)) { if(FAIL(return_code = base32_decode(buffer, needle, buffer_bin))) { return return_code; } if(FAIL(return_code = output_stream_write(os, buffer_bin, return_code))) { return return_code; } needle = 0; } } if(needle > 0) { if((needle & 7) != 0) { return PARSEB32_ERROR; } if(FAIL(return_code = base32_decode(buffer, needle, buffer_bin))) { return return_code; } if(FAIL(return_code = output_stream_write(os, buffer_bin, return_code))) { return return_code; } } return return_code; } ya_result output_stream_decode_base32hex(output_stream* os, const char * string, u32 length) { char buffer[64]; u8 buffer_bin[40]; u32 needle = 0; ya_result return_code = OK; /* ------------------------------------------------------------ */ while(length-- > 0) { char c = *string++; if(isspace(c)) { continue; } buffer[needle++] = c; if(needle == sizeof (buffer)) { if(FAIL(return_code = base32hex_decode(buffer, needle, buffer_bin))) { return return_code; } if(FAIL(return_code = output_stream_write(os, buffer_bin, return_code))) { return return_code; } needle = 0; } } if(needle > 0) { if((needle & 7) != 0) { return PARSEB32H_ERROR; } if(FAIL(return_code = base32hex_decode(buffer, needle, buffer_bin))) { return return_code; } if(FAIL(return_code = output_stream_write(os, buffer_bin, return_code))) { return return_code; } } return return_code; } ya_result output_stream_decode_base16(output_stream* os, const char * string, u32 length) { const char *string_start = string; u32 needle = 0; ya_result return_code = OK; char buffer[64]; u8 buffer_bin[32]; /* ------------------------------------------------------------ */ while(length-- > 0) { char c = *string++; if(isspace(c)) { continue; } buffer[needle++] = c; if(needle == sizeof (buffer)) { if(FAIL(return_code = base16_decode(buffer, needle, buffer_bin))) { return return_code; } if(FAIL(return_code = output_stream_write(os, buffer_bin, return_code))) { return return_code; } needle = 0; } } if(needle > 0) { if((needle & 1) != 0) { return PARSEB16_ERROR; } if(FAIL(return_code = base16_decode(buffer, needle, buffer_bin))) { return return_code; } if(FAIL(return_code = output_stream_write(os, buffer_bin, return_code))) { return return_code; } } /* return the number of bytes read, instead of the last write size * this way something can be done about the input. * * alternatively we could just return "success" */ return string - string_start; } ya_result output_stream_write_pu32(output_stream* os, u32 value) { u8 v; while(value > 127) { v = (u8)value; value >>= 7; v |= 0x80; /* I'll only check the error for the last byte */ output_stream_write(os, &v, 1); } v = (u8)value; return output_stream_write(os, &v, 1); } ya_result output_stream_write_dnsname(output_stream* os, const u8 *name) { u32 len = dnsname_len(name); return output_stream_write(os, name, len); } ya_result output_stream_write_dnslabel_vector(output_stream* os, dnslabel_vector_reference labels, s32 top) { ya_result n = 0; s32 i; for(i = 0; i <= top; i++) { ya_result err; u8 len = labels[i][0] + 1; if(FAIL(err = output_stream_write(os, labels[i], len))) { return err; } n += err; } output_stream_write_u8(os, 0); return n; } ya_result output_stream_write_dnslabel_stack(output_stream* os, dnslabel_stack_reference labels, s32 top) { ya_result n = 0; s32 i; for(i = top; i >= 0; i--) { ya_result err; u8 len = labels[i][0] + 1; if(FAIL(err = output_stream_write(os, labels[i], len))) { return err; } n += err; } output_stream_write_u8(os, 0); return n; } output_stream* output_stream_alloc() { output_stream* os; MALLOC_OR_DIE(output_stream*, os, sizeof (output_stream), OSTREAM_TAG); /* OSTREAM */ os->data = NULL; os->vtbl = NULL; return os; } static ya_result void_output_stream_write(output_stream* stream, const u8* buffer, u32 len) { log_err("tried to write a closed stream"); return INVALID_STATE_ERROR; } static ya_result void_output_stream_flush(output_stream* stream) { log_err("tried to flush a closed stream"); return INVALID_STATE_ERROR; } static void void_output_stream_close(output_stream* stream) { /* * WARNING */ log_err("tried to close a closed stream"); #ifdef DEBUG abort(); #endif } static const output_stream_vtbl void_output_stream_vtbl ={ void_output_stream_write, void_output_stream_flush, void_output_stream_close, "void_output_stream", }; /** * This tools allows a safer misuse (and detection) of closed streams * It sets the stream to a sink that warns abouts its usage and for which every call that can fail fails. */ void output_stream_set_void(output_stream* stream) { stream->data = NULL; stream->vtbl = &void_output_stream_vtbl; } ya_result output_stream_write_fully(output_stream* stream, const void* buffer_start, u32 len_start) { output_stream_write_method* writefunc = stream->vtbl->write; u32 len = len_start; u8* buffer = (u8*)buffer_start; ya_result ret; while(len > 0) { if(FAIL(ret = writefunc(stream, buffer, len))) { return ret; } if(ret == 0) /* eof */ { break; } buffer += ret; len -= ret; // cppcheck: false positive } /* If we only read a partial it's wrong. * If we were aked to read nothing it's ok. * If we read nothing at all we were on EOF and its still ok */ if(len > 0) { return UNABLE_TO_COMPLETE_FULL_WRITE; } return buffer - (u8*)buffer_start; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/u64_set.c0000644000077100007710000000012412650131756020771 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.746344 30 ctime=1454597651.648344534 yadifa-2.1.6-5826/lib/dnscore/src/u64_set.c0000664000077100007710000001215712650131756020604 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief * * A collection of strings based on the AVL * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #define _U64_SET_C #define DEBUG_LEVEL 0 #include "dnscore/dnscore.h" #include "dnscore/u64_set.h" #include "dnscore/zalloc.h" #define U64SET_TAG 0x544553343655 /* * The following macros are defining relevant fields in the node */ /* * Access to the field that points to the left child */ #define AVL_LEFT_CHILD(node) ((node)->children.lr.left) /* * Access to the field that points to the right child */ #define AVL_RIGHT_CHILD(node) ((node)->children.lr.right) /* * Access to the field that points to one of the children (0: left, 1: right) */ #define AVL_CHILD(node,id) ((node)->children.child[(id)]) /* * Access to the field that keeps the balance (a signed byte) */ #define AVL_BALANCE(node) ((node)->balance) /* * Self explanatory */ #define AVL_REFERENCE_IS_POINTER FALSE /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE u64 /* * */ #define AVL_REFERENCE_FORMAT_STRING '%08x' #define AVL_REFERENCE_FORMAT(reference) reference /* * A macro to initialize a node and setting the reference */ #define AVL_INIT_NODE(node,reference) node->key = reference;node->value=NULL #if 0 /* fix */ #else /* * A macro to allocate a new node */ #define AVL_ALLOC_NODE(node,reference) ZALLOC_OR_DIE(AVL_NODE_TYPE*,node,AVL_NODE_TYPE, U64SET_TAG); /* * A macro to free a node allocated by ALLOC_NODE */ #define AVL_FREE_NODE(node) ZFREE(node,AVL_NODE_TYPE) #endif /* * A macro to print the node */ #define AVL_DUMP_NODE(node) format("node@%p",(node)); /* * A macro that returns the reference field of the node. * It must be of type REFERENCE_TYPE */ #define AVL_REFERENCE(node) (node)->key /* * A macro to compare two references * Returns TRUE if and only if the references are equal. */ #define AVL_ISEQUAL(reference_a,reference_b) ((u64)(reference_a) == (u64)(reference_b)) /* * A macro to compare two references * Returns TRUE if and only if the first one is bigger than the second one. */ #define AVL_ISBIGGER(reference_a,reference_b) ((u64)(reference_a) > (u64)(reference_b)) /* * Copies the payload of a node * It MUST NOT copy the "proprietary" node fields : children, parent, balance */ #define AVL_COPY_PAYLOAD(node_trg,node_src) (node_trg)->key=(node_src)->key;(node_trg)->value=(node_src)->value; /* * A macro to preprocess a node before it is preprocessed for a delete (detach) * If there was anything to do BEFORE deleting a node, we would do it here * After this macro is exectuted, the node * _ is detached, then deleted with FREE_NODE * _ has got its content overwritten by the one of another node, then the other * node is deleted with FREE_NODE */ #define AVL_NODE_DELETE_CALLBACK(node) #include "dnscore/avl.c.inc" void *u64_set_avl_iterator_hasnext_next_value(u64_set_avl_iterator *iterp) { if(u64_set_avl_iterator_hasnext(iterp)) { u64_node *node = u64_set_avl_iterator_next_node(iterp); void *ptr = node->value; return ptr; } else { return NULL; } } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/logger_channel_syslog.c0000644000077100007710000000012412650131756024047 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.762344 30 ctime=1454597651.494344534 yadifa-2.1.6-5826/lib/dnscore/src/logger_channel_syslog.c0000664000077100007710000001254612650131756023664 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logger Logging functions * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include #define LOGGER_CHANNEL_SYSLOG_MULTITHREADED 0 #define SYSLOG_IS_THREADSAFE 0 #if LOGGER_CHANNEL_SYSLOG_MULTITHREADED == 0 #undef SYSLOG_IS_THREADSAFE #define SYSLOG_IS_THREADSAFE 1 #endif #if SYSLOG_IS_THREADSAFE == 0 #include #endif #include "dnscore/logger_channel_syslog.h" #include "dnscore/sys_types.h" #include "dnscore/format.h" #define SYSLOG_MAX_LINE_SIZE 1024 #define SYSLOG_FORMATTING_ERROR_TEXT "internal syslog formatting error" #define SYSLOG_FORMATTING_ERROR_TEXT_LENGTH 33 struct logger_syslog_data { char* ident; int options; int facility; }; typedef struct logger_syslog_data logger_syslog_data; static ya_result logger_channel_syslog_constmsg(logger_channel* chan, int level, char* text, u32 text_len, u32 date_offset) { (void)text_len; if(level > LOG_DEBUG) { level = LOG_DEBUG; } syslog(level, "%s", &text[date_offset]); /* don't worry about not being a string literal */ return SUCCESS; } static ya_result logger_channel_syslog_msg(logger_channel* chan, int level, char* text, ...) { char tmp[SYSLOG_MAX_LINE_SIZE]; va_list args; va_start(args, text); ya_result return_code = vsnformat(tmp, sizeof (tmp), text, args); if(FAIL(return_code)) { memcpy(tmp, SYSLOG_FORMATTING_ERROR_TEXT, SYSLOG_FORMATTING_ERROR_TEXT_LENGTH); return_code = SYSLOG_FORMATTING_ERROR_TEXT_LENGTH; } syslog(level, "%s", tmp); va_end(args); return return_code; } static ya_result logger_channel_syslog_vmsg(logger_channel* chan, int level, char* text, va_list args) { (void)chan; char tmp[SYSLOG_MAX_LINE_SIZE]; ya_result return_code = vsnformat(tmp, sizeof (tmp), text, args); if(FAIL(return_code)) { memcpy(tmp, SYSLOG_FORMATTING_ERROR_TEXT, SYSLOG_FORMATTING_ERROR_TEXT_LENGTH); return_code = SYSLOG_FORMATTING_ERROR_TEXT_LENGTH; } /* * NOTE: LOG_DEBUG is the last supported level */ syslog(level & LOG_PRIMASK, "%s", tmp); return return_code; } static void logger_channel_syslog_flush(logger_channel* chan) { /* NOP */ } static void logger_channel_syslog_close(logger_channel* chan) { logger_syslog_data *sd = (logger_syslog_data*)chan->data; free(sd->ident); free(sd); closelog(); chan->data = NULL; chan->vtbl = NULL; } static ya_result logger_channel_syslog_reopen(logger_channel* chan) { logger_syslog_data *sd = (logger_syslog_data*)chan->data; closelog(); openlog(sd->ident, sd->options, sd->facility); return SUCCESS; } static const logger_channel_vtbl syslog_vtbl = { logger_channel_syslog_constmsg, logger_channel_syslog_msg, logger_channel_syslog_vmsg, logger_channel_syslog_flush, logger_channel_syslog_close, logger_channel_syslog_reopen, "syslog_channel" }; void logger_channel_syslog_open(const char* ident, int options, int facility, logger_channel* chan) { logger_syslog_data *sd; MALLOC_OR_DIE(logger_syslog_data*, sd, sizeof (logger_syslog_data), 0x4d5254534e414843); /* CHANSTRM */ sd->ident = strdup(ident); sd->options = options; sd->facility = facility; chan->data = sd; chan->vtbl = &syslog_vtbl; openlog(sd->ident, options, facility); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/digest_sha512.c0000644000077100007710000000012412650131756022042 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.759344 30 ctime=1454597651.400344534 yadifa-2.1.6-5826/lib/dnscore/src/digest_sha512.c0000664000077100007710000000506512650131756021655 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include "dnscore/digest.h" #ifndef OPENSSL_NO_SHA512 s32 digest_sha512_update(digest_s* ctx, const void* buffer, u32 size) { return SHA512_Update(&ctx->ctx.sha512, buffer, size) - 1; } s32 digest_sha512_final(digest_s* ctx, void *outbuffer, u32 outsize) { if(outsize >= SHA512_DIGEST_LENGTH) { return SHA512_Final(outbuffer, &ctx->ctx.sha512) - 1; } return -2; } s32 digest_sha512_get_size(digest_s* ctx) { return SHA512_DIGEST_LENGTH; } static const struct digest_vtbl sha512_vtbl = { digest_sha512_update, digest_sha512_final, digest_sha512_get_size, "SHA512" }; void digest_sha512_init(digest_s *ctx) { ctx->vtbl = &sha512_vtbl; SHA512_Init(&ctx->ctx.sha512); } #endif yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/string_set.c0000644000077100007710000000012412650131756021661 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.692344 30 ctime=1454597651.592344534 yadifa-2.1.6-5826/lib/dnscore/src/string_set.c0000664000077100007710000001157212650131756021474 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief * * A collection of strings based on the AVL * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #define _STRING_SET_C #define DEBUG_LEVEL 0 #include "dnscore/dnscore.h" #include "dnscore/string_set.h" #include "dnscore/zalloc.h" #define STRNGSET_TAG 0x544553474e525453 /* * The following macros are defining relevant fields in the node */ static int strcompare(const char *a, const char *b) { return strcmp(a, b); } /* * Access to the field that points to the left child */ #define AVL_LEFT_CHILD(node) ((node)->children.lr.left) /* * Access to the field that points to the right child */ #define AVL_RIGHT_CHILD(node) ((node)->children.lr.right) /* * Access to the field that points to one of the children (0: left, 1: right) */ #define AVL_CHILD(node,id) ((node)->children.child[(id)]) /* * Access to the field that keeps the balance (a signed byte) */ #define AVL_BALANCE(node) ((node)->balance) /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE const char* #define AVL_REFERENCE_IS_CONST TRUE /* * */ #define AVL_REFERENCE_FORMAT_STRING '%s' #define AVL_REFERENCE_FORMAT(reference) reference /* * A macro to initialize a node and setting the reference */ #define AVL_INIT_NODE(node,reference) node->key = reference #if 0 /* fix */ #else /* * A macro to allocate a new node */ #define AVL_ALLOC_NODE(node,reference) ZALLOC_OR_DIE(AVL_NODE_TYPE*,node,AVL_NODE_TYPE, STRNGSET_TAG); /* * A macro to free a node allocated by ALLOC_NODE */ #define AVL_FREE_NODE(node) ZFREE(node,AVL_NODE_TYPE) #endif /* * A macro to print the node */ #define AVL_DUMP_NODE(node) format("node@%p",(node)); /* * A macro that returns the reference field of the node. * It must be of type REFERENCE_TYPE */ #define AVL_REFERENCE(node) (node)->key /* * A macro to compare two references * Returns TRUE if and only if the references are equal. */ #define AVL_ISEQUAL(reference_a,reference_b) (strcompare(reference_a,reference_b)==0) /* * A macro to compare two references * Returns TRUE if and only if the first one is bigger than the second one. */ #define AVL_ISBIGGER(reference_a,reference_b) (strcompare(reference_a,reference_b)>0) /* * Copies the payload of a node * It MUST NOT copy the "proprietary" node fields : children, parent, balance */ #define AVL_COPY_PAYLOAD(node_trg,node_src) (node_trg)->key=(node_src)->key;(node_trg)->value=(node_src)->value; /* * A macro to preprocess a node before it is preprocessed for a delete (detach) * If there was anything to do BEFORE deleting a node, we would do it here * After this macro is exectuted, the node * _ is detached, then deleted with FREE_NODE * _ has got its content overwritten by the one of another node, then the other * node is deleted with FREE_NODE */ #define AVL_NODE_DELETE_CALLBACK(node) #include "dnscore/avl.c.inc" /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/pool.c0000644000077100007710000000012412650131756020451 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.683344 30 ctime=1454597651.558344534 yadifa-2.1.6-5826/lib/dnscore/src/pool.c0000664000077100007710000001425512650131756020265 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include "dnscore/pool.h" extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger static mutex_t pool_chain_mtx = MUTEX_INITIALIZER; static pool_s *pool_chain = NULL; void pool_init(pool_s *pool, pool_allocate_callback *allocate_, pool_free_callback *free_, void *allocate_args, const char *name) { ptr_vector_init(&pool->pool); pool->allocate_method = allocate_; pool->free_method = free_; pool->allocate_args = allocate_args; mutex_init(&pool->mtx); pool->allocated_count = 0; pool->released_count = 0; pool->name = name; pool->max_size = 0; pool->current_count = 0; pool->peak_count = 0; pool->hard_limit = FALSE; pool->maxed = FALSE; pool_set_size(pool, 0x10000); mutex_lock(&pool_chain_mtx); pool->next = pool_chain; pool_chain = pool; mutex_unlock(&pool_chain_mtx); } void pool_log_stats_ex(pool_s *pool, logger_handle* handle, u32 level) { if(pool != NULL) { logger_handle_msg(handle, level, "pool '%s' handled %llu allocations and %llu releases; pooled %i maxed at %i; using %u peaked at %u", pool->name, pool->allocated_count, pool->released_count, pool->pool.offset + 1, pool->max_size, pool->current_count, pool->peak_count); } else { logger_handle_msg(handle, MSG_ERR, "pool is NULL"); } } void pool_log_stats(pool_s *pool) { pool_log_stats_ex(pool, MODULE_MSG_HANDLE, MSG_DEBUG); } void pool_log_all_stats_ex(logger_handle* handle, u32 level) { mutex_lock(&pool_chain_mtx); pool_s *p = pool_chain; while(p != NULL) { pool_log_stats_ex(p, handle, level); p = p->next; } mutex_unlock(&pool_chain_mtx); } void pool_log_all_stats() { pool_log_all_stats_ex(MODULE_MSG_HANDLE, MSG_DEBUG); } void pool_finalize(pool_s *pool) { mutex_lock(&pool_chain_mtx); pool_s **pp = &pool_chain; while(*pp != NULL) { if(*pp == pool) { *pp = pool->next; break; } pp = &(*pp)->next; } mutex_unlock(&pool_chain_mtx); u64 delta; mutex_lock(&pool->mtx); delta = pool->allocated_count - pool->released_count; for(s32 i = 0; i <= pool->pool.offset; i++) { pool->free_method(pool->pool.data[i], pool->allocate_args); pool->pool.data[i] = NULL; } ptr_vector_destroy(&pool->pool); mutex_unlock(&pool->mtx); mutex_destroy(&pool->mtx); pool_log_stats(pool); if(delta != 0) { log_warn("pool '%s' leaked: %d items", pool->name, delta); } #ifdef DEBUG memset(pool, 0xe0, sizeof(pool_s)); #endif } void* pool_alloc(pool_s *pool) { void *p; mutex_lock(&pool->mtx); if(pool->hard_limit) { if(pool->current_count >= pool->max_size + 1) { if(!pool->maxed) // the maxed flag helps to only complain once the limit is reached { log_warn("pool '%s' : pool usage reached maximum %i > %i", pool->name, pool->peak_count, pool->max_size); pool->maxed = TRUE; } mutex_unlock(&pool->mtx); return NULL; } pool->maxed = FALSE; } pool->allocated_count++; if(++pool->current_count > pool->peak_count) { pool->peak_count = pool->current_count; } if(pool->pool.offset >= 0) { p = ptr_vector_pop(&pool->pool); mutex_unlock(&pool->mtx); } else { mutex_unlock(&pool->mtx); p = pool->allocate_method(pool->allocate_args); } log_debug7("pool '%s': alloc %p", pool->name, p); return p; } void pool_release(pool_s *pool, void *p) { log_debug7("pool '%s': release %p", pool->name, p); mutex_lock(&pool->mtx); if((--pool->current_count) < 0) { log_err("pool '%s': <0: %d", pool->name, pool->current_count); } if(pool->pool.offset < pool->max_size) { ptr_vector_append(&pool->pool, p); } else { pool->free_method(p, pool->allocate_args); } pool->released_count++; mutex_unlock(&pool->mtx); } void pool_set_size(pool_s *pool, s32 max_size) { yassert(ptr_vector_size(&pool->pool) <= max_size); ptr_vector_resize(&pool->pool, max_size); pool->max_size = max_size - 1; } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/bytearray_input_stream.c0000644000077100007710000000012412650131756024274 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.713344 30 ctime=1454597651.330344534 yadifa-2.1.6-5826/lib/dnscore/src/bytearray_input_stream.c0000664000077100007710000001374712650131756024115 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/bytearray_input_stream.h" #include "dnscore/zalloc.h" #define BYTE_ARRAY_INPUT_STREAM_TAG 0x53494142 // BAIS #define BYTE_ARRAY_INPUT_STREAM_DATA_TAG 0x4154414453494142 // BAISDATA typedef struct bytearray_input_stream_data bytearray_input_stream_data; /* flags */ struct bytearray_input_stream_data { const u8* buffer; u32 offset; u32 size; bool own_buffer; }; static ya_result bytearray_input_stream_read(input_stream* stream, u8 *buffer, u32 len) { if(len == 0) { return 0; } bytearray_input_stream_data* data = (bytearray_input_stream_data*)stream->data; u32 remaining = data->size - data->offset; if(len > remaining) { if(remaining == 0) { return 0; /* EOF */ } len = remaining; } const u8* src = &data->buffer[data->offset]; MEMCOPY(buffer, src, len); data->offset += len; return len; } static ya_result bytearray_input_stream_skip(input_stream* stream, u32 len) { if(len == 0) { return 0; } bytearray_input_stream_data* data = (bytearray_input_stream_data*)stream->data; u32 remaining = data->size - data->offset; if(len > remaining) { if(remaining == 0) { return 0; /* EOF */ } len = remaining; } data->offset += len; return len; } static void bytearray_input_stream_close(input_stream* stream) { bytearray_input_stream_data* data = (bytearray_input_stream_data*)stream->data; if(data->own_buffer) { free((void*)data->buffer); } ZFREE(data,bytearray_input_stream_data); input_stream_set_void(stream); } static const input_stream_vtbl bytearray_input_stream_vtbl = { bytearray_input_stream_read, bytearray_input_stream_skip, bytearray_input_stream_close, "bytearray_input_stream", }; void bytearray_input_stream_init_const(input_stream* out_stream, const u8* array, u32 size) { bytearray_input_stream_data* data; ZALLOC_OR_DIE(bytearray_input_stream_data*, data, bytearray_input_stream_data, BYTE_ARRAY_INPUT_STREAM_DATA_TAG); data->buffer = array; data->offset = 0; data->size = size; data->own_buffer = FALSE; #if DEBUG && EDF log_debug5("bais@%p: init: set %d@%p (const)", out_stream, size, array); #endif out_stream->data = data; out_stream->vtbl = &bytearray_input_stream_vtbl; } void bytearray_input_stream_init(u8* array, u32 size, input_stream* out_stream, bool owned) { bytearray_input_stream_data* data; ZALLOC_OR_DIE(bytearray_input_stream_data*, data, bytearray_input_stream_data, BYTE_ARRAY_INPUT_STREAM_DATA_TAG); data->buffer = array; data->offset = 0; data->size = size; data->own_buffer = owned; #if DEBUG && EDF log_debug5("bais@%p: init: set %d@%p (%x)", out_stream, size, array, owned); #endif out_stream->data = data; out_stream->vtbl = &bytearray_input_stream_vtbl; } void bytearray_input_stream_reset(input_stream* stream) { bytearray_input_stream_data* data = (bytearray_input_stream_data*)stream->data; data->offset = 0; } u32 bytearray_input_stream_offset(input_stream* stream) { bytearray_input_stream_data* data = (bytearray_input_stream_data*)stream->data; return data->offset; } u32 bytearray_input_stream_size(input_stream* stream) { bytearray_input_stream_data* data = (bytearray_input_stream_data*)stream->data; return data->size; } const u8* bytearray_input_stream_buffer(input_stream* stream) { bytearray_input_stream_data* data = (bytearray_input_stream_data*)stream->data; return data->buffer; } u8* bytearray_input_stream_detach(input_stream* stream) { bytearray_input_stream_data* data = (bytearray_input_stream_data*)stream->data; data->own_buffer = FALSE; return (u8*)data->buffer; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/cmdline.c0000644000077100007710000000012412650131756021113 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.636344 30 ctime=1454597651.348344534 yadifa-2.1.6-5826/lib/dnscore/src/cmdline.c0000664000077100007710000002505312650131756020725 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include "dnscore/bytearray_input_stream.h" #include "dnscore/bytearray_output_stream.h" #include "dnscore/ptr_set.h" #include "dnscore/format.h" #include "dnscore/cmdline.h" static ptr_set g_cmdline_sections = PTR_SET_ASCIIZ_EMPTY; static bool cmdline_init_error_codes_done = FALSE; /* #if 0 v = value; t = translate; ya_result cmdline_tsigkey_translate(output_stream *os, const char *text, const char *section_name) { } CMDLINE(0, "main"); v, 'd', "daemon", "on" , "daemon" /// (on/off) CMDLINE(0, "zone"); v, 0, "nodaemon", "off" , "daemon" /// (on/off) CMDLINE(0, "main"); v, 't', "thread-count, NULL , "thread-count" {0, "key"} {t, "key", 'y', cmdline_tsigkey_translate} daemon || d === on /off; i thread-count || t , "10" #endif */ ya_result cmdline_process_argument(const cmdline_desc_s *desc, const char *section_name, const char *arg) { ya_result return_code; if((desc->flags & CMDLINE_FLAG_ARGUMENTS) && (arg == NULL)) { return CMDLINE_OPT_EXPECTS_ARGUMENT; } ptr_node *node; node = ptr_set_avl_insert(&g_cmdline_sections, (char*)section_name); output_stream *os; if(node->value == NULL) { MALLOC_OR_DIE(output_stream*, os, sizeof(output_stream), GENERIC_TAG); bytearray_output_stream_init(os, NULL, 0); osformatln(os, "<%s>", section_name); node->value = os; } os = (output_stream *)node->value; switch(desc->flags) { case CMDLINE_FLAG_SECTION: return_code = CMDLINE_PROCESSING_SECTION_AS_ARGUMENT; break; case CMDLINE_FLAG_ALIAS: osformatln(os, "%s \"%s\"", desc->target.alias, desc->value); return_code = 0; break; case CMDLINE_FLAG_TRANSLATOR: return_code = desc->target.translator(desc, os, section_name, desc->value); if(return_code >= 0) { return_code = 0; } break; case CMDLINE_FLAG_ALIAS | CMDLINE_FLAG_ARGUMENTS: osformatln(os, "%s \"%s\"", desc->target.alias, arg); return_code = 1; break; case CMDLINE_FLAG_TRANSLATOR | CMDLINE_FLAG_ARGUMENTS: return_code = desc->target.translator(desc, os, section_name, arg); break; default: return_code = CMDLINE_PROCESSING_INVALID_DESCRIPTOR; } return return_code; } ya_result cmdline_get_opt_long(const cmdline_desc_s *table, const char *name, const char *arg) { ya_result return_code = CMDLINE_LONG_OPT_UNDEFINED; int i; bool internal_arg = FALSE; char clean_name[128]; for(i = 0; name[i] != '\0'; i++) { if(name[i] != '=') { clean_name[i] = name[i]; } else { arg = &name[i + 1]; internal_arg = TRUE; break; } } clean_name[i] = '\0'; const char *section_name = ""; for(const cmdline_desc_s *desc = table; desc->name != NULL; desc++) { if (desc->flags == CMDLINE_FLAG_SECTION) { section_name = desc->name; continue; } if(strcmp(clean_name, desc->name) == 0) { if(ISOK(return_code = cmdline_process_argument(desc, section_name, arg))) { if(internal_arg) { return_code = 0; } } break; } } return return_code; } ya_result cmdline_get_opt_short(const cmdline_desc_s *table, const char *name, const char *arg) { ya_result return_code = CMDLINE_SHORT_OPT_UNDEFINED; const char *section_name = ""; while(*name != '\0') { for(const cmdline_desc_s *desc = table; desc->name != NULL; desc++) { if (desc->flags == CMDLINE_FLAG_SECTION) { section_name = desc->name; continue; } if(*name == desc->letter) { if(desc->flags & CMDLINE_FLAG_ARGUMENTS) { if(name[1] != '\0') { arg = &name[1]; } return_code = cmdline_process_argument(desc, section_name, arg); return return_code; } else { return_code = cmdline_process_argument(desc, section_name, arg); break; } } } name++; } return return_code; } ya_result cmdline_parse(const cmdline_desc_s *table, int argc, char **argv, cmdline_filter_callback *filter, void *filter_arg, input_stream *is) { // ensures the IS is unusable if something goes wrong here input_stream_set_void(is); for(int i = 1; i < argc; i++) { char *arg = argv[i]; int arg_len = strlen(arg); ya_result return_code; if((arg[0] == '-') && (arg_len > 1)) { // fetch next val const char *val = NULL; if(i < argc - 1) { val = argv[i + 1]; if(val[0] == '-') { val = NULL; } } // check opt(long/short) or add if(arg[1] != '-') { // short argument if(FAIL(return_code = cmdline_get_opt_short(table, &arg[1], val))) { return return_code; } i += return_code; continue; } else { // long argument if(arg_len > 2) { if(FAIL(return_code = cmdline_get_opt_long(table, &arg[2], val))) { return return_code; } i += return_code; continue; } else // == 2 { // case of "--" // fall outside of the if } } } if(filter != NULL) { return_code = filter(table, arg, filter_arg); switch(return_code) { case CMDLINE_ARG_STOP_PROCESSING_FLAG_OPTIONS: { for(++i;i < argc;i++) { char *arg = argv[i]; if(FAIL(return_code = filter(table, arg, filter_arg))) { break; } } break; } default: break; } if(FAIL(return_code)) { return return_code; } } } /// output_stream complete_config_os; bytearray_output_stream_init(&complete_config_os, NULL, 0); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&g_cmdline_sections, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); output_stream *os = (output_stream *)node->value; const char *section_name = (const char *)node->key; osformatln(os, "", section_name); u32 buffer_size = bytearray_output_stream_size(os); u8 *buffer = bytearray_output_stream_buffer(os); output_stream_write(&complete_config_os, buffer, buffer_size); output_stream_close(os); node->value = NULL; } ptr_set_avl_destroy(&g_cmdline_sections); u32 buffer_size = bytearray_output_stream_size(&complete_config_os); u8 *buffer = bytearray_output_stream_detach(&complete_config_os); output_stream_close(&complete_config_os); bytearray_input_stream_init(buffer, buffer_size, is, TRUE); return buffer_size; } void cmdline_init_error_codes() { if(cmdline_init_error_codes_done) { return; } cmdline_init_error_codes_done = TRUE; error_register(CMDLINE_PROCESSING_SECTION_AS_ARGUMENT, "CMDLINE_PROCESSING_SECTION_AS_ARGUMENT"); error_register(CMDLINE_PROCESSING_INVALID_DESCRIPTOR, "CMDLINE_PROCESSING_INVALID_DESCRIPTOR"); error_register(CMDLINE_LONG_OPT_UNDEFINED, "CMDLINE_LONG_OPT_UNDEFINED"); error_register(CMDLINE_SHORT_OPT_UNDEFINED, "CMDLINE_SHORT_OPT_UNDEFINED"); error_register(CMDLINE_OPT_EXPECTS_ARGUMENT, "CMDLINE_OPT_EXPECTS_ARGUMENT"); } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/message.c0000644000077100007710000000012412650131756021124 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.649344 30 ctime=1454597651.506344534 yadifa-2.1.6-5826/lib/dnscore/src/message.c0000664000077100007710000020320012650131756020726 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnspacket DNS Messages * @ingroup dnscore * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/dnscore-config.h" #include "dnscore/message.h" #include "dnscore/logger.h" #include "dnscore/dnscore.h" #include "dnscore/format.h" #include "dnscore/fingerprint.h" #include "dnscore/packet_reader.h" #include "dnscore/packet_writer.h" #include "dnscore/tsig.h" #include "dnscore/fdtools.h" #include "dnscore/tcp_io_stream.h" #include "dnscore/counter_output_stream.h" #include "dnscore/network.h" #include "dnscore/thread_pool.h" #if HAS_CTRL #include "dnscore/ctrl-rfc.h" #endif /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger #define SA_LOOP 3 #define SA_PRINT 4 /*------------------------------------------------------------------------------ * FUNCTIONS */ u16 edns0_maxsize = EDNS0_MAX_LENGTH; void message_edns0_setmaxsize(u16 maxsize) { edns0_maxsize = maxsize; } u16 message_edns0_getmaxsize() { return edns0_maxsize; } // Handles OPT and TSIG static ya_result message_process_additionals(message_data *mesg, u8* s, u16 ar_count) { /* * @note: I've moved this in the main function (the one calling this one) */ //yassert(ar_count != 0 && ar_count == MESSAGE_AR(mesg->buffer)); u8 *buffer = mesg->buffer; ar_count = ntohs(MESSAGE_AR(buffer)); /* * rfc2845 * * If there is a TSIG then * _ It must be put aside, safely * _ It must be removed from the query * _ It must be processed * * rfc2671 * * Handle OPT * */ /* * Read DNS name (decompression on) * Read type (TSIG = 250) * Read class (ANY) * Read TTL (0) * Read RDLEN * */ u32 query_end = mesg->received; packet_unpack_reader_data purd; purd.packet = buffer; purd.packet_size = mesg->received; if(mesg->ar_start == NULL) { u32 ar_index = ntohs(MESSAGE_AN(buffer)) + ntohs(MESSAGE_NS(buffer)); purd.offset = DNS_HEADER_LENGTH; /* Header */ packet_reader_skip_fqdn(&purd); /* Query DNAME */ purd.offset += 4; /* TYPE CLASS */ while(ar_index > 0) /* Skip all until AR records */ { /* * It should be in this kind of processing that we read the EDNS0 flag */ packet_reader_skip_record(&purd); ar_index--; } query_end = purd.offset; mesg->ar_start = &mesg->buffer[purd.offset]; } else { purd.offset = mesg->ar_start - mesg->buffer; } /* We are now at the start of the ar */ struct type_class_ttl_rdlen tctr; u8 tsigname[MAX_DOMAIN_LENGTH]; #if DNSCORE_HAS_TSIG_SUPPORT u32 record_offset; #endif while(ar_count-- > 0) { #if DNSCORE_HAS_TSIG_SUPPORT record_offset = purd.offset; #endif if(FAIL(packet_reader_read_fqdn(&purd, tsigname, sizeof (tsigname)))) { /* oops */ mesg->status = FP_ERROR_READING_QUERY; return UNPROCESSABLE_MESSAGE; } if(packet_reader_read(&purd, &tctr, 10) == 10 ) { /* * EDNS (0) */ if(tctr.qtype == TYPE_OPT) { /** * Handle EDNS * * @todo 20140523 edf -- improve the EDNS handling * @todo 20140523 edf -- handle extended RCODE (supposed to be 0, but could be set to something else : FORMERR) */ if((tctr.ttl & NU32(0x00ff0000)) == 0) /* ensure version is 0 */ { u32 rdlen = ntohs(tctr.rdlen); #if HAS_NSID_SUPPORT if(rdlen != 0) { u32 next = purd.offset + rdlen; for(u32 remain = rdlen; remain >= 4; remain -= 4) { u32 opt_type_size; packet_reader_read_u32(&purd, &opt_type_size); if(opt_type_size == NU32(0x00030000)) { // nsid mesg->nsid = TRUE; break; } packet_reader_skip(&purd, ntohl(opt_type_size) & 0xffff); } packet_reader_skip(&purd, next - purd.offset); } #else packet_reader_skip(&purd, rdlen); #endif if(tsigname[0] == '\0') { mesg->size_limit = MAX(EDNS0_MIN_LENGTH, ntohs(tctr.qclass)); /* our own limit, taken from the config file */ mesg->edns = TRUE; mesg->rcode_ext = tctr.ttl; log_debug("EDNS: udp-size=%d rcode-ext=%08x desc=%04x", mesg->size_limit, tctr.ttl, rdlen); continue; } } else { mesg->status = FP_EDNS_BAD_VERSION; mesg->size_limit = MAX(EDNS0_MIN_LENGTH, ntohs(tctr.qclass)); mesg->edns = TRUE; mesg->rcode_ext = 0; } log_debug("OPT record is not processable (broken or not supported)"); return UNPROCESSABLE_MESSAGE; } #if DNSCORE_HAS_TSIG_SUPPORT /* * TSIG */ else if(tctr.qtype == TYPE_TSIG) { if(ar_count == 0) { /* * It looks like a TSIG ... */ ya_result return_code; if(message_isquery(mesg)) { if(FAIL(return_code = tsig_process_query(mesg, &purd, record_offset, tsigname, &tctr))) { log_err("%r query error from %{sockaddr}", return_code, &mesg->other.sa); return UNPROCESSABLE_MESSAGE; } } else { tsig_item *key = tsig_get(tsigname); if(key != NULL) { if(FAIL(return_code = tsig_process(mesg, &purd, record_offset, key, &tctr))) { log_err("%r answer error from %{sockaddr}", return_code, &mesg->other.sa); return UNPROCESSABLE_MESSAGE; } } else { log_err("answer error from %{sockaddr}: TSIG when none expected", &mesg->other.sa); mesg->status = FP_TSIG_UNEXPECTED; return INVALID_MESSAGE; } } break; /* we know there is no need to loop anymore */ } else { /* * Error: TSIG is not the last AR record */ #if DEBUG log_debug("TSIG record is not the last AR"); #endif mesg->status = FP_TSIG_IS_NOT_LAST; return UNPROCESSABLE_MESSAGE; } } #endif else { /* Unhandled AR TYPE */ log_debug("Unhandled AR type %{dnstype}", &tctr.qtype); mesg->status = FP_UNEXPECTED_RR_IN_QUERY; return UNPROCESSABLE_MESSAGE; } } } /* While there are AR to process */ mesg->received = query_end; return SUCCESS; } static ya_result message_process_answer_additionals(message_data *mesg, u8* s, u16 ar_count) { /* * @note: I've moved this in the main function (the one calling this one) */ yassert(ar_count != 0 && ar_count == MESSAGE_AR(mesg->buffer)); u8 *buffer = mesg->buffer; ar_count = ntohs(ar_count); /* * rfc2845 * * If there is a TSIG then * _ It must be put aside, safely * _ It must be removed from the query * _ It must be processed * * rfc2671 * * Handle OPT * */ /* * Read DNS name (decompression on) * Read type (TSIG = 250) * Read class (ANY) * Read TTL (0) * Read RDLEN * */ u32 query_end = mesg->received; packet_unpack_reader_data purd; purd.packet = buffer; purd.packet_size = mesg->received; if(mesg->ar_start == NULL) { u32 ar_index = ntohs(MESSAGE_AN(buffer)) + ntohs(MESSAGE_NS(buffer)); purd.offset = DNS_HEADER_LENGTH; /* Header */ packet_reader_skip_fqdn(&purd); /* Query DNAME */ purd.offset += 4; /* TYPE CLASS */ while(ar_index > 0) /* Skip all until AR records */ { /* * It should be in this kind of processing that we read the EDNS0 flag */ packet_reader_skip_record(&purd); ar_index--; } query_end = purd.offset; mesg->ar_start = &mesg->buffer[purd.offset]; } else { purd.offset = mesg->ar_start - mesg->buffer; } /* We are now at the start of the ar */ struct type_class_ttl_rdlen tctr; u8 tsigname[MAX_DOMAIN_LENGTH]; #if DNSCORE_HAS_TSIG_SUPPORT u32 record_offset; #endif while(ar_count-- > 0) { #if DNSCORE_HAS_TSIG_SUPPORT record_offset = purd.offset; #endif if(FAIL(packet_reader_read_fqdn(&purd, tsigname, sizeof (tsigname)))) { /* oops */ mesg->status = FP_ERROR_READING_QUERY; return UNPROCESSABLE_MESSAGE; } if(packet_reader_read(&purd, &tctr, 10) == 10 ) { /* * EDNS (0) */ if(tctr.qtype == TYPE_OPT) { /** * Handle EDNS * * @todo 20140526 edf -- improve the EDNS handling * @todo 20140526 edf -- handle extended RCODE (supposed to be 0, but could be set to something else : FORMERR) */ MESSAGE_SET_AR(mesg->buffer,htons(ntohs(MESSAGE_AR(mesg->buffer)) - 1)); if((tctr.ttl & NU32(0x00ff0000)) == 0) /* ensure version is 0 */ { if(tsigname[0] == '\0') { mesg->size_limit = edns0_maxsize; /* our own limit, taken from the config file */ mesg->edns = TRUE; mesg->rcode_ext = tctr.ttl; log_debug("EDNS: udp-size=%d rcode-ext=%08x desc=%04x", mesg->size_limit, tctr.ttl, ntohs(tctr.rdlen)); continue; } } else { mesg->status = FP_EDNS_BAD_VERSION; mesg->size_limit = edns0_maxsize; mesg->edns = TRUE; mesg->rcode_ext = 0; /* we are after tctr in the packet : rewind by 6 */ /* MESSAGE_FLAGS_OR(buffer, QR_BITS, FP_EDNS_BAD_VERSION & 15); buffer[purd.offset - 6] = (FP_EDNS_BAD_VERSION >> 4); buffer[purd.offset - 5] = 0; */ } log_debug("OPT record is not processable (broken or not supported)"); return UNPROCESSABLE_MESSAGE; } #if DNSCORE_HAS_TSIG_SUPPORT /* * TSIG */ else if(tctr.qtype == TYPE_TSIG) { if(ar_count == 0) { /* * It looks like a TSIG ... */ ya_result return_code; if(message_isquery(mesg)) { if(FAIL(return_code = tsig_process_query(mesg, &purd, record_offset, tsigname, &tctr))) { log_err("%r query error from %{sockaddr}", return_code, &mesg->other.sa); switch(return_code) { case TSIG_BADKEY: case TSIG_BADTIME: case TSIG_BADSIG: /* There is a TSIG and it's bad : NOTAUTH * * The query TSIG has been removed already. * A new TSIG with no-mac one with the return_code set in the error field must be added to the result. */ tsig_append_error(mesg); break; default: /* * discard : FORMERR */ break; } return UNPROCESSABLE_MESSAGE; } } else // not a query (an answer) { u8 old_mac[64]; if(mesg->tsig.tsig != NULL) { if(dnsname_equals(tsigname, mesg->tsig.tsig->name)) { u16 old_mac_size = mesg->tsig.mac_size; memcpy(old_mac, mesg->tsig.mac, old_mac_size); if(FAIL(return_code = tsig_process_answer(mesg, &purd, record_offset, mesg->tsig.tsig, &tctr, old_mac, old_mac_size))) { log_err("%r answer error from %{sockaddr}", return_code, &mesg->other.sa); return UNPROCESSABLE_MESSAGE; } } } else // no tsig { log_err("answer error from %{sockaddr}: TSIG when none expected", &mesg->other.sa); mesg->status = FP_TSIG_UNEXPECTED; return UNPROCESSABLE_MESSAGE; } } break; /* we know there is no need to loop anymore */ } else { /* * Error: TSIG is not the last AR record */ log_debug("TSIG record is not the last AR"); mesg->status = FP_TSIG_IS_NOT_LAST; return UNPROCESSABLE_MESSAGE; } } #endif else { /* Unhandled AR TYPE */ #ifdef DEBUG log_debug("skipping AR type %{dnstype}", &tctr.qtype); #endif purd.offset += ntohs(tctr.rdlen); query_end = purd.offset; } } } /* While there are AR to process */ mesg->received = query_end; return SUCCESS; } /** \brief Processing DNS packet * * @param mesg * * @retval OK * @return status of message is written in mesg->status */ /* Defines a mask and the expected result for the 4 first 16 bits of the header */ #ifdef WORDS_BIGENDIAN #define MESSAGE_HEADER_MASK (( (u64) 0 ) | \ ( ((u64) ( QR_BITS | AA_BITS | RA_BITS | TC_BITS )) << 40 ) | \ ( ((u64) ( RA_BITS | RCODE_BITS )) << 32 ) | \ ( ((u64) 1LL) << 16 )) #define MESSAGE_HEADER_RESULT ( ((u64) 1LL) << 16 ) /* Bind gives "RA" here (seems irrelevant, nonsense, but we need to accept it) */ #define NOTIFY_MESSAGE_HEADER_MASK (( (u64) 0LL ) | \ ( ((u64) ( TC_BITS )) << 40 ) | \ ( ((u64) 1LL) << 16 )) #define NOTIFY_MESSAGE_HEADER_RESULT ( ((u64) 1LL) << 16 ) #else #define MESSAGE_HEADER_MASK (( (u64) 0LL ) | \ ( ((u64) ( QR_BITS | AA_BITS | RA_BITS | TC_BITS )) << 16 ) | \ ( ((u64) ( RA_BITS | RCODE_BITS )) << 24 ) | \ ( ((u64) 1LL) << 40 )) #define MESSAGE_HEADER_RESULT ( ((u64) 1LL) << 40 ) /* Bind gives "RA" here (seems irrelevant, nonsense, but we need to accept it) */ #define NOTIFY_MESSAGE_HEADER_MASK (( (u64) 0LL ) | \ ( ((u64) ( TC_BITS )) << 16 ) | \ ( ((u64) 1LL) << 40 )) #define NOTIFY_MESSAGE_HEADER_RESULT ( ((u64) 1LL) << 40 ) #endif /* EDF: this takes about 150 cycles [144;152] with peaks at 152 */ static inline u8* message_process_copy_fqdn(message_data *mesg) { u8 *src = &mesg->buffer[DNS_HEADER_LENGTH]; u8 *dst = &mesg->qname[0]; u8 *base = dst; u32 len; for(;;) { len = *src++; *dst++ = len; if(len == 0) { break; } if( (len & 0xC0) == 0 ) { const u8 * const limit = dst + len; if(limit - base < MAX_DOMAIN_LENGTH) { do { *dst++ = LOCASE(*src++); /* Works with the dns character set */ } while(dst < limit); } else { mesg->status = FP_NAME_TOO_LARGE; //mesg->send_length = mesg->received; DERROR_MSG("FP_NAME_TOO_LARGE"); return NULL; } } else { /* if((len & 0xC0) == 0xC0) { len &= 0x3f; len <<= 8; len |= *src; src = &mesg->buffer[len]; } else { mesg->status = FP_NAME_FORMAT_ERROR; return NULL; } */ mesg->status = ((len & 0xC0)==0xC0)?FP_QNAME_COMPRESSED:FP_NAME_FORMAT_ERROR; return NULL; } } /* Get qtype & qclass */ mesg->qtype = GET_U16_AT(src[0]); /** @note : NATIVETYPE */ mesg->qclass = GET_U16_AT(src[2]); /** @note : NATIVECLASS */ return src + 4; } ya_result message_process_query(message_data *mesg) { u8 *buffer = mesg->buffer; /** CHECK DNS HEADER */ /** Drop dns packet if query is answer or does not have correct header length */ /* * +5 <=> 1 qd record ar least */ u64 *h64 = (u64*)buffer; u64 m64 = MESSAGE_HEADER_MASK; u64 r64 = MESSAGE_HEADER_RESULT; if( (mesg->received < DNS_HEADER_LENGTH + 5) || (( *h64 & m64) != r64 ) ) { /** Return if QDCOUNT is not 1 * * @note Previous test was actually testing if QDCOUNT was > 1 * I assumed either 0 or >1 is wrong for us so I used the same trick than for QCCOUNT */ if(MESSAGE_QR(buffer)) { mesg->status = FP_QR_BIT_SET; return INVALID_MESSAGE; } MESSAGE_FLAGS_AND(buffer, OPCODE_BITS|RD_BITS, 0); if(NETWORK_ONE_16 != MESSAGE_QD(buffer)) { if(0 == MESSAGE_QD(buffer)) { DERROR_MSG("FP_QDCOUNT_IS_0"); mesg->status = FP_QDCOUNT_IS_0; return INVALID_MESSAGE; /* will be dropped */ } else { DERROR_MSG("FP_QDCOUNT_BIG_1"); mesg->status = FP_QDCOUNT_BIG_1; } } else if(MESSAGE_NS(buffer) != 0) { mesg->status = FP_NSCOUNT_NOT_0; } else { mesg->status = FP_PACKET_DROPPED; } return UNPROCESSABLE_MESSAGE; } /** * @note Past this point, a message could be processable. * It's the right place to reset the message's defaults. * */ mesg->size_limit = UDPPACKET_MAX_LENGTH; mesg->ar_start = NULL; #if DNSCORE_HAS_TSIG_SUPPORT mesg->tsig.tsig = NULL; #endif mesg->rcode_ext = 0; mesg->edns = FALSE; #if HAS_NSID_SUPPORT mesg->nsid = FALSE; #endif u8 *s = message_process_copy_fqdn(mesg); if(s == NULL) { mesg->status = FP_NAME_FORMAT_ERROR; return UNPROCESSABLE_MESSAGE; } /* * Handle the OPT and TSIG records */ { ya_result return_code; u32 nsar_count; if((nsar_count = MESSAGE_NSAR(buffer)) != 0) { if(FAIL(return_code = message_process_additionals(mesg, s, nsar_count))) { mesg->received = s - buffer; return return_code; } } if(mesg->qtype != TYPE_IXFR) { mesg->received = s - buffer; } } /* cut the trash here */ /* At this point the TSIG has been computed and removed */ /* Clear zome bits */ MESSAGE_FLAGS_AND(mesg->buffer, ~(QR_BITS|TC_BITS|AA_BITS), ~(Z_BITS|AD_BITS|CD_BITS|RA_BITS|RCODE_BITS)); //MESSAGE_LOFLAGS(buffer) &= ~(Z_BITS|AD_BITS|CD_BITS|RCODE_BITS); mesg->status = FP_MESG_OK; return OK; } int message_process(message_data *mesg) { u8 *buffer = mesg->buffer; switch(MESSAGE_OP(buffer)) { case OPCODE_QUERY: { /** CHECK DNS HEADER */ /** Drop dns packet if query is answer or does not have correct header length */ /* * +5 <=> 1 qd record ar least */ u64 *h64 = (u64*)buffer; u64 m64 = MESSAGE_HEADER_MASK; u64 r64 = MESSAGE_HEADER_RESULT; if( (mesg->received < DNS_HEADER_LENGTH + 5) || (( *h64 & m64) != r64 ) ) { /** Return if QDCOUNT is not 1 * * @note Previous test was actually testing if QDCOUNT was > 1 * I assumed either 0 or >1 is wrong for us so I used the same trick than for QCCOUNT */ if(MESSAGE_QR(buffer)) { mesg->status = FP_QR_BIT_SET; return INVALID_MESSAGE; } MESSAGE_FLAGS_AND(buffer, OPCODE_BITS|RD_BITS, 0); if(NETWORK_ONE_16 != MESSAGE_QD(buffer)) { if(0 == MESSAGE_QD(buffer)) { DERROR_MSG("FP_QDCOUNT_IS_0"); mesg->status = FP_QDCOUNT_IS_0; return INVALID_MESSAGE; /* will be dropped */ } else { mesg->status = FP_QDCOUNT_BIG_1; DERROR_MSG("FP_QDCOUNT_BIG_1"); } } else if( MESSAGE_NS(buffer) != 0) { mesg->status = FP_NSCOUNT_NOT_0; } else { mesg->status = FP_PACKET_DROPPED; } return UNPROCESSABLE_MESSAGE; } /** * @note Past this point, a message could be processable. * It's the right place to reset the message's defaults. * */ mesg->size_limit = UDPPACKET_MAX_LENGTH; mesg->ar_start = NULL; #if DNSCORE_HAS_TSIG_SUPPORT mesg->tsig.tsig = NULL; #endif mesg->rcode_ext = 0; mesg->edns = FALSE; #if HAS_NSID_SUPPORT mesg->nsid = FALSE; #endif u8 *s = message_process_copy_fqdn(mesg); if(s == NULL) { mesg->status = FP_NAME_FORMAT_ERROR; return UNPROCESSABLE_MESSAGE; } /* * Handle the OPT and TSIG records */ { ya_result return_code; u32 nsar_count; if((nsar_count = MESSAGE_NSAR(buffer)) != 0) { if(FAIL(return_code = message_process_additionals(mesg, s, nsar_count))) { mesg->received = s - buffer; return return_code; } } if(mesg->qtype != TYPE_IXFR) { mesg->received = s - buffer; } } /* At this point the TSIG has been computed and removed */ /* Clear zome bits */ MESSAGE_FLAGS_AND(mesg->buffer, ~(QR_BITS|TC_BITS|AA_BITS), ~(Z_BITS|RA_BITS|AD_BITS|CD_BITS|RCODE_BITS)); mesg->status = FP_MESG_OK; return OK; } case OPCODE_NOTIFY: { MESSAGE_LOFLAGS(buffer) &= ~(Z_BITS|AD_BITS|CD_BITS); /* ------------------------------------------------------------ */ /** CHECK DNS HEADER */ /** Drop dns packet if query is answer or does not have correct header length */ /* * +5 <=> 1 qd record ar least */ u64 *h64 = (u64*)buffer; u64 m64 = NOTIFY_MESSAGE_HEADER_MASK; u64 r64 = NOTIFY_MESSAGE_HEADER_RESULT; /* ... A400 0001 ... */ if( (mesg->received < DNS_HEADER_LENGTH + 5) || (( *h64 & m64) != r64 ) ) { /** Return if QDCOUNT is not 1 * * @note Previous test was actually testing if QDCOUNT was > 1 * I assumed either 0 or >1 is wrong for us so I used the same trick than for QCCOUNT */ MESSAGE_FLAGS_AND(buffer, OPCODE_BITS, 0); if(NETWORK_ONE_16 != MESSAGE_QD(buffer)) { if(0 == MESSAGE_QD(buffer)) { DERROR_MSG("FP_QDCOUNT_IS_0"); mesg->status = FP_QDCOUNT_IS_0; return INVALID_MESSAGE; } else { mesg->status = FP_QDCOUNT_BIG_1; DERROR_MSG("FP_QDCOUNT_BIG_1"); } } else { mesg->status = FP_PACKET_DROPPED; } return UNPROCESSABLE_MESSAGE; } u8 *s = message_process_copy_fqdn(mesg); if(s == NULL) { mesg->status = FP_NAME_FORMAT_ERROR; return UNPROCESSABLE_MESSAGE; } /** * @note Past this point, a message could be processable. * It's the right place to reset the message's defaults. * */ mesg->size_limit = UDPPACKET_MAX_LENGTH; mesg->ar_start = NULL; #if DNSCORE_HAS_TSIG_SUPPORT mesg->tsig.tsig = NULL; #endif mesg->rcode_ext = 0; mesg->edns = FALSE; #if HAS_NSID_SUPPORT mesg->nsid = FALSE; #endif /* * If there is a TSIG, it is here ... */ #if DNSCORE_HAS_TSIG_SUPPORT { ya_result return_code; u16 ar_count; if((ar_count = MESSAGE_AR(buffer)) != 0) { if(FAIL(return_code = message_process_additionals(mesg, s, ar_count))) { return return_code; } } } #endif /* At this point the TSIG has been computed and removed */ // MESSAGE_FLAGS_AND(mesg->buffer, ~(TC_BITS|AA_BITS), ~(RA_BITS|RCODE_BITS)); mesg->status = FP_MESG_OK; return OK; } case OPCODE_UPDATE: { MESSAGE_LOFLAGS(buffer) &= ~(Z_BITS|AD_BITS|CD_BITS|RCODE_BITS); /* ------------------------------------------------------------ */ /** CHECK DNS HEADER */ /** Drop dns packet if query is answer or does not have correct header length */ /* * +5 <=> 1 qd record ar least */ u64 *h64 = (u64*)buffer; u64 m64 = MESSAGE_HEADER_MASK; u64 r64 = MESSAGE_HEADER_RESULT; if( (mesg->received < DNS_HEADER_LENGTH + 5) || (( *h64 & m64) != r64 ) ) { /** Return if QDCOUNT is not 1 * * @note Previous test was actually testing if QDCOUNT was > 1 * I assumed either 0 or >1 is wrong for us so I used the same trick than for QCCOUNT */ if(MESSAGE_QR(buffer)) { mesg->status = FP_QR_BIT_SET; return INVALID_MESSAGE; } MESSAGE_FLAGS_AND(buffer, OPCODE_BITS, 0); if(NETWORK_ONE_16 != MESSAGE_QD(buffer)) { if(0 == MESSAGE_QD(buffer)) { DERROR_MSG("FP_QDCOUNT_IS_0"); mesg->status = FP_QDCOUNT_IS_0; return INVALID_MESSAGE; } else { DERROR_MSG("FP_QDCOUNT_BIG_1"); mesg->status = FP_QDCOUNT_BIG_1; } return UNPROCESSABLE_MESSAGE; } mesg->status = FP_PACKET_DROPPED; return UNPROCESSABLE_MESSAGE; } u8 *s = message_process_copy_fqdn(mesg); if(s == NULL) { mesg->status = FP_NAME_FORMAT_ERROR; return UNPROCESSABLE_MESSAGE; } /** * @note Past this point, a message could be processable. * It's the right place to reset the message's defaults. * */ mesg->size_limit = UDPPACKET_MAX_LENGTH; mesg->ar_start = NULL; #if DNSCORE_HAS_TSIG_SUPPORT mesg->tsig.tsig = NULL; #endif mesg->rcode_ext = 0; mesg->edns = FALSE; #if HAS_NSID_SUPPORT mesg->nsid = FALSE; #endif /* * If there is a TSIG, it is here ... */ #if DNSCORE_HAS_TSIG_SUPPORT { ya_result return_code; u16 ar_count; if((ar_count = MESSAGE_AR(buffer)) != 0) { if(FAIL(return_code = message_process_additionals(mesg, s, ar_count))) { return return_code; } } } #endif /* At this point the TSIG has been computed and removed */ MESSAGE_FLAGS_AND(mesg->buffer, ~(QR_BITS|TC_BITS|AA_BITS), ~(RA_BITS|RCODE_BITS)); mesg->status = FP_MESG_OK; return OK; } #if HAS_CTRL case OPCODE_CTRL: { MESSAGE_LOFLAGS(buffer) &= ~(Z_BITS|AD_BITS|CD_BITS|RCODE_BITS); /* rdtsc_init(&mpb); */ /* ------------------------------------------------------------ */ /** CHECK DNS HEADER */ /** Drop dns packet if query is answer or does not have correct header length */ /* * +5 <=> 1 qd record ar least */ u64 *h64 = (u64*)buffer; u64 m64 = MESSAGE_HEADER_MASK; u64 r64 = MESSAGE_HEADER_RESULT; if( (mesg->received < DNS_HEADER_LENGTH + 5) || (( *h64 & m64) != r64 ) ) { /** Return if QDCOUNT is not 1 * * @note Previous test was actually testing if QDCOUNT was > 1 * I assumed either 0 or >1 is wrong for us so I used the same trick than for QCCOUNT */ if(MESSAGE_QR(buffer)) { mesg->status = FP_QR_BIT_SET; return INVALID_MESSAGE; } MESSAGE_FLAGS_AND(buffer, OPCODE_BITS, 0); if(NETWORK_ONE_16 != MESSAGE_QD(buffer)) { if(0 == MESSAGE_QD(buffer)) { DERROR_MSG("FP_QDCOUNT_IS_0"); mesg->status = FP_QDCOUNT_IS_0; return INVALID_MESSAGE; } else { DERROR_MSG("FP_QDCOUNT_BIG_1"); mesg->status = FP_QDCOUNT_BIG_1; } return UNPROCESSABLE_MESSAGE; } mesg->status = FP_PACKET_DROPPED; return UNPROCESSABLE_MESSAGE; } u8 *s = message_process_copy_fqdn(mesg); if(s == NULL) { mesg->status = FP_NAME_FORMAT_ERROR; return UNPROCESSABLE_MESSAGE; } /** * @note Past this point, a message could be processable. * It's the right place to reset the message's defaults. * */ mesg->size_limit = UDPPACKET_MAX_LENGTH; mesg->ar_start = NULL; #if DNSCORE_HAS_TSIG_SUPPORT mesg->tsig.tsig = NULL; #endif mesg->rcode_ext = 0; mesg->edns = FALSE; #if HAS_NSID_SUPPORT mesg->nsid = FALSE; #endif /* * If there is a TSIG, it is here ... */ #if DNSCORE_HAS_TSIG_SUPPORT { ya_result return_code; u16 ar_count; if((ar_count = MESSAGE_AR(buffer)) != 0) { if(FAIL(return_code = message_process_additionals(mesg, s, ar_count))) { return return_code; } } } #endif /* At this point the TSIG has been computed and removed */ MESSAGE_FLAGS_AND(mesg->buffer, ~(QR_BITS|TC_BITS|AA_BITS), ~(RA_BITS|RCODE_BITS)); mesg->status = FP_MESG_OK; return OK; } #endif // HAS_CTRL default: { u8 hf = MESSAGE_HIFLAGS(buffer); if((hf & QR_BITS) == 0) { MESSAGE_LOFLAGS(buffer) &= ~(Z_BITS|AD_BITS|CD_BITS|RCODE_BITS); MESSAGE_FLAGS_AND(buffer, OPCODE_BITS, 0); mesg->size_limit = UDPPACKET_MAX_LENGTH; mesg->ar_start = NULL; #if DNSCORE_HAS_TSIG_SUPPORT mesg->tsig.tsig = NULL; #endif mesg->rcode_ext = 0; mesg->edns = FALSE; #if HAS_NSID_SUPPORT mesg->nsid = FALSE; #endif mesg->status = FP_NOT_SUPP_OPC; mesg->received = DNS_HEADER_LENGTH; SET_U32_AT(mesg->buffer[4],0); /* aligned to 32 bits, so two 32 bits instead of one 64 */ SET_U32_AT(mesg->buffer[8],0); /* reserved for future use */ return UNPROCESSABLE_MESSAGE; } else { mesg->status = FP_PACKET_DROPPED; return INVALID_MESSAGE; } } } } int message_process_lenient(message_data *mesg) { if(mesg->received < DNS_HEADER_LENGTH) { return UNPROCESSABLE_MESSAGE; } u8 *buffer = mesg->buffer; u8 *s = message_process_copy_fqdn(mesg); if(s == NULL) { return UNPROCESSABLE_MESSAGE; } /** * @note Past this point, a message could be processable. * It's the right place to reset the message's defaults. * */ mesg->size_limit = UDPPACKET_MAX_LENGTH; mesg->ar_start = NULL; mesg->rcode_ext = 0; mesg->edns = FALSE; #if HAS_NSID_SUPPORT mesg->nsid = FALSE; #endif /* * Handle the OPT and TSIG records */ { ya_result return_code; u16 ar_count; if((ar_count = MESSAGE_AR(buffer)) != 0) { if(FAIL(return_code = message_process_answer_additionals(mesg, s, ar_count))) { return return_code; } } #if DNSCORE_HAS_TSIG_SUPPORT else { mesg->tsig.tsig = NULL; /* cut the trash here */ /*mesg->received = s - buffer;*/ } #endif } /* At this point the TSIG has been computed and removed */ mesg->status = FP_MESG_OK; return OK; } void message_transform_to_error(message_data *mesg) { if(!mesg->edns) { MESSAGE_FLAGS_OR(mesg->buffer, QR_BITS, mesg->status); if(mesg->status == RCODE_FORMERR) { SET_U32_AT(mesg->buffer[4],0); /* aligned to 32 bits, so two 32 bits instead of one 64 */ SET_U32_AT(mesg->buffer[8],0); mesg->send_length = DNS_HEADER_LENGTH; } else { mesg->send_length = mesg->received; } } else { /* 00 0029 0200 EE 00 00000000 */ if(mesg->status == RCODE_FORMERR) { SET_U32_AT(mesg->buffer[4],0); /* aligned to 32 bits, so two 32 bits instead of one 64 */ SET_U32_AT(mesg->buffer[8],0); mesg->send_length = DNS_HEADER_LENGTH; } else { mesg->send_length = mesg->ar_start - mesg->buffer; } /* rcode */ //MESSAGE_LOFLAGS(mesg->buffer) &= RCODE_BITS; MESSAGE_HIFLAGS(mesg->buffer) |= QR_BITS; MESSAGE_LOFLAGS(mesg->buffer) |= mesg->status & 15; /* #AR = 1 */ mesg->buffer[DNS_HEADER_LENGTH - 1] = 1; /* AR count was 0, now it is 1 */ /* append opt *//* */ u8 *buffer = &mesg->buffer[mesg->send_length]; buffer[ 0] = 0; buffer[ 1] = 0; buffer[ 2] = 0x29; buffer[ 3] = edns0_maxsize>>8; buffer[ 4] = edns0_maxsize; buffer[ 5] = (mesg->status >> 4); //buffer[ 6] = mesg->rcode_ext >> 24; buffer[ 6] = mesg->rcode_ext >> 16; buffer[ 7] = mesg->rcode_ext >> 8; buffer[ 8] = mesg->rcode_ext; buffer[ 9] = 0; buffer[10] = 0; mesg->send_length += 11; } } void message_make_query(message_data *mesg, u16 id, const u8 *qname, u16 qtype, u16 qclass) { #ifdef WORDS_BIGENDIAN SET_U64_AT(mesg->buffer[0], 0x0000000000010000LL); SET_U32_AT(mesg->buffer[8], 0); #else SET_U64_AT(mesg->buffer[0], 0x0000010000000000LL); SET_U32_AT(mesg->buffer[8], 0); #endif MESSAGE_SET_ID(mesg->buffer, id); ya_result qname_len = dnsname_len(qname); u8 *tc = &mesg->buffer[DNS_HEADER_LENGTH]; memcpy(tc, qname, qname_len); tc += qname_len; SET_U16_AT(tc[0], qtype); tc += 2; SET_U16_AT(tc[0], qclass); tc += 2; #if DNSCORE_HAS_TSIG_SUPPORT mesg->tsig.tsig = NULL; #endif mesg->ar_start = tc; mesg->size_limit = UDPPACKET_MAX_LENGTH; mesg->send_length = tc - &mesg->buffer[0]; mesg->status = FP_MESG_OK; mesg->rcode_ext = 0; } void message_make_query_ex(message_data *mesg, u16 id, const u8 *qname, u16 qtype, u16 qclass, u16 flags) { #ifdef WORDS_BIGENDIAN SET_U64_AT(mesg->buffer[0], 0x0000000000010000LL); SET_U32_AT(mesg->buffer[8], 0); #else SET_U64_AT(mesg->buffer[0], 0x0000010000000000LL); SET_U32_AT(mesg->buffer[8], 0); #endif MESSAGE_SET_ID(mesg->buffer, id); ya_result qname_len = dnsname_len(qname); u8 *tc = &mesg->buffer[DNS_HEADER_LENGTH]; memcpy(tc, qname, qname_len); tc += qname_len; SET_U16_AT(tc[0], qtype); tc += 2; SET_U16_AT(tc[0], qclass); tc += 2; mesg->ar_start = tc; mesg->send_length = tc - &mesg->buffer[0]; mesg->rcode_ext = 0; mesg->status = FP_MESG_OK; #if DNSCORE_HAS_TSIG_SUPPORT mesg->tsig.tsig = NULL; #endif if(flags != 0) { SET_U16_AT(mesg->buffer[10], NETWORK_ONE_16); mesg->rcode_ext |= MESSAGE_EDNS0_DNSSEC; u8 *buffer = &mesg->buffer[mesg->send_length]; buffer[ 0] = 0; buffer[ 1] = 0; // TYPE buffer[ 2] = 0x29; // buffer[ 3] = edns0_maxsize >> 8; // CLASS = SIZE buffer[ 4] = edns0_maxsize; // buffer[ 5] = (mesg->status >> 4); // extended RCODE & FLAGS buffer[ 6] = mesg->rcode_ext >> 16; buffer[ 7] = mesg->rcode_ext >> 8; buffer[ 8] = mesg->rcode_ext; buffer[ 9] = 0; // RDATA descriptor buffer[10] = 0; mesg->send_length += 11; } } void message_make_message(message_data *mesg, u16 id, const u8 *qname, u16 qtype, u16 qclass, packet_writer *uninitialised_packet_writer) { assert(uninitialised_packet_writer != NULL); #ifdef WORDS_BIGENDIAN SET_U64_AT(mesg->buffer[0], 0x0000000000010000LL); SET_U32_AT(mesg->buffer[8], 0); #else SET_U64_AT(mesg->buffer[0], 0x0000010000000000LL); SET_U32_AT(mesg->buffer[8], 0); #endif MESSAGE_SET_ID(mesg->buffer, id); packet_writer_create(uninitialised_packet_writer, mesg->buffer, DNSPACKET_MAX_LENGTH); packet_writer_add_fqdn(uninitialised_packet_writer, qname); packet_writer_add_u16(uninitialised_packet_writer, qtype); packet_writer_add_u16(uninitialised_packet_writer, qclass); #if DNSCORE_HAS_TSIG_SUPPORT mesg->tsig.tsig = NULL; #endif mesg->ar_start = &mesg->buffer[uninitialised_packet_writer->packet_offset]; mesg->send_length = uninitialised_packet_writer->packet_offset; if(mesg->send_length < UDPPACKET_MAX_LENGTH) { mesg->size_limit = UDPPACKET_MAX_LENGTH; } else { mesg->size_limit = DNSPACKET_MAX_LENGTH; } mesg->status = FP_MESG_OK; } void message_make_notify(message_data *mesg, u16 id, const u8 *qname, u16 qtype, u16 qclass) { #ifdef WORDS_BIGENDIAN SET_U64_AT(mesg->buffer[0], 0x0000200000010000LL); SET_U32_AT(mesg->buffer[8], 0); #else SET_U64_AT(mesg->buffer[0], 0x0000010000200000LL); SET_U32_AT(mesg->buffer[8], 0); #endif MESSAGE_SET_ID(mesg->buffer, id); ya_result qname_len = dnsname_len(qname); u8 *tc = &mesg->buffer[DNS_HEADER_LENGTH]; memcpy(tc, qname, qname_len); tc += qname_len; SET_U16_AT(tc[0], qtype); tc += 2; SET_U16_AT(tc[0], qclass); tc += 2; #if DNSCORE_HAS_TSIG_SUPPORT mesg->tsig.tsig = NULL; #endif mesg->size_limit = UDPPACKET_MAX_LENGTH; mesg->ar_start = tc; mesg->send_length = tc - &mesg->buffer[0]; mesg->status = FP_MESG_OK; } void message_make_ixfr_query(message_data *mesg, u16 id, const u8 *qname, u32 soa_ttl, u16 soa_rdata_size, const u8 *soa_rdata) { packet_writer pw; #ifdef WORDS_BIGENDIAN SET_U64_AT(mesg->buffer[0], 0x0000000000010000LL); SET_U32_AT(mesg->buffer[8], 0x00010000); #else SET_U64_AT(mesg->buffer[0], 0x0000010000000000LL); SET_U32_AT(mesg->buffer[8], 0x00000100); #endif MESSAGE_SET_ID(mesg->buffer, id); packet_writer_create(&pw, mesg->buffer, UDPPACKET_MAX_LENGTH); packet_writer_add_fqdn(&pw, qname); packet_writer_add_u16(&pw, TYPE_IXFR); packet_writer_add_u16(&pw, CLASS_IN); packet_writer_add_fqdn(&pw, qname); packet_writer_add_u16(&pw, TYPE_SOA); packet_writer_add_u16(&pw, CLASS_IN); packet_writer_add_u32(&pw, htonl(soa_ttl)); packet_writer_add_rdata(&pw, TYPE_SOA, soa_rdata, soa_rdata_size); #if DNSCORE_HAS_TSIG_SUPPORT mesg->tsig.tsig = NULL; #endif mesg->ar_start = &mesg->buffer[pw.packet_offset]; mesg->size_limit = UDPPACKET_MAX_LENGTH; mesg->send_length = pw.packet_offset; mesg->status = FP_MESG_OK; } #if DNSCORE_HAS_TSIG_SUPPORT ya_result message_sign_answer_by_name(message_data *mesg, const u8 *tsig_name) { const tsig_item *key = tsig_get(tsig_name); return message_sign_answer(mesg, key); } ya_result message_sign_query_by_name(message_data *mesg, const u8 *tsig_name) { const tsig_item *key = tsig_get(tsig_name); return message_sign_query(mesg, key); } ya_result message_sign_answer(message_data *mesg, const tsig_item *key) { if(key != NULL) { ZEROMEMORY(&mesg->tsig, sizeof(message_tsig)); mesg->tsig.tsig = key; mesg->tsig.mac_size = mesg->tsig.tsig->mac_size; u64 now = time(NULL); mesg->tsig.timehi = htons((u16)(now >> 32)); mesg->tsig.timelo = htonl((u32)now); mesg->tsig.fudge = htons(300); /* 5m */ mesg->tsig.mac_algorithm = key->mac_algorithm; mesg->tsig.original_id = GET_U16_AT(mesg->buffer[0]); return tsig_sign_answer(mesg); } return TSIG_BADKEY; } ya_result message_sign_query(message_data *mesg, const tsig_item *key) { if(key != NULL) { ZEROMEMORY(&mesg->tsig, sizeof(message_tsig)); mesg->tsig.tsig = key; mesg->tsig.mac_size = mesg->tsig.tsig->mac_size; u64 now = time(NULL); mesg->tsig.timehi = htons((u16)(now >> 32)); mesg->tsig.timelo = htonl((u32)now); mesg->tsig.fudge = htons(300); /* 5m */ mesg->tsig.mac_algorithm = key->mac_algorithm; mesg->tsig.original_id = GET_U16_AT(mesg->buffer[0]); // mesg->tsig.error = 0; zeromem // mesg->tsig.other_len = 0; zeromem return tsig_sign_query(mesg); } return TSIG_BADKEY; } #endif void message_make_error(message_data *mesg, u16 error_code) { MESSAGE_FLAGS_OR(mesg->buffer, QR_BITS, error_code); #ifdef WORDS_BIGENDIAN SET_U32_AT(mesg->buffer[4], 0x00010000); SET_U32_AT(mesg->buffer[8], 0x00000000); #else SET_U32_AT(mesg->buffer[4], 0x00000100); SET_U32_AT(mesg->buffer[8], 0x00000000); #endif mesg->size_limit = UDPPACKET_MAX_LENGTH; mesg->send_length = DNS_HEADER_LENGTH + 4; mesg->send_length += dnsname_len(&mesg->buffer[DNS_HEADER_LENGTH]); mesg->ar_start = &mesg->buffer[mesg->send_length]; mesg->status = (finger_print)error_code; } void message_make_error_ext(message_data *mesg, u16 error_code) { yassert(FALSE); /// @todo 20140523 edf -- implement error code with OPT } ya_result message_query_tcp(message_data *mesg, host_address *server) { /* connect the server */ ya_result return_value; if(ISOK(return_value = host_address2sockaddr(&mesg->other, server))) { int s; if((s = socket(mesg->other.sa.sa_family, SOCK_STREAM, 0)) >=0) { socklen_t sa_len = return_value; if(connect(s, (struct sockaddr*)&mesg->other, sa_len) == 0) { /// @todo 20140523 edf -- optionally sign the query message_update_tcp_length(mesg); ssize_t n; #if DEBUG log_debug("sending %d bytes to %{sockaddr} (tcp)", mesg->send_length, &mesg->other); log_memdump_ex(g_system_logger, MSG_DEBUG5, mesg->buffer, mesg->send_length, 16, OSPRINT_DUMP_HEXTEXT); #endif if((n = writefully(s, &mesg->buffer_tcp_len[0], mesg->send_length + 2)) == mesg->send_length + 2) { u16 tcp_len; if((n = readfully(s, &tcp_len, 2)) == 2) { tcp_len = ntohs(tcp_len); if(readfully(s, mesg->buffer, tcp_len) == tcp_len) { /* * test the answser * test the TSIG if any */ mesg->received = tcp_len; #if DEBUG log_debug("received %d bytes from %{sockaddr} (tcp)", mesg->received, &mesg->other); log_memdump_ex(g_system_logger, MSG_DEBUG5, mesg->buffer, mesg->received, 16, OSPRINT_DUMP_HEXTEXT); #endif return_value = message_process_lenient(mesg); } } } } else { // Linux quirk ... if(errno != EINPROGRESS) { return_value = ERRNO_ERROR; } else { return_value = MAKE_ERRNO_ERROR(ETIMEDOUT); } } close_ex(s); } else { return_value = ERRNO_ERROR; } } return return_value; } ya_result message_query_tcp_ex(message_data *mesg, host_address *server, message_data *answer) { /* connect the server */ ya_result return_value; if(ISOK(return_value = host_address2sockaddr(&mesg->other, server))) { int s; if((s = socket(mesg->other.sa.sa_family, SOCK_STREAM, 0)) >=0) { socklen_t sa_len = return_value; if(connect(s, (struct sockaddr*)&mesg->other, sa_len) == 0) { /// @todo 20140523 edf -- optionally sign the query message_update_tcp_length(mesg); ssize_t n; #if DEBUG log_debug("sending %d bytes to %{sockaddr} (tcp)", mesg->send_length, &mesg->other); log_memdump_ex(g_system_logger, MSG_DEBUG5, mesg->buffer, mesg->send_length, 16, OSPRINT_DUMP_HEXTEXT); #endif if((n = writefully(s, &mesg->buffer_tcp_len[0], mesg->send_length + 2)) == mesg->send_length + 2) { u16 tcp_len; if((n = readfully(s, &tcp_len, 2)) == 2) { tcp_len = ntohs(tcp_len); if(readfully(s, answer->buffer, tcp_len) == tcp_len) { /* * test the answser * test the TSIG if any */ answer->received = tcp_len; #if DNSCORE_HAS_TSIG_SUPPORT answer->tsig = mesg->tsig; #endif answer->other = mesg->other; #if DEBUG log_debug("received %d bytes from %{sockaddr} (tcp)", answer->received, &answer->other); log_memdump_ex(g_system_logger, MSG_DEBUG5, answer->buffer, answer->received, 16, OSPRINT_DUMP_HEXTEXT); #endif return_value = message_process_lenient(answer); } } } } else { // Linux quirk ... if(errno != EINPROGRESS) { return_value = ERRNO_ERROR; } else { return_value = MAKE_ERRNO_ERROR(ETIMEDOUT); } } close_ex(s); } else { return_value = ERRNO_ERROR; } } return return_value; } ya_result message_query_tcp_with_timeout(message_data *mesg, host_address *address, u8 to_sec) { ya_result return_value; /* ------------------------------------------------------------ */ mesg->buffer_tcp_len[0] = mesg->send_length >> 8; mesg->buffer_tcp_len[1] = mesg->send_length; input_stream is; output_stream os; if(ISOK(return_value = tcp_input_output_stream_connect_host_address(address, &is, &os, to_sec))) { if(ISOK(return_value = output_stream_write(&os, &mesg->buffer_tcp_len[0], mesg->send_length + 2))) { output_stream_flush(&os); int fd = fd_input_stream_get_filedescriptor(&is); tcp_set_sendtimeout(fd, 30, 0); tcp_set_recvtimeout(fd, 30, 0); #ifdef DEBUG memset(mesg->buffer, 0xee, sizeof(mesg->buffer)); #endif u16 len; #ifdef DEBUG len = ~0; #endif if(ISOK(return_value = input_stream_read_nu16(&is, &len))) { if (ISOK(return_value = input_stream_read_fully(&is, mesg->buffer, len))) { mesg->received = return_value; } } } output_stream_close(&os); output_stream_close(&is); } return return_value; } ya_result message_query_udp(message_data *mesg, host_address *server) { ya_result return_code = SUCCESS; int seconds = 0; int useconds = 500000; return_code = message_query_udp_with_time_out(mesg, server, seconds, useconds); return return_code; } #define RESET_ID 1 #define CHANGE_NAME_SERVER 0 #if 1 ya_result message_query_udp_with_time_out_and_retries(message_data *mesg, host_address *server, int seconds, int useconds, u8 retries, u8 flags) { ya_result return_value = SUCCESS; random_ctx rndctx = thread_pool_get_random_ctx(); u16 id; for(u8 countdown = retries; countdown > 0; ) { if (flags & RESET_ID) { id = (u16)random_next(rndctx); MESSAGE_SET_ID(mesg->buffer, id); } else { id = MESSAGE_ID(mesg->buffer); } if(ISOK(return_value = message_query_udp_with_time_out(mesg, server, seconds, useconds))) { if(MESSAGE_ID(mesg->buffer) != id) { return_value = MESSAGE_HAS_WRONG_ID; } else if(!MESSAGE_QR(mesg->buffer)) { return_value = MESSAGE_IS_NOT_AN_ANSWER; } else if(MESSAGE_RCODE(mesg->buffer) != RCODE_NOERROR) { return_value = MAKE_DNSMSG_ERROR(MESSAGE_RCODE(mesg->buffer)); } else { return_value = INVALID_MESSAGE; } break; } if(return_value == MAKE_ERRNO_ERROR(EINTR)) { continue; } if(return_value != MAKE_ERRNO_ERROR(EAGAIN) || countdown <= 0) { /* * Do not retry for any other kind of error */ break; } countdown--; usleep_ex(10000); /* 10 ms */ /* if (flags & CHANGE_NAME_SERVER) { } */ } return return_value; } #endif ya_result message_query_udp_with_time_out(message_data *mesg, host_address *server, int seconds, int useconds) { /* connect the server */ ya_result return_value = SUCCESS; socketaddress sa; /* ------------------------------------------------------------ */ if(ISOK(return_value = host_address2sockaddr(&sa, server))) { int s; if((s = socket(sa.sa.sa_family, SOCK_DGRAM, 0)) >=0) { socklen_t sa_len = return_value; int n; tcp_set_recvtimeout(s, seconds, useconds); /* half a second for UDP is a lot ... */ mesg->received = 0; if((n = sendto(s, mesg->buffer, mesg->send_length, 0, &sa.sa, sa_len)) == mesg->send_length) { socketaddress ans_sa; socklen_t ans_sa_len = sizeof(ans_sa); while((n = recvfrom(s, mesg->buffer, sizeof(mesg->buffer), 0, &ans_sa.sa, &ans_sa_len)) >= 0) { /* check that the sender is the one we spoke to */ #ifdef DEBUG log_memdump_ex(g_system_logger, MSG_DEBUG5, mesg->buffer, n, 16, OSPRINT_DUMP_HEXTEXT); #endif if(sockaddr_equals(&sa.sa, &ans_sa.sa)) { mesg->received = n; return_value = message_process_lenient(mesg); break; } } if(n < 0) { return_value = ERRNO_ERROR; } /* timeout */ } else { return_value = (n < 0)?ERRNO_ERROR:ERROR; } close_ex(s); } else { return_value = ERRNO_ERROR; } } return return_value; } ya_result message_ixfr_query_get_serial(const message_data *mesg, u32 *serial) { packet_unpack_reader_data purd; ya_result return_value; u8 domain_fqdn[MAX_DOMAIN_LENGTH]; u8 soa_fqdn[MAX_DOMAIN_LENGTH]; purd.packet = (u8*)mesg->buffer; purd.packet_size = mesg->received; purd.offset = DNS_HEADER_LENGTH; /* Keep only the query */ if(ISOK(return_value = packet_reader_read_fqdn(&purd, domain_fqdn, sizeof(domain_fqdn)))) { purd.offset += 4; /* Get the queried serial */ if(ISOK(return_value = packet_reader_read_fqdn(&purd, soa_fqdn, sizeof(soa_fqdn)))) { if(dnsname_equals(domain_fqdn, soa_fqdn)) { u16 soa_type; u16 soa_class; u32 soa_ttl; u16 soa_rdata_size; u32 soa_serial; if(ISOK(return_value = packet_reader_read_u16(&purd, &soa_type))) { if(soa_type == TYPE_SOA) { packet_reader_read_u16(&purd, &soa_class); packet_reader_read_u32(&purd, &soa_ttl); packet_reader_read_u16(&purd, &soa_rdata_size); packet_reader_skip_fqdn(&purd); packet_reader_skip_fqdn(&purd); packet_reader_read_u32(&purd, &soa_serial); *serial=ntohl(soa_serial); } } } } } return return_value; } ya_result message_query_serial(const u8 *origin, host_address *server, u32 *serial_out) { /* do an SOA query */ ya_result return_value; random_ctx rndctx = thread_pool_get_random_ctx(); message_data soa_query_mesg; for(u16 countdown = 5; countdown > 0; ) { u16 id = (u16)random_next(rndctx); message_make_query(&soa_query_mesg, id, origin, TYPE_SOA, CLASS_IN); if(ISOK(return_value = message_query_udp(&soa_query_mesg, server))) { u8 *buffer = soa_query_mesg.buffer; if((MESSAGE_ID(buffer) == id) && MESSAGE_QR(buffer) &&(MESSAGE_RCODE(buffer) == RCODE_NOERROR) && (MESSAGE_QD(buffer) == NETWORK_ONE_16)&& ((MESSAGE_AN(buffer) == NETWORK_ONE_16) || (MESSAGE_NS(buffer) == NETWORK_ONE_16))) { packet_unpack_reader_data reader; packet_reader_init(&reader, buffer, soa_query_mesg.received); reader.offset = DNS_HEADER_LENGTH; packet_reader_skip_fqdn(&reader); packet_reader_skip(&reader, 4); u8 tmp[MAX_DOMAIN_LENGTH]; /* read and expect an SOA */ packet_reader_read_fqdn(&reader, tmp, sizeof(tmp)); if(dnsname_equals(tmp, origin)) { struct type_class_ttl_rdlen tctr; if(packet_reader_read(&reader, &tctr, 10) == 10) { if((tctr.qtype == TYPE_SOA) && (tctr.qclass == CLASS_IN)) { if(ISOK(return_value = packet_reader_skip_fqdn(&reader))) { if(ISOK(return_value = packet_reader_skip_fqdn(&reader))) { if(packet_reader_read(&reader, tmp, 4) == 4) { *serial_out = ntohl(GET_U32_AT(tmp[0])); return SUCCESS; } } } } else { return MESSAGE_UNEXPECTED_ANSWER_TYPE_CLASS; } } } return_value = MESSAGE_UNEXPECTED_ANSWER_DOMAIN; } else if(MESSAGE_ID(buffer) != id) { return_value = MESSAGE_HAS_WRONG_ID; } else if(!MESSAGE_QR(buffer)) { return_value = MESSAGE_IS_NOT_AN_ANSWER; } else if(MESSAGE_RCODE(buffer) != RCODE_NOERROR) { return_value = MAKE_DNSMSG_ERROR(MESSAGE_RCODE(buffer)); } else { return_value = INVALID_MESSAGE; } break; } if(return_value == MAKE_ERRNO_ERROR(EINTR)) { continue; } if(return_value != MAKE_ERRNO_ERROR(EAGAIN) || countdown <= 0) { /* * Do not retry for any other kind of error */ break; } countdown--; usleep_ex(10000); /* 10 ms */ } return return_value; } /* * Does not clone the pool. */ message_data* message_dup(message_data *mesg) { message_data *clone = mesg; MALLOC_OR_DIE(message_data*, clone, sizeof(message_data), MESGDATA_TAG); memcpy(clone, mesg, offsetof(message_data,qname)); dnsname_copy(clone->qname, mesg->qname); memcpy(clone->buffer_tcp_len, mesg->buffer_tcp_len, 2 + MAX(mesg->received, mesg->send_length)); return clone; } /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/host_address.c0000644000077100007710000000012412650131756022162 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.775344 30 ctime=1454597651.456344534 yadifa-2.1.6-5826/lib/dnscore/src/host_address.c0000664000077100007710000007217512650131756022003 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscoretools Generic Tools * @ingroup dnscore * @brief host address (list) functions * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnscore/dnscore-config.h" #include "dnscore/dnscore-config.h" #include #include #include #include #include #include #include "dnscore/host_address.h" #include "dnscore/tsig.h" #include "dnscore/zalloc.h" #define ADDRINFO_TAG 0x4f464e4952444441 /*------------------------------------------------------------------------------ * FUNCTIONS */ host_address *host_address_alloc() { host_address *new_address; ZALLOC_OR_DIE(host_address*, new_address, host_address, HOSTADDR_TAG); new_address->version = 0; new_address->next = NULL; #if DNSCORE_HAS_TSIG_SUPPORT new_address->tsig = NULL; #endif return new_address; } /** * Clears the content of a host_address (mostly : deletes the dname if it's * what it contains. * * @param the host address */ void host_address_clear(host_address *address) { if(address->version == HOST_ADDRESS_DNAME) { free(address->ip.dname.dname); } address->version = 0; } /** * Deletes a host addresse * * @param the host address */ void host_address_delete(host_address *address) { if(address->version == HOST_ADDRESS_DNAME) { #ifdef DEBUG memset(address->ip.dname.dname, 0xff, dnsname_len(address->ip.dname.dname)); #endif free(address->ip.dname.dname); } #ifdef DEBUG memset(address, 0xff, sizeof(host_address)); #endif ZFREE(address, host_address); } /** * Deletes a list of host addresses * * @param the first host address in the list */ void host_address_delete_list(host_address *address) { while(address != NULL) { host_address *next = address->next; host_address_delete(address); address = next; } } host_address * host_address_copy(const host_address *address) { host_address clone_head; #ifdef DEBUG memset(&clone_head, 0xff, sizeof(clone_head)); #endif /* no need to set TSIG */ clone_head.next = NULL; clone_head.version = HOST_ADDRESS_NONE; if(address != NULL) { host_address_append_host_address(&clone_head, address); // copy made } return clone_head.next; } host_address * host_address_copy_list(const host_address *address) { host_address clone_head; #ifdef DEBUG memset(&clone_head, 0xff, sizeof(clone_head)); #endif /* no need to set TSIG */ clone_head.next = NULL; clone_head.version = HOST_ADDRESS_NONE; host_address *clone = &clone_head; while(address != NULL) { host_address_append_host_address(clone, address); // copy made clone = clone->next; address = address->next; } return clone_head.next; } u32 host_address_count(const host_address *address) { u32 n = 0; while(address != NULL) { n++; address = address->next; } return n; } ya_result host_address2allocated_sockaddr(struct sockaddr **sap, const host_address *address) { switch(address->version) { case HOST_ADDRESS_IPV4: { struct sockaddr_in *sa_in; MALLOC_OR_DIE(struct sockaddr_in*, sa_in, sizeof(struct sockaddr_in), SOCKADD4_TAG); // no ZALLOC ZEROMEMORY(sa_in, sizeof(struct sockaddr_in)); memcpy(&sa_in->sin_addr.s_addr, address->ip.v4.bytes, 4); //sa_in->sin_addr.s_addr = htonl(sa_in->sin_addr.s_addr); sa_in->sin_port = address->port; sa_in->sin_family = AF_INET; #if HAS_SOCKADDR_IN_SIN_LEN != 0 sa_in->sin_len = sizeof(struct sockaddr_in); #endif *sap = (struct sockaddr*)sa_in; return sizeof(struct sockaddr_in); } case HOST_ADDRESS_IPV6: { struct sockaddr_in6 *sa_in6; MALLOC_OR_DIE(struct sockaddr_in6*, sa_in6, sizeof(struct sockaddr_in6), SOCKADD6_TAG); // no ZALLOC ZEROMEMORY(sa_in6, sizeof(struct sockaddr_in6)); memcpy(&sa_in6->sin6_addr, address->ip.v6.bytes, 16); sa_in6->sin6_port = address->port; sa_in6->sin6_family = AF_INET6; #if HAS_SOCKADDR_IN6_SIN6_LEN != 0 sa_in6->sin6_len = sizeof(struct sockaddr_in6); #endif /* sa_in6->sin6_flowinfo = 0; sa_in6->sin6_scope_id = 0; */ *sap = (struct sockaddr*)sa_in6; return sizeof(struct sockaddr_in6); } default: { return IP_VERSION_NOT_SUPPORTED; /* unsupported ip version */ } } } ya_result host_address2sockaddr(socketaddress *sap, const host_address *address) { switch(address->version) { case HOST_ADDRESS_IPV4: { struct sockaddr_in *sa_in = (struct sockaddr_in*)sap; ZEROMEMORY(sa_in, sizeof(struct sockaddr_in)); memcpy(&sa_in->sin_addr.s_addr, address->ip.v4.bytes, 4); sa_in->sin_port = address->port; sa_in->sin_family = AF_INET; #if HAS_SOCKADDR_IN_SIN_LEN != 0 sa_in->sin_len = sizeof(struct sockaddr_in); #endif return sizeof(struct sockaddr_in); } case HOST_ADDRESS_IPV6: { struct sockaddr_in6 *sa_in6 = (struct sockaddr_in6*)sap; ZEROMEMORY(sa_in6, sizeof(struct sockaddr_in6)); memcpy(&sa_in6->sin6_addr, address->ip.v6.bytes, 16); sa_in6->sin6_port = address->port; sa_in6->sin6_family = AF_INET6; #if HAS_SOCKADDR_IN6_SIN6_LEN != 0 sa_in6->sin6_len = sizeof(struct sockaddr_in6); #endif return sizeof(struct sockaddr_in6); } default: { return IP_VERSION_NOT_SUPPORTED; /* unsupported ip version */ } } } void host_set_default_port_value(host_address *address, u16 port) { /* set the default port on any unset port */ while(address != NULL) { if(address->port == 0) { address->port = port; } address = address->next; } } ya_result host_address2addrinfo(struct addrinfo **addrp, const host_address *address) { struct addrinfo *addr; ya_result return_value; MALLOC_OR_DIE(struct addrinfo*, addr, sizeof(struct addrinfo), ADDRINFO_TAG); // no ZALLOC (yet) addr->ai_flags = AI_PASSIVE; addr->ai_protocol = 0; /* IPPROTO_UDP | IPPROTO_TCP */ addr->ai_socktype = 0; /* SOCK_DGRAM SOCK_STREAM */ addr->ai_canonname = NULL; addr->ai_next = NULL; switch(address->version) { case HOST_ADDRESS_IPV4: { addr->ai_family = AF_INET; break; } case HOST_ADDRESS_IPV6: { addr->ai_family = AF_INET6; break; } default: { free(addr); return IP_VERSION_NOT_SUPPORTED; } } if(ISOK(return_value = host_address2allocated_sockaddr(&addr->ai_addr, address))) { addr->ai_addrlen = return_value; *addrp = addr; } else { free(addr); } return return_value; } ya_result host_address_set_with_sockaddr(host_address *address, const socketaddress *sa) { switch(sa->sa.sa_family) { case AF_INET: { const struct sockaddr_in *sain = (const struct sockaddr_in*)sa; address->version = HOST_ADDRESS_IPV4; address->port = sain->sin_port; address->ip.v4.value = sain->sin_addr.s_addr; return SUCCESS; } case AF_INET6: { const struct sockaddr_in6 *sain6 = (const struct sockaddr_in6*)sa; address->version = HOST_ADDRESS_IPV6; address->port = sain6->sin6_port; memcpy(address->ip.v6.bytes, &sain6->sin6_addr, 16); return SUCCESS; } default: { return IP_VERSION_NOT_SUPPORTED; } } } bool host_address_list_contains_ip(host_address *address_list, const socketaddress *sa) { host_address address; #ifdef DEBUG memset(&address, 0xff, sizeof(address)); #endif /* no need to set NEXT nor TSIG */ if(ISOK(host_address_set_with_sockaddr(&address, sa))) { switch(address.version) { case HOST_ADDRESS_IPV4: { while(address_list != NULL) { if(address_list->version == HOST_ADDRESS_IPV4) { if(address_list->ip.v4.value == address.ip.v4.value) { return TRUE; } } address_list = address_list->next; } break; } case HOST_ADDRESS_IPV6: { while(address_list != NULL) { if(address_list->version == HOST_ADDRESS_IPV6) { if((address_list->ip.v6.lohi[0] == address.ip.v6.lohi[0]) && (address_list->ip.v6.lohi[1] == address.ip.v6.lohi[1])) { return TRUE; } } address_list = address_list->next; } break; } default: { break; } } } return FALSE; } #if DNSCORE_HAS_TSIG_SUPPORT bool host_address_list_contains_ip_tsig(host_address *address_list, const socketaddress *sa, const tsig_item *tsig) { host_address address; #ifdef DEBUG memset(&address, 0xff, sizeof(address)); #endif /* no need to set NEXT nor TSIG */ if(ISOK(host_address_set_with_sockaddr(&address, sa))) { switch(address.version) { case HOST_ADDRESS_IPV4: { while(address_list != NULL) { if(address_list->version == HOST_ADDRESS_IPV4) { if(address_list->ip.v4.value == address.ip.v4.value) { if(address_list->tsig == tsig) { return TRUE; } } } address_list = address_list->next; } break; } case HOST_ADDRESS_IPV6: { while(address_list != NULL) { if(address_list->version == HOST_ADDRESS_IPV6) { if((address_list->ip.v6.lohi[0] == address.ip.v6.lohi[0]) && (address_list->ip.v6.lohi[1] == address.ip.v6.lohi[1])) { if(address_list->tsig == tsig) { return TRUE; } } } address_list = address_list->next; } break; } default: { break; } } } return FALSE; } #endif bool host_address_list_contains_host(host_address *address_list, const host_address *address) { switch(address->version) { case HOST_ADDRESS_IPV4: { while(address_list != NULL) { if(address_list->version == HOST_ADDRESS_IPV4) { if(address_list->ip.v4.value == address->ip.v4.value) { #if DNSCORE_HAS_TSIG_SUPPORT if(address_list->tsig == address->tsig) { return TRUE; } #else return TRUE; #endif } } address_list = address_list->next; } break; } case HOST_ADDRESS_IPV6: { while(address_list != NULL) { if(address_list->version == HOST_ADDRESS_IPV6) { if((address_list->ip.v6.lohi[0] == address->ip.v6.lohi[0]) && (address_list->ip.v6.lohi[1] == address->ip.v6.lohi[1])) { #if DNSCORE_HAS_TSIG_SUPPORT if(address_list->tsig == address->tsig) { return TRUE; } #else return TRUE; #endif } } address_list = address_list->next; } break; } default: { break; } } return FALSE; } void host_address_set_ipv4(host_address *address, const u8 *ipv4, u16 port) { memcpy(address->ip.v4.bytes, ipv4, 4); address->port = port; address->version = HOST_ADDRESS_IPV4; } void host_address_set_ipv6(host_address *address, const u8 *ipv6, u16 port) { memcpy(address->ip.v6.bytes, ipv6, 16); address->port = port; address->version = HOST_ADDRESS_IPV6; } void host_address_set_dname(host_address *address, const u8 *dname, u16 port) { address->ip.dname.dname = dnsname_dup(dname); address->port = port; address->version = HOST_ADDRESS_DNAME; } ya_result host_address_append_ipv4(host_address *address, const u8 *ipv4, u16 port) { for(;;) { if(address->version == HOST_ADDRESS_IPV4) { if(memcmp(address->ip.v4.bytes, ipv4, 4) == 0) { /* dup */ return COLLECTION_DUPLICATE_ENTRY; } } if(address->next == NULL) { break; } address = address->next; } host_address *new_address; ZALLOC_OR_DIE(host_address*, new_address, host_address, HOSTADDR_TAG); new_address->next = NULL; #if DNSCORE_HAS_TSIG_SUPPORT new_address->tsig = NULL; #endif host_address_set_ipv4(new_address, ipv4, port); address->next = new_address; return SUCCESS; } ya_result host_address_append_ipv6(host_address *address, const u8 *ipv6, u16 port) { for(;;) { if(address->version == HOST_ADDRESS_IPV6) { if(memcmp(address->ip.v6.bytes, ipv6, 16) == 0) { /* dup */ return COLLECTION_DUPLICATE_ENTRY; } } if(address->next == NULL) { break; } address = address->next; } host_address *new_address; ZALLOC_OR_DIE(host_address*, new_address, host_address, HOSTADDR_TAG); new_address->next = NULL; #if DNSCORE_HAS_TSIG_SUPPORT new_address->tsig = NULL; #endif host_address_set_ipv6(new_address, ipv6, port); address->next = new_address; return SUCCESS; } ya_result host_address_append_dname(host_address *address, const u8 *dname, u16 port) { int dname_len = dnsname_len(dname); for(;;) { if(address->version == HOST_ADDRESS_DNAME) { if(memcmp(address->ip.dname.dname, dname, dname_len) == 0) { /* dup */ return COLLECTION_DUPLICATE_ENTRY; } } if(address->next == NULL) { break; } address = address->next; } host_address *new_address; ZALLOC_OR_DIE(host_address*, new_address, host_address, HOSTADDR_TAG); new_address->next = NULL; #if DNSCORE_HAS_TSIG_SUPPORT new_address->tsig = NULL; #endif host_address_set_dname(new_address, dname, port); address->next = new_address; return SUCCESS; } ya_result host_address_append_host_address(host_address *address, const host_address *ha) { switch(ha->version) { case HOST_ADDRESS_IPV4: { for(;;) { if(address->version == ha->version) { if(address->ip.v4.value == ha->ip.v4.value) { /* dup */ return COLLECTION_DUPLICATE_ENTRY; } } if(address->next == NULL) { break; } address = address->next; } host_address *new_address; ZALLOC_OR_DIE(host_address*, new_address, host_address, HOSTADDR_TAG); new_address->next = NULL; #if DNSCORE_HAS_TSIG_SUPPORT new_address->tsig = ha->tsig; #endif host_address_set_ipv4(new_address, ha->ip.v4.bytes, ha->port); address->next = new_address; break; } case HOST_ADDRESS_IPV6: { for(;;) { if(address->version == ha->version) { if((address->ip.v6.lohi[0] == ha->ip.v6.lohi[0]) && (address->ip.v6.lohi[1] == ha->ip.v6.lohi[1])) { /* dup */ return COLLECTION_DUPLICATE_ENTRY; } } if(address->next == NULL) { break; } address = address->next; } host_address *new_address; ZALLOC_OR_DIE(host_address*, new_address, host_address, HOSTADDR_TAG); new_address->next = NULL; #if DNSCORE_HAS_TSIG_SUPPORT new_address->tsig = ha->tsig; #endif host_address_set_ipv6(new_address, ha->ip.v6.bytes, ha->port); address->next = new_address; break; } case HOST_ADDRESS_DNAME: { int dname_len = dnsname_len(ha->ip.dname.dname); for(;;) { if(address->version == ha->version) { if(memcmp(address->ip.dname.dname, ha->ip.dname.dname, dname_len) == 0) { /* dup */ return COLLECTION_DUPLICATE_ENTRY; } } if(address->next == NULL) { break; } address = address->next; } host_address *new_address; ZALLOC_OR_DIE(host_address*, new_address, host_address, HOSTADDR_TAG); new_address->next = NULL; #if DNSCORE_HAS_TSIG_SUPPORT new_address->tsig = ha->tsig; #endif host_address_set_dname(new_address, ha->ip.dname.dname, ha->port); address->next = new_address; break; } default: { return IP_VERSION_NOT_SUPPORTED; } } return SUCCESS; } ya_result host_address_append_hostent(host_address *address, struct hostent *he, u16 port) { if(he != NULL) { switch(he->h_addrtype) { case AF_INET: { char **addr = he->h_addr_list; while(*addr != NULL) { host_address_append_ipv4(address, (u8*)addr, port); addr++; } return SUCCESS; } case AF_INET6: { char **addr = he->h_addr_list; while(*addr != NULL) { host_address_append_ipv6(address, (u8*)addr, port); addr++; } return SUCCESS; } default: { break; } } } return UNEXPECTED_NULL_ARGUMENT_ERROR; } bool host_address_equals(const host_address *a, const host_address *b) { if(a->version == b->version && a->port == b->port) { switch(a->version) { case HOST_ADDRESS_IPV4: { return a->ip.v4.value == b->ip.v4.value; } case HOST_ADDRESS_IPV6: { return a->ip.v6.lohi[0] == b->ip.v6.lohi[0] && a->ip.v6.lohi[1] == b->ip.v6.lohi[1]; } case HOST_ADDRESS_DNAME: { return dnsname_equals(a->ip.dname.dname, b->ip.dname.dname); } } } return FALSE; } bool host_address_list_equals(const host_address *a, const host_address *b) { while((a != NULL) && (b != NULL)) { if(a == b) { return TRUE; } if(!host_address_equals(a, b)) { return FALSE; } a = a->next; b = b->next; } return (a == b); } s32 host_address_compare(const host_address *a, const host_address *b) { s32 v = (s32)a->version - (s32)b->version; if(v == 0) { switch(a->version) { case HOST_ADDRESS_IPV4: { s32 d = memcmp(a->ip.v4.bytes, b->ip.v4.bytes, 4); if(d != 0) { return d; } break; } case HOST_ADDRESS_IPV6: { s32 d = memcmp(a->ip.v6.bytes, b->ip.v6.bytes, 16); if(d != 0) { return d; } break; } case HOST_ADDRESS_DNAME: { s32 d = dnsname_compare(a->ip.dname.dname, b->ip.dname.dname); if(d != 0) { return d; } break; } } return (s32)a->port - (s32)b->port; } else { return v; } return FALSE; } bool host_address_match(const host_address *a, const host_address *b) { if(a->version == b->version && ((a->port == b->port) || (b->port == 0) || (a->port == 0)) ) { switch(a->version) { case HOST_ADDRESS_IPV4: { return a->ip.v4.value == b->ip.v4.value; } case HOST_ADDRESS_IPV6: { return a->ip.v6.lohi[0] == b->ip.v6.lohi[0] && a->ip.v6.lohi[1] == b->ip.v6.lohi[1]; } case HOST_ADDRESS_DNAME: { return dnsname_equals(a->ip.dname.dname, b->ip.dname.dname); } } } return FALSE; } /** * Removes the matching host_address from the list * * @param address * @param ha * @return */ host_address * host_address_remove_host_address(host_address **address, host_address *ha_match) { host_address **ha_prev = address; host_address *ha = *ha_prev; while(ha != NULL) { if(host_address_equals(ha, ha_match)) { *ha_prev = ha->next; ha->next = NULL; return ha; } ha_prev = &ha->next; ha = *ha_prev; } return NULL; } bool host_address_update_host_address_list(host_address **dp, host_address *s) { host_address* d = *dp; bool changed = FALSE; // if the first list is empty (NULL) // and the second one is not null // put a copy of the second one in the first one // else // do nothing and it's an error // else // ... if(d == NULL) { if(s != NULL) { d = host_address_copy_list(s); *dp = d; return TRUE; } else { return FALSE; } } // *dp is not NULL // ... // // for each ha in d // not in s -> remove from d // // now d is smaller, test what it still contains // // for each ha in s // not in d -> add to d // for(host_address *ha = d; ha != NULL; ha = ha->next) { if(!host_address_list_contains_host(s, ha)) { // remove from d host_address *removed = host_address_remove_host_address(&d, ha); // release it host_address_delete(removed); // if d was ha, then d is now empty if(d == NULL) { break; } // awful, don't care ha = d; changed = TRUE; } } /// @note host_address_append_host_address checks for duplicate before putting a copy for(host_address *ha = s; ha != NULL; ha = ha->next) { if(ISOK(host_address_append_host_address(d, ha))) // copy made { changed = true; } } // this is not a leak, the head of the list may have changed so this fixes it if(changed) { *dp = d; } return changed; } ya_result host_address_to_str(const host_address *ha, char *str, int len, u8 flags) { char *limit = &str[len]; char *p = str; char port_separator; switch(ha->version) { case HOST_ADDRESS_IPV4: { port_separator = ':'; if(inet_ntop(AF_INET, ha->ip.v4.bytes, p, limit - p) == NULL) { *p = '\0'; return ERRNO_ERROR; } p += strlen(p); break; } case HOST_ADDRESS_IPV6: { port_separator = '#'; if(inet_ntop(AF_INET6, ha->ip.v6.bytes, p, limit - p) == NULL) { *p = '\0'; return ERRNO_ERROR; } p += strlen(p); break; } case HOST_ADDRESS_DNAME: { s32 n; port_separator = ':'; *p = '\0'; if(FAIL(n = snformat(p, len, "%{dnsname}", ha->ip.dname.dname))) { // it failed, and n is the error code return n; } p += n; break; } default: { port_separator = ':'; *p = '\0'; break; } } if((ha->port != 0) && (flags & HOST_ADDRESS_TO_STR_SHOW_PORT_ZERO)) { if(flags & (HOST_ADDRESS_TO_STR_FULLPORT|HOST_ADDRESS_TO_STR_PORT)) { s32 n; if(flags & HOST_ADDRESS_TO_STR_FULLPORT) { n = snformat(p, limit - p, " port %i", ntohs(ha->port)); } else { n = snformat(p, limit - p, "%c%i", port_separator, ntohs(ha->port)); } if(FAIL(n)) { // it failed, and n is the error code return n; } p += n; } } #if DNSCORE_HAS_TSIG_SUPPORT if((ha->tsig != NULL) && (ha->tsig->name != NULL)) { s32 n = 0; if(flags & HOST_ADDRESS_TO_STR_TSIG) { n = snformat(p, limit - p, "*%{dnsname}", ha->tsig->name); } else if(flags & HOST_ADDRESS_TO_STR_FULLTSIG) { n = snformat(p, limit - p, "key %{dnsname}", ha->tsig->name); } if(FAIL(n)) { // it failed, and n is the error code return n; } p += n; } #endif return p - str; } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/dnsformat.c0000644000077100007710000000012412650131756021475 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.794344 30 ctime=1454597651.415344534 yadifa-2.1.6-5826/lib/dnscore/src/dnsformat.c0000664000077100007710000010367412650131756021315 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup format C-string formatting * @ingroup dnscore * @brief * * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include /* Required for BSD */ #include #include #include #include "dnscore/rfc.h" #include "dnscore/ctrl-rfc.h" #include "dnscore/format.h" #include "dnscore/base32hex.h" #include "dnscore/dnsformat.h" #include "dnscore/host_address.h" #include "dnscore/dns_resource_record.h" #define NULL_STRING_SUBSTITUTE (u8*)"(NULL)" #define NULL_STRING_SUBSTITUTE_LEN 6 /*(sizeof(NULL_STRING_SUBSTITUTE)-1)*/ #define PORT_SEPARATOR '#' #define PORT_SEPARATOR_V4 PORT_SEPARATOR #define PORT_SEPARATOR_V6 PORT_SEPARATOR /** digest32h * * @note The digest format is 1 byte of length, n bytes of digest data. */ static void digest32h_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters) { u8 *digest = (u8 *)val; if(digest != NULL) { output_stream_write_base32hex(stream, &digest[1], *digest); } else { format_asciiz("NULL", stream, padding, pad_char, left_justified); } } static const format_handler_descriptor digest32h_format_handler_descriptor ={ "digest32h", 9, digest32h_format_handler_method }; /* dnsname */ static void dnsname_format_handler_method(const void *val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void *reserved_for_method_parameters) { const u8 dot = (u8)'.'; u8 *label = (u8*)val; if(label != NULL) { u8 label_len; FORMAT_BREAK_ON_INVALID(label, 1); label_len = *label; if(label_len > 0) { do { FORMAT_BREAK_ON_INVALID(&label[1], label_len); output_stream_write(stream, ++label, label_len); output_stream_write(stream, &dot, 1); label += label_len; FORMAT_BREAK_ON_INVALID(label, 1); label_len = *label; } while(label_len > 0); } else { output_stream_write(stream, &dot, 1); } } else { output_stream_write(stream, NULL_STRING_SUBSTITUTE, NULL_STRING_SUBSTITUTE_LEN); } } static const format_handler_descriptor dnsname_format_handler_descriptor ={ "dnsname", 7, dnsname_format_handler_method }; /* */ static void dnsnamevector_format_handler_method(const void *val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void *reserved_for_method_parameters) { u8 dot = '.'; dnsname_vector* namevector = (dnsname_vector *)val; if(namevector != NULL) { FORMAT_BREAK_ON_INVALID(namevector, sizeof(dnsname_vector)); s32 top = namevector->size; if(top >= 0) { s32 idx; for(idx = 0; idx <= top; idx++) { u8 *label = namevector->labels[idx]; FORMAT_BREAK_ON_INVALID(label, 1); u8 label_len = *label++; FORMAT_BREAK_ON_INVALID(label, label_len); output_stream_write(stream, label, label_len); output_stream_write(stream, &dot, 1); } } else { output_stream_write(stream, &dot, 1); } } else { output_stream_write(stream, NULL_STRING_SUBSTITUTE, NULL_STRING_SUBSTITUTE_LEN); } } static const format_handler_descriptor dnsnamevector_format_handler_descriptor ={ "dnsnamevector", 13, dnsnamevector_format_handler_method }; /* dnsnamestack */ static void dnsnamestack_format_handler_method(const void *val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void *reserved_for_method_parameters) { u8 dot = '.'; dnsname_stack *namestack = (dnsname_stack *)val; if(namestack != NULL) { s32 top = namestack->size; if(top >= 0) { do { u8 *label = namestack->labels[top]; u8 label_len = *label++; output_stream_write(stream, label, label_len); output_stream_write(stream, &dot, 1); } while(--top >= 0); } else { output_stream_write(stream, &dot, 1); } } else { output_stream_write(stream, NULL_STRING_SUBSTITUTE, NULL_STRING_SUBSTITUTE_LEN); } } static const format_handler_descriptor dnsnamestack_format_handler_descriptor ={ "dnsnamestack", 12, dnsnamestack_format_handler_method }; /* dnslabel */ static void dnslabel_format_handler_method(const void *val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void *reserved_for_method_parameters) { u8 *label = (u8 *)val; if(label != NULL) { u8 label_len = *label++; output_stream_write(stream, label, label_len); } else { output_stream_write(stream, NULL_STRING_SUBSTITUTE, NULL_STRING_SUBSTITUTE_LEN); } } static const format_handler_descriptor dnslabel_format_handler_descriptor ={ "dnslabel", 8, dnslabel_format_handler_method }; /* class */ static void dnsclass_format_handler_method(const void *val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void *reserved_for_method_parameters) { u16 *classp = (u16 *)val; if(classp != NULL) { const char *txt = NULL; s32 len = 0; switch(GET_U16_AT(*classp)) { case CLASS_IN: len = 2; txt = CLASS_IN_NAME; break; case CLASS_HS: len = 2; txt = CLASS_HS_NAME; break; case CLASS_CH: len = 2; txt = CLASS_CH_NAME; break; case CLASS_CTRL: len = 4; txt = CLASS_CTRL_NAME; break; case CLASS_ANY: len = 3; txt = CLASS_ANY_NAME; break; default: output_stream_write(stream, (u8 *)"CLASS", 5); /* rfc 3597 */ format_dec_u64((u64) ntohs(*classp), stream, 0, ' ', TRUE); return; } output_stream_write(stream, (u8 *)txt, len); } else { output_stream_write(stream, NULL_STRING_SUBSTITUTE, NULL_STRING_SUBSTITUTE_LEN); } } static const format_handler_descriptor dnsclass_format_handler_descriptor ={ "dnsclass", 8, dnsclass_format_handler_method }; /* type */ static void dnstype_format_handler_method(const void *val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void *reserved_for_method_parameters) { u16 *typep = (u16 *)val; if(typep != NULL) { const char *txt = NULL; s32 len = 0; switch(GET_U16_AT(*typep)) { case TYPE_A: len = 1; txt = TYPE_A_NAME; break; case TYPE_NS: len = 2; txt = TYPE_NS_NAME; break; case TYPE_MD: len = 2; txt = TYPE_MD_NAME; break; case TYPE_MF: len = 2; txt = TYPE_MF_NAME; break; case TYPE_CNAME: len = 5; txt = TYPE_CNAME_NAME; break; case TYPE_SOA: len = 3; txt = TYPE_SOA_NAME; break; case TYPE_MB: len = 2; txt = TYPE_MB_NAME; break; case TYPE_MG: len = 2; txt = TYPE_MG_NAME; break; case TYPE_MR: len = 2; txt = TYPE_MR_NAME; break; case TYPE_NULL: len = 4; txt = TYPE_NULL_NAME; break; case TYPE_WKS: len = 3; txt = TYPE_WKS_NAME; break; case TYPE_PTR: len = 3; txt = TYPE_PTR_NAME; break; case TYPE_HINFO: len = 5; txt = TYPE_HINFO_NAME; break; case TYPE_MINFO: len = 5; txt = TYPE_MINFO_NAME; break; case TYPE_MX: len = 2; txt = TYPE_MX_NAME; break; case TYPE_TXT: len = 3; txt = TYPE_TXT_NAME; break; case TYPE_RP: len = 2; txt = TYPE_RP_NAME; break; case TYPE_AFSDB: len = 5; txt = TYPE_AFSDB_NAME; break; case TYPE_X25: len = 3; txt = TYPE_X25_NAME; break; case TYPE_ISDN: len = 4; txt = TYPE_ISDN_NAME; break; case TYPE_RT: len = 2; txt = TYPE_RT_NAME; break; case TYPE_NSAP: len = 4; txt = TYPE_NSAP_NAME; break; case TYPE_NSAP_PTR: len = 8; txt = TYPE_NSAP_PTR_NAME; break; case TYPE_SIG: len = 3; txt = TYPE_SIG_NAME; break; case TYPE_KEY: len = 3; txt = TYPE_KEY_NAME; break; case TYPE_PX: len = 2; txt = TYPE_PX_NAME; break; case TYPE_GPOS: len = 4; txt = TYPE_GPOS_NAME; break; case TYPE_AAAA: len = 4; txt = TYPE_AAAA_NAME; break; case TYPE_LOC: len = 3; txt = TYPE_LOC_NAME; break; case TYPE_NXT: len = 3; txt = TYPE_NXT_NAME; break; case TYPE_EID: len = 3; txt = TYPE_EID_NAME; break; case TYPE_NIMLOC: len = 6; txt = TYPE_NIMLOC_NAME; break; case TYPE_SRV: len = 3; txt = TYPE_SRV_NAME; break; case TYPE_ATMA: len = 4; txt = TYPE_ATMA_NAME; break; case TYPE_NAPTR: len = 5; txt = TYPE_NAPTR_NAME; break; case TYPE_KX: len = 2; txt = TYPE_KX_NAME; break; case TYPE_CERT: len = 4; txt = TYPE_CERT_NAME; break; case TYPE_A6: len = 2; txt = TYPE_A6_NAME; break; case TYPE_DNAME: len = 5; txt = TYPE_DNAME_NAME; break; case TYPE_SINK: len = 4; txt = TYPE_SINK_NAME; break; case TYPE_OPT: len = 3; txt = TYPE_OPT_NAME; break; case TYPE_APL: len = 3; txt = TYPE_APL_NAME; break; case TYPE_DS: len = 2; txt = TYPE_DS_NAME; break; case TYPE_SSHFP: len = 5; txt = TYPE_SSHFP_NAME; break; case TYPE_IPSECKEY: len = 8; txt = TYPE_IPSECKEY_NAME; break; case TYPE_RRSIG: len = 5; txt = TYPE_RRSIG_NAME; break; case TYPE_NSEC: len = 4; txt = TYPE_NSEC_NAME; break; case TYPE_DNSKEY: len = 6; txt = TYPE_DNSKEY_NAME; break; case TYPE_DHCID: len = 5; txt = TYPE_DHCID_NAME; break; case TYPE_NSEC3: len = 5; txt = TYPE_NSEC3_NAME; break; case TYPE_NSEC3PARAM: len = 10; txt = TYPE_NSEC3PARAM_NAME; break; case TYPE_TLSA: len = 4; txt = TYPE_TLSA_NAME; break; case TYPE_HIP: len = 3; txt = TYPE_HIP_NAME; break; case TYPE_NINFO: len = 5; txt = TYPE_NINFO_NAME; break; case TYPE_RKEY: len = 4; txt = TYPE_RKEY_NAME; break; case TYPE_TALINK: len = 6; txt = TYPE_TALINK_NAME; break; case TYPE_SPF: len = 3; txt = TYPE_SPF_NAME; break; case TYPE_UINFO: len = 5; txt = TYPE_UINFO_NAME; break; case TYPE_UID: len = 3; txt = TYPE_UID_NAME; break; case TYPE_GID: len = 3; txt = TYPE_GID_NAME; break; case TYPE_UNSPEC: len = 6; txt = TYPE_UNSPEC_NAME; break; case TYPE_NID: len = 3; txt = TYPE_NID_NAME; break; case TYPE_L32: len = 3; txt = TYPE_L32_NAME; break; case TYPE_L64: len = 3; txt = TYPE_L64_NAME; break; case TYPE_LP: len = 2; txt = TYPE_LP_NAME; break; case TYPE_EUI48: len = 5; txt = TYPE_EUI48_NAME; break; case TYPE_EUI64: len = 5; txt = TYPE_EUI64_NAME; break; case TYPE_TKEY: len = 4; txt = TYPE_TKEY_NAME; break; case TYPE_TSIG: len = 4; txt = TYPE_TSIG_NAME; break; case TYPE_IXFR: len = 4; txt = TYPE_IXFR_NAME; break; case TYPE_AXFR: len = 4; txt = TYPE_AXFR_NAME; break; case TYPE_MAILB: len = 5; txt = TYPE_MAILB_NAME; break; case TYPE_MAILA: len = 5; txt = TYPE_MAILA_NAME; break; case TYPE_ANY: len = 3; txt = TYPE_ANY_NAME; break; case TYPE_URI: len = 3; txt = TYPE_URI_NAME; break; case TYPE_CAA: len = 3; txt = TYPE_CAA_NAME; break; case TYPE_TA: len = 2; txt = TYPE_TA_NAME; break; case TYPE_DLV: len = 3; txt = TYPE_DLV_NAME; break; #if HAS_DYNAMIC_PROVISIONING case TYPE_ZONE_TYPE: len = 8; txt = TYPE_ZONE_TYPE_NAME; break; case TYPE_ZONE_FILE: len = 8; txt = TYPE_ZONE_FILE_NAME; break; case TYPE_ZONE_NOTIFY: len = 9; txt = TYPE_ZONE_NOTIFY_NAME; break; case TYPE_ZONE_MASTER: len = 6; txt = TYPE_ZONE_MASTER_NAME; break; case TYPE_ZONE_DNSSEC: len = 6; txt = TYPE_ZONE_DNSSEC_NAME; break; case TYPE_ZONE_SLAVES: len = 6; txt = TYPE_ZONE_SLAVES_NAME; break; case TYPE_SIGINTV: len = 7; txt = TYPE_SIGINTV_NAME; break; case TYPE_SIGREGN: len = 7; txt = TYPE_SIGREGN_NAME; break; case TYPE_SIGJITR: len = 7; txt = TYPE_SIGJITR_NAME; break; case TYPE_NTFRC: len = 5; txt = TYPE_NTFRC_NAME; break; case TYPE_NTFRP: len = 5; txt = TYPE_NTFRP_NAME; break; case TYPE_NTFRPI: len = 6; txt = TYPE_NTFRPI_NAME; break; case TYPE_NTFAUTO: len = 7; txt = TYPE_NTFAUTO_NAME; break; #endif /// @todo 20150219 gve -- HAS_CTRL is the correct if statement and not 1, must be changed before release #if 1 // HAS_CTRL case TYPE_CTRL_SRVCFGRELOAD: len = 9; txt = TYPE_CTRL_SRVCFGRELOAD_NAME; break; case TYPE_CTRL_SRVLOGREOPEN: len = 9; txt = TYPE_CTRL_SRVLOGREOPEN_NAME; break; case TYPE_CTRL_SRVSHUTDOWN: len = 8; txt = TYPE_CTRL_SHUTDOWN_NAME; break; case TYPE_CTRL_SRVQUERYLOG: len = 8; txt = TYPE_CTRL_SRVQUERYLOG_NAME; break; case TYPE_CTRL_ZONECFGRELOAD: len = 13; txt = TYPE_CTRL_ZONECFGRELOAD_NAME; break; case TYPE_CTRL_ZONECFGRELOADALL: len = 16; txt = TYPE_CTRL_ZONECFGRELOADALL_NAME; break; case TYPE_CTRL_ZONEFREEZE: len = 6; txt = TYPE_CTRL_ZONEFREEZE_NAME; break; case TYPE_CTRL_ZONEUNFREEZE: len = 8; txt = TYPE_CTRL_ZONEUNFREEZE_NAME; break; case TYPE_CTRL_ZONERELOAD: len = 6; txt = TYPE_CTRL_ZONERELOAD_NAME; break; case TYPE_CTRL_ZONEFREEZEALL: len = 9; txt = TYPE_CTRL_ZONEFREEZEALL_NAME; break; case TYPE_CTRL_ZONEUNFREEZEALL: len = 11; txt = TYPE_CTRL_ZONEUNFREEZEALL_NAME; break; case TYPE_CTRL_ZONESYNC: len = 4; txt = TYPE_CTRL_ZONESYNC_NAME; break; #endif // 1 HAS_CTRL default: output_stream_write(stream, (u8 *)"TYPE", 4); /* rfc 3597 */ format_dec_u64((u64) ntohs(*typep), stream, 0, ' ', TRUE); return; } output_stream_write(stream, (u8 *)txt, len); } else { output_stream_write(stream, NULL_STRING_SUBSTITUTE, NULL_STRING_SUBSTITUTE_LEN); } } static const format_handler_descriptor dnstype_format_handler_descriptor ={ "dnstype", 7, dnstype_format_handler_method }; static void sockaddr_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void *restrict reserved_for_method_parameters) { char buffer[INET6_ADDRSTRLEN + 1 + 5 + 1]; char *src = buffer; struct sockaddr *sa = (struct sockaddr*)val; switch(sa->sa_family) { case AF_INET: { struct sockaddr_in *ipv4 = (struct sockaddr_in*)sa; if(inet_ntop(ipv4->sin_family, &ipv4->sin_addr, buffer, sizeof (buffer)) != NULL) { int n = strlen(buffer); buffer[n++] = PORT_SEPARATOR_V4; snprintf(&buffer[n],6, "%i", ntohs(ipv4->sin_port)); } else { src = strerror(errno); } break; } case AF_INET6: { struct sockaddr_in6 *ipv6 = (struct sockaddr_in6*)sa; if(inet_ntop(ipv6->sin6_family, &ipv6->sin6_addr, buffer, sizeof (buffer)) != NULL) { int n = strlen(buffer); buffer[n++] = PORT_SEPARATOR_V6; snprintf(&buffer[n],6, "%i", ntohs(ipv6->sin6_port)); } else { src = strerror(errno); } break; } default: { snprintf(buffer, sizeof (buffer), "AF_#%i:?", sa->sa_family); break; } } format_asciiz(src, stream, padding, pad_char, left_justified); } static const format_handler_descriptor sockaddr_format_handler_descriptor ={ "sockaddr", 8, sockaddr_format_handler_method }; static void hostaddr_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void *restrict reserved_for_method_parameters) { char buffer[MAX_DOMAIN_LENGTH + 1 + 5 + 1]; char *src = buffer; if(val != NULL) { host_address *ha = (struct host_address*)val; switch(ha->version) { case HOST_ADDRESS_IPV4: { if(inet_ntop(AF_INET, ha->ip.v4.bytes, buffer, sizeof (buffer)) != NULL) { int n = strlen(buffer); buffer[n++] = PORT_SEPARATOR_V4; snprintf(&buffer[n],6, "%i", ntohs(ha->port)); } else { src = strerror(errno); } break; } case HOST_ADDRESS_IPV6: { if(inet_ntop(AF_INET6, ha->ip.v6.bytes, buffer, sizeof (buffer)) != NULL) { int n = strlen(buffer); buffer[n++] = PORT_SEPARATOR_V6; snprintf(&buffer[n],6, "%i", ntohs(ha->port)); } else { src = strerror(errno); } break; } case HOST_ADDRESS_DNAME: { buffer[0] = '\0'; dnsname_to_cstr(buffer, ha->ip.dname.dname); break; } default: { src = "INVALID"; break; } } } else { src = "NULL"; } format_asciiz(src, stream, padding, pad_char, left_justified); } static const format_handler_descriptor hostaddr_format_handler_descriptor ={ "hostaddr", 8, hostaddr_format_handler_method }; static void hostaddrlist_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void *restrict reserved_for_method_parameters) { char *src; char *p; char *limit; int len; bool allocated = FALSE; char buffer_tmp[1024]; src = buffer_tmp; p = buffer_tmp; len = sizeof(buffer_tmp); limit = &buffer_tmp[len]; if(val != NULL) { host_address *ha = (struct host_address*)val; for(;;) { switch(ha->version) { case HOST_ADDRESS_IPV4: { if(inet_ntop(AF_INET, ha->ip.v4.bytes, p, limit - p) != NULL) { p += strlen(p); if(ha->port != 0) { p += snprintf(p, 12, " port %i", ntohs(ha->port)); } } else { strncpy(src, strerror(errno), limit - src); } break; } case HOST_ADDRESS_IPV6: { if(inet_ntop(AF_INET6, ha->ip.v6.bytes, p, limit - p) != NULL) { p += strlen(p); if(ha->port != 0) { p += snprintf(p, 12, " port %i", ntohs(ha->port)); } } else { strncpy(src, strerror(errno), limit - src); } break; } case HOST_ADDRESS_DNAME: { *p = '\0'; p += dnsname_to_cstr(p, ha->ip.dname.dname); break; } default: { memcpy(p, "INVALID", 8); p += 8; break; } } ha = ha->next; if(ha == NULL) { break; } *p++ = ','; if(limit - p < MAX_DOMAIN_LENGTH + 12 + 1) { char *tmp; len <<= 1; MALLOC_OR_DIE(char*, tmp, len, GENERIC_TAG); memcpy(tmp, src, p - src); if(allocated) { free(src); } allocated = TRUE; p = &tmp[p - src]; src = tmp; limit = &tmp[len]; } } } else { memcpy(src, "NULL", 5); } format_asciiz(src, stream, padding, pad_char, left_justified); if(allocated) { free(src); } } static const format_handler_descriptor hostaddrlist_format_handler_descriptor ={ "hostaddrlist", 12, hostaddrlist_format_handler_method }; static void sockaddrip_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters) { char buffer[INET6_ADDRSTRLEN + 1 + 5 + 1]; char *src = buffer; struct sockaddr *sa = (struct sockaddr*)val; switch(sa->sa_family) { case AF_INET: { struct sockaddr_in *ipv4 = (struct sockaddr_in*)sa; if(inet_ntop(ipv4->sin_family, &ipv4->sin_addr, buffer, sizeof (buffer)) != NULL) { } else { src = strerror(errno); } break; } case AF_INET6: { struct sockaddr_in6 *ipv6 = (struct sockaddr_in6*)sa; if(inet_ntop(ipv6->sin6_family, &ipv6->sin6_addr, buffer, sizeof (buffer)) != NULL) { } else { src = strerror(errno); } break; } default: { snprintf(buffer, sizeof (buffer), "AF_#%i:?", sa->sa_family); break; } } format_asciiz(src, stream, padding, pad_char, left_justified); } static const format_handler_descriptor sockaddrip_format_handler_descriptor ={ "sockaddrip", /* only the IP */ 10, sockaddrip_format_handler_method }; static void rdatadesc_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters) { rdata_desc *desc = (rdata_desc *)val; osprint_rdata(stream, desc->type, desc->rdata, desc->len); } static const format_handler_descriptor rdatadesc_format_handler_descriptor ={ "rdatadesc", 9, rdatadesc_format_handler_method }; static void typerdatadesc_format_handler_method(const void * restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters) { rdata_desc *desc = (rdata_desc*)val; dnstype_format_handler_method(&desc->type, stream, padding, pad_char, left_justified, reserved_for_method_parameters); output_stream_write_u8(stream, (u8)pad_char); osprint_rdata(stream, desc->type, desc->rdata, desc->len); } static const format_handler_descriptor typerdatadesc_format_handler_descriptor = { "typerdatadesc", 13, typerdatadesc_format_handler_method }; static void recordwire_format_handler_method(const void * restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters) { u8 *domain = (u8 *)val; u32 domain_len = dnsname_len(domain); u16 *typeptr = (u16 *)&domain[domain_len]; u16 *classptr = (u16 *)&domain[domain_len + 2]; //u32 ttl = ntohl(GET_U32_AT(domain[domain_len + 4])); u16 rdata_len = ntohs(GET_U16_AT(domain[domain_len + 8])); u8 *rdata = &domain[domain_len + 10]; dnsname_format_handler_method(domain, stream, padding, pad_char, left_justified, reserved_for_method_parameters); output_stream_write_u8(stream, (u8)pad_char); dnsclass_format_handler_method(classptr, stream, padding, pad_char, left_justified, reserved_for_method_parameters); output_stream_write_u8(stream, (u8)pad_char); dnstype_format_handler_method(typeptr, stream, padding, pad_char, left_justified, reserved_for_method_parameters); output_stream_write_u8(stream, (u8)pad_char); osprint_rdata(stream, *typeptr, rdata, rdata_len); } static const format_handler_descriptor recordwire_format_handler_descriptor = { "recordwire", 10, recordwire_format_handler_method }; static void dnsrr_format_handler_method(const void * restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters) { dns_resource_record *rr = (dns_resource_record*)val; if(rr == NULL) { output_stream_write(stream,(const u8*)"*** NULL RESOURCE RECORD ***", 28); return; } dnsname_format_handler_method(rr->name, stream, padding, pad_char, left_justified, reserved_for_method_parameters); output_stream_write_u8(stream, (u8)pad_char); dnstype_format_handler_method(&rr->tctr.qtype, stream, padding, pad_char, left_justified, reserved_for_method_parameters); output_stream_write_u8(stream, (u8)pad_char); if(rr->rdata != NULL) { osprint_rdata(stream, rr->tctr.qtype, rr->rdata, rr->rdata_size); } else { output_stream_write(stream, (const u8*)"*** NULL RDATA ***", 18); } } static const format_handler_descriptor dnsrr_format_handler_descriptor = { "dnsrr", 5, dnsrr_format_handler_method }; static bool dnsformat_class_init_done = FALSE; void dnsformat_class_init() { if(dnsformat_class_init_done) { return; } dnsformat_class_init_done = TRUE; format_class_init(); format_registerclass(&dnsname_format_handler_descriptor); format_registerclass(&dnslabel_format_handler_descriptor); format_registerclass(&dnsclass_format_handler_descriptor); format_registerclass(&dnstype_format_handler_descriptor); format_registerclass(&dnsnamestack_format_handler_descriptor); format_registerclass(&dnsnamevector_format_handler_descriptor); format_registerclass(&digest32h_format_handler_descriptor); format_registerclass(&sockaddr_format_handler_descriptor); format_registerclass(&sockaddrip_format_handler_descriptor); format_registerclass(&hostaddr_format_handler_descriptor); format_registerclass(&hostaddrlist_format_handler_descriptor); format_registerclass(&rdatadesc_format_handler_descriptor); format_registerclass(&typerdatadesc_format_handler_descriptor); format_registerclass(&recordwire_format_handler_descriptor); format_registerclass(&dnsrr_format_handler_descriptor); } /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/config_key.c0000644000077100007710000000012412650131756021615 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.690344 30 ctime=1454597651.363344534 yadifa-2.1.6-5826/lib/dnscore/src/config_key.c0000664000077100007710000001533512650131756021431 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include "dnscore/tsig.h" #include "dnscore/base64.h" #include "dnscore/config_settings.h" struct config_section_key_s { char name[256]; char algorithm[32]; char secret[512]; }; typedef struct config_section_key_s config_section_key_s; #define HMAC_UNKNOWN 0 #define HMAC_MD5 157 #define HMAC_SHA1 161 #define HMAC_SHA224 162 #define HMAC_SHA256 163 #define HMAC_SHA384 164 #define HMAC_SHA512 165 static value_name_table hmac_digest_enum[]= { {HMAC_MD5 , "hmac-md5" }, {HMAC_SHA1 , "hmac-sha1" }, {HMAC_SHA224, "hmac-sha224" }, {HMAC_SHA256, "hmac-sha256" }, {HMAC_SHA384, "hmac-sha384" }, {HMAC_SHA512, "hmac-sha512" }, {0, NULL} }; #define CONFIG_TYPE config_section_key_s CONFIG_BEGIN(config_section_key_desc) CONFIG_STRING_COPY(name, NULL) CONFIG_STRING_COPY(algorithm, NULL) CONFIG_STRING_COPY(secret, NULL) CONFIG_END(config_section_key_desc) #undef CONFIG_TYPE static ya_result config_section_key_init(struct config_section_descriptor_s *csd) { // NOP if(csd->base != NULL) { return INVALID_STATE_ERROR; // base SHOULD be NULL at init } return SUCCESS; } static ya_result config_section_key_start(struct config_section_descriptor_s *csd) { // NOP //config_section_key_s *csk = (config_section_key_s*)csd->base; config_section_key_s *csk; MALLOC_OR_DIE(config_section_key_s*, csk, sizeof(config_section_key_s), GENERIC_TAG); csd->base = csk; csk->name[0] = '\0'; csk->algorithm[0] = '\0'; csk->secret[0] = '\0'; #if CONFIG_SETTINGS_DEBUG formatln("config: section: key: start"); #endif return SUCCESS; } static ya_result config_section_key_stop(struct config_section_descriptor_s *csd) { #if CONFIG_SETTINGS_DEBUG formatln("config: section: key: stop"); #endif // NOP config_section_key_s *csk = (config_section_key_s*)csd->base; if( csk->name[0] == '\0' || csk->algorithm[0] == '\0' || csk->secret[0] == '\0' ) { if(csk->name[0] == '\0' && csk->algorithm[0] == '\0' && csk->secret[0] == '\0' ) { return SUCCESS; // empty key, ignored } else { return CONFIG_KEY_INCOMPLETE_KEY; } } // check if algorithm is supported u32 hmac_digest; anytype table; table._voidp = hmac_digest_enum; if(FAIL(config_set_enum_value(csk->algorithm, &hmac_digest, table))) // dest must be 32 bits { return CONFIG_KEY_UNSUPPORTED_ALGORITHM; } // decode the secret ya_result return_code; u32 secret_len; u32 len = strlen(csk->secret); u8 fqdn[MAX_DOMAIN_LENGTH]; u8 secret_buffer[512]; if(FAIL(return_code = base64_decode(csk->secret, len, secret_buffer))) { return return_code; } secret_len = return_code; if(ISOK(return_code = cstr_to_dnsname_with_check(fqdn, csk->name))) { return_code = tsig_register(fqdn, secret_buffer, secret_len, hmac_digest); } #if CONFIG_SETTINGS_DEBUG formatln("tsig_register(%s,%s,%s) = %r", csk->name, csk->algorithm, csk->secret, return_code); #endif return return_code; } static ya_result config_section_key_postprocess(struct config_section_descriptor_s *csd) { (void)csd; return SUCCESS; } static ya_result config_section_key_finalise(struct config_section_descriptor_s *csd) { if(csd != NULL) { if(csd->base != NULL) { free(csd->base); } free(csd); } return SUCCESS; } static ya_result config_section_key_set_wild(struct config_section_descriptor_s *csd, const char *key, const char *value) { return CONFIG_UNKNOWN_SETTING; } static ya_result config_section_key_print_wild(struct config_section_descriptor_s *csd, output_stream *os, const char *key) { return CONFIG_UNKNOWN_SETTING; } static const config_section_descriptor_vtbl_s config_section_key_descriptor_vtbl = { "key", config_section_key_desc, // no table config_section_key_set_wild, config_section_key_print_wild, config_section_key_init, config_section_key_start, config_section_key_stop, config_section_key_postprocess, config_section_key_finalise }; ya_result config_register_key(const char *null_or_key_name, s32 priority) { //null_or_key_name = "key"; (void)null_or_key_name; config_section_descriptor_s *desc; MALLOC_OR_DIE(config_section_descriptor_s*, desc, sizeof(config_section_descriptor_s), GENERIC_TAG); desc->base = NULL; desc->vtbl = &config_section_key_descriptor_vtbl; ya_result return_code = config_register(desc, priority); if(FAIL(return_code)) { free(desc); } return return_code; // no, there is no leak of desc, it is either put in the collection, either freed } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/osx_clock_gettime.c0000644000077100007710000000012412650131756023202 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.666344 30 ctime=1454597651.660344534 yadifa-2.1.6-5826/lib/dnscore/src/osx_clock_gettime.c0000664000077100007710000000536112650131756023014 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup OSX portability * @ingroup dnscore * @brief * * @{ * *----------------------------------------------------------------------------*/ // CentOS 5.9 requires this to have PTHREAD_MUTEX_RECURSIVE #define _GNU_SOURCE 1 #include "dnscore/dnscore-config.h" #include #include #include #include "dnscore/mutex.h" #if !(defined(_POSIX_TIMERS) && (_POSIX_TIMERS > 0)) && defined(__MACH__) #include #include int clock_gettime(clockid_t clk_id, struct timespec *tp) { (void)clk_id; clock_serv_t cclock; mach_timespec_t mts; host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), cclock); tp->tv_sec = mts.tv_sec; tp->tv_nsec = mts.tv_nsec; return 0; } #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/mutex.c0000644000077100007710000000012412650131756020642 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.721344 30 ctime=1454597651.525344534 yadifa-2.1.6-5826/lib/dnscore/src/mutex.c0000664000077100007710000010051212650131756020446 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading mutexes, ... * @ingroup dnscore * @brief * * @{ * *----------------------------------------------------------------------------*/ // CentOS 5.9 requires this to have PTHREAD_MUTEX_RECURSIVE #define _GNU_SOURCE 1 #include "dnscore/dnscore-config.h" #include #include #include #include "dnscore/mutex.h" #define MODULE_MSG_HANDLE g_system_logger extern logger_handle *g_system_logger; #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #include "dnscore/ptr_set.h" volatile bool mutex_ultraverbose = FALSE; static pthread_mutex_t mutex_locked_set_mtx = PTHREAD_MUTEX_INITIALIZER; static ptr_set mutex_locked_set = PTR_SET_PTR_EMPTY; static pthread_mutex_t group_mutex_locked_set_mtx = PTHREAD_MUTEX_INITIALIZER; static ptr_set group_mutex_locked_set = PTR_SET_PTR_EMPTY; static pthread_mutex_t shared_group_mutex_locked_set_mtx = PTHREAD_MUTEX_INITIALIZER; static ptr_set shared_group_mutex_locked_set = PTR_SET_PTR_EMPTY; #if !DEBUG void mutex_locked_set_add(mutex_t *mtx) { pthread_mutex_lock(&mutex_locked_set_mtx); ptr_node *node = ptr_set_avl_insert(&mutex_locked_set, mtx); node->value = mtx; pthread_mutex_unlock(&mutex_locked_set_mtx); } void mutex_locked_set_del(mutex_t *mtx) { pthread_mutex_lock(&mutex_locked_set_mtx); ptr_set_avl_delete(&mutex_locked_set, mtx); pthread_mutex_unlock(&mutex_locked_set_mtx); } #else void mutex_locked_set_add(mutex_t *mtx) { int err; if((err = pthread_mutex_lock(&mutex_locked_set_mtx)) != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_locked_set_add(%p): pthread_mutex_lock: ", mtx, MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } ptr_node *node = ptr_set_avl_insert(&mutex_locked_set, mtx); node->value = mtx; if((err = pthread_mutex_unlock(&mutex_locked_set_mtx)) != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_locked_set_add(%p): pthread_mutex_unlock: ", mtx, MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } } void mutex_locked_set_del(mutex_t *mtx) { int err; if((err = pthread_mutex_lock(&mutex_locked_set_mtx)) != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_locked_set_del(%p): pthread_mutex_lock: ", mtx, MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } ptr_set_avl_delete(&mutex_locked_set, mtx); if((err = pthread_mutex_unlock(&mutex_locked_set_mtx)) != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_locked_set_del(%p): pthread_mutex_unlock: ", mtx, MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } } #endif void mutex_locked_set_monitor() { u64 now = timeus(); pthread_mutex_lock(&mutex_locked_set_mtx); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&mutex_locked_set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); mutex_t *mtx = (mutex_t*)node->key; u64 ts = mtx->timestamp; stacktrace trace = mtx->trace; pthread_t id = mtx->id; if((ts != 0) && (ts < now)) { u64 dt = now - ts; if(dt > MUTEX_LOCKED_TOO_MUCH_TIME_US) { // locked for 5 seconds ... trouble log_warn("mutex@%p locked for %lluus by %p", mtx, dt, (intptr)id); debug_stacktrace_log(MODULE_MSG_HANDLE, MSG_WARNING, trace); } } } pthread_mutex_unlock(&mutex_locked_set_mtx); } #if !DEBUG void group_mutex_locked_set_add(group_mutex_t *mtx) { pthread_mutex_lock(&group_mutex_locked_set_mtx); ptr_node *node = ptr_set_avl_insert(&group_mutex_locked_set, mtx); node->value = mtx; pthread_mutex_unlock(&group_mutex_locked_set_mtx); } void group_mutex_locked_set_del(group_mutex_t *mtx) { pthread_mutex_lock(&group_mutex_locked_set_mtx); ptr_set_avl_delete(&group_mutex_locked_set, mtx); pthread_mutex_unlock(&group_mutex_locked_set_mtx); } #else void group_mutex_locked_set_add(group_mutex_t *mtx) { int err; if((err = pthread_mutex_lock(&group_mutex_locked_set_mtx)) != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "group_mutex_locked_set_add: pthread_mutex_lock: ", MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } ptr_node *node = ptr_set_avl_insert(&group_mutex_locked_set, mtx); node->value = mtx; if((err = pthread_mutex_unlock(&group_mutex_locked_set_mtx)) != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "group_mutex_locked_set_add: pthread_mutex_unlock: ", MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } } void group_mutex_locked_set_del(group_mutex_t *mtx) { int err; if((err = pthread_mutex_lock(&group_mutex_locked_set_mtx)) != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "group_mutex_locked_set_del: pthread_mutex_lock: ", MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } ptr_set_avl_delete(&group_mutex_locked_set, mtx); if((err = pthread_mutex_unlock(&group_mutex_locked_set_mtx)) != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "group_mutex_locked_set_del: pthread_mutex_unlock: ", MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } } #endif void group_mutex_locked_set_monitor() { u64 now = timeus(); pthread_mutex_lock(&group_mutex_locked_set_mtx); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&group_mutex_locked_set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); group_mutex_t *mtx = (group_mutex_t*)node->key; u8 owner = mtx->owner; u64 ts = mtx->timestamp; stacktrace trace = mtx->trace; pthread_t id = mtx->id; if((ts != 0) && (ts < now)) { u64 dt = now - ts; if(dt > MUTEX_LOCKED_TOO_MUCH_TIME_US) { // locked for 5 seconds ... trouble log_warn("group_mutex@%p locked by %x for %lluus by %p", mtx, owner, dt, (intptr)id); debug_stacktrace_log(MODULE_MSG_HANDLE, MSG_WARNING, trace); } } } pthread_mutex_unlock(&group_mutex_locked_set_mtx); } #if !DEBUG void shared_group_mutex_locked_set_add(shared_group_mutex_t *mtx) { pthread_mutex_lock(&shared_group_mutex_locked_set_mtx); ptr_node *node = ptr_set_avl_insert(&shared_group_mutex_locked_set, mtx); node->value = mtx; pthread_mutex_unlock(&shared_group_mutex_locked_set_mtx); } void shared_group_mutex_locked_set_del(shared_group_mutex_t *mtx) { pthread_mutex_lock(&shared_group_mutex_locked_set_mtx); ptr_set_avl_delete(&shared_group_mutex_locked_set, mtx); pthread_mutex_unlock(&shared_group_mutex_locked_set_mtx); } #else void shared_group_mutex_locked_set_add(shared_group_mutex_t *mtx) { int err; if((err = pthread_mutex_lock(&shared_group_mutex_locked_set_mtx)) != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "shared_group_mutex_locked_set_add: pthread_mutex_lock: ", MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } ptr_node *node = ptr_set_avl_insert(&shared_group_mutex_locked_set, mtx); node->value = mtx; if((err = pthread_mutex_unlock(&shared_group_mutex_locked_set_mtx)) != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "shared_group_mutex_locked_set_add: pthread_mutex_unlock: ", MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } } void shared_group_mutex_locked_set_del(shared_group_mutex_t *mtx) { int err; if((err = pthread_mutex_lock(&shared_group_mutex_locked_set_mtx)) != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "shared_group_mutex_locked_set_del: pthread_mutex_lock: ", MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } ptr_set_avl_delete(&shared_group_mutex_locked_set, mtx); if((err = pthread_mutex_unlock(&shared_group_mutex_locked_set_mtx)) != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "shared_group_mutex_locked_set_del: pthread_mutex_unlock: ", MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } } #endif void shared_group_mutex_locked_set_monitor() { u64 now = timeus(); pthread_mutex_lock(&shared_group_mutex_locked_set_mtx); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&shared_group_mutex_locked_set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); shared_group_mutex_t *mtx = (shared_group_mutex_t*)node->key; u8 owner = mtx->owner; u64 ts = mtx->timestamp; stacktrace trace = mtx->trace; pthread_t id = mtx->id; if((ts != 0) && (ts < now)) { u64 dt = now - ts; if(dt > MUTEX_LOCKED_TOO_MUCH_TIME_US) { // locked for 5 seconds ... trouble log_warn("shared_group_mutex@%p locked by %x for %lluus by %p", mtx, owner, dt, (intptr)id); debug_stacktrace_log(MODULE_MSG_HANDLE, MSG_WARNING, trace); } } } pthread_mutex_unlock(&shared_group_mutex_locked_set_mtx); } #endif /* * Group mutex lock */ void group_mutex_init(group_mutex_t* mtx) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("group_mutex: init mutex@%p", mtx); #endif #endif mutex_init(&mtx->mutex); cond_init(&mtx->cond); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->trace = NULL; mtx->id = 0; mtx->timestamp = 0; #endif mtx->count = 0; mtx->owner = GROUP_MUTEX_NOBODY; } bool group_mutex_islocked(group_mutex_t *mtx) { mutex_lock(&mtx->mutex); bool r = mtx->owner != 0; mutex_unlock(&mtx->mutex); return r; } void group_mutex_lock(group_mutex_t *mtx, u8 owner) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("group_mutex: locking mutex@%p for %x", mtx, owner); #endif s64 start = timeus(); pthread_t tid = pthread_self(); if(tid == mtx->id) { logger_handle_msg(g_system_logger,MSG_ERR, "group_mutex_lock(%p): double lock from the same thread on a non-recursive mutex", mtx); debug_log_stacktrace(g_system_logger, MSG_ERR, "group_mutex_lock"); logger_handle_msg(g_system_logger,MSG_ERR, "group_mutex_lock(%p): already locked by", mtx); debug_stacktrace_log(g_system_logger, MSG_ERR, mtx->trace); logger_flush(); abort(); } #endif mutex_lock(&mtx->mutex); for(;;) { /* A simple way to ensure that a lock can be shared by similar entities or not. Sharable entities have their msb off. */ u8 co = mtx->owner & 0x7f; if(co == GROUP_MUTEX_NOBODY || co == owner) { yassert(mtx->count != MAX_S32); mtx->owner = owner & 0x7f; mtx->count++; break; } #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT s64 now = timeus(); s64 d = now - start; pthread_t culprit = mtx->id; stacktrace trace = mtx->trace; s64 ts = mtx->timestamp; if(d > MUTEX_WAITED_TOO_MUCH_TIME_US) { log_warn("group_mutex(%p): waited for %llius already ...", mtx, d); debug_log_stacktrace(MODULE_MSG_HANDLE, MSG_WARNING, "group_mutex"); if(culprit != 0) { if(trace != NULL && ts != 0) { log_warn("group_mutex(%p): the mutex has been locked for %llius already by %p", mtx, now - ts, culprit); debug_stacktrace_log(g_system_logger, MSG_WARNING, trace); } else { log_warn("shared_group_mutex(%p): the mutex was locked by %p", mtx, now - ts, culprit); } } } cond_timedwait(&mtx->cond, &mtx->mutex, MUTEX_WAITED_TOO_MUCH_TIME_US); #else cond_wait(&mtx->cond, &mtx->mutex); #endif } mutex_unlock(&mtx->mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->trace = debug_stacktrace_get(); mtx->id = tid; mtx->timestamp = timeus(); group_mutex_locked_set_add(mtx); #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("group_mutex: locked mutex@%p for %x", mtx, owner); #endif #endif } bool group_mutex_trylock(group_mutex_t *mtx, u8 owner) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("group_mutex: trying to lock mutex@%p for %x", mtx, owner); #endif #endif mutex_lock(&mtx->mutex); u8 co = mtx->owner & 0x7f; if(co == GROUP_MUTEX_NOBODY || co == owner) { yassert(mtx->count != MAX_S32); mtx->owner = owner & 0x7f; mtx->count++; mutex_unlock(&mtx->mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->trace = debug_stacktrace_get(); mtx->id = pthread_self(); mtx->timestamp = timeus(); group_mutex_locked_set_add(mtx); #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("group_mutex: locked mutex@%p for %x", mtx, owner); #endif #endif return TRUE; } else { mutex_unlock(&mtx->mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("group_mutex: failed to lock mutex@%p for %x", mtx, owner); #endif #endif return FALSE; } } void group_mutex_unlock(group_mutex_t *mtx, u8 owner) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("group_mutex: unlocking mutex@%p for %x (owned by %x)", mtx, owner, mtx->owner); #endif #endif mutex_lock(&mtx->mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT if((mtx->owner != (owner & 0x7f)) || (mtx->count == 0)) { if(mtx->count > 0) { s64 now = timeus(); log_err("group_mutex(%p): the mutex has been locked by %p/%x for %llius (count = %i) but is being unlocked by %p/%i", mtx, mtx->id, mtx->owner, now - mtx->timestamp, mtx->count, pthread_self(), owner); } else { log_err("group_mutex(%p): the mutex is not locked but is being unlocked by %p/%x", mtx, pthread_self(), owner); } debug_log_stacktrace(g_system_logger, MSG_ERR, "group_mutex_unlock"); abort(); } #else yassert(mtx->owner == (owner & 0x7f)); yassert(mtx->count != 0); #endif mtx->count--; if(mtx->count == 0) { mtx->owner = GROUP_MUTEX_NOBODY; // wake up all the ones that were waiting for a clean ownership cond_notify(&mtx->cond); } #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->trace = NULL; mtx->id = 0; mtx->timestamp = 0; group_mutex_locked_set_del(mtx); #endif mutex_unlock(&mtx->mutex); } bool group_mutex_transferlock(group_mutex_t *mtx, u8 owner, u8 newowner) { bool r; #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("group_mutex: transferring ownership of mutex@%p from %x to %x (owned by %x)", mtx, owner, newowner, mtx->owner); #endif #endif mutex_lock(&mtx->mutex); u8 co = mtx->owner & 0x7f; if((r = (co == owner))) { mtx->owner = newowner; } mutex_unlock(&mtx->mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->trace = debug_stacktrace_get(); mtx->id = pthread_self(); mtx->timestamp = timeus(); #endif return r; } void group_mutex_destroy(group_mutex_t* mtx) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("group_mutex: destroy mutex@%p", mtx); #endif #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mutex_lock(&mtx->mutex); bool locked = (mtx->count > 0); mutex_unlock(&mtx->mutex); if(locked) { s64 now = timeus(); log_err("group_mutex(%p): the mutex is locked by %p/%x for %llius (count = %i) but is being destroyed by %p", mtx, mtx->id, mtx->owner, now - mtx->timestamp, mtx->count, pthread_self()); debug_log_stacktrace(g_system_logger, MSG_ERR, "group_mutex_destroy"); } #else yassert(mtx->count == 0); #endif group_mutex_lock(mtx, GROUP_MUTEX_DESTROY); group_mutex_unlock(mtx, GROUP_MUTEX_DESTROY); cond_notify(&mtx->cond); cond_finalize(&mtx->cond); mutex_destroy(&mtx->mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->trace = (stacktrace)~0; mtx->id = (pthread_t)~0; mtx->timestamp = ~0; #endif } void mutex_init_recursive(mutex_t *mtx) { int err; ZEROMEMORY(mtx, sizeof(mutex_t)); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->recursive = TRUE; mtx->_MTXs[0] = 'M'; mtx->_MTXs[1] = 'T'; mtx->_MTXs[2] = 'X'; mtx->_MTXs[3] = sizeof(mutex_t); #endif pthread_mutexattr_t mta; err = pthread_mutexattr_init(&mta); if(err != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_init_recursive: attr %r", MAKE_ERRNO_ERROR(err)); } err = pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_RECURSIVE); if(err != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_init_recursive: set %r", MAKE_ERRNO_ERROR(err)); } #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT err = pthread_mutex_init(&mtx->mtx, &mta); #else err = pthread_mutex_init(mtx, &mta); #endif if(err != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_init_recursive: %r", MAKE_ERRNO_ERROR(err)); } #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT if(mutex_ultraverbose) { logger_handle_msg(g_system_logger,MSG_DEBUG7, "mutex_init(%p)", mtx); } #endif } void mutex_init(mutex_t *mtx) { #if !DNSCORE_HAS_MUTEX_DEBUG_SUPPORT int err = pthread_mutex_init(mtx, NULL); if(err != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_init: %r", MAKE_ERRNO_ERROR(err)); } #else int err; ZEROMEMORY(mtx, sizeof(mutex_t)); mtx->recursive = FALSE; mtx->_MTXs[0] = 'M'; mtx->_MTXs[1] = 'T'; mtx->_MTXs[2] = 'X'; mtx->_MTXs[3] = sizeof(mutex_t); pthread_mutexattr_t mta; err = pthread_mutexattr_init(&mta); if(err != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_init (errorcheck): attr %r", MAKE_ERRNO_ERROR(err)); } err = pthread_mutexattr_settype(&mta, PTHREAD_MUTEX_ERRORCHECK); if(err != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_init (errorcheck): set %r", MAKE_ERRNO_ERROR(err)); } err = pthread_mutex_init(&mtx->mtx, &mta); if(err != 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_init (errorcheck): %r", MAKE_ERRNO_ERROR(err)); } if(mutex_ultraverbose) { logger_handle_msg(g_system_logger,MSG_DEBUG7, "mutex_init(%p)", mtx); } #endif } #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT void mutex_lock(mutex_t *mtx) { if(mutex_ultraverbose) { logger_handle_msg(g_system_logger,MSG_DEBUG7, "mutex_lock(%p)", mtx); } pthread_t tid = pthread_self(); if(tid == mtx->id && !mtx->recursive) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_lock(%p): double lock from the same thread on a non-recursive mutex", mtx); debug_log_stacktrace(g_system_logger, MSG_ERR, "mutex_lock"); logger_handle_msg(g_system_logger,MSG_ERR, "mutex_lock(%p): already locked by", mtx); debug_stacktrace_log(g_system_logger, MSG_ERR, mtx->trace); logger_flush(); abort(); } s64 start = timeus(); for(;;) { s64 timeout = timeus() + MUTEX_WAITED_TOO_MUCH_TIME_US; struct timespec lts; int err; lts.tv_sec = timeout / 1000000; lts.tv_nsec = (timeout % 1000000) * 1000; if((err = pthread_mutex_timedlock(&mtx->mtx, <s)) == 0) { break; } if(err == ETIMEDOUT) { s64 now = timeus(); s64 d = now - start; pthread_t culprit = mtx->id; stacktrace trace = mtx->trace; s64 ts = mtx->timestamp; log_warn("mutex_lock(%p): waited for %llius already ...", mtx, d); debug_log_stacktrace(g_system_logger, MSG_WARNING, "mutex"); if(culprit != 0) { if(trace != NULL && ts != 0) { log_warn("mutex_lock(%p): the mutex has been locked for %llius already by %p", mtx, now - ts, culprit); debug_stacktrace_log(g_system_logger, MSG_WARNING, trace); } else { log_warn("mutex_lock(%p): the mutex was locked by %p", mtx, now - ts, culprit); } } continue; } logger_handle_msg(g_system_logger,MSG_ERR, "mutex_lock(%p): %r", mtx, MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } mtx->trace = debug_stacktrace_get(); mtx->id = tid; mtx->timestamp = timeus(); mutex_locked_set_add(mtx); if(mutex_ultraverbose) { logger_handle_msg(g_system_logger,MSG_DEBUG7, "mutex_lock(%p): locked", mtx); } } #endif void mutex_destroy(mutex_t *mtx) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT int ebusy_count = 0; if(mutex_ultraverbose) { logger_handle_msg(g_system_logger,MSG_DEBUG7, "mutex_destroy(%p)", mtx); } #endif for(;;) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT int err = pthread_mutex_destroy(&mtx->mtx); mtx->trace = (stacktrace)~0; mtx->id = (pthread_t)~0; mtx->timestamp = ~0; mtx->_MTXs[0]='m'; #else int err = pthread_mutex_destroy(mtx); #endif switch(err) { case 0: { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT if(ebusy_count > 0) { logger_handle_msg(g_system_logger,MSG_DEBUG7, "mutex_destroy: EBUSY #%i", ebusy_count); } #endif return; } case EBUSY: { usleep(1000); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT ebusy_count++; if((ebusy_count & 0xfffff) == 0) { debug_stacktrace_log(g_system_logger, MSG_DEBUG7, mtx->trace); } if((ebusy_count & 0xfff) == 0) { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_destroy: EBUSY #%i", ebusy_count); } #endif break; } default: { logger_handle_msg(g_system_logger,MSG_ERR, "mutex_destroy: %r", MAKE_ERRNO_ERROR(err)); logger_flush(); abort(); } } } } /////////////////////////////////////////////////////////////////////////////// /* * Group mutex lock */ void shared_group_shared_mutex_init(shared_group_shared_mutex_t* smtx) { mutex_init(&smtx->mutex); cond_init(&smtx->cond); smtx->rc = 0; } void shared_group_shared_mutex_init_recursive(shared_group_shared_mutex_t* smtx) { mutex_init_recursive(&smtx->mutex); cond_init(&smtx->cond); smtx->rc = 0; } void shared_group_shared_mutex_destroy(shared_group_shared_mutex_t* smtx) { yassert(smtx->rc == 0); cond_finalize(&smtx->cond); mutex_destroy(&smtx->mutex); } void shared_group_mutex_init(shared_group_mutex_t* mtx, shared_group_shared_mutex_t* smtx, const char *name) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("shared_group_mutex: init mutex@%p+%p '%s'", mtx, smtx, name); #endif #endif mutex_lock(&smtx->mutex); smtx->rc++; mutex_unlock(&smtx->mutex); mtx->shared_mutex = smtx; #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->trace = NULL; mtx->id = 0; mtx->timestamp = 0; #endif mtx->count = 0; mtx->owner = GROUP_MUTEX_NOBODY; } bool shared_group_mutex_islocked(shared_group_mutex_t *mtx) { mutex_lock(&mtx->shared_mutex->mutex); bool r = mtx->owner != 0; mutex_unlock(&mtx->shared_mutex->mutex); return r; } bool shared_group_mutex_islocked_by(shared_group_mutex_t *mtx, u8 owner) { mutex_lock(&mtx->shared_mutex->mutex); bool r = mtx->owner == (owner & 0x7f); mutex_unlock(&mtx->shared_mutex->mutex); return r; } void shared_group_mutex_lock(shared_group_mutex_t *mtx, u8 owner) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("shared_group_mutex: locking mutex@%p for %x", mtx, owner); #endif s64 start = timeus(); #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT pthread_t tid = pthread_self(); bool add; if(tid == mtx->id) { logger_handle_msg(g_system_logger,MSG_ERR, "shared_group_mutex(%p): double lock from the same thread on a non-recursive mutex", mtx); debug_log_stacktrace(g_system_logger, MSG_ERR, "shared_group_mutex"); logger_handle_msg(g_system_logger,MSG_ERR, "shared_group_mutex(%p): already locked by", mtx); debug_stacktrace_log(g_system_logger, MSG_ERR, mtx->trace); logger_flush(); abort(); } #endif mutex_lock(&mtx->shared_mutex->mutex); for(;;) { /* A simple way to ensure that a lock can be shared by similar entities or not. Sharable entities have their msb off. */ u8 co = mtx->owner & 0x7f; if(co == GROUP_MUTEX_NOBODY || co == owner) { yassert(mtx->count != MAX_S32); mtx->owner = owner & 0x7f; #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT add = mtx->count == 0; #endif mtx->count++; break; } #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT s64 now = timeus(); s64 d = now - start; pthread_t culprit = mtx->id; stacktrace trace = mtx->trace; s64 ts = mtx->timestamp; if(d > MUTEX_WAITED_TOO_MUCH_TIME_US) { log_warn("shared_group_mutex(%p): waited for %llius already ...", mtx, d); debug_log_stacktrace(MODULE_MSG_HANDLE, MSG_WARNING, "shared_group_mutex"); if(culprit != 0) { if(trace != NULL && ts != 0) { log_warn("shared_group_mutex(%p): the mutex has been locked for %llius already by %p", mtx, now - ts, culprit); debug_stacktrace_log(g_system_logger, MSG_WARNING, trace); } else { log_warn("shared_group_mutex(%p): the mutex was locked by %p", mtx, now - ts, culprit); } } } cond_timedwait(&mtx->shared_mutex->cond, &mtx->shared_mutex->mutex, MUTEX_WAITED_TOO_MUCH_TIME_US); #else cond_wait(&mtx->shared_mutex->cond, &mtx->shared_mutex->mutex); #endif } mutex_unlock(&mtx->shared_mutex->mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->trace = debug_stacktrace_get(); mtx->id = tid; mtx->timestamp = timeus(); if(add) { shared_group_mutex_locked_set_add(mtx); } #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("shared_group_mutex: locked mutex@%p for %x", mtx, owner); #endif #endif } bool shared_group_mutex_trylock(shared_group_mutex_t *mtx, u8 owner) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("shared_group_mutex: trying to lock mutex@%p for %x", mtx, owner); #endif #endif mutex_lock(&mtx->shared_mutex->mutex); u8 co = mtx->owner & 0x7f; if(co == GROUP_MUTEX_NOBODY || co == owner) { yassert(mtx->count != MAX_S32); mtx->owner = owner & 0x7f; #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT bool add = mtx->count == 0; #endif mtx->count++; mutex_unlock(&mtx->shared_mutex->mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("shared_group_mutex: locked mutex@%p for %x", mtx, owner); #endif #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->trace = debug_stacktrace_get(); mtx->id = pthread_self(); mtx->timestamp = timeus(); if(add) { shared_group_mutex_locked_set_add(mtx); } #endif return TRUE; } else { mutex_unlock(&mtx->shared_mutex->mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("shared_group_mutex: failed to lock mutex@%p for %x", mtx, owner); #endif #endif return FALSE; } } void shared_group_mutex_unlock(shared_group_mutex_t *mtx, u8 owner) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("shared_group_mutex: unlocking mutex@%p for %x (owned by %x)", mtx, owner, mtx->owner); #endif #endif mutex_lock(&mtx->shared_mutex->mutex); yassert(mtx->owner == (owner & 0x7f)); yassert(mtx->count != 0); mtx->count--; if(mtx->count == 0) { mtx->owner = GROUP_MUTEX_NOBODY; #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT shared_group_mutex_locked_set_del(mtx); #endif // wake up all the ones that were waiting for a clean ownership cond_notify(&mtx->shared_mutex->cond); } #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->trace = NULL; mtx->id = 0; mtx->timestamp = 0; #endif mutex_unlock(&mtx->shared_mutex->mutex); } bool shared_group_mutex_transferlock(shared_group_mutex_t *mtx, u8 owner, u8 newowner) { bool r; #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("shared_group_mutex: transferring ownership of mutex@%p from %x to %x (owned by %x)", mtx, owner, newowner, mtx->owner); #endif #endif mutex_lock(&mtx->shared_mutex->mutex); u8 co = mtx->owner & 0x7f; if((r = (co == owner))) { mtx->owner = newowner; } mutex_unlock(&mtx->shared_mutex->mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->trace = debug_stacktrace_get(); mtx->id = pthread_self(); mtx->timestamp = timeus(); #endif return r; } void shared_group_mutex_destroy(shared_group_mutex_t* mtx) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #ifdef MODULE_MSG_HANDLE log_debug7("shared_group_mutex: destroy mutex@%p", mtx); #endif #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mtx->trace = (stacktrace)~0; mtx->id = (pthread_t)~0; mtx->timestamp = ~0; #endif mutex_lock(&mtx->shared_mutex->mutex); mtx->shared_mutex->rc--; mutex_unlock(&mtx->shared_mutex->mutex); } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/message_print_format_dig.c0000644000077100007710000000012412650131756024533 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.791344 30 ctime=1454597651.513344534 yadifa-2.1.6-5826/lib/dnscore/src/message_print_format_dig.c0000664000077100007710000002664612650131756024356 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscore System core functions * @brief System core functions * * @{ */ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/counter_output_stream.h" #include "dnscore/format.h" #include "dnscore/message.h" #define VM_WITH_ADDITIONAL 0x01 #define VM_WITH_ANSWER 0x02 #define VM_WITH_AUTHORITY 0x04 #define VM_WITH_QUESTION 0x08 static u8 message_print_view_with_mode[4] = { VM_WITH_QUESTION, VM_WITH_ANSWER, VM_WITH_AUTHORITY, VM_WITH_ADDITIONAL }; static char* message_section_names[4] = { "QUESTION SECTION", "ANSWER SECTION", "AUTHORITY SECTION", "ADDITIONAL SECTION" }; static char* message_section_update_names[4] = { "ZONE", "PREREQUISITES", "UPDATE RECORDS", "ADDITIONAL RECORDS" }; static char* message_count_names[4] = { "QUERY", "ANSWER", "AUTHORITY", "ADDITIONAL" }; static char* message_count_update_names[4] = { "ZONE", "PREREQUISITES", "UPDATE", "ADDITIONAL" }; ya_result message_print_format_dig_buffer(output_stream *os_, const u8 *buffer, u16 length, u16 view_mode_with) { ya_result return_value; /* * There is no padding support for formats on complex types (padding is ignored) * Doing it would be relatively expensive for it's best doing it manually when needed (afaik: only here) */ counter_output_stream_data counters; output_stream cos; counter_output_stream_init(os_, &cos, &counters); output_stream *os = &cos; packet_unpack_reader_data purd; u8 record_wire[MAX_DOMAIN_LENGTH + 10 + 65535]; /* ------------------------------------------------------------ */ /* Init packet reader with buffer. length and offset in the buffer */ purd.packet = buffer; purd.packet_size = length; purd.offset = DNS_HEADER_LENGTH; /* 1. GET ID */ u16 id = MESSAGE_ID(buffer); /* 2. GET OPCODE AND RCODE */ u8 opcode = MESSAGE_OP(buffer); opcode >>= OPCODE_SHIFT; u8 rcode = MESSAGE_RCODE(buffer); const char *opcode_txt = get_opcode(opcode); const char *status_txt = get_rcode(rcode); /* 3. GET VALUES OF THE SECTIONS */ u16 count[4]; count[0] = ntohs(MESSAGE_QD(buffer)); count[1] = ntohs(MESSAGE_AN(buffer)); count[2] = ntohs(MESSAGE_NS(buffer)); count[3] = ntohs(MESSAGE_AR(buffer)); /* 4. GET THE NAMES FOR THE PRESENTATION */ char **count_name = (opcode != OPCODE_UPDATE)? message_count_names : message_count_update_names; char **section_name = (opcode != OPCODE_UPDATE)? message_section_names : message_section_update_names; /* 5. FILL THE STREAM */ /* fill the information of the header of a DNS packet */ osformat(os, ";; ->>HEADER<<- opcode: %s, status: %s, id: %hd\n", opcode_txt, status_txt, id); osformat(os, ";; flags: "); if(MESSAGE_QR(buffer) != 0) osprint(os, "qr "); if(MESSAGE_AA(buffer) != 0) osprint(os, "aa "); if(MESSAGE_TC(buffer) != 0) osprint(os, "tc "); if(MESSAGE_RD(buffer) != 0) osprint(os, "rd "); if(MESSAGE_RA(buffer) != 0) osprint(os, "ra "); if(MESSAGE_ZF(buffer) != 0) osprint(os, "zf "); if(MESSAGE_AD(buffer) != 0) osprint(os, "ad "); if(MESSAGE_CD(buffer) != 0) osprint(os, "cd "); osformat(os, "%s: %hd, %s: %hd, %s: %hd, %s: %hd\n", count_name[0], count[0], count_name[1], count[1], count_name[2], count[2], count_name[3], count[3] ); { u32 section_idx = 0; /* Print SECTION name */ if ((view_mode_with & message_print_view_with_mode[section_idx]) && count[section_idx]) { osformat(os, "\n;; %s:\n", section_name[section_idx]); } for(u16 n = count[section_idx]; n > 0; n--) { /* 1. GET EVERYTHING FROM THE BUFFER FOR QUESTION + OFFSET packet reader */ /* Retrieve QNAME from packet reader */ if(FAIL(return_value = packet_reader_read_fqdn(&purd, record_wire, sizeof(record_wire)))) { return return_value; } /* Retrieve QTYPE from packet reader */ u16 rtype; if(FAIL(return_value = packet_reader_read_u16(&purd, &rtype))) { return return_value; } /* Retrieve QCLASS from packet reader */ u16 rclass; if(FAIL(return_value = packet_reader_read_u16(&purd, &rclass))) { return return_value; } /* Print everything from QUESTION SECTION */ if ((view_mode_with & message_print_view_with_mode[section_idx]) && count[section_idx]) { u64 next = counters.write_count + 24 + 8; /* write NAME + alignment for next item */ osformat(os, ";%{dnsname}", record_wire, ' ' ); while(counters.write_count < next) { output_stream_write_u8(os, (u8)' '); } output_stream_write_u8(os, (u8)' '); next = counters.write_count + 7; /* write CLASS + alignment for next item */ osformat(os, "%7{dnsclass}", &rclass); while(counters.write_count < next) { output_stream_write_u8(os, (u8)' '); } output_stream_write_u8(os, (u8)' '); // next = counters.write_count + 7; /* write TYPE */ osformatln(os, "%7{dnstype}", &rtype); } } osprintln(os, ""); } for(u32 section_idx = 1; section_idx < 4; section_idx++) { if ((view_mode_with & message_print_view_with_mode[section_idx]) && count[section_idx]) { osformat(os, ";; %s:\n", section_name[section_idx]); } for(u16 n = count[section_idx]; n > 0; n--) { /* Get next record and put the packet reader offset on the next record */ if(FAIL(return_value = packet_reader_read_record(&purd, record_wire, sizeof(record_wire)))) { return return_value; } /* Initialize the values needed for printing */ u8 *rname = record_wire; u8 *rdata = rname + dnsname_len(rname); u16 rtype = GET_U16_AT(rdata[0]); u16 rclass = GET_U16_AT(rdata[2]); u32 rttl = ntohl(GET_U32_AT(rdata[4])); u16 rdata_size = ntohs(GET_U16_AT(rdata[8])); /** @todo: test that rdata_size matches the record size */ rdata += 10; u64 next = counters.write_count + 24; /* Starting printing */ if ((view_mode_with & message_print_view_with_mode[section_idx]) && count[section_idx]) { /* write NAME + alignment for next item */ osformat(os, "%{dnsname}", rname); while(counters.write_count < next) { output_stream_write_u8(os, (u8)' '); } output_stream_write_u8(os, (u8)' '); /* write TTL + alignment for next item */ osformat(os, "%7d", rttl); output_stream_write_u8(os, (u8)' '); next = counters.write_count + 7; /* write CLASS + alignment for next item */ osformat(os, "%7{dnsclass}", &rclass); while(counters.write_count < next) { output_stream_write_u8(os, (u8)' '); } output_stream_write_u8(os, (u8)' '); next = counters.write_count + 7; /* write TYPE + alignment for next item */ osformat(os, "%7{dnstype} ", &rtype); while(counters.write_count < next) { output_stream_write_u8(os, (u8)' '); } output_stream_write_u8(os, (u8)' '); /* write RDATA */ osprint_rdata(os, rtype, rdata, rdata_size); osprintln(os, ""); } } if ((view_mode_with & message_print_view_with_mode[section_idx]) && count[section_idx]) { osprintln(os, ""); } } return 0; } ya_result message_print_format_dig(output_stream *os, const u8 *buffer, u16 length, u16 view_mode_with, long time_duration) { ya_result return_value; time_t timep; /* ------------------------------------------------------------ */ osformat(os, ";; global options: \n"); osformat(os, ";; Got answer:\n"); if(FAIL(return_value = message_print_format_dig_buffer(os, buffer, length, view_mode_with))) { return return_value; } time(&timep); osformat(os, ";; Query time: %ld msec\n", time_duration); /** @todo: still need to implemented the server viewable line */ // osformat(os, ";; SERVER: %{hostaddr}(%{hostaddr})\n", config->server, config->server); osformat(os, ";; WHEN: %s", ctime(&timep)); osformat(os, ";; MSG SIZE rcvd: %ld\n", length); osformat(os, "\n"); return OK; } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/config-cmdline.c0000644000077100007710000000012412650131756022356 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.639344 30 ctime=1454597651.356344534 yadifa-2.1.6-5826/lib/dnscore/src/config-cmdline.c0000664000077100007710000000566512650131756022177 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #define CONFIG_CMDLINE_C #include "dnscore/dnscore-config.h" #include "dnscore/config_settings.h" const char CMDLINE_CONTAINER[] = "\001cmdline"; /// command line container // only for the general settings: // version // help typedef struct cmdline_general_settings_s cmdline_general_settings_s; struct cmdline_general_settings_s { u8 version; bool help; }; #define CONFIG_TYPE cmdline_general_settings_s CONFIG_BEGIN(cmdline_settings_desc) CONFIG_U8_INC(version) CONFIG_BOOL(help, "0") CONFIG_END(cmdline_settings_desc) #undef CONFIG_TYPE // declare and init global variable static cmdline_general_settings_s cmdline_general_settings = {0, false}; ya_result config_register_cmdline(u8 priority) { ya_result return_code; // init and register general command line settings container if(FAIL(return_code = config_register_struct(CMDLINE_CONTAINER, cmdline_settings_desc, &cmdline_general_settings, priority))) { return return_code; } return OK; } bool cmdline_help_get() { return cmdline_general_settings.help; } u8 cmdline_version_get() { return cmdline_general_settings.version; } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/threaded_ringlist.c0000644000077100007710000000012412650131756023173 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.659344 30 ctime=1454597651.626344534 yadifa-2.1.6-5826/lib/dnscore/src/threaded_ringlist.c0000664000077100007710000003510012650131756022777 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/threaded_ringlist.h" #ifndef DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #error "DNSCORE_HAS_MUTEX_DEBUG_SUPPORT not defined" #endif #define MUTEX_USE_SPINLOCK 0 #include "dnscore/mutex.h" #define THREADED_QUEUE_TAG 0x455545555154 /* TQUEUE */ /* * The maximum number of nodes I should ever require is the queue size + 1 * * A good way to handle this is : * * Node allocator, node destroyer * * But the node allocator only allocates a node if none are free * And the node destroyer does not release a node but queue it instead. * * If I enforce the requirement that the allocation/destruction is done * by a single thread I could gain some cpu cycles. * * This reasoning is also valid for the thread_pool_task * */ typedef struct threaded_ringlist_node threaded_ringlist_node; struct threaded_ringlist_node { /* DO NOT MOVE THESE POINTERS */ threaded_ringlist_node *next; threaded_ringlist_node *prev; /* -------------------------- */ void* data; }; /* * Note: * * If a mutex_init fails, it's because of a resource, memory or rights issue. * So the application will fail soon enough. * I still should check this and exit. * * mutex_lock will fail only if the current thread aleady owns the mutex * * mutex_unlock will fail only if the current thread does not owns the mutex * */ void threaded_ringlist_init(threaded_ringlist *queue, int max_size) { queue->prev = (threaded_ringlist_node*)queue; queue->next = (threaded_ringlist_node*)queue; queue->pool = NULL; mutex_init(&queue->mutex); mutex_init(&queue->mutex_enqueue); mutex_init(&queue->mutex_dequeue); queue->max_size = max_size; queue->size = 0; mutex_lock(&queue->mutex_dequeue); } void threaded_ringlist_finalize(threaded_ringlist *queue) { threaded_ringlist_node* node; /** * If the queue is not empty : too bad ! * * It's the responsibility of the caller to ensure the queue and set of listeners is empty. */ mutex_lock(&queue->mutex); node = queue->next; queue->next = NULL; while(node != (threaded_ringlist_node*)queue) { threaded_ringlist_node* tmp; tmp = node; node = node->next; free(tmp); } node = queue->pool; queue->pool = NULL; while(node != NULL) { #ifdef DEBUG assert(node->data == (void*)~0); #endif threaded_ringlist_node* tmp; tmp = node; node = node->next; free(tmp); } mutex_unlock(&queue->mutex); mutex_destroy(&queue->mutex); mutex_destroy(&queue->mutex_enqueue); mutex_destroy(&queue->mutex_dequeue); } void threaded_ringlist_enqueue(threaded_ringlist* queue, void* constant_pointer) { /* * Ensure I'm allowed to enqueue (only one enqueuer and queue not full) */ mutex_lock(&queue->mutex_enqueue); /* * Ensure I'm allowed to work on queue (only one working on it) */ mutex_lock(&queue->mutex); threaded_ringlist_node* node = queue->pool; /* If there was a node in the pool : use it, else allocate a new one */ if(node != NULL) { queue->pool = node->next; } else { MALLOC_OR_DIE(threaded_ringlist_node*, node, sizeof(threaded_ringlist_node), THREADED_QUEUE_TAG); } node->prev = queue->prev; node->next = (threaded_ringlist_node*)queue; node->data = constant_pointer; queue->prev->next = node; queue->prev = node; if(queue->size == 0) { /* * The queue is empty : the dequeuers are waiting. * Since we will add something for them, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ mutex_unlock(&queue->mutex_dequeue); } queue->size++; if(queue->size < queue->max_size) /* Too much -> lock the pushes, will be unlocked by a pop */ { /* * This new addition made the queue full. So we will not unlock the enqueuers. * The dequeuers will do that when they see fit. (ie: queue not full anymore) */ mutex_unlock(&queue->mutex_enqueue); } /* * We are done here. */ mutex_unlock(&queue->mutex); } bool threaded_ringlist_try_enqueue(threaded_ringlist* queue, void* constant_pointer) { /* * Ensure I'm allowed to enqueue (only one enqueuer and queue not full) */ if(mutex_trylock(&queue->mutex_enqueue) != 0) { return FALSE; } /* * Ensure I'm allowed to work on queue (only one working on it) */ if(mutex_trylock(&queue->mutex) != 0) { mutex_unlock(&queue->mutex_enqueue); return FALSE; } threaded_ringlist_node* node = queue->pool; /* If there was a node in the pool : use it, else allocate a new one */ if(node != NULL) { queue->pool = node->next; } else { MALLOC_OR_DIE(threaded_ringlist_node*, node, sizeof (threaded_ringlist_node), THREADED_QUEUE_TAG); } node->prev = queue->prev; node->next = (threaded_ringlist_node*)queue; node->data = constant_pointer; queue->prev->next = node; queue->prev = node; if(queue->size == 0) { /* * The queue is empty : the dequeuers are waiting. * Since we will add something for them, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ mutex_unlock(&queue->mutex_dequeue); } queue->size++; if(queue->size < queue->max_size) /* Too much -> lock the pushes, will be unlocked by a pop */ { /* * This new addition made the queue full. So we will not unlock the enqueuers. * The dequeuers will do that when they see fit. (ie: queue not full anymore) */ mutex_unlock(&queue->mutex_enqueue); } /* * We are done here. */ mutex_unlock(&queue->mutex); return TRUE; } void* threaded_ringlist_peek(threaded_ringlist *queue) { threaded_ringlist_node* node; /* * Ensure I'm allowed to dequeue (not empty and only one on it) */ mutex_lock(&queue->mutex_dequeue); /* * Ensure I'm allowed to work on queue (only one working on it) */ mutex_lock(&queue->mutex); node = queue->next; void* data = node->data; /* * We are done here. */ mutex_unlock(&queue->mutex); mutex_unlock(&queue->mutex_dequeue); return data; } void* threaded_ringlist_try_peek(threaded_ringlist *queue) { threaded_ringlist_node* node; /* * Ensure I'm allowed to dequeue (not empty and only one on it) */ if(mutex_trylock(&queue->mutex_dequeue) != 0) { return (void*)~0; } /* * Ensure I'm allowed to work on queue (only one working on it) */ if(mutex_trylock(&queue->mutex) != 0) { mutex_unlock(&queue->mutex_dequeue); return (void*)~0; } node = queue->next; void* data = node->data; /* * We are done here. */ mutex_unlock(&queue->mutex); mutex_unlock(&queue->mutex_dequeue); return data; } void* threaded_ringlist_dequeue(threaded_ringlist *queue) { threaded_ringlist_node* node; /* * Ensure I'm allowed to dequeue (not empty and only one on it) */ mutex_lock(&queue->mutex_dequeue); /* * Ensure I'm allowed to work on queue (only one working on it) */ mutex_lock(&queue->mutex); node = queue->next; queue->next = node->next; node->next->prev = node->prev; void* data = node->data; #ifdef DEBUG node->prev = (threaded_ringlist_node*)~0; node->data = (void*)~0; #endif /* Pool the node */ node->next = queue->pool; queue->pool = node; if(queue->size == queue->max_size) /* enqueue has just been locked -> unlock */ { /* * The queue is full : the queuers are waiting. * Since we will are removing something, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ mutex_unlock(&queue->mutex_enqueue); } queue->size--; if(queue->size > 0) /* at 0, locks the next dequeue */ { /* * This removal made the queue empty. So we will not unlock the dequeuers. * The enqueuers will do that when they see fit. (ie: queue not full anymore) */ mutex_unlock(&queue->mutex_dequeue); } /* * We are done here. */ mutex_unlock(&queue->mutex); return data; } void* threaded_ringlist_try_dequeue(threaded_ringlist *queue) { threaded_ringlist_node* node; /* * Ensure I'm allowed to dequeue (not empty and only one on it) */ if(mutex_trylock(&queue->mutex_dequeue) != 0) { return (void*)~0; } /* * Ensure I'm allowed to work on queue (only one working on it) */ if(mutex_trylock(&queue->mutex) != 0) { mutex_unlock(&queue->mutex_dequeue); return (void*)~0; } node = queue->next; queue->next = node->next; node->next->prev = node->prev; void* data = node->data; #ifdef DEBUG node->prev = (threaded_ringlist_node*)~0; node->data = (void*)~0; #endif /* Pool the node */ node->next = queue->pool; queue->pool = node; if(queue->size == queue->max_size) /* enqueue has just been locked -> unlock */ { /* * The queue is full : the queuers are waiting. * Since we will are removing something, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ mutex_unlock(&queue->mutex_enqueue); } queue->size--; if(queue->size > 0) /* at 0, locks the next dequeue */ { /* * This removal made the queue empty. So we will not unlock the dequeuers. * The enqueuers will do that when they see fit. (ie: queue not full anymore) */ mutex_unlock(&queue->mutex_dequeue); } /* * We are done here. */ mutex_unlock(&queue->mutex); return data; } u32 threaded_ringlist_dequeue_set(threaded_ringlist* queue, void** array, u32 array_size) { threaded_ringlist_node* node; /* * Ensure I'm allowed to dequeue (not empty and only one on it) */ mutex_lock(&queue->mutex_dequeue); /* * Ensure I'm allowed to work on queue (only one working on it) */ mutex_lock(&queue->mutex); bool unlock_enqueue = queue->size == queue->max_size; /* enqueue has just been locked -> schedule unlock */ u32 loops = MIN(queue->size, array_size); /* The amount we will be able to extract */ void ** const limit = &array[loops]; while(array < limit) { node = queue->next; queue->next = node->next; node->next->prev = node->prev; *array++ = node->data; /* Pool the node */ node->next = queue->pool; queue->pool = node; if(node->data == NULL) /* Break if a terminator is found*/ { loops -= limit - array; break; } } if(unlock_enqueue) /* enqueue has just been locked -> unlock */ { /* * The queue is full : the queuers are waiting. * Since we will are removing something, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ mutex_unlock(&queue->mutex_enqueue); } queue->size -= loops; if(queue->size > 0) /* at 0, locks the next dequeue */ { /* * This removal made the queue empty. So we will not unlock the dequeuers. * The enqueuers will do that when they see fit. (ie: queue not full anymore) */ mutex_unlock(&queue->mutex_dequeue); } /* * We are done here. */ mutex_unlock(&queue->mutex); return loops; } void threaded_ringlist_wait_empty(threaded_ringlist *queue) { int size; for(;;) { mutex_lock(&queue->mutex); size = queue->size; mutex_unlock(&queue->mutex); if(size == 0) { break; } usleep(1); } } int threaded_ringlist_size(threaded_ringlist *queue) { int size; mutex_lock(&queue->mutex); size = queue->size; mutex_unlock(&queue->mutex); return size; } ya_result threaded_ringlist_set_maxsize(threaded_ringlist *queue, int max_size) { mutex_lock(&queue->mutex); queue->max_size = max_size; mutex_unlock(&queue->mutex); return SUCCESS; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/base32hex.c0000644000077100007710000000012412650131756021264 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.780344 30 ctime=1454597651.311344534 yadifa-2.1.6-5826/lib/dnscore/src/base32hex.c0000664000077100007710000003113412650131756021073 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup base Base conversion functions * @ingroup dnscore * @brief Base 32 hex codec * * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include "dnscore/base32hex.h" /* * */ #define BASE32_HEX_PADDING '=' static const char __BASE32_HEX__[256] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', }; /** * Encodes bytes into base32hex * The output size must be at least size_in * 8/5 * * @param buffer_in bytes to convert * @param size_in number of bytes * @param buffer_out output buffer of a size >= size_in * 8/5 * * @return output size */ u32 base32hex_encode(const u8* buffer_in, u32 size_in, char* buffer_out) { char* ptr = buffer_out; while(size_in >= 5) { u8 b0 = *buffer_in++; u8 b1 = *buffer_in++; u8 b2 = *buffer_in++; u8 b3 = *buffer_in++; u8 b4 = *buffer_in++; *ptr++ = __BASE32_HEX__[ b0 >> 3 ]; *ptr++ = __BASE32_HEX__[(u8)((b0 << 2) | (b1 >> 6))]; *ptr++ = __BASE32_HEX__[ b1 >> 1 ]; *ptr++ = __BASE32_HEX__[(u8)((b1 << 4) | (b2 >> 4))]; *ptr++ = __BASE32_HEX__[(u8)((b2 << 1) | (b3 >> 7))]; *ptr++ = __BASE32_HEX__[ b3 >> 2 ]; *ptr++ = __BASE32_HEX__[(u8)((b3 << 3) | (b4 >> 5))]; *ptr++ = __BASE32_HEX__[ b4 ]; size_in -= 5; } switch(size_in) { case 4: { u8 b0 = *buffer_in++; u8 b1 = *buffer_in++; u8 b2 = *buffer_in++; u8 b3 = *buffer_in++; *ptr++ = __BASE32_HEX__[ b0 >> 3 ]; *ptr++ = __BASE32_HEX__[(u8)((b0 << 2) | (b1 >> 6))]; *ptr++ = __BASE32_HEX__[ b1 >> 1 ]; *ptr++ = __BASE32_HEX__[(u8)((b1 << 4) | (b2 >> 4))]; *ptr++ = __BASE32_HEX__[(u8)((b2 << 1) | (b3 >> 7))]; *ptr++ = __BASE32_HEX__[ b3 >> 2 ]; *ptr++ = __BASE32_HEX__[(u8)(b3 << 3)]; *ptr++ = BASE32_HEX_PADDING; break; } case 3: { u8 b0 = *buffer_in++; u8 b1 = *buffer_in++; u8 b2 = *buffer_in++; *ptr++ = __BASE32_HEX__[ b0 >> 3 ]; *ptr++ = __BASE32_HEX__[(u8)((b0 << 2) | (b1 >> 6))]; *ptr++ = __BASE32_HEX__[ b1 >> 1 ]; *ptr++ = __BASE32_HEX__[(u8)((b1 << 4) | (b2 >> 4))]; *ptr++ = __BASE32_HEX__[(u8)(b2 << 1)]; *ptr++ = BASE32_HEX_PADDING; *ptr++ = BASE32_HEX_PADDING; *ptr++ = BASE32_HEX_PADDING; break; } case 2: { u8 b0 = *buffer_in++; u8 b1 = *buffer_in++; *ptr++ = __BASE32_HEX__[ b0 >> 3 ]; *ptr++ = __BASE32_HEX__[(u8)((b0 << 2) | (b1 >> 6))]; *ptr++ = __BASE32_HEX__[ b1 >> 1 ]; *ptr++ = __BASE32_HEX__[(u8)(b1 << 4)]; *ptr++ = BASE32_HEX_PADDING; *ptr++ = BASE32_HEX_PADDING; *ptr++ = BASE32_HEX_PADDING; *ptr++ = BASE32_HEX_PADDING; break; } case 1: { u8 b0 = *buffer_in++; *ptr++ = __BASE32_HEX__[ b0 >> 3 ]; *ptr++ = __BASE32_HEX__[(u8)(b0 << 2) ]; *ptr++ = BASE32_HEX_PADDING; *ptr++ = BASE32_HEX_PADDING; *ptr++ = BASE32_HEX_PADDING; *ptr++ = BASE32_HEX_PADDING; *ptr++ = BASE32_HEX_PADDING; *ptr++ = BASE32_HEX_PADDING; break; } } return (u32)(ptr - buffer_out); } #define __DEBASE32_HEX__STOP__ 0x80 static const u8 __DEBASE32_HEX__[256] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0 - 7 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 8 - 15 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 16 - 23 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 24 - 31 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 32 - 39 */ 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f, /* 40 - 47 ...+.../ */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 01234567 */ 0x08, 0x09, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, /* 89...=.. */ 0xff, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, /* .ABCDEFG */ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, /* HIJKLMNO */ 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0xff, /* PQRSTUVW */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* XYZ..... */ 0xff, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, /* .abcdefg */ /* Added to support NSD */ 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, /* hijklmno */ 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0xff, /* pqrstuvw */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* xyz..... */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; /** * Decodes base32hex into bytes * The output size must be at least size_in * 5/8 * * @param buffer_in base32hex text * @param size_in number of chars * @param buffer_out output buffer of a size >= size_in * 5/8 * * @return output size */ ya_result base32hex_decode(const char* buffer_in, u32 size_in, u8* buffer_out) { if((size_in & 7) != 0) { return PARSEB32H_ERROR; // wrong number of bytes } u8* in = (u8*)buffer_in; u8* out = buffer_out; while(size_in > 8) { u8 a = __DEBASE32_HEX__[*in++]; u8 b = __DEBASE32_HEX__[*in++]; u8 c = __DEBASE32_HEX__[*in++]; u8 d = __DEBASE32_HEX__[*in++]; u8 e = __DEBASE32_HEX__[*in++]; u8 f = __DEBASE32_HEX__[*in++]; u8 g = __DEBASE32_HEX__[*in++]; u8 h = __DEBASE32_HEX__[*in++]; if(((a | b | c | d | e | f | g | h)&0x40) != 0x00) { /* PARSE ERROR */ return PARSEB32H_ERROR; } *out++ = (a << 3) | (b >> 2); *out++ = (b << 6) | (c << 1) | (d >> 4); *out++ = (d << 4) | (e >> 1); *out++ = (e << 7) | (f << 2) | (g >> 3); *out++ = (g << 5) | h; size_in -= 8; } if(size_in != 0) /* It's either 0 or 4 */ { u8 a = __DEBASE32_HEX__[*in++]; u8 b = __DEBASE32_HEX__[*in++]; if(((a | b)&0xc0) != 0x00) { /* PARSE ERROR */ return PARSEB32H_ERROR; } *out++ = (a << 3) | (b >> 2); u8 c = __DEBASE32_HEX__[*in++]; u8 d = __DEBASE32_HEX__[*in++]; if((c != __DEBASE32_HEX__STOP__) && (d != __DEBASE32_HEX__STOP__)) { if(((c | d)&0x40) != 0) { return PARSEB32H_ERROR; } *out++ = (b << 6) | (c << 1) | (d >> 4); u8 e = __DEBASE32_HEX__[*in++]; if(e != __DEBASE32_HEX__STOP__) { if((e & 0x40) != 0) { return PARSEB32H_ERROR; } *out++ = (d << 4) | (e >> 1); u8 f = __DEBASE32_HEX__[*in++]; u8 g = __DEBASE32_HEX__[*in++]; if((f != __DEBASE32_HEX__STOP__) && (g != __DEBASE32_HEX__STOP__)) { if(((f | g)&0x40) != 0) { return PARSEB32H_ERROR; } *out++ = (e << 7) | (f << 2) | (g >> 3); u8 h = __DEBASE32_HEX__[*in++]; if(h != __DEBASE32_HEX__STOP__) { if((h & 0x40) != 0) { return PARSEB32H_ERROR; } *out++ = (g << 5) | h; } } } } } return out - buffer_out; } /** * encodes the buffer into base32hex to the output stream * * @param os output stream * @param buffer_in buffer to encode * @param size_in size of the buffer * * @return bytes written */ ya_result output_stream_write_base32hex(output_stream* os, const u8* buffer_in, u32 size_in) { ya_result total = ((size_in + (BASE32HEX_DECODED_CHUNK - 1)) / BASE32HEX_DECODED_CHUNK) * BASE32HEX_ENCODED_CHUNK; char tmp[8]; while(size_in >= BASE32HEX_DECODED_CHUNK) { /* this cannot fail */ base32hex_encode(buffer_in, BASE32HEX_DECODED_CHUNK, tmp); output_stream_write(os, (u8*)tmp, BASE32HEX_ENCODED_CHUNK); buffer_in += BASE32HEX_DECODED_CHUNK; size_in -= BASE32HEX_DECODED_CHUNK; } ya_result return_code; /* doing the general case in the if block results into faster code */ if(ISOK(return_code = output_stream_write(os, (u8*)tmp, base32hex_encode(buffer_in, size_in, tmp)))) { return total; } return return_code; } /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/tsig.c0000644000077100007710000000012412650131756020446 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.681344 30 ctime=1454597651.664344534 yadifa-2.1.6-5826/lib/dnscore/src/tsig.c0000664000077100007710000013410212650131756020254 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup dnscore * @brief * * @{ */ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/dnscore-config.h" #include "dnscore/message.h" // DO NOT REMOVE ME #include "dnscore/tsig.h" #include "dnscore/packet_reader.h" #if DNSCORE_HAS_TSIG_SUPPORT #define TSIGNODE_TAG 0x45444f4e47495354 #define TSIGPAYL_TAG 0x4c59415047495354 #define TSIGMAC_TAG 0x43414d47495354 #define TSIGOTHR_TAG 0x5248544f47495354 #define MODULE_MSG_HANDLE g_system_logger #define LOG_DIGEST_INPUT 0 #define TSIG_TCP_PERIOD 99 /* overrites the detected TSIG with 0xff */ #define TSIG_DESTROY_DEBUG 1 /* * AVL definition part begins here */ /* * The maximum depth of a tree. * 40 is enough for storing 433494436 items (worst case) * * Depth 0 is one node. * * Worst case : N is enough for sum[n = 0,N](Fn) where F is Fibonacci * Best case : N is enough for (2^(N+1))-1 */ #define AVL_MAX_DEPTH 32 /* worst case scenario : about 9M keys */ /* * The previx that will be put in front of each function name */ #define AVL_PREFIX tsig_ /* * The type that hold the node */ #define AVL_NODE_TYPE tsig_node /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_TREE_TYPE AVL_NODE_TYPE* /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_CONST_TREE_TYPE AVL_NODE_TYPE * const /* * The way to get the root from the tree */ #define AVL_TREE_ROOT(__tree__) (*(__tree__)) /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE const u8* #define AVL_REFERENCE_IS_CONST TRUE #define AVL_REFERENCE_IS_POINTER TRUE /* * The node has got a pointer to its parent * * 0 : disable * !=0 : enable */ #define AVL_HAS_PARENT_POINTER 0 #include "dnscore/avl.h.inc" /*********************************************************/ /* * The following macros are defining relevant fields in the node */ /* * Access to the field that points to the left child */ #define AVL_LEFT_CHILD(node) ((node)->children.lr.left) /* * Access to the field that points to the right child */ #define AVL_RIGHT_CHILD(node) ((node)->children.lr.right) /* * Access to the field that points to one of the children (0: left, 1: right) */ #define AVL_CHILD(node,id) ((node)->children.child[(id)]) /* * Access to the field that keeps the balance (a signed byte) */ #define AVL_BALANCE(node) ((node)->balance) /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE const u8* #define AVL_REFERENCE_IS_CONST TRUE /* * */ #define AVL_REFERENCE_FORMAT_STRING "%{dnsname}" #define AVL_REFERENCE_FORMAT(reference) reference /* * A macro to initialize a node and setting the reference */ #define AVL_INIT_NODE(node,reference) ZEROMEMORY((node),sizeof(tsig_node));(node)->item.name = dnsname_dup(reference) /* * A macro to allocate a new node */ #define AVL_ALLOC_NODE(node,reference) MALLOC_OR_DIE(AVL_NODE_TYPE*,node,sizeof(AVL_NODE_TYPE), TSIGNODE_TAG) /* * A macro to free a node allocated by ALLOC_NODE */ #define AVL_FREE_NODE(node) free((u8*)(node)->item.name);free((u8*)(node)->item.mac);free(node) /* * A macro to print the node */ #define AVL_DUMP_NODE(node) format("node@%p",(node)); /* * A macro that returns the reference field of the node. * It must be of type REFERENCE_TYPE */ #define AVL_REFERENCE(node) (node)->item.name /* * A macro to compare two references * Returns TRUE if and only if the references are equal. */ #define AVL_ISEQUAL(reference_a,reference_b) dnsname_equals(reference_a,reference_b) /* * A macro to compare two references * Returns TRUE if and only if the first one is bigger than the second one. */ #define AVL_ISBIGGER(reference_a,reference_b) (dnsname_compare(reference_a,reference_b) > 0) /* * Copies the payload of a node * It MUST NOT copy the "proprietary" node fields : children, parent, balance */ #define AVL_COPY_PAYLOAD(node_trg,node_src) (node_trg)->item.name = dnsname_dup((node_src)->item.name); \ MALLOC_OR_DIE(const u8*,(node_trg)->item.mac,(node_src)->item.mac_size, TSIGPAYL_TAG); \ MEMCOPY((u8*)(node_trg)->item.mac, (node_src)->item.mac, (node_src)->item.mac_size); \ (node_trg)->item.mac_size = (node_src)->item.mac_size; \ (node_trg)->item.mac_algorithm = (node_src)->item.mac_algorithm; /* * A macro to preprocess a node before it is preprocessed for a delete (detach) * If there was anything to do BEFORE deleting a node, we would do it here * After this macro is exectuted, the node * _ is detached, then deleted with FREE_NODE * _ has got its content overwritten by the one of another node, then the other * node is deleted with FREE_NODE */ #define AVL_NODE_DELETE_CALLBACK(node) #include "dnscore/avl.c.inc" #include "dnscore/message.h" // DO NOT REMOVE ME #undef AVL_MAX_DEPTH #undef AVL_PREFIX #undef AVL_NODE_TYPE #undef AVL_TREE_TYPE #undef AVL_CONST_TREE_TYPE #undef AVL_TREE_ROOT #undef AVL_REFERENCE_TYPE #undef _AVL_H_INC /* * */ static tsig_node *tsig_tree = NULL; static u32 tsig_tree_count = 0; static u8 tsig_serial = 0; /// @note load serial /** * Call this before a config reload */ void tsig_serial_next() { tsig_serial++; } ya_result tsig_register(const u8 *name, const u8 *mac, u16 mac_size, u8 mac_algorithm) { ya_result return_code = SUCCESS; tsig_node *node = tsig_avl_insert(&tsig_tree, name); if(node != NULL) { if(node->item.mac != NULL) { bool same = (node->item.mac_size == mac_size) && (node->item.mac_algorithm == mac_algorithm) && (memcmp((u8*)node->item.mac, mac, mac_size) == 0); if(node->item.load_serial != tsig_serial) { if(same) { // same key, different instances ... nothing to do return SUCCESS; } else { // this is an old version of the key free((void*)node->item.mac); node->item.mac = NULL; } } else { // it's a dup in the config file return TSIG_DUPLICATE_REGISTRATION; /* dup */ } } yassert(node->item.mac == NULL); MALLOC_OR_DIE(u8*, node->item.mac, mac_size, TSIGMAC_TAG); MEMCOPY((u8*)node->item.mac, mac, mac_size); node->item.evp_md = tsig_get_EVP_MD(mac_algorithm); node->item.mac_algorithm_name = tsig_get_algorithm_name(mac_algorithm); node->item.name_len = dnsname_len(name); node->item.mac_algorithm_name_len = dnsname_len(node->item.mac_algorithm_name); node->item.mac_size = mac_size; node->item.mac_algorithm = mac_algorithm; node->item.load_serial = tsig_serial; tsig_tree_count++; } else { return_code = ERROR; /* internal error */ } return return_code; } tsig_item* tsig_get(const u8 *name) { tsig_node *node = tsig_avl_find(&tsig_tree, name); if(node != NULL) { return &node->item; } return NULL; } u32 tsig_get_count() { return tsig_tree_count; } tsig_item* tsig_get_at_index(s32 index) { if(index < 0 || index >= tsig_tree_count) { return NULL; } tsig_avl_iterator iter; tsig_avl_iterator_init(&tsig_tree, &iter); while(tsig_avl_iterator_hasnext(&iter)) { tsig_node *node = tsig_avl_iterator_next_node(&iter); if(index == 0) { return &node->item; } index--; } // should never be reached return NULL; } void tsig_finalize_algorithms(); void tsig_finalize() { tsig_avl_destroy(&tsig_tree); tsig_finalize_algorithms(); } static u8 tsig_typeclassttl[8] = {0x00, 0xfa, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00}; static u8 tsig_classttl[6] = {0x00, 0xff, 0x00, 0x00, 0x00, 0x00}; static u8 tsig_noerror_noother[4] = {0x00, 0x00, 0x00, 0x00}; static ya_result tsig_verify_query(message_data *mesg) { u32 md_len = 0; u8 md[EVP_MAX_MD_SIZE]; #if LOG_DIGEST_INPUT >= 2 log_debug("tsig_verify: %hx", mesg->tsig.mac_size); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.mac_size, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.tsig->mac, mesg->tsig.tsig->mac_size, 32); log_debug("tsig_verify: start"); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->buffer, mesg->send_length, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.tsig->name, mesg->tsig.tsig->name_len, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, tsig_classttl, sizeof (tsig_classttl), 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.tsig->mac_algorithm_name, mesg->tsig.tsig->mac_algorithm_name_len, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.timehi, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.timelo, 4, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.fudge, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.error, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.other_len, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.other, ntohs(mesg->tsig.other_len), 32); log_debug("tsig_verify: stop"); #endif HMAC_CTX ctx; HMAC_CTX_init(&ctx); HMAC_Init(&ctx, mesg->tsig.tsig->mac, mesg->tsig.tsig->mac_size, mesg->tsig.tsig->evp_md); /* DNS message */ HMAC_Update(&ctx, mesg->buffer, mesg->received); /* TSIG Variables */ HMAC_Update(&ctx, mesg->tsig.tsig->name, mesg->tsig.tsig->name_len); HMAC_Update(&ctx, tsig_classttl, sizeof (tsig_classttl)); HMAC_Update(&ctx, mesg->tsig.tsig->mac_algorithm_name, mesg->tsig.tsig->mac_algorithm_name_len); HMAC_Update(&ctx, (u8*) & mesg->tsig.timehi, 2); HMAC_Update(&ctx, (u8*) & mesg->tsig.timelo, 4); HMAC_Update(&ctx, (u8*) & mesg->tsig.fudge, 2); HMAC_Update(&ctx, (u8*) & mesg->tsig.error, 2); HMAC_Update(&ctx, (u8*) & mesg->tsig.other_len, 2); if(mesg->tsig.other_len != 0) { HMAC_Update(&ctx, mesg->tsig.other, ntohs(mesg->tsig.other_len)); } HMAC_Final(&ctx, md, &md_len); HMAC_CTX_cleanup(&ctx); if((md_len != mesg->tsig.mac_size) || (memcmp(mesg->tsig.mac, md, md_len) != 0)) { mesg->status = FP_TSIG_ERROR; mesg->tsig.error = NU16(RCODE_BADSIG); return TSIG_BADSIG; } return SUCCESS; } ya_result tsig_verify_answer(message_data *mesg, const u8 *mac, u16 mac_size) { u32 md_len = 0; u8 md[EVP_MAX_MD_SIZE]; u16 mac_size_network = htons(mac_size); #if LOG_DIGEST_INPUT >= 2 log_debug("tsig_verify_answer: %hx", mesg->tsig.mac_size); log_debug("tsig_verify_answer: start"); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) &mac_size_network, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mac, mac_size, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->buffer, mesg->send_length, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.tsig->name, mesg->tsig.tsig->name_len, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, tsig_classttl, sizeof (tsig_classttl), 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.tsig->mac_algorithm_name, mesg->tsig.tsig->mac_algorithm_name_len, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) &mesg->tsig.timehi, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) &mesg->tsig.timelo, 4, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) &mesg->tsig.fudge, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) &mesg->tsig.error, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) &mesg->tsig.other_len, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.other, ntohs(mesg->tsig.other_len), 32); log_debug("tsig_verify_answer: stop"); #endif HMAC_CTX ctx; HMAC_CTX_init(&ctx); HMAC_Init(&ctx, mesg->tsig.tsig->mac, mesg->tsig.tsig->mac_size, mesg->tsig.tsig->evp_md); HMAC_Update(&ctx, (u8*) &mac_size_network, 2); HMAC_Update(&ctx, mac, mac_size); /* DNS message */ HMAC_Update(&ctx, mesg->buffer, mesg->received); /* TSIG Variables */ HMAC_Update(&ctx, mesg->tsig.tsig->name, mesg->tsig.tsig->name_len); HMAC_Update(&ctx, tsig_classttl, sizeof (tsig_classttl)); HMAC_Update(&ctx, mesg->tsig.tsig->mac_algorithm_name, mesg->tsig.tsig->mac_algorithm_name_len); HMAC_Update(&ctx, (u8*) &mesg->tsig.timehi, 2); HMAC_Update(&ctx, (u8*) &mesg->tsig.timelo, 4); HMAC_Update(&ctx, (u8*) &mesg->tsig.fudge, 2); HMAC_Update(&ctx, (u8*) &mesg->tsig.error, 2); HMAC_Update(&ctx, (u8*) &mesg->tsig.other_len, 2); if(mesg->tsig.other_len != 0) { HMAC_Update(&ctx, mesg->tsig.other, ntohs(mesg->tsig.other_len)); } HMAC_Final(&ctx, md, &md_len); HMAC_CTX_cleanup(&ctx); //if(md_len != ntohs(mesg->tsig.mac_size)) if(md_len != mac_size) { mesg->status = FP_TSIG_ERROR; return TSIG_BADSIG; } if(memcmp(mesg->tsig.mac, md, md_len) != 0) { mesg->status = FP_TSIG_ERROR; return TSIG_BADSIG; } return SUCCESS; } static ya_result tsig_digest_query(message_data *mesg) { HMAC_CTX ctx; HMAC_CTX_init(&ctx); HMAC_Init(&ctx, mesg->tsig.tsig->mac, mesg->tsig.tsig->mac_size, mesg->tsig.tsig->evp_md); /* Request MAC */ #if LOG_DIGEST_INPUT >= 2 log_debug("tsig_digest_query: %hx", mesg->tsig.mac_size); log_debug("tsig_digest_query: start"); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->buffer, mesg->send_length, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.tsig->name, mesg->tsig.tsig->name_len, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, tsig_classttl, sizeof (tsig_classttl), 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.tsig->mac_algorithm_name, mesg->tsig.tsig->mac_algorithm_name_len, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.timehi, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.timelo, 4, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.fudge, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.error, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.other_len, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.other, ntohs(mesg->tsig.other_len), 32); log_debug("tsig_digest_query: stop"); #endif /* DNS message */ HMAC_Update(&ctx, mesg->buffer, mesg->send_length); /* TSIG Variables */ HMAC_Update(&ctx, mesg->tsig.tsig->name, mesg->tsig.tsig->name_len); HMAC_Update(&ctx, tsig_classttl, sizeof (tsig_classttl)); HMAC_Update(&ctx, mesg->tsig.tsig->mac_algorithm_name, mesg->tsig.tsig->mac_algorithm_name_len); HMAC_Update(&ctx, (u8*) & mesg->tsig.timehi, 2); HMAC_Update(&ctx, (u8*) & mesg->tsig.timelo, 4); HMAC_Update(&ctx, (u8*) & mesg->tsig.fudge, 2); // error is 0 // other len is 0 // no need to work on other data either (since other len is 0) HMAC_Update(&ctx, tsig_noerror_noother, 4); // four zeros u32 tmp_mac_size; HMAC_Final(&ctx, mesg->tsig.mac, &tmp_mac_size); mesg->tsig.mac_size = tmp_mac_size; HMAC_CTX_cleanup(&ctx); return SUCCESS; } static ya_result tsig_digest_answer(message_data *mesg) { HMAC_CTX ctx; HMAC_CTX_init(&ctx); HMAC_Init(&ctx, mesg->tsig.tsig->mac, mesg->tsig.tsig->mac_size, mesg->tsig.tsig->evp_md); /* Request MAC */ #if LOG_DIGEST_INPUT >= 2 log_debug("tsig_digest_answer: %hx", mesg->tsig.mac_size); log_debug("tsig_digest_answer: start"); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.tsig->mac_size, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.tsig->mac, mesg->tsig.tsig->mac_size, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->buffer, mesg->send_length, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.tsig->name, mesg->tsig.tsig->name_len, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, tsig_classttl, sizeof (tsig_classttl), 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.tsig->mac_algorithm_name, mesg->tsig.tsig->mac_algorithm_name_len, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.timehi, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.timelo, 4, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.fudge, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.error, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.other_len, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.other, ntohs(mesg->tsig.other_len), 32); log_debug("tsig_digest_answer: stop"); #endif u16 mac_size_network = htons(mesg->tsig.mac_size); HMAC_Update(&ctx, (u8*) & mac_size_network, 2); HMAC_Update(&ctx, mesg->tsig.mac, mesg->tsig.mac_size); /* DNS message */ HMAC_Update(&ctx, mesg->buffer, mesg->send_length); /* TSIG Variables */ HMAC_Update(&ctx, mesg->tsig.tsig->name, mesg->tsig.tsig->name_len); HMAC_Update(&ctx, tsig_classttl, sizeof (tsig_classttl)); HMAC_Update(&ctx, mesg->tsig.tsig->mac_algorithm_name, mesg->tsig.tsig->mac_algorithm_name_len); HMAC_Update(&ctx, (u8*) & mesg->tsig.timehi, 2); HMAC_Update(&ctx, (u8*) & mesg->tsig.timelo, 4); HMAC_Update(&ctx, (u8*) & mesg->tsig.fudge, 2); HMAC_Update(&ctx, (u8*) & mesg->tsig.error, 2); HMAC_Update(&ctx, (u8*) & mesg->tsig.other_len, 2); if(mesg->tsig.other_len != 0) { HMAC_Update(&ctx, mesg->tsig.other, ntohs(mesg->tsig.other_len)); } u32 tmp_mac_size; HMAC_Final(&ctx, mesg->tsig.mac, &tmp_mac_size); mesg->tsig.mac_size = tmp_mac_size; HMAC_CTX_cleanup(&ctx); return SUCCESS; } /** * Extract the TSIG from a message * * * _ checks if the CLASS & TTL are right * _ checks if the TSIG name is known * _ loads the TSIG into the TSIG structure into the message * * Works fine for questions but for answer it needs to match a previous setup. * * @param mesg the message * @param purd a packet reader at the position of the TSIG record * @param tsig_offset * @param tsigname * @param tctr * @return */ ya_result tsig_process(message_data *mesg, packet_unpack_reader_data *purd, u32 tsig_offset, const tsig_item *tsig, struct type_class_ttl_rdlen *tctr) { u16 ar_count = MESSAGE_AR(mesg->buffer); u8 algorithm[256]; ar_count = ntohs(ar_count); if((tctr->qclass == CLASS_ANY) && (tctr->ttl == 0)) { /* * Check if the key is known to us * * We must know the key, else there is a few error options available. */ if(tsig == NULL) { /* oops */ /** * If a non-forwarding server does not recognize the key used by the * client, the server MUST generate an error response with RCODE 9 * (NOTAUTH) and TSIG ERROR 17 (BADKEY). * * The server SHOULD log the error. * */ mesg->tsig.error = NU16(RCODE_BADKEY); mesg->status = RCODE_NOTAUTH; // no fingerprint here, it's RFC MESSAGE_LOFLAGS(mesg->buffer) = (MESSAGE_LOFLAGS(mesg->buffer)&~RCODE_BITS) | mesg->status; return TSIG_BADKEY; } /* * Got the TSIG: * * * Now we can remove the tsig from the AR. */ ya_result return_code; mesg->received = tsig_offset; mesg->send_length = tsig_offset; MESSAGE_SET_AR(mesg->buffer,htons(ar_count - 1)); /* * Read the algorithm name and see if it matches our TSIG key */ if(FAIL(return_code = packet_reader_read_fqdn(purd, algorithm, sizeof (algorithm)))) { /* oops */ mesg->tsig.error = NU16(RCODE_BADKEY); mesg->status = FP_TSIG_BROKEN; return TSIG_BADKEY; // format error reading the key name } u8 alg = tsig_get_algorithm(algorithm); if(tsig->mac_algorithm != alg) { /* oops */ mesg->tsig.error = NU16(RCODE_BADKEY); mesg->status = FP_TSIG_ERROR; return TSIG_BADKEY; // mismatched algorithm } /* * Save the TSIG. */ mesg->tsig.other = NULL; mesg->tsig.tsig = tsig; mesg->tsig.mac_algorithm = alg; if(FAIL(return_code = packet_reader_read(purd, &mesg->tsig.timehi, 10))) { /* oops */ mesg->status = FP_TSIG_BROKEN; return TSIG_FORMERR; } /* Check the time */ /** * * If the server time is outside the time interval specified by the * request (which is: Time Signed, plus/minus Fudge), the server MUST * generate an error response with RCODE 9 (NOTAUTH) and TSIG ERROR 18 (BADTIME). * * I cannot use time_t because on some systems time_t is 32 bits. I need more. * The next best thing is u64 */ u64 then = ntohs(mesg->tsig.timehi); then <<= 32; then |= ntohl(mesg->tsig.timelo); u64 now = time(NULL); u64 fudge = ntohs(mesg->tsig.fudge); u16 mac_size = ntohs(mesg->tsig.mac_size); /* NETWORK => NATIVE */ if(mac_size > sizeof(mesg->tsig.mac)) { /* oops */ mesg->status = FP_TSIG_BROKEN; return TSIG_FORMERR; } mesg->tsig.mac_size = mac_size; if(FAIL(return_code = packet_reader_read(purd, mesg->tsig.mac, mac_size))) { /* oops */ mesg->status = FP_TSIG_BROKEN; return TSIG_FORMERR; } if(FAIL(return_code = packet_reader_read(purd, &mesg->tsig.original_id, 6))) // and error, and other len { /* oops */ mesg->status = FP_TSIG_BROKEN; return TSIG_FORMERR; } if(mesg->tsig.other_len != 0) { /** * @note This should never be run in input queries ... */ u16 other_len = ntohs(mesg->tsig.other_len); MALLOC_OR_DIE(u8*, mesg->tsig.other, other_len, TSIGOTHR_TAG); if(FAIL(return_code = packet_reader_read(purd, mesg->tsig.other, other_len))) { /* oops */ free(mesg->tsig.other); mesg->tsig.other = NULL; mesg->status = FP_TSIG_BROKEN; return TSIG_FORMERR; } } if(llabs((s64)(then - now)) > fudge) // cast to signed in case now > then { mesg->tsig.error = htons(RCODE_BADTIME); mesg->status = FP_TSIG_ERROR; return TSIG_BADTIME; } /* * We can now process the wire and compute the HMAC * Note that if message_id != original_message_id, then message_id replaces original_message_id */ return SUCCESS; } /* error : tsig but wrong tsig setup */ mesg->status = FP_TSIG_BROKEN; return TSIG_FORMERR; } ya_result tsig_process_query(message_data *mesg, packet_unpack_reader_data *purd, u32 tsig_offset, u8 tsigname[MAX_DOMAIN_LENGTH], struct type_class_ttl_rdlen *tctr) { ya_result return_value; tsig_item *tsig = tsig_get(tsigname); if(ISOK(return_value = tsig_process(mesg, purd, tsig_offset, tsig, tctr))) { if(ISOK(return_value = tsig_verify_query(mesg))) { return return_value; } // tsig process may have allocated tsig other free(mesg->tsig.other); mesg->tsig.other = NULL; mesg->tsig.error = htons(RCODE_BADSIG); } switch(return_value) { case TSIG_FORMERR: break; case TSIG_BADTIME: tsig_append_error(mesg); break; default: tsig_append_unsigned_error(mesg); break; } /* oops */ return return_value; } ya_result tsig_process_answer(message_data *mesg, packet_unpack_reader_data *purd, u32 tsig_offset, const tsig_item *tsig, struct type_class_ttl_rdlen *tctr, const u8 *mac, u16 mac_size) { ya_result return_value; if(ISOK(return_value = tsig_process(mesg, purd, tsig_offset, tsig, tctr))) { if(FAIL(return_value = tsig_verify_answer(mesg, mac, mac_size))) { /* oops */ free(mesg->tsig.other); mesg->tsig.other = NULL; mesg->tsig.error = htons(RCODE_BADSIG); tsig_append_error(mesg); } } return return_value; } /** * Extracts the TSIG from the message * * Reads all the records but the last AR one */ ya_result tsig_extract_and_process(message_data *mesg) { /*yassert(mesg->ar_start != NULL);*/ /* * rfc2845 * * If there is a TSIG then * _ It must be put aside, safely * _ It must be removed from the query * _ It must be processed * * rfc2671 * * Handle OPT * */ /* * Read DNS name (decompression on) * Read type (TSIG = 250) * Read class (ANY) * Read TTL (0) * Read RDLEN * */ packet_unpack_reader_data purd; purd.packet = mesg->buffer; purd.packet_size = mesg->received; if(mesg->ar_start == NULL) { u32 tsig_index = ntohs(MESSAGE_AN(mesg->buffer)) + ntohs(MESSAGE_NS(mesg->buffer)) + ntohs(MESSAGE_AR(mesg->buffer)) - 1; purd.offset = 12; /* Header */ packet_reader_skip_fqdn(&purd); /* Query DNAME */ purd.offset += 4; /* TYPE CLASS */ while(tsig_index-- > 0) /* Skip all AR records but the last one */ { /* * It should be in this kind of processing that we read the EDNS0 flag */ packet_reader_skip_record(&purd); } mesg->ar_start = &mesg->buffer[purd.offset]; } else { purd.offset = mesg->ar_start - mesg->buffer; } struct type_class_ttl_rdlen tctr; u32 record_offset = purd.offset; u8 tsigname[MAX_DOMAIN_LENGTH]; if(FAIL(packet_reader_read_fqdn(&purd, tsigname, sizeof (tsigname)))) { /* oops */ return TSIG_FORMERR; } /*yassert(((u8*)&tctr.rdlen) - ((u8*)&tctr.qtype) == 8);*/ if(ISOK(packet_reader_read(&purd, &tctr, 10))) { if(tctr.qtype == TYPE_TSIG) /* && (tctr.qclass == TYPE_ANY) && (tctr.ttl == 0 )*/ { /* It must be the last AR record, class = ANY and TTL = 0 */ return tsig_process_query(mesg, &purd, record_offset, tsigname, &tctr); } /* if type is TSIG */ /* AR but not a TSIG : there is just no TSIG in this packet */ mesg->tsig.tsig = NULL; } return TSIG_FORMERR; } /** * Adds the TSIG to the message * */ ya_result tsig_add_tsig(message_data *mesg) { u16 ar_count = ntohs(MESSAGE_AR(mesg->buffer)); /* Converted after network read ... so why do I do this ? */ //u16 mac_size = ntohs(mesg->tsig.mac_size); u16 mac_size = mesg->tsig.mac_size; u16 other_len = ntohs(mesg->tsig.other_len); if(mesg->size_limit < mesg->send_length + mesg->tsig.tsig->name_len + /* DNS NAME of the TSIG (name of the key) */ mac_size + /* MAC */ other_len + /* OTHER DATA */ 12) /* time + fudge + mac size + original id + error + other len */ { /* Cannot sign because of truncation */ MESSAGE_HIFLAGS(mesg->buffer) |= TC_BITS; return TSIG_SIZE_LIMIT_ERROR; } u8 *tsig_ptr = &mesg->buffer[mesg->send_length]; /* record */ memcpy(tsig_ptr, mesg->tsig.tsig->name, mesg->tsig.tsig->name_len); tsig_ptr += mesg->tsig.tsig->name_len; memcpy(tsig_ptr, tsig_typeclassttl, sizeof (tsig_typeclassttl)); tsig_ptr += sizeof (tsig_typeclassttl); u16 *rdata_size_ptr = (u16*)tsig_ptr; tsig_ptr += 2; /* rdata */ memcpy(tsig_ptr, mesg->tsig.tsig->mac_algorithm_name, mesg->tsig.tsig->mac_algorithm_name_len); tsig_ptr += mesg->tsig.tsig->mac_algorithm_name_len; SET_U16_AT(tsig_ptr[0], mesg->tsig.timehi); SET_U32_AT(tsig_ptr[2], mesg->tsig.timelo); SET_U16_AT(tsig_ptr[6], mesg->tsig.fudge); SET_U16_AT(tsig_ptr[8], htons(mesg->tsig.mac_size)); memcpy(&tsig_ptr[10], mesg->tsig.mac, mac_size); tsig_ptr += mac_size + 10; SET_U16_AT(tsig_ptr[0], mesg->tsig.original_id); SET_U16_AT(tsig_ptr[2], mesg->tsig.error); SET_U16_AT(tsig_ptr[4], mesg->tsig.other_len); tsig_ptr += 6; if(mesg->tsig.other_len != 0) { memcpy(tsig_ptr, mesg->tsig.other, other_len); tsig_ptr += other_len; } u16 rdata_size = (tsig_ptr - (u8*)rdata_size_ptr) - 2; SET_U16_AT(*rdata_size_ptr, htons(rdata_size)); mesg->send_length = (tsig_ptr - mesg->buffer); MESSAGE_SET_AR(mesg->buffer, htons(ar_count + 1)); return SUCCESS; } /**¨ * Signs the message answer with its TSIG */ ya_result tsig_sign_answer(message_data *mesg) { yassert(mesg->ar_start != NULL); tsig_digest_answer(mesg); return tsig_add_tsig(mesg); } /**¨ * Signs the message query with its TSIG */ ya_result tsig_sign_query(message_data *mesg) { yassert(mesg->ar_start != NULL); tsig_digest_query(mesg); return tsig_add_tsig(mesg); } /** * On a RECEIVED message. * * Adds a TSIG error to the message * * @todo 20140523 edf -- Change the algorithm to use tsig_add_tsig */ ya_result tsig_append_unsigned_error(message_data *mesg) { yassert(mesg->ar_start != NULL); u16 ar_count = ntohs(MESSAGE_AR(mesg->buffer)); packet_unpack_reader_data purd; purd.packet = mesg->buffer; purd.packet_size = mesg->received; purd.offset = 12; packet_reader_skip_fqdn(&purd); purd.offset += 4; mesg->send_length = purd.offset; mesg->received = purd.offset; MESSAGE_SET_AN(mesg->buffer, 0); MESSAGE_SET_NS(mesg->buffer, 0); MESSAGE_SET_AR(mesg->buffer, 0); if(!MESSAGE_HAS_TSIG(*mesg) || mesg->size_limit < (mesg->send_length + mesg->tsig.tsig->name_len + /* DNS NAME of the TSIG (name of the key) */ 0 + /* MAC */ 0 + /* OTHER DATA */ 12 /*DO NOT REPLACE*/)) /* = time + fudge + mac size + original id + error + other len */ { /* Cannot sign */ return TSIG_UNABLE_TO_SIGN; } u8 *tsig_ptr = &mesg->buffer[mesg->received]; /* record */ memcpy(tsig_ptr, mesg->tsig.tsig->name, mesg->tsig.tsig->name_len); tsig_ptr += mesg->tsig.tsig->name_len; memcpy(tsig_ptr, tsig_typeclassttl, sizeof (tsig_typeclassttl)); tsig_ptr += sizeof (tsig_typeclassttl); u16 *rdata_size_ptr = (u16*)tsig_ptr; tsig_ptr += 2; /* rdata */ memcpy(tsig_ptr, mesg->tsig.tsig->mac_algorithm_name, mesg->tsig.tsig->mac_algorithm_name_len); tsig_ptr += mesg->tsig.tsig->mac_algorithm_name_len; SET_U16_AT(tsig_ptr[ 0], mesg->tsig.timehi); SET_U32_AT(tsig_ptr[ 2], mesg->tsig.timelo); SET_U16_AT(tsig_ptr[ 6], mesg->tsig.fudge); SET_U16_AT(tsig_ptr[ 8], 0); /* MAC len */ SET_U16_AT(tsig_ptr[10], mesg->tsig.original_id); SET_U16_AT(tsig_ptr[12], mesg->tsig.error); SET_U16_AT(tsig_ptr[14], 0); /* Error len */ tsig_ptr += 16; u16 rdata_size = (tsig_ptr - (u8*)rdata_size_ptr) - 2; SET_U16_AT(*rdata_size_ptr, htons(rdata_size)); mesg->send_length = (tsig_ptr - mesg->buffer); MESSAGE_SET_AR(mesg->buffer, htons(ar_count + 1)); return SUCCESS; } ya_result tsig_append_error(message_data *mesg) { yassert(mesg->ar_start != NULL); MESSAGE_FLAGS_OR(mesg->buffer, QR_BITS, mesg->status); tsig_sign_answer(mesg); return SUCCESS; } ya_result tsig_sign_tcp_first_message(struct message_data *mesg) { ya_result ret = tsig_sign_answer(mesg); /* I must NOT clear the digest memory : it has already been done at the end of tsig_sign_answer */ if(FAIL(ret)) { return ret; } /* * Reset the digest * * Digest the digest (mesg->tsig.mac, mesg->tsig.mac_size (NETWORK ORDERED!)) */ HMAC_CTX_init(&mesg->tsig.ctx); HMAC_Init(&mesg->tsig.ctx, mesg->tsig.tsig->mac, mesg->tsig.tsig->mac_size, mesg->tsig.tsig->evp_md); u16 mac_size_network = htons(mesg->tsig.mac_size); #if LOG_DIGEST_INPUT != 0 log_debug("tsig_sign_tcp: PRIOR: (%p)", mesg); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mac_size_network, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.mac, mesg->tsig.mac_size, 32); #endif HMAC_Update(&mesg->tsig.ctx, (u8*) & mac_size_network, 2); HMAC_Update(&mesg->tsig.ctx, mesg->tsig.mac, mesg->tsig.mac_size); mesg->tsig.tcp_tsig_countdown = TSIG_TCP_PERIOD; return SUCCESS; } ya_result tsig_sign_tcp_next_message(struct message_data *mesg) { /* * Digest the message */ #if LOG_DIGEST_INPUT != 0 log_debug("tsig_sign_tcp: Message: (%p)", mesg); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->buffer, mesg->send_length, 32); #endif HMAC_Update(&mesg->tsig.ctx, mesg->buffer, mesg->send_length); /* * If it's the 100th since the last TSIG, then ... */ if(--mesg->tsig.tcp_tsig_countdown == 0) { mesg->tsig.tcp_tsig_countdown = TSIG_TCP_PERIOD; /* * Digest the time */ #if LOG_DIGEST_INPUT != 0 log_debug("tsig_sign_tcp: Timers: (%p)", mesg); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.timehi, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.timelo, 4, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.fudge, 2, 32); #endif HMAC_Update(&mesg->tsig.ctx, (u8*) & mesg->tsig.timehi, 2); HMAC_Update(&mesg->tsig.ctx, (u8*) & mesg->tsig.timelo, 4); HMAC_Update(&mesg->tsig.ctx, (u8*) & mesg->tsig.fudge, 2); u32 tmp_mac_size; HMAC_Final(&mesg->tsig.ctx, mesg->tsig.mac, &tmp_mac_size); /* * Store the TSIG */ tsig_add_tsig(mesg); /* * Reset the digest * * Digest the digest */ HMAC_CTX_cleanup(&mesg->tsig.ctx); HMAC_CTX_init(&mesg->tsig.ctx); HMAC_Init(&mesg->tsig.ctx, mesg->tsig.tsig->mac, mesg->tsig.tsig->mac_size, mesg->tsig.tsig->evp_md); u16 mac_size_network = htons(mesg->tsig.mac_size); #if LOG_DIGEST_INPUT != 0 log_debug("tsig_sign_tcp: Prior: (%p)", mesg); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mac_size_network, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.mac, mesg->tsig.mac_size, 32); #endif HMAC_Update(&mesg->tsig.ctx, (u8*) & mac_size_network, 2); HMAC_Update(&mesg->tsig.ctx, mesg->tsig.mac, mesg->tsig.mac_size); } return SUCCESS; } ya_result tsig_sign_tcp_last_message(struct message_data *mesg) { /* * Digest the message */ #if LOG_DIGEST_INPUT != 0 log_debug("tsig_sign_tcp: MESSAGE: (%p)", mesg); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->buffer, mesg->send_length, 32); #endif HMAC_Update(&mesg->tsig.ctx, mesg->buffer, mesg->send_length); /* * If it's the 100th since the last TSIG, then ... */ mesg->tsig.tcp_tsig_countdown = 0; /* * Digest the time */ #if LOG_DIGEST_INPUT != 0 log_debug("tsig_sign_tcp: TIMERS: (%p)", mesg); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.timehi, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.timelo, 4, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.fudge, 2, 32); #endif HMAC_Update(&mesg->tsig.ctx, (u8*) & mesg->tsig.timehi, 2); HMAC_Update(&mesg->tsig.ctx, (u8*) & mesg->tsig.timelo, 4); HMAC_Update(&mesg->tsig.ctx, (u8*) & mesg->tsig.fudge, 2); u32 tmp_mac_size; HMAC_Final(&mesg->tsig.ctx, mesg->tsig.mac, &tmp_mac_size); /* * Store the TSIG */ tsig_add_tsig(mesg); HMAC_CTX_cleanup(&mesg->tsig.ctx); return SUCCESS; } /** * If the message has no TSIG to do, it is considered to be successful. */ ya_result tsig_sign_tcp_message(struct message_data *mesg, tsig_tcp_message_position pos) { ya_result return_code = SUCCESS; if(MESSAGE_HAS_TSIG(*mesg)) { switch(pos) { case TSIG_START: { return_code = tsig_sign_tcp_first_message(mesg); break; } case TSIG_MIDDLE: { return_code = tsig_sign_tcp_next_message(mesg); break; } case TSIG_END: { return_code = tsig_sign_tcp_last_message(mesg); break; } case TSIG_WHOLE: /* one packet message */ { return_code = tsig_sign_answer(mesg); break; } case TSIG_NOWHERE: { break; } } } return return_code; } ya_result tsig_verify_tcp_first_message(struct message_data *mesg, const u8 *mac, u16 mac_size) { #if LOG_DIGEST_INPUT != 0 log_debug("tsig_verify_tcp_first_message: first verify: (%p)", mesg); #endif ya_result ret = tsig_verify_answer(mesg, mac, mac_size); /* I must NOT clear the digest memory : it has already been done at the end of tsig_sign */ if(FAIL(ret)) { return ret; } /* * Reset the digest * * Digest the digest (mesg->tsig.mac, mesg->tsig.mac_size (NETWORK ORDERED!)) */ HMAC_CTX_init(&mesg->tsig.ctx); HMAC_Init(&mesg->tsig.ctx, mesg->tsig.tsig->mac, mesg->tsig.tsig->mac_size, mesg->tsig.tsig->evp_md); u16 mac_size_network = htons(mesg->tsig.mac_size); #if LOG_DIGEST_INPUT != 0 log_debug("tsig_verify_tcp_first_message: previous MAC: (%p)", mesg); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mac_size_network, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.mac, mesg->tsig.mac_size, 32); #endif HMAC_Update(&mesg->tsig.ctx, (u8*) & mac_size_network, 2); HMAC_Update(&mesg->tsig.ctx, mesg->tsig.mac, mesg->tsig.mac_size); mesg->tsig.tcp_tsig_countdown = TSIG_TCP_PERIOD + 2; /* be a bit lenient */ return SUCCESS; } ya_result tsig_verify_tcp_next_message(struct message_data *mesg) { /* * Digest the message */ u8 mac[64]; #if LOG_DIGEST_INPUT != 0 log_debug("tsig_verify_tcp_next_message: message: (%p)", mesg); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->buffer, mesg->received, 32); #endif if(mesg->tsig.tcp_tsig_countdown-- < 0) { return TSIG_BADSIG; } HMAC_Update(&mesg->tsig.ctx, mesg->buffer, mesg->received); /* * If it has been signed ... */ if(mesg->tsig.tsig != NULL) { mesg->tsig.tcp_tsig_countdown = TSIG_TCP_PERIOD + 2; /* be a bit lenient */ /* * Digest the time */ #if LOG_DIGEST_INPUT != 0 log_debug("tsig_verify_tcp_next_message: timers: (%p)", mesg); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.timehi, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.timelo, 4, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mesg->tsig.fudge, 2, 32); #endif HMAC_Update(&mesg->tsig.ctx, (u8*) & mesg->tsig.timehi, 2); HMAC_Update(&mesg->tsig.ctx, (u8*) & mesg->tsig.timelo, 4); HMAC_Update(&mesg->tsig.ctx, (u8*) & mesg->tsig.fudge, 2); u32 tmp_mac_size; HMAC_Final(&mesg->tsig.ctx, mac, &tmp_mac_size); HMAC_CTX_cleanup(&mesg->tsig.ctx); if(memcmp(mesg->tsig.mac, mac, tmp_mac_size) != 0) { return TSIG_BADSIG; } /* * Reset the digest * * Digest the digest */ HMAC_CTX_init(&mesg->tsig.ctx); HMAC_Init(&mesg->tsig.ctx, mesg->tsig.tsig->mac, mesg->tsig.tsig->mac_size, mesg->tsig.tsig->evp_md); u16 mac_size_network = htons(mesg->tsig.mac_size); #if LOG_DIGEST_INPUT != 0 log_debug("tsig_verify_tcp_next_message: previous MAC: (%p)", mesg); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, (u8*) & mac_size_network, 2, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->tsig.mac, mesg->tsig.mac_size, 32); #endif HMAC_Update(&mesg->tsig.ctx, (u8*) & mac_size_network, 2); HMAC_Update(&mesg->tsig.ctx, mesg->tsig.mac, mesg->tsig.mac_size); } return SUCCESS; } /** * This only cleans-up after the verify * * @param mesg */ void tsig_verify_tcp_last_message(struct message_data *mesg) { /* * Clear the digest */ #if LOG_DIGEST_INPUT != 0 log_debug("tsig_verify_tcp_last_message: message: (%p)", mesg); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG, mesg->buffer, mesg->received, 32); #endif if(mesg->tsig.tsig != NULL) { HMAC_CTX_cleanup(&mesg->tsig.ctx); } } /** * Skips the header and all the records but the last AR. * * Does NOT care about errors but the ones preventing it to find the TSIG record * * Extract the TSIG * Decreases AR * Decreases the size of the message. * * Whole-message processing should avoid this as it does the job twice ... */ ya_result tsig_message_extract(struct message_data *mesg) { packet_unpack_reader_data reader; ya_result return_value; u16 ar = ntohs(MESSAGE_AR(mesg->buffer)); if( ar < 1) { return 0; /* no TSIG */ } u16 qd = ntohs(MESSAGE_QD(mesg->buffer)); u16 an = ntohs(MESSAGE_AN(mesg->buffer)); u16 ns = ntohs(MESSAGE_NS(mesg->buffer)); packet_reader_init(&reader, mesg->buffer, mesg->received); reader.offset = DNS_HEADER_LENGTH; while(qd > 0) { if(FAIL(return_value = packet_reader_skip_fqdn(&reader))) { return return_value; } if(FAIL(return_value = packet_reader_skip(&reader, 4))) { return return_value; } qd--; } u16 n = an + ns + ar - 1; while(n > 0) { if(FAIL(return_value = packet_reader_skip_record(&reader))) { return return_value; } n--; } /* The following record is supposed to be a TSIG */ u32 tsig_offset = reader.offset; u8 fqdn[MAX_DOMAIN_LENGTH]; if(FAIL(return_value = packet_reader_read_fqdn(&reader, fqdn, sizeof(fqdn)))) { return return_value; } struct type_class_ttl_rdlen tctr; if(FAIL(return_value = packet_reader_read(&reader, &tctr, 10))) { return return_value; } if(tctr.qtype != TYPE_TSIG) { return 0; } if(tctr.qclass != CLASS_ANY) { return TSIG_FORMERR; } if(tctr.ttl != 0) { return TSIG_FORMERR; } tsig_item *tsig = tsig_get(fqdn); if(tsig == NULL) { return TSIG_BADKEY; } s32 len = ntohs(tctr.rdlen) - 16; if(len < 3 + 3) /* minimum for the fixed bytes + two relevant fqdn */ { return TSIG_FORMERR; } if(FAIL(return_value = packet_reader_read_fqdn(&reader, fqdn, sizeof(fqdn)))) { return return_value; } len -= return_value; packet_reader_read_u16(&reader, &mesg->tsig.timehi); packet_reader_read_u32(&reader, &mesg->tsig.timelo); packet_reader_read_u16(&reader, &mesg->tsig.fudge); packet_reader_read_u16(&reader, &mesg->tsig.mac_size); u16 mac_size = ntohs(mesg->tsig.mac_size); mesg->tsig.mac_size = mac_size; if(mac_size > sizeof(mesg->tsig.mac)) { return TSIG_BADKEY; /* The key is bigger than anything supported */ } if(FAIL(return_value = packet_reader_read(&reader, mesg->tsig.mac, mac_size))) { return return_value; } len -= return_value; packet_reader_read_u16(&reader, &mesg->tsig.original_id); packet_reader_read_u16(&reader, &mesg->tsig.error); if(FAIL(return_value = packet_reader_read_u16(&reader, &mesg->tsig.other_len))) { return return_value; } u16 other_len = ntohs(mesg->tsig.other_len); len -= other_len; if(len != 0) { return TSIG_FORMERR; } mesg->tsig.other = NULL; mesg->tsig.tsig = tsig; mesg->tsig.mac_algorithm = tsig->mac_algorithm; mesg->received = tsig_offset; MESSAGE_SET_AR(mesg->buffer, htons(ar - 1)); return 1; /* got 1 signature */ } #endif /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/logger_channel_file.c0000644000077100007710000000012412650131756023446 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.625344 30 ctime=1454597651.486344534 yadifa-2.1.6-5826/lib/dnscore/src/logger_channel_file.c0000664000077100007710000002700012650131756023252 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logger Logging functions * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include #include #include #include #include #include #include "dnscore/logger_channel_file.h" #include "dnscore/buffer_output_stream.h" #include "dnscore/file_output_stream.h" #include "dnscore/format.h" #include "dnscore/chroot.h" /* * The new logger model does not requires MT protection on the channels */ #define FILE_CHANNEL_BUFFER_SIZE 65536 /// @todo 20140523 edf -- make this configurable typedef struct file_data file_data; struct file_data { output_stream os; char *file_name; int fd; uid_t uid; gid_t gid; u16 mode; bool force_flush; }; static ya_result logger_channel_file_constmsg(logger_channel* chan, int level, char* text, u32 text_len, u32 date_offset) { file_data* sd = (file_data*)chan->data; output_stream_write(&sd->os, (const u8*)text, text_len); ya_result ret = output_stream_write(&sd->os, (const u8*)"\n", 1); if(sd->force_flush) { output_stream_flush(&sd->os); } return ret; } static ya_result logger_channel_file_vmsg(logger_channel* chan, int level, char* text, va_list args) { file_data* sd = (file_data*)chan->data; vosformat(&sd->os, text, args); ya_result ret = output_stream_write(&sd->os, (const u8*)"\n", 1); if(sd->force_flush) { output_stream_flush(&sd->os); } return ret; } static ya_result logger_channel_file_msg(logger_channel* chan, int level, char* text, ...) { va_list args; va_start(args, text); ya_result ret = logger_channel_file_vmsg(chan, level, text, args); va_end(args); return ret; } static void logger_channel_file_flush(logger_channel* chan) { file_data* sd = (file_data*)chan->data; output_stream_flush(&sd->os); } static void logger_channel_file_close(logger_channel* chan) { file_data* sd = (file_data*)chan->data; output_stream_flush(&sd->os); output_stream_close(&sd->os); chroot_unmanage_path(&sd->file_name); free(sd->file_name); chan->vtbl = NULL; sd->os.data = NULL; sd->os.vtbl = NULL; free(chan->data); chan->data = NULL; } static ya_result logger_channel_file_append(const char *fullpath, uid_t uid, gid_t gid, u16 mode, file_data* sd) { output_stream errlog_os; output_stream buffered_errlog_os; ya_result return_code; if(FAIL(return_code = file_output_stream_open_ex_nolog(fullpath, O_CREAT|O_APPEND|O_RDWR, mode, &errlog_os))) { sd->fd = -1; return return_code; } /* * Change ownership of the file here. */ int fd = fd_output_stream_get_filedescriptor(&errlog_os); if((getuid() != uid) || (getgid() != gid)) { if(fchown(fd, uid, gid) < 0) { return_code = ERRNO_ERROR; output_stream_close(&errlog_os); sd->fd = -1; return return_code; } } sd->fd = fd; if(FAIL(return_code = buffer_output_stream_init(&errlog_os, &buffered_errlog_os, FILE_CHANNEL_BUFFER_SIZE))) { output_stream_close(&errlog_os); sd->fd = -1; return return_code; } sd->os.data = buffered_errlog_os.data; sd->os.vtbl = buffered_errlog_os.vtbl; return SUCCESS; } static ya_result logger_channel_file_reopen(logger_channel* chan) { ya_result return_code; file_data* sd = (file_data*)chan->data; struct timeval tv; struct tm t; output_stream_flush(&sd->os); sd->uid = logger_get_uid(); sd->gid = logger_get_gid(); /// /* open a new file stream */ output_stream errlog_os; if(FAIL(return_code = file_output_stream_open_ex_nolog(sd->file_name, O_CREAT|O_APPEND|O_RDWR, sd->mode, &errlog_os))) { logger_channel_file_flush(chan); gettimeofday(&tv, NULL); localtime_r(&tv.tv_sec, &t); logger_channel_file_msg(chan, LOG_NOTICE, "%04d-%02d-%02d %02d:%02d:%02d.%06d | %-5i | %08x | %8s | N | unable to reopen '%s': %r, resuming on original", t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, tv.tv_usec, getpid(), pthread_self(), "system", sd->file_name, return_code); logger_channel_file_flush(chan); return return_code; } /* change ownership of the file */ int fd = fd_output_stream_get_filedescriptor(&errlog_os); if((getuid() != sd->uid) || (getgid() != sd->gid)) { if(fchown(fd, sd->uid, sd->gid) < 0) { return_code = ERRNO_ERROR; output_stream_close(&errlog_os); logger_channel_file_flush(chan); gettimeofday(&tv, NULL); localtime_r(&tv.tv_sec, &t); logger_channel_file_msg(chan, LOG_NOTICE, "%04d-%02d-%02d %02d:%02d:%02d.%06d | %-5i | %08x | %8s | N | unable to fchown '%s': %r, resuming on original", t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, tv.tv_usec, getpid(), pthread_self(), "system", sd->file_name, return_code); logger_channel_file_flush(chan); return return_code; } } logger_channel_file_flush(chan); gettimeofday(&tv, NULL); localtime_r(&tv.tv_sec, &t); logger_channel_file_msg(chan, LOG_NOTICE, #if defined(DEBUG) || (HAS_LOG_PID_ALWAYS_ON && HAS_LOG_THREAD_ID_ALWAYS_ON) "%04d-%02d-%02d %02d:%02d:%02d.%06d | %-5i | %08x | %8s | N | reopening '%s'", #elif HAS_LOG_PID_ALWAYS_ON "%04d-%02d-%02d %02d:%02d:%02d.%06d | %-5i | %8s | N | reopening '%s'", #elif HAS_LOG_THREAD_ID_ALWAYS_ON "%04d-%02d-%02d %02d:%02d:%02d.%06d | %08x | %8s | N | reopening '%s'", #else "%04d-%02d-%02d %02d:%02d:%02d.%06d | %8s | N | reopening '%s'", #endif t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, tv.tv_usec, #if defined(DEBUG) || HAS_LOG_PID_ALWAYS_ON getpid(), #endif #if defined(DEBUG) || HAS_LOG_THREAD_ID_ALWAYS_ON pthread_self(), #endif "system", sd->file_name); logger_channel_file_flush(chan); output_stream* fos = buffer_output_stream_get_filtered(&sd->os); /* exchange the file descriptors */ fd_output_stream_attach(fos, fd); fd_output_stream_attach(&errlog_os, sd->fd); sd->fd = fd; file_output_stream_close_nolog(&errlog_os); // and NOT output_stream_close(&errlog_os); logger_channel_file_flush(chan); gettimeofday(&tv, NULL); localtime_r(&tv.tv_sec, &t); logger_channel_file_msg(chan, LOG_NOTICE, #if defined(DEBUG) || (HAS_LOG_PID_ALWAYS_ON && HAS_LOG_THREAD_ID_ALWAYS_ON) "%04d-%02d-%02d %02d:%02d:%02d.%06d | %-5i | %08x | %8s | N | reopened '%s'", #elif HAS_LOG_PID_ALWAYS_ON "%04d-%02d-%02d %02d:%02d:%02d.%06d | %-5i | %8s | N | reopened '%s'", #elif HAS_LOG_THREAD_ID_ALWAYS_ON "%04d-%02d-%02d %02d:%02d:%02d.%06d | %08x | %8s | N | reopened '%s'", #else "%04d-%02d-%02d %02d:%02d:%02d.%06d | %8s | N | reopened '%s'", #endif t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, tv.tv_usec, #if defined(DEBUG) || HAS_LOG_PID_ALWAYS_ON getpid(), #endif #if defined(DEBUG) || HAS_LOG_THREAD_ID_ALWAYS_ON pthread_self(), #endif "system", sd->file_name); logger_channel_file_flush(chan); return return_code; } static const logger_channel_vtbl stream_vtbl = { logger_channel_file_constmsg, logger_channel_file_msg, logger_channel_file_vmsg, logger_channel_file_flush, logger_channel_file_close, logger_channel_file_reopen, "file_channel" }; ya_result logger_channel_file_open(const char *fullpath, uid_t uid, gid_t gid, u16 mode, bool forceflush,logger_channel* chan) { ya_result return_code; file_data* sd; MALLOC_OR_DIE(file_data*, sd, sizeof (file_data), 0x4d5254534e414843); /* CHANSTRM */ if(ISOK(return_code = logger_channel_file_append(fullpath, uid, gid, mode, sd))) { sd->file_name = strdup(fullpath); chroot_manage_path(&sd->file_name, fullpath, FALSE); sd->uid = uid; sd->gid = gid; sd->mode = mode; sd->force_flush = forceflush; chan->data = sd; chan->vtbl = &stream_vtbl; } else { free(sd); } return return_code; } ya_result logger_channel_file_rename(logger_channel *chan, const char *newpath) { file_data* sd = (file_data*)chan->data; if(sd != NULL) { if(strcmp(sd->file_name, newpath) != 0) { free(sd->file_name); sd->file_name = strdup(newpath); return SUCCESS; } } return INVALID_STATE_ERROR; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/parsing.c0000644000077100007710000000012412650131756021143 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.624344 30 ctime=1454597651.547344534 yadifa-2.1.6-5826/lib/dnscore/src/parsing.c0000664000077100007710000004556012650131756020762 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscoretools Generic Tools * @ingroup dnscore * @brief * * @{ */ #include "dnscore/dnscore-config.h" #include "dnscore/dnscore-config.h" #include #include #include #include #include #include #include "dnscore/parsing.h" #if !HAS_TIMEGM /// @note edf 20150326 -- timegm is not portable (Solaris) in the end, implementing one seemed the only choice /** * This implementation is based on the formula found in: * * http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_15 * 4.15 Seconds Since the Epoch * * It only cares on the Year, Month, Day, Hour, Minute and Second fields of struct tm (the one we are really caring about) * It's a constant-time implementation. * * I don't see an obvious way to make it faster expect having the year values pre-calculated for the next 30+ years * (This would spare a few divs and a mult.) * * If I improve it further, it may be a replacement on the timegm() dependency. * */ // J F M A M J J A S O N D // 31 28 31 30 31 30 31 31 30 31 30 31 #define MDAY_FIX(d_) ((d_)-1) static int timegm_mdays_norm[12] = {MDAY_FIX(0),MDAY_FIX( 31),MDAY_FIX( 59),MDAY_FIX( 90),MDAY_FIX( 120),MDAY_FIX( 151),MDAY_FIX( 181),MDAY_FIX( 212),MDAY_FIX( 243),MDAY_FIX( 273),MDAY_FIX( 304),MDAY_FIX( 334)}; // MDAY_FIX(365) static int timegm_mdays_leap[12] = {MDAY_FIX(0),MDAY_FIX( 31),MDAY_FIX( 60),MDAY_FIX( 91),MDAY_FIX( 121),MDAY_FIX( 152),MDAY_FIX( 182),MDAY_FIX( 213),MDAY_FIX( 244),MDAY_FIX( 274),MDAY_FIX( 305),MDAY_FIX( 335)}; // MDAY_FIX(366) static time_t timegm(struct tm *tv) { time_t ret; if( (tv->tm_year < 0) || (((u32)tv->tm_mon) > 11) || (((u32)tv->tm_mday - 1) > 31 - 1) || (((u32)tv->tm_hour) > 60) || (((u32)tv->tm_min) > 59) || (((u32)tv->tm_sec) > 60) ) { return -1; } int yyyy = (tv->tm_year + 1900); int yday; if(((yyyy & 3) == 0) && (((yyyy % 100) != 0) || ((yyyy % 400) == 0))) { yday = timegm_mdays_leap[tv->tm_mon]; } else { yday = timegm_mdays_norm[tv->tm_mon]; } yday += tv->tm_mday; ret = tv->tm_sec + tv->tm_min * 60 + tv->tm_hour * 3600 + ( yday + ((tv->tm_year-69)/4) - ((tv->tm_year-1)/100) + ((tv->tm_year+299)/400) ) * 86400 + (tv->tm_year-70) * 31536000; return ret; } #endif /** \brief A string will be checked * * The number will be extracted from the string if present. This number can * be 10-based, or hex-based, or...\n * The base must be between 2 and 36 and the number must be be between the min * values and max value * * @param[in] src string with number part in it * @param[out] dst number found * @param[in] min * @param[in] max * @param[in] base * * @retval OK * @retval NOK, if no digits found, or number not in the range */ ya_result parse_u32_check_range(const char *src, u32 *dst, u32 min, u32 max, u8 base) { long long int val; char *endptr; int err; /** @note sizeof(long long int) > sizeof(u32) */ /* ------------------------------------------------------------ */ errno = 0; /** @note strtol returns a 64 bits integer on 64 bits architectures * strtoll should be 64 bits on both 32 and 64 bits architectures * so for portability 64 bits has to be handled */ val = strtoll(src, &endptr, base); /* stroll = 64 bits : dst is 32 */ err = errno; /* in case errno is a macro */ if((endptr == src) || (err == EINVAL) || (err == ERANGE) || (val < (long long int)min) || (val > (long long int)max)) { return PARSEINT_ERROR; } *dst = (u32)val; return OK; } ya_result parse_u32_check_range_len_base10(const char *src, u32 src_len, u32 *dst, u32 min, u32 max) { // 0......N // 67612321 --src_len; if(src_len > 9) { return PARSEINT_ERROR; // out of range } u32 base_multiplier = 10; u64 output_value = ((u64)src[src_len]) - '0'; if((u64)output_value > 9) { return PARSEINT_ERROR; } while(src_len > 0) { --src_len; u64 value = ((u64)src[src_len]) - '0'; if((u64)value > 9) { return PARSEINT_ERROR; } value *= base_multiplier; output_value += value; base_multiplier *= 10; } if((output_value < min) || (output_value > max)) { return PARSEINT_ERROR; } *dst = (u32)output_value; return SUCCESS; } ya_result parse_s32_check_range_len_base10(const char *src, u32 src_len, s32 *dst, s32 min, s32 max) { // 0......N // 67612321 --src_len; if(src_len > 10) { return PARSEINT_ERROR; // out of range } bool minus; if((minus = (src[0] == '-'))) { src++; --src_len; } u32 base_multiplier = 10; s64 output_value = ((s64)src[src_len]) - '0'; if((u64)output_value > 9) { return PARSEINT_ERROR; } while(src_len > 0) { --src_len; s64 value = ((s64)src[src_len]) - '0'; if((u64)value > 9) { return PARSEINT_ERROR; } value *= base_multiplier; output_value += value; base_multiplier *= 10; } if(minus) { output_value = -output_value; } if((output_value < min) || (output_value > max)) { return PARSEINT_ERROR; } *dst = (s32)output_value; return SUCCESS; } /** \brief Converts a string to an epoch * * Converts a string to an epoch * * @param[in] src string in the form YYYYMMDDhhmmss * @param[out] dst value of the source converted into GMT epoch * * @retval OK * @retval NOK, if no digits found, or number not in the range */ ya_result parse_yyyymmddhhmmss_check_range_len(const char *src, u32 src_len, u32 *dst) { struct tm thetime; if(src_len != 14) { return PARSEDATE_ERROR; } #ifdef DEBUG memset(&thetime, 0xff, sizeof (thetime)); #endif u32 tmp_u32; if(FAIL(parse_u32_check_range_len_base10(src, 4, &tmp_u32, 1970, 2038))) { return PARSEDATE_ERROR; } thetime.tm_year = tmp_u32; src += 4; if(FAIL(parse_u32_check_range_len_base10(src, 2, &tmp_u32, 1, 12))) { return PARSEDATE_ERROR; } thetime.tm_mon = tmp_u32; src += 2; if(FAIL(parse_u32_check_range_len_base10(src, 2, &tmp_u32, 1, 31))) { return PARSEDATE_ERROR; } thetime.tm_mday = tmp_u32; src += 2; if(FAIL(parse_u32_check_range_len_base10(src, 2, &tmp_u32, 0, 23))) { return PARSEDATE_ERROR; } thetime.tm_hour = tmp_u32; src += 2; if(FAIL(parse_u32_check_range_len_base10(src, 2, &tmp_u32, 0, 59))) { return PARSEDATE_ERROR; } thetime.tm_min = tmp_u32; src += 2; if(FAIL(parse_u32_check_range_len_base10(src, 2, &tmp_u32, 0, 61))) { return PARSEDATE_ERROR; } thetime.tm_sec = tmp_u32; thetime.tm_year -= 1900; thetime.tm_mon--; time_t t = timegm(&thetime); if(t < 0) { return PARSEDATE_ERROR; } *dst = (u32)t; return OK; } ya_result parse_yyyymmddhhmmss_check_range(const char *src, u32 *dst) { ya_result return_code; return_code = parse_yyyymmddhhmmss_check_range_len(src, strlen(src), dst); return return_code; } /** \brief Converts a chain of pascal strings to a string * * Converts a chain of pascal strings to a string * * @param[in] src string in the form [len+chars]* * @param[out] dst string * * @retval OK * @retval NOK, if something is broken */ ya_result parse_pstring(char **srcp, size_t src_len, u8 *dst, size_t dst_len) { char *s = *srcp; const char * const limit = &s[src_len]; u8 *p; const u8 *dst_limit; bool quoted; if(src_len == 0 || dst_len < 256) { return PARSESTRING_ERROR; } p = &dst[1]; dst_limit = &dst[dst_len]; quoted = FALSE; if(s[0] == '"') { quoted = TRUE; s++; } for(; s < limit; s++) { char c = *s; if((c < 32)) { return PARSE_INVALID_CHARACTER; } // If unescaped '\' go on otherwise set escape = 1 if(c == '\\') { // grab next char IF there is one s++; if(s < limit) { if((c < 32)) { return PARSE_INVALID_CHARACTER; } if(p == dst_limit) { return PARSE_BUFFER_TOO_SMALL_ERROR; } *p++ = *s; } else { return PARSESTRING_ERROR; } continue; } // only " if(c == '"') { if(!quoted) { return PARSESTRING_ERROR; } quoted = FALSE; break; } if(!quoted) { if(isspace(c)) { break; } } if(p == dst_limit) { return PARSE_BUFFER_TOO_SMALL_ERROR; } /* add character to temporary variable */ *p++ = c; } /* if unbalanaced qoutes --> stop */ if(quoted) { return PARSESTRING_ERROR; } ya_result len = p - dst; dst[0] = len - 1; /* Now it is really done the parsing */ *srcp = s + 1; return len; } /** \brief Copies and trim a string * * Copies a string while remove head & tail spaces and reducing any blank run to a single space * The source does not need to be asciiz * The destination will be asciiz * * @param[in] src string * @param[in] src_len size of the string (the zero sentinel is not checked) * @param[in] dst buffer that will receive the output string * @param[in] dst_len size of the buffer * * @retval >= 0, the length of the dst string * @retval ERROR, dst_len was too small */ ya_result parse_copy_trim_spaces(const char *src, u32 src_len, char *dst, u32 dst_len) { yassert(src != NULL && dst != NULL && dst_len > 0); const char *src_limit = src + src_len; const char *dst_limit = dst + dst_len - 1; const char *dst_org = dst; bool has_space = FALSE; *dst = '\0'; while(src < src_limit && isspace(*src)) { src++; } while(src < src_limit) { char c = *src++; if(isspace(c)) { has_space = TRUE; continue; } if(has_space) { *dst++ = ' '; if(dst == dst_limit) { return PARSE_BUFFER_TOO_SMALL_ERROR; /* buffer too small */ } } has_space = FALSE; *dst++ = c; if(dst == dst_limit) { return PARSE_BUFFER_TOO_SMALL_ERROR; /* buffer too small */ } } *dst++ = '\0'; return dst - dst_org; } ya_result parse_remove_spaces(char *inout_txt) { char *p = inout_txt; char c; while((c = *inout_txt++) != '\0') { if(isspace(c)) { continue; } *p++ = c; } *p = '\0'; return p - inout_txt; } /** \brief Skips a specific keyword from a string, case insensitive * * Skips a specific keyword from a string, case insensitive, skips white spaces before and after the match * * @param[in] src string * @param[in] src_len size of the string (the zero sentinel is not checked) * @param[in] words array of strings that will be looked for * @param[in] word_count the size of the array * @param[in] matched_word a pointer to an integer that will hold the matched word index or -1 (can be NULL) * * @retval >= 0, the number of bytes until the next word * @retval ERROR, dst_len was too small */ ya_result parse_skip_word_specific(const char *src, u32 src_len, const char **words, u32 word_count, s32 *matched_word) { const char *src_org = src; const char *src_limit = src + src_len; // skip spaces src = parse_skip_spaces(src); // get the non-space const char *p = src; while(p < src_limit && !isspace(*p)) { p++; } // p == src_limit OR p is at the first blank after the word src_limit = p; src_len = src_limit - src; for(u32 i = 0; i < word_count; i++) { const char *ptr = src; const char *word = words[i]; u32 word_len = strlen(word); if(word_len != src_len) { continue; } const char *word_limit = word + word_len; // lengths are the same while(word < word_limit) { if(tolower(*ptr++) != tolower(*word++)) { break; } } if(word == word_limit) { /* match */ if(matched_word != NULL) { *matched_word = i; } return src_limit - src_org; } } if(matched_word != NULL) { *matched_word = -1; } return PARSEWORD_NOMATCH_ERROR; /* no match */ } const char * parse_skip_until_chars(const char *src, const char *chars, u32 chars_len) { for(;;) { char c = *src; if(c == '\0') { return src; } for(u32 i = 0; i < chars_len; i++) { if(c == chars[i]) { return src; } } src++; } } /** \brief Skips a specific keyword from a string, case insensitive * * Skips a specific keyword from a string, case insensitive, skips white spaces before and after the match * * @param[in] src string * @param[in] src_len size of the string (the zero sentinel is not checked) * @param[in] dst buffer that will receive the binary version of the ip * @param[in] dst_len the size of the buffer, minimum 4 for ipv4 and minimum 16 for ipv6 * * @retval >= 0, the number of bytes written (4 for ipv4 and 16 for ipv6) * @retval ERROR, dst_len was too small or the src was not a valid ip */ ya_result parse_ip_address(const char *src, u32 src_len_, u8 *dst, u32 dst_len) { const char *new_src = parse_skip_spaces(src); s32 src_len = (s32)src_len_; src_len -= new_src - src; bool expect_v6_or_more = FALSE; if(src_len <= 0) { return PARSEIP_ERROR; } if(*new_src == '[') /// @note handle RFC 3986, section 3.2.2 { expect_v6_or_more = TRUE; new_src++; // IPv6+ delimiter char *end = strchr(new_src, ']'); if(end == NULL) { return PARSEIP_ERROR; } src_len = end - new_src; } char tmp[64]; src_len = MIN(src_len, sizeof(tmp)-1); memcpy(tmp, src, src_len); tmp[src_len] = '\0'; if(dst_len < 4) { return PARSE_BUFFER_TOO_SMALL_ERROR; /* dst too small */ } if(inet_pton(AF_INET, tmp, dst) == 1) { if(expect_v6_or_more) { return PARSEIP_ERROR; } return 4; } if(dst_len < 16) { return PARSE_BUFFER_TOO_SMALL_ERROR; /* dst too small */ } if(inet_pton(AF_INET6, tmp, dst) == 1) { return 16; } return PARSEIP_ERROR; } s32 parse_next_token(char *dest, size_t dest_size, const char *from, const char *delim) { const char *to = from; for(;;) { char c = *to; if(c == '\0') { size_t len = to - from; if(len > dest_size) { return PARSE_BUFFER_TOO_SMALL_ERROR; } memcpy(dest, from, len); dest[len] = '\0'; return len; } // for every delimiter, test if c if such a delimiter // if it is, then for(const char *d = delim; *d != 0; d++) { if(*d == c) { // end of word size_t len = to - from; if(len > dest_size) { return PARSE_BUFFER_TOO_SMALL_ERROR; } memcpy(dest, from, len); dest[len] = '\0'; return len; } } ++to; } } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/threaded_ringbuffer.c0000644000077100007710000000012412650131756023471 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.746344 30 ctime=1454597651.618344534 yadifa-2.1.6-5826/lib/dnscore/src/threaded_ringbuffer.c0000664000077100007710000003634212650131756023306 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/threaded_ringbuffer.h" #define THREADED_QUEUE_TAG 0x455545555154 /* TQUEUE */ /* * The maximum number of nodes I should ever require is the queue size + 1 * * A good way to handle this is : * * Node allocator, node destroyer * * But the node allocator only allocates a node if none are free * And the node destroyer does not release a node but queue it instead. * * If I enforce the requirement that the allocation/destruction is done * by a single thread I could gain some cpu cycles. * * This reasoning is also valid for the thread_pool_task * */ typedef struct threaded_ringbuffer_node threaded_ringbuffer_node; struct threaded_ringbuffer_node { threaded_ringbuffer_node *next; threaded_ringbuffer_node *prev; void* data; }; /* * Note: * * If a pthread_mutex_init fails, it's because of a resource, memory or rights issue. * So the application will fail soon enough. * I still should check this and exit. * * pthread_mutex_lock will fail only if the current thread aleady owns the mutex * * pthread_mutex_unlock will fail only if the current thread does not owns the mutex * */ void threaded_ringbuffer_init(threaded_ringbuffer *queue, int max_size) { MALLOC_OR_DIE(void**, queue->buffer, sizeof (void*)* max_size, THREADED_QUEUE_TAG); queue->buffer_limit = &queue->buffer[max_size]; queue->write_slot = queue->buffer; queue->read_slot = queue->buffer; pthread_mutex_init(&queue->mutex, NULL); pthread_mutex_init(&queue->mutex_enqueue, NULL); pthread_mutex_init(&queue->mutex_dequeue, NULL); queue->max_size = max_size; queue->size = 0; pthread_mutex_lock(&queue->mutex_dequeue); } void threaded_ringbuffer_finalize(threaded_ringbuffer *queue) { /** * If the queue is not empty : too bad ! * * It's the responsibility of the caller to ensure the queue and set of listeners is empty. */ free(queue->buffer); queue->buffer = NULL; pthread_mutex_destroy(&queue->mutex); pthread_mutex_destroy(&queue->mutex_enqueue); pthread_mutex_destroy(&queue->mutex_dequeue); } void threaded_ringbuffer_enqueue(threaded_ringbuffer* queue, void* constant_pointer) { /* * Ensure I'm allowed to enqueue (only one enqueuer and queue not full) */ pthread_mutex_lock(&queue->mutex_enqueue); /* * Ensure I'm allowed to work on queue (only one working on it) */ pthread_mutex_lock(&queue->mutex); /* * Set the data to the write position, * and move the write position to the next slot * */ /** * @note: From the random benchmark : "if(overflow) reset" is (much) faster than MOD(limit) */ *queue->write_slot++ = constant_pointer; if(queue->write_slot == queue->buffer_limit) { queue->write_slot = queue->buffer; } if(queue->size == 0) { /* * The queue is empty : the dequeuers are waiting. * Since we will add something for them, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ pthread_mutex_unlock(&queue->mutex_dequeue); } queue->size++; if(queue->size < queue->max_size) /* Too much -> lock the pushes, will be unlocked by a pop */ { /* * This new addition made the queue full. So we will not unlock the enqueuers. * The dequeuers will do that when they see fit. (ie: queue not full anymore) */ pthread_mutex_unlock(&queue->mutex_enqueue); } /* * We are done here. */ pthread_mutex_unlock(&queue->mutex); } bool threaded_ringbuffer_try_enqueue(threaded_ringbuffer* queue, void* constant_pointer) { /* * Ensure I'm allowed to enqueue (only one enqueuer and queue not full) */ if(pthread_mutex_trylock(&queue->mutex_enqueue) != 0) { return FALSE; } /* * Ensure I'm allowed to work on queue (only one working on it) */ if(pthread_mutex_trylock(&queue->mutex) != 0) { pthread_mutex_unlock(&queue->mutex_enqueue); return FALSE; } /* * Set the data to the write position, * and move the write position to the next slot * */ /** * @note: From the random benchmark : "if(overflow) reset" is (much) faster than MOD(limit) */ *queue->write_slot++ = constant_pointer; if(queue->write_slot == queue->buffer_limit) { queue->write_slot = queue->buffer; } if(queue->size == 0) { /* * The queue is empty : the dequeuers are waiting. * Since we will add something for them, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ pthread_mutex_unlock(&queue->mutex_dequeue); } queue->size++; if(queue->size < queue->max_size) /* Too much -> lock the pushes, will be unlocked by a pop */ { /* * This new addition made the queue full. So we will not unlock the enqueuers. * The dequeuers will do that when they see fit. (ie: queue not full anymore) */ pthread_mutex_unlock(&queue->mutex_enqueue); } /* * We are done here. */ pthread_mutex_unlock(&queue->mutex); return TRUE; } void* threaded_ringbuffer_try_peek(threaded_ringbuffer *queue) { /* * Ensure I'm allowed to dequeue (not empty and only one on it) */ if(pthread_mutex_trylock(&queue->mutex_dequeue) != 0) { return (void*)~0; } /* * Ensure I'm allowed to work on queue (only one working on it) */ if(pthread_mutex_trylock(&queue->mutex) != 0) { pthread_mutex_unlock(&queue->mutex_dequeue); return (void*)~0; } /* * Get the data from the read position, * and move the read position to the next slot * */ void* data = *queue->read_slot; pthread_mutex_unlock(&queue->mutex); pthread_mutex_unlock(&queue->mutex_dequeue); return data; } void* threaded_ringbuffer_peek(threaded_ringbuffer *queue) { /* * Ensure I'm allowed to dequeue (not empty and only one on it) */ pthread_mutex_lock(&queue->mutex_dequeue); /* * Ensure I'm allowed to work on queue (only one working on it) */ pthread_mutex_lock(&queue->mutex); /* * Get the data from the read position, * and move the read position to the next slot * */ void* data = *queue->read_slot; pthread_mutex_unlock(&queue->mutex); pthread_mutex_unlock(&queue->mutex_dequeue); return data; } void* threaded_ringbuffer_dequeue(threaded_ringbuffer *queue) { /* * Ensure I'm allowed to dequeue (not empty and only one on it) */ pthread_mutex_lock(&queue->mutex_dequeue); /* * Ensure I'm allowed to work on queue (only one working on it) */ pthread_mutex_lock(&queue->mutex); /* * Get the data from the read position, * and move the read position to the next slot * */ void* data = *queue->read_slot++; if(queue->read_slot == queue->buffer_limit) { queue->read_slot = queue->buffer; } if(queue->size == queue->max_size) /* enqueue has just been locked -> unlock */ { /* * The queue is full : the queuers are waiting. * Since we will are removing something, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ pthread_mutex_unlock(&queue->mutex_enqueue); } queue->size--; if(queue->size > 0) /* at 0, locks the next dequeue */ { /* * This removal made the queue empty. So we will not unlock the dequeuers. * The enqueuers will do that when they see fit. (ie: queue not full anymore) */ pthread_mutex_unlock(&queue->mutex_dequeue); } /* * We are done here. */ pthread_mutex_unlock(&queue->mutex); return data; } void* threaded_ringbuffer_try_dequeue(threaded_ringbuffer *queue) { /* * Ensure I'm allowed to dequeue (not empty and only one on it) */ if(pthread_mutex_trylock(&queue->mutex_dequeue) != 0) { return (void*)~0; } /* * Ensure I'm allowed to work on queue (only one working on it) */ if(pthread_mutex_trylock(&queue->mutex) != 0) { pthread_mutex_unlock(&queue->mutex_dequeue); return (void*)~0; } /* * Get the data from the read position, * and move the read position to the next slot * */ void* data = *queue->read_slot++; if(queue->read_slot == queue->buffer_limit) { queue->read_slot = queue->buffer; } if(queue->size == queue->max_size) /* enqueue has just been locked -> unlock */ { /* * The queue is full : the queuers are waiting. * Since we will are removing something, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ pthread_mutex_unlock(&queue->mutex_enqueue); } queue->size--; if(queue->size > 0) /* at 0, locks the next dequeue */ { /* * This removal made the queue empty. So we will not unlock the dequeuers. * The enqueuers will do that when they see fit. (ie: queue not full anymore) */ pthread_mutex_unlock(&queue->mutex_dequeue); } /* * We are done here. */ pthread_mutex_unlock(&queue->mutex); return data; } u32 threaded_ringbuffer_dequeue_set(threaded_ringbuffer* queue, void** array, u32 array_size) { /* * Ensure I'm allowed to dequeue (not empty and only one on it) */ pthread_mutex_lock(&queue->mutex_dequeue); /* * Ensure I'm allowed to work on queue (only one working on it) */ pthread_mutex_lock(&queue->mutex); /* * Get up to array_size times the data from the read position, * and move the read position to the next slot * */ bool unlock_enqueue = queue->size == queue->max_size; /* enqueue has just been locked -> schedule unlock */ u32 loops = MIN(queue->size, array_size); /* The amount we will be able to extract */ void ** const limit = &array[loops]; /* compute the limit so we only have one increment and one compare */ while(array < limit) { void* data = *queue->read_slot++; *array++ = data; if(queue->read_slot == queue->buffer_limit) { queue->read_slot = queue->buffer; } if(data == NULL) /* Break if a terminator is found*/ { loops -= limit - array; break; } } if(unlock_enqueue) /* enqueue has just been locked -> unlock */ { /* * The queue is full : the queuers are waiting. * Since we will are removing something, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ pthread_mutex_unlock(&queue->mutex_enqueue); } queue->size -= loops; /* adjust the size */ if(queue->size > 0) /* at 0, locks the next dequeue */ { /* * This removal made the queue empty. So we will not unlock the dequeuers. * The enqueuers will do that when they see fit. (ie: queue not full anymore) */ pthread_mutex_unlock(&queue->mutex_dequeue); } /* * We are done here. */ pthread_mutex_unlock(&queue->mutex); return loops; /* Return the amount we got from the queue */ } void threaded_ringbuffer_wait_empty(threaded_ringbuffer *queue) { int size; for(;;) { pthread_mutex_lock(&queue->mutex); size = queue->size; pthread_mutex_unlock(&queue->mutex); if(size == 0) { break; } usleep(1); } } int threaded_ringbuffer_size(threaded_ringbuffer *queue) { int size; pthread_mutex_lock(&queue->mutex); size = queue->size; pthread_mutex_unlock(&queue->mutex); return size; } ya_result threaded_ringbuffer_set_maxsize(threaded_ringbuffer *queue, int max_size) { ya_result ret = ERROR; pthread_mutex_lock(&queue->mutex); if(max_size >= queue->size) { void** tmp; MALLOC_OR_DIE(void**, tmp, sizeof (void*)* max_size, THREADED_QUEUE_TAG); /* * Copy from the read to the write position */ void** p = tmp; u32 count = queue->size; while(count-- > 0) { *p = *queue->read_slot++; if(queue->read_slot == queue->buffer_limit) { queue->read_slot = queue->buffer; } } /* * At this point ... * * tmp is the new "read" * p is the new "write", but it could be at the limit * */ free(queue->buffer); queue->buffer = tmp; queue->buffer_limit = &tmp[max_size]; queue->read_slot = tmp; if(p == queue->buffer_limit) { p = tmp; } queue->write_slot = p; queue->max_size = max_size; } pthread_mutex_unlock(&queue->mutex); return ret; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/base64.c0000644000077100007710000000012412650131756020564 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.777344 30 ctime=1454597651.315344534 yadifa-2.1.6-5826/lib/dnscore/src/base64.c0000664000077100007710000002106712650131756020377 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup base Base conversion functions * @ingroup dnscore * @brief Base 64 codec * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include "dnscore/base64.h" /* * */ #define BASE64_PADDING '=' static const char __BASE64__[256] ={ 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' }; /** * Encodes bytes into base64 * The output size must be at least size_in * 8/5 * * @param buffer_in bytes to convert * @param size_in number of bytes * @param buffer_out output buffer of a size >= size_in * 4/3 * * @return output size */ u32 base64_encode(const u8* buffer_in, u32 size_in, char* buffer_out) { char* ptr = buffer_out; while(size_in >= 3) { u8 b0 = *buffer_in++; u8 b1 = *buffer_in++; u8 b2 = *buffer_in++; *ptr++ = __BASE64__[ b0 >> 2 ]; *ptr++ = __BASE64__[(u8)((b0 << 4) | (b1 >> 4))]; *ptr++ = __BASE64__[(u8)((b1 << 2) | (b2 >> 6))]; *ptr++ = __BASE64__[ b2 ]; size_in -= 3; } switch(size_in) { case 2: { u8 b0 = *buffer_in++; u8 b1 = *buffer_in; *ptr++ = __BASE64__[ b0 >> 2 ]; *ptr++ = __BASE64__[(u8)((b0 << 4) | (b1 >> 4))]; *ptr++ = __BASE64__[(u8)(b1 << 2) ]; *ptr++ = BASE64_PADDING; break; } case 1: { u8 b0 = *buffer_in; *ptr++ = __BASE64__[ b0 >> 2 ]; *ptr++ = __BASE64__[ (u8)(b0 << 4) ]; *ptr++ = BASE64_PADDING; *ptr++ = BASE64_PADDING; break; } } return (u32)(ptr - buffer_out); } #define __DEBASE64__STOP__ 0x80 static const u8 __DEBASE64__[256] ={ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0 - 7 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 8 - 15 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 16 - 23 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 24 - 31 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 32 - 39 */ 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f, /* 40 - 47 ...+.../ */ 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, /* 01234567 */ 0x3c, 0x3d, 0xff, 0xff, 0xff, 0x80, 0xff, 0xff, /* 89...=.. */ 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, /* .ABCDEFG */ 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, /* HIJKLMNO */ 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, /* PQRSTUVW */ 0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, /* XYZ..... */ 0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, /* .abcdefg */ 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, /* hijklmno */ 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, /* pqrstuvw */ 0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff, /* xyz..... */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; /** * Decodes base64 into bytes * The output size must be at least size_in * 3/4 * * @param buffer_in base64 text * @param size_in number of chars * @param buffer_out output buffer of a size >= size_in * 3/4 * * @return output size */ ya_result base64_decode(const char* buffer_in, u32 size_in, u8* buffer_out) { if((size_in & 3) != 0) { return PARSEB64_ERROR; // wrong number of bytes } u8* in = (u8*)buffer_in; u8* out = buffer_out; while(size_in > 4) { u8 a = __DEBASE64__[*in++]; u8 b = __DEBASE64__[*in++]; u8 c = __DEBASE64__[*in++]; u8 d = __DEBASE64__[*in++]; if(((a | b | c | d)&0x80) != 0x00) { /* PARSE ERROR */ return PARSEB64_ERROR; } *out++ = (a << 2) | (b >> 4); *out++ = (b << 4) | (c >> 2); *out++ = (c << 6) | d; size_in -= 4; } if(size_in != 0) /* It's either 0 or 4 */ { u8 a = __DEBASE64__[*in++]; u8 b = __DEBASE64__[*in++]; if(((a | b)&0xc0) != 0x00) { /* PARSE ERROR */ return PARSEB64_ERROR; } *out++ = (a << 2) | (b >> 4); u8 c = __DEBASE64__[*in++]; if(c != __DEBASE64__STOP__) { if((c & 0xc0) != 0) { return PARSEB64_ERROR; } *out++ = (b << 4) | (c >> 2); u8 d = __DEBASE64__[*in++]; if(d != __DEBASE64__STOP__) { if((d & 0xc0) != 0) { return PARSEB64_ERROR; } *out++ = (c << 6) | d; } } } return out - buffer_out; } /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/identity.c0000644000077100007710000000012412650131756021331 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.788344 30 ctime=1454597651.464344534 yadifa-2.1.6-5826/lib/dnscore/src/identity.c0000664000077100007710000000745112650131756021145 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include "dnscore/sys_types.h" #include "dnscore/logger.h" #include #include /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ #define MODULE_MSG_HANDLE g_system_logger extern logger_handle *g_system_logger; /*------------------------------------------------------------------------------ * STATIC PROTOTYPES */ /*------------------------------------------------------------------------------ * FUNCTIONS */ /** \brief Change uid and gid of the program * * @param[in] config is a config_data structure * * @return an error code */ ya_result identity_change(uid_t new_uid, gid_t new_gid) { ya_result return_code; uid_t uid = getuid(); gid_t gid = getgid(); /* ------------------------------------------------------------ */ if( (uid == 0) && ((uid != new_uid) || (gid != new_gid))) { log_info("changing identity to %d:%d (current: %d:%d)", new_uid, new_gid, uid, gid); } if((gid != new_gid) && (uid == 0)) { if(setgid(new_gid) < 0) { return_code = ERRNO_ERROR; log_err("error switching to gid %i: %r", new_gid, return_code); return return_code;; } } if((uid != new_uid) && (uid == 0)) { if(setuid(new_uid) < 0) { return_code = ERRNO_ERROR; log_err("error switching to uid %i: %r", new_uid, return_code); return return_code;; } } return SUCCESS; } /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/concat_input_stream.c0000644000077100007710000000012412650131756023541 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.758344 30 ctime=1454597651.352344534 yadifa-2.1.6-5826/lib/dnscore/src/concat_input_stream.c0000664000077100007710000001474412650131756023360 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/concat_input_stream.h" #include "dnscore/zalloc.h" #define CONCAT_INPUT_STREAM_TAG 0x53495441434e4f43 /* CONCATIS */ #define CONCAT_INPUT_STREAM_NODE_TAG 0x5349444e54434e43 /* CNCTNDIS */ typedef struct concat_input_stream_data_node concat_input_stream_data_node; struct concat_input_stream_data_node { struct concat_input_stream_data_node *next; input_stream filtered; }; typedef struct concat_input_stream_data concat_input_stream_data; struct concat_input_stream_data { concat_input_stream_data_node* current; concat_input_stream_data_node** lastlink; }; static ya_result concat_read(input_stream* stream, u8* buffer, u32 len) { concat_input_stream_data *data = (concat_input_stream_data*)stream->data; ya_result total = 0; ya_result return_value = SUCCESS; while(len > 0) { if(data->current == NULL) { return_value = SUCCESS; break; } if(FAIL(return_value = input_stream_read(&data->current->filtered, &buffer[total], len))) { break; } if(return_value == 0) /* EOF */ { concat_input_stream_data_node *next = data->current->next; input_stream_close(&data->current->filtered); ZFREE(data->current, concat_input_stream_data_node); data->current = next; if(data->current == NULL) { data->lastlink = &data->current; } continue; } total += return_value; len -= return_value; } if((total == 0) && FAIL(return_value)) { total = return_value; } return total; } static void concat_close(input_stream* stream) { concat_input_stream_data* data = (concat_input_stream_data*)stream->data; while(data->current != NULL) { input_stream_close(&data->current->filtered); concat_input_stream_data_node *next = data->current->next; ZFREE(data->current, concat_input_stream_data_node); data->current = next; } ZFREE(data, concat_input_stream_data); input_stream_set_void(stream); } static ya_result concat_skip(input_stream* stream, u32 len) { concat_input_stream_data *data = (concat_input_stream_data*)stream->data; ya_result total = 0; ya_result return_value = SUCCESS; while(len > 0) { if(data->current == NULL) { return_value = -1; break; } if(FAIL(return_value = input_stream_skip(&data->current->filtered, len))) { if(return_value == -1) { concat_input_stream_data_node *next = data->current->next; input_stream_close(&data->current->filtered); ZFREE(data->current, concat_input_stream_data_node); data->current = next; if(data->current == NULL) { data->lastlink = &data->current; } continue; } break; } total += return_value; len -= return_value; } if((total == 0) && FAIL(return_value)) { total = return_value; } return total; } static const input_stream_vtbl concat_input_stream_vtbl = { concat_read, concat_skip, concat_close, "concat_input_stream" }; /** * * @param cis */ void concat_input_stream_init(input_stream *cis) { concat_input_stream_data* data; ZALLOC_OR_DIE(concat_input_stream_data*, data, concat_input_stream_data, CONCAT_INPUT_STREAM_TAG); data->current = NULL; data->lastlink = &data->current; cis->data = data; cis->vtbl = &concat_input_stream_vtbl; } /** * * @param cis * @param added_stream */ void concat_input_stream_add(input_stream *cis, input_stream *added_stream) { concat_input_stream_data* data = (concat_input_stream_data*)cis->data; concat_input_stream_data_node *node; ZALLOC_OR_DIE(concat_input_stream_data_node*, node, concat_input_stream_data_node, CONCAT_INPUT_STREAM_NODE_TAG); node->filtered.data = added_stream->data; node->filtered.vtbl = added_stream->vtbl; node->next = NULL; added_stream->data = NULL; added_stream->vtbl = NULL; *data->lastlink = node; data->lastlink = &node->next; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/alarm.c0000644000077100007710000000012412650131756020574 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.661344 30 ctime=1454597651.293344534 yadifa-2.1.6-5826/lib/dnscore/src/alarm.c0000664000077100007710000005141012650131756020402 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup alarm * @ingroup dnscore * @brief Alarm functions * * @{ */ #include "dnscore/dnscore-config.h" #include "dnscore/logger.h" #include "dnscore/alarm.h" #include "dnscore/mutex.h" #ifdef DEBUG #include "dnscore/timeformat.h" #endif // DEBUG #define MODULE_MSG_HANDLE g_system_logger extern logger_handle *g_system_logger; /* * List of events (double-linked), sorted by epoch (then insersion time). * Array of handles (expandable), with the list of events they hold. (so they can easily be foud by id and closed) * * The descriptions are stored in both collections. (two double-linked structures) * * TIMELIST->[TIME#0]->[TIME#1]->...->[TIME#n] * | | * v [NODE] * HNDLLIST->[NODE]--+ | * +->[NODE]-- ... */ #define ALARM_NODE_LIST_TAG 0x5453494c4d524c41 #define ALARM_NODE_DESC_TAG 0x4353444e4d524c41 #define ALARM_NODE_TIME_TAG 0x454d49544d524c41 #define ALARM_HANDLE_TAG 0x4c444e484d524c41 struct alarm_event_list { alarm_event_node *first; alarm_event_node *last; }; typedef struct alarm_event_list alarm_event_list; struct alarm_handle { alarm_event_list events; const u8 *owner_dnsname; }; typedef struct alarm_handle alarm_handle; struct alarm_time_node { struct alarm_time_node *next; alarm_event_list events; u32 epoch; }; typedef struct alarm_time_node alarm_time_node; static ptr_vector alarm_handles = EMPTY_PTR_VECTOR; static alarm_time_node doomsday = { NULL, {NULL, NULL}, MAX_U32 }; static alarm_time_node time_list = { &doomsday, {NULL, NULL}, 0 }; static pthread_mutex_t alarm_mutex = PTHREAD_MUTEX_INITIALIZER; static int alarm_handles_next_free = -1; #ifdef DEBUG static volatile bool alarm_pthread_mutex_locked = FALSE; static u32 alarm_event_count = 0; #endif /**/ static void alarm_event_list_init(alarm_event_list *head) { head->first = alarm_event_alloc(); head->last = head->first; ZEROMEMORY(head->first, sizeof(alarm_event_node)); } static void alarm_event_list_finalize(alarm_event_list *head) { if(head->first != NULL && head->first == head->last) { alarm_event_free(head->first); head->first = NULL; head->last = NULL; } } static bool alarm_event_list_isempty(alarm_event_list *head) { assert(alarm_pthread_mutex_locked); return head->first == head->last; } static alarm_event_node * alarm_event_list_removefirst(alarm_event_list *event) { assert(alarm_pthread_mutex_locked); assert(!alarm_event_list_isempty(event)); assert((event->first != NULL) && (event->last != NULL)); /** * * AT THIS POINT WE KNOW THE LIST HAS AT LEAST ONE ITEM AND THE SENTINEL * */ alarm_event_node *node = event->first; event->first = node->time_next; event->first->time_prev = NULL; assert(node->hndl_next != NULL); if(node->hndl_prev != NULL) { node->hndl_prev->hndl_next = node->hndl_next; } else { /* move the "first" ptr ... */ alarm_event_list *head = ptr_vector_get(&alarm_handles, node->handle); head->first = node->hndl_next; } /* if(node->hndl_next != NULL) There is at least the sentinel */ node->hndl_next->hndl_prev = node->hndl_prev; return node; } alarm_event_node * alarm_event_alloc() { alarm_event_node *node; MALLOC_OR_DIE(alarm_event_node*, node, sizeof(alarm_event_node), ALARM_NODE_DESC_TAG); #ifdef DEBUG memset(node, 0xff,sizeof(alarm_event_node)); #endif return node; } void alarm_event_free(alarm_event_node *node) { #ifdef DEBUG memset(node, 0xff,sizeof(alarm_event_node)); #endif free(node); } /* * Append at end. */ static void alarm_event_append(alarm_event_list *hndl, alarm_event_list *time, alarm_event_node *node) { assert(alarm_pthread_mutex_locked); /* * List not empty ? */ if(hndl->first != hndl->last) { /* * Insert the node before the last one. */ hndl->last->hndl_prev->hndl_next = node; // BL ->N L node->hndl_prev = hndl->last->hndl_prev; // BL<->N L hndl->last->hndl_prev = node; // BL<->N<- L node->hndl_next = hndl->last; // BL<->N<->L } else { hndl->first = node; // F = N L node->hndl_next = hndl->last; // ->F ->L hndl->last->hndl_prev = node; // ->F<->L node->hndl_prev = NULL; // 0<->F<->L } if(time->first != time->last) { time->last->time_prev->time_next = node; node->time_prev = time->last->time_prev; time->last->time_prev = node; node->time_next = time->last; } else { time->first = node; node->time_next = time->last; time->last->time_prev = node; node->time_prev = NULL; } } static void alarm_event_remove(alarm_event_list *hndl, alarm_event_list *time, alarm_event_node *node) { assert(alarm_pthread_mutex_locked); assert(time != NULL); if(node->hndl_prev != NULL) // A<- N<->B ? { node->hndl_prev->hndl_next = node->hndl_next; // N<--N<->B } else { hndl->first = node->hndl_next; // F = N<->B } node->hndl_next->hndl_prev = node->hndl_prev; // 0/A<-?B if(node->time_prev != NULL) { node->time_prev->time_next = node->time_next; } else { time->first = node->time_next; // scan-build false positive : time cannot be null because the call // that provides the value only gives a null for non-existing nodes // AND the call is made using an existing node (not null). } node->time_next->time_prev = node->time_prev; } static alarm_time_node * alarm_time_alloc() { alarm_time_node *node; MALLOC_OR_DIE(alarm_time_node*, node, sizeof(alarm_time_node), ALARM_NODE_TIME_TAG); #ifdef DEBUG memset(node, 0xff,sizeof(alarm_time_node)); #endif alarm_event_list_init(&node->events); /* newly allocated : NO LOCK */ /* node->next : for the caller */ return node; } static void alarm_time_free(alarm_time_node *node) { #ifdef DEBUG memset(node, 0xff,sizeof(alarm_time_node)); #endif free(node); } /* * Get the time node for the exact epoch ... */ static alarm_time_node * alarm_time_get(u32 epoch) { assert(alarm_pthread_mutex_locked); assert(epoch != MAX_U32); alarm_time_node *node = time_list.next; while(node->epoch < epoch) { node = node->next; } if(node->epoch == epoch) { return node; } else { return NULL; } } static alarm_time_node * alarm_time_create(u32 epoch) { assert(alarm_pthread_mutex_locked); assert(epoch > 0); assert(epoch != MAX_U32); alarm_time_node *prev = &time_list; alarm_time_node *node = time_list.next; while(node->epoch < epoch) { prev = node; node = node->next; } if(node->epoch == epoch) { return node; } else { alarm_time_node *timenode = alarm_time_alloc(); prev->next = timenode; timenode->next = node; timenode->epoch = epoch; return timenode; } } void alarm_init() { if(ptr_vector_size(&alarm_handles) == 0) { ptr_vector_resize(&alarm_handles, 64); alarm_event_list_init(&time_list.events); /* init: NO LOCK */ } } void alarm_finalise() { pthread_mutex_lock(&alarm_mutex); #ifdef DEBUG alarm_pthread_mutex_locked = TRUE; #endif if(ptr_vector_size(&alarm_handles) > 0) { if(alarm_event_list_isempty(&time_list.events)) { alarm_event_list_finalize(&time_list.events); } else { log_debug("alarm: event list not empty"); } ptr_vector_destroy(&alarm_handles); } pthread_mutex_unlock(&alarm_mutex); #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif } alarm_t alarm_open(const u8 *owner_dnsname) { alarm_handle *handle_struct; MALLOC_OR_DIE(alarm_handle*, handle_struct, sizeof(alarm_handle), ALARM_HANDLE_TAG); #ifdef DEBUG memset(handle_struct, 0xac,sizeof(alarm_handle)); #endif alarm_event_list_init(&handle_struct->events); /* newly allocated: NO LOCK */ pthread_mutex_lock(&alarm_mutex); #ifdef DEBUG alarm_pthread_mutex_locked = TRUE; #endif intptr h; if(alarm_handles_next_free >= 0) { h = alarm_handles_next_free; // get the next one if any alarm_handles_next_free = (intptr)ptr_vector_get(&alarm_handles, h); ptr_vector_set(&alarm_handles, (intptr)h, handle_struct); } else { ptr_vector_append(&alarm_handles, handle_struct); h = (intptr)alarm_handles.offset; } #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif pthread_mutex_unlock(&alarm_mutex); handle_struct->owner_dnsname = owner_dnsname; log_debug("alarm_open(%{dnsname}) opened alarm with handle %x", handle_struct->owner_dnsname, (int)h); return (alarm_t)h; } static alarm_handle * alarm_get_struct_from_handle(alarm_t hndl) { assert(alarm_pthread_mutex_locked); if(hndl > alarm_handles.offset || hndl < 0) { /* ERROR ! */ #ifdef DEBUG log_debug("invalid alarm handle: %x", hndl); #endif return NULL; } alarm_handle *handle_struct = ptr_vector_get(&alarm_handles, hndl); return handle_struct; } static void alarm_clear_struct_from_handle(alarm_t hndl) { assert(alarm_pthread_mutex_locked); if(hndl > alarm_handles.offset || hndl < 0) { /* ERROR ! */ #ifdef DEBUG log_debug("invalid alarm handle: %x", hndl); #endif return; } ptr_vector_set(&alarm_handles, hndl, (void*)(intptr)alarm_handles_next_free); alarm_handles_next_free = (intptr)hndl; } void alarm_close(alarm_t hndl) { if(hndl == ALARM_HANDLE_INVALID) { return; } #ifdef DEBUG u32 alarm_event_count_start = alarm_event_count; #endif pthread_mutex_lock(&alarm_mutex); #ifdef DEBUG alarm_pthread_mutex_locked = TRUE; #endif alarm_handle *handle_struct = alarm_get_struct_from_handle(hndl); if(handle_struct == NULL) { #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif pthread_mutex_unlock(&alarm_mutex); log_err("alarm_close(%x) invalid alarm handle", hndl); return; } log_debug("alarm_close(%x) closing alarm for %{dnsname}", hndl, handle_struct->owner_dnsname); alarm_event_node *node = handle_struct->events.first; while(node != NULL) { alarm_event_node *node_next = node->hndl_next; alarm_time_node *time_node = alarm_time_get(node->epoch); if(time_node != NULL) { alarm_event_list *time_list = &time_node->events; alarm_event_remove(&handle_struct->events, time_list, node); #ifdef DEBUG alarm_event_count--; #endif } if(node->function != NULL) { node->function(node->args, TRUE); } alarm_event_free(node); node = node_next; } #ifdef DEBUG log_debug("alarm_close(%x) removed %u events for %{dnsname}", hndl, alarm_event_count_start - alarm_event_count, handle_struct->owner_dnsname); #endif alarm_clear_struct_from_handle(hndl); #ifdef DEBUG memset(handle_struct, 0xe4,sizeof(alarm_event_list)); #endif free(handle_struct); #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif pthread_mutex_unlock(&alarm_mutex); } void alarm_set(alarm_t hndl, alarm_event_node *desc) { pthread_mutex_lock(&alarm_mutex); #ifdef DEBUG alarm_pthread_mutex_locked = TRUE; #endif //assert(alarm_pthread_mutex_locked); alarm_handle *handle_struct = alarm_get_struct_from_handle(hndl); if(handle_struct == NULL) { #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif pthread_mutex_unlock(&alarm_mutex); log_err("alarm_set(%p,%x) invalid alarm handle: %x", hndl, desc); return; } if(desc->epoch == MAX_U32) { #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif pthread_mutex_unlock(&alarm_mutex); log_err("alarm_set(%p,%x) outside of the supported time frame", hndl, desc); return; } if(desc->epoch == time(NULL)) { #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif pthread_mutex_unlock(&alarm_mutex); log_warn("alarm_set(%p,%x) is NOW", hndl, desc); return; } alarm_event_list *head = &handle_struct->events; #ifdef DEBUG char epoch_buffer[64]; time_t epoch_time = desc->epoch; ctime_r(&epoch_time, epoch_buffer); epoch_buffer[strlen(epoch_buffer)-1] = '\0'; log_debug("alarm_set: %p: at %s, for '%{dnsname}' call key=%x '%s', %p(%p)", desc, epoch_buffer, handle_struct->owner_dnsname, desc->key, desc->text, desc->function, desc->args); #endif if(desc->flags != ALARM_DUP_NOP) { /* Cleanup first */ if(desc->flags == ALARM_DUP_REMOVE_EARLIER) { alarm_event_node* node = head->first; while(node != head->last) { if(node->key == desc->key) { log_debug("alarm_set: %p: dropping earliest dup", desc); if(desc->epoch < node->epoch) { /* desc is earlier */ if(desc->function != NULL) { desc->function(desc->args, TRUE); } alarm_event_free(desc); #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif pthread_mutex_unlock(&alarm_mutex); return; } alarm_event_node *node_next = node->hndl_next; alarm_event_remove(head, &alarm_time_get(node->epoch)->events, node); // cancel the event node->function(node->args, TRUE); free(node); node = node_next; #ifdef DEBUG alarm_event_count--; #endif } else { node = node->hndl_next; } } } else { alarm_event_node* node = head->first; while(node != head->last) { if(node->key == desc->key) { #ifdef DEBUG log_debug("alarm_set: %p: dropping latest dup", desc); #endif if(desc->epoch > node->epoch) { /* desc is later */ if(desc->function != NULL) { desc->function(desc->args, TRUE); } alarm_event_free(desc); #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif pthread_mutex_unlock(&alarm_mutex); return; } alarm_event_node *node_next = node->hndl_next; alarm_event_remove(head, &alarm_time_get(node->epoch)->events, node); // cancel the event node->function(node->args, TRUE); free(node); node = node_next; #ifdef DEBUG alarm_event_count--; #endif } else { node = node->hndl_next; } } } } #ifdef DEBUG log_debug("alarm_set: %p: added", desc); #endif /* Create/get the time head */ alarm_time_node *timenode = alarm_time_create(desc->epoch); /* Link desc at the end of time list and in the hndl list */ desc->handle = hndl; alarm_event_append(head, &timenode->events, desc); #ifdef DEBUG alarm_event_count++; #endif #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif pthread_mutex_unlock(&alarm_mutex); } void alarm_run_tick(u32 epoch) { assert(epoch != MAX_U32); pthread_mutex_lock(&alarm_mutex); #ifdef DEBUG alarm_pthread_mutex_locked = TRUE; #endif alarm_time_node *node = time_list.next; #ifdef DEBUG if(alarm_event_count > 0) { static u32 last_alarm_debug_dump = 0; if(epoch - last_alarm_debug_dump > 60) { u32 next_epoch = MAX(node->epoch, epoch); EPOCH_DEF(next_epoch); log_debug("alarm: processing alarms. %d events in queue. (next on %w in %i seconds)", alarm_event_count, EPOCH_REF(next_epoch), next_epoch - epoch); last_alarm_debug_dump = epoch; } } #endif while(node->epoch <= epoch) { while(!alarm_event_list_isempty(&node->events)) { alarm_event_node *event = alarm_event_list_removefirst(&node->events); #ifdef DEBUG alarm_event_count--; #endif #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif pthread_mutex_unlock(&alarm_mutex); /* EXECUTE EVENT */ log_debug("alarm: running %p: %p(%p) '%s'", event, event->function, event->args, event->text); ya_result return_value = event->function(event->args, FALSE); log_debug("alarm: %p returned %r", event, return_value); if(return_value == ALARM_REARM) { event->epoch = epoch + 5; alarm_set(event->handle, event); pthread_mutex_lock(&alarm_mutex); #ifdef DEBUG alarm_pthread_mutex_locked = TRUE; #endif } else { pthread_mutex_lock(&alarm_mutex); #ifdef DEBUG alarm_pthread_mutex_locked = TRUE; #endif alarm_event_free(event); /// @todo edf 20150205 -- consistency } } alarm_time_node *prev = node; node = node->next; alarm_time_free(prev); time_list.next = node; } #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif pthread_mutex_unlock(&alarm_mutex); } void alarm_lock() { pthread_mutex_lock(&alarm_mutex); #ifdef DEBUG alarm_pthread_mutex_locked = TRUE; #endif } void alarm_unlock() { #ifdef DEBUG alarm_pthread_mutex_locked = FALSE; #endif pthread_mutex_unlock(&alarm_mutex); } alarm_event_node * alarm_get_first(alarm_t hndl) { assert(alarm_pthread_mutex_locked); alarm_handle *handle_struct = alarm_get_struct_from_handle(hndl); return handle_struct->events.first; } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/packet_reader.c0000644000077100007710000000012412650131756022271 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.656344 30 ctime=1454597651.536344534 yadifa-2.1.6-5826/lib/dnscore/src/packet_reader.c0000664000077100007710000005240512650131756022104 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnspacket DNS Messages * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include #include #include "dnscore/dnscore-config.h" #include "dnscore/packet_reader.h" //#include "dnscore/rfc.h" #include "dnscore/tsig.h" #if HAS_CTRL #include "dnscore/ctrl-rfc.h" #endif ya_result packet_reader_read_fqdn(packet_unpack_reader_data* reader, u8 *output_buffer, u32 len_) { const u8 *p_limit = &reader->packet[reader->packet_size]; u8 *buffer = output_buffer; u8 *buffer_limit = &buffer[len_]; const u8 *p = &reader->packet[reader->offset]; /* ------------------------------------------------------------ */ if(p >= p_limit) { return UNEXPECTED_EOF; /* EOF */ } for(;;) { u8 len = *p++; if((len & 0xc0) == 0xc0) { reader->offset = p - reader->packet; /* reposition the pointer */ u32 new_offset = len & 0x3f; new_offset <<= 8; new_offset |= *p; p = &reader->packet[new_offset]; reader->offset++; break; } *buffer++ = len; if(len == 0) { reader->offset = p - reader->packet; return buffer - output_buffer; } if((p + len > p_limit) || (buffer + len > buffer_limit)) { return UNEXPECTED_EOF; } /* MEMCOPY(buffer, p, len); buffer += len; p += len; */ u8* buffer_limit = &buffer[len]; do { *buffer++ = tolower(*p++); } while(buffer < buffer_limit); } for(;;) { u8 len = *p++; if((len & 0xc0) == 0xc0) /* EDF: better yet: cmp len, 192; jge */ { /* reposition the pointer */ u32 new_offset = len & 0x3f; new_offset <<= 8; new_offset |= *p; p = &reader->packet[new_offset]; continue; } *buffer++ = len; if(len == 0) { return buffer - output_buffer; } if((p + len > p_limit) || (buffer + len > buffer_limit)) { return UNEXPECTED_EOF; } u8* buffer_limit = &buffer[len]; do { *buffer++ = tolower(*p++); } while(buffer < buffer_limit); } // never reached } ya_result packet_reader_read(packet_unpack_reader_data* reader, void *output_buffer, u32 len) { u32 remaining = reader->packet_size - reader->offset; if(remaining < len) { len = remaining; } MEMCOPY(output_buffer, &reader->packet[reader->offset], len); reader->offset += len; return len; } ya_result packet_reader_read_u16(packet_unpack_reader_data* reader, u16 *val) { yassert(val != NULL); u32 remaining = reader->packet_size - reader->offset; if(remaining < 2) { return UNEXPECTED_EOF; } *val = GET_U16_AT(reader->packet[reader->offset]); reader->offset += 2; return 2; } ya_result packet_reader_read_u32(packet_unpack_reader_data* reader, u32 *val) { yassert(val != NULL); u32 remaining = reader->packet_size - reader->offset; if(remaining < 4) { return UNEXPECTED_EOF; } *val = GET_U32_AT(reader->packet[reader->offset]); reader->offset += 4; return 4; } ya_result packet_reader_read_zone_record(packet_unpack_reader_data* reader, u8* output_buffer, u32 len) { ya_result err; u8* buffer = output_buffer; /* Read the name */ if(FAIL(err = packet_reader_read_fqdn(reader, buffer, len))) { return err; } buffer += err; len -= err; if(len < 4) { return UNEXPECTED_EOF; } /* read the TYPE CLASS TTL RDATASIZE (4 bytes) */ if(FAIL(err = packet_reader_read(reader, buffer, 4))) { return err; } yassert(err == 4); buffer += 4; return buffer - output_buffer; } /** * @note DOES NOT AND SHOULD NOT WORK FOR CTRL TYPES ! */ ya_result packet_reader_read_record(packet_unpack_reader_data* reader, u8* output_buffer, u32 len) { ya_result err; u8* buffer = output_buffer; /* Read the name */ if(FAIL(err = packet_reader_read_fqdn(reader, buffer, len))) { return err; } buffer += err; len -= err; if(len < 10) { return UNEXPECTED_EOF; } /* read the TYPE CLASS TTL RDATASIZE (10 bytes) */ if(FAIL(err = packet_reader_read(reader, buffer, 10))) { return err; } yassert(err == 10); u16 size = ntohs(GET_U16_AT(buffer[8])); if(len < size) { return UNEXPECTED_EOF; } if(size == 0) /* Can occur for dynupdate record set delete */ { return (buffer - output_buffer) + 10; } u16 type = (GET_U16_AT(buffer[0])); /** @note : NATIVETYPE */ buffer += 10; /* * EDF: No need to cut the len short, especially since what is returned * by the fqdn readers is the output side, not the input one (unpack) */ u8* rdata_start = buffer; u32 rdata_limit = reader->offset + size; switch(type) { /****************************************************************************** * The types that requires special handling (dname compression) ******************************************************************************/ case TYPE_MX: { if((err = packet_reader_read(reader, buffer, 2)) != 2) { return INVALID_RECORD; } buffer += err; len -= err; size -= err; if(len == 0 || size > MAX_DOMAIN_LENGTH) { return INVALID_RECORD; /* wrong size */ } if(FAIL(err = packet_reader_read_fqdn(reader, buffer, len))) /* err = error code or bytes filled, not bytes read (compression) */ { return err; } buffer += err; break; } case TYPE_NS: case TYPE_CNAME: case TYPE_DNAME: case TYPE_PTR: case TYPE_MB: case TYPE_MD: case TYPE_MF: case TYPE_MG: case TYPE_MR: { /* ONE NAME record */ if(size == 0 || size > MAX_DOMAIN_LENGTH) { return INVALID_RECORD; /* wrong size */ } if(FAIL(err = packet_reader_read_fqdn(reader, buffer, len))) { return err; } buffer += err; break; } case TYPE_SOA: { /* NOTE: NO NEED TO SORT (There is only one) */ if(FAIL(err = packet_reader_read_fqdn(reader, buffer, len))) { return err; } buffer += err; len -= err; if(FAIL(err = packet_reader_read_fqdn(reader, buffer, len))) { return err; } if(rdata_limit - reader->offset != 20) { return UNEXPECTED_EOF; } buffer += err; //len -= err; if(FAIL(err = packet_reader_read(reader, buffer, 20))) { return err; } buffer += err; break; } case TYPE_RRSIG: /* not supposed to be compressed */ { if(size > 2+1+1+4+4+4+2+256+1024+4) { return UNSUPPORTED_RECORD; /* too big */ } if(size < 18) { return UNEXPECTED_EOF; } if(FAIL(err = packet_reader_read(reader, buffer, 18))) { return err; } buffer += err; len -= err; if(FAIL(err = packet_reader_read_fqdn(reader, buffer, len))) { return err; } buffer += err; //len -= err; if(FAIL(err = packet_reader_read(reader, buffer, rdata_limit - reader->offset))) { return err; } buffer += err; break; } case TYPE_NSEC: /* not supposed to be compressed */ { if(FAIL(err = packet_reader_read_fqdn(reader, buffer, len))) { return err; } buffer += err; //len -= err; if(FAIL(err = packet_reader_read(reader, buffer, rdata_limit - reader->offset))) { return err; } buffer += err; break; } /****************************************************************************** * The types we reject ******************************************************************************/ case TYPE_SIG: { if(size > 1024) { return UNSUPPORTED_RECORD; /* key is too big */ } if(FAIL(err = packet_reader_skip(reader, size))) { return err; } //buffer += err; return UNSUPPORTED_TYPE; } case TYPE_A6: { if(size > 1+16+256) { return UNSUPPORTED_RECORD; /* key is too big */ } if(FAIL(err = packet_reader_skip(reader, size))) { return err; } //buffer += err; return UNSUPPORTED_TYPE; } case TYPE_AFSDB: { if(size > 260) { return UNSUPPORTED_RECORD; /* key is too big */ } if(FAIL(err = packet_reader_skip(reader, size))) { return err; } //buffer += err; return UNSUPPORTED_TYPE; /****************************************************************************** * The other types ******************************************************************************/ } case TYPE_A: { if(size != 4) { return INCORRECT_IPADDRESS; } if(FAIL(err = packet_reader_read(reader, buffer, size))) { return err; } buffer += err; break; } case TYPE_AAAA: { if(size != 16) { return INCORRECT_IPADDRESS; } if(FAIL(err = packet_reader_read(reader, buffer, size))) { return err; } buffer += err; break; } /* case TYPE_HINFO: case TYPE_MINFO: case TYPE_DS: case TYPE_TXT: case TYPE_WKS: case TYPE_DNSKEY: case TYPE_NSEC3: case TYPE_NSEC3PARAM: case TYPE_LOC: */ default: { if(FAIL(err = packet_reader_read(reader, buffer, size))) { return err; } buffer += err; break; } } if(rdata_limit != reader->offset) { return UNEXPECTED_EOF; } SET_U16_AT(rdata_start[-2], htons(buffer - rdata_start)); /* rdata size */ /* * This len was the rdata_size but this was the packed size. * So I cannot compare without a relatively expensive test * yassert(len == 0); * */ return buffer - output_buffer; } void packet_reader_rewind(packet_unpack_reader_data* reader) { reader->offset = 0; } /* * Skip a compressed fqdn */ ya_result packet_reader_skip_fqdn(packet_unpack_reader_data* reader) { /* Testing for a minimum len size is pointless */ u32 from = reader->offset; const u8* p_limit = &reader->packet[reader->packet_size]; const u8* p = &reader->packet[reader->offset]; if(p >= p_limit) { return UNEXPECTED_EOF; /* EOF */ } for(;;) { u8 len = *p++; if((len & 0xc0) == 0xc0) { p++; reader->offset = p - reader->packet; return reader->offset - from; } if(len == 0) { reader->offset = p - reader->packet; return reader->offset - from; } if(p + len > p_limit) { return UNEXPECTED_EOF; } p += len; } } /* * Skip a record */ ya_result packet_reader_skip_record(packet_unpack_reader_data* reader) { ya_result err; ya_result from = reader->offset; /* Read the name */ if(FAIL(err = packet_reader_skip_fqdn(reader))) { return err; } /* read the TYPE CLASS TTL RDATASIZE (10 bytes) */ u16 size = ntohs(GET_U16_AT(reader->packet[reader->offset + 8])); reader->offset += 10; reader->offset += size; if(reader->offset > reader->packet_size) { return UNEXPECTED_EOF; } /* * This len was the rdata_size but this was the packed size. * So I cannot compare without a relatively expensive test * yassert(len == 0); * */ return reader->offset - from; } void packet_reader_init(packet_unpack_reader_data* reader, const u8* buffer, u32 buffer_size) { reader->packet = buffer; reader->packet_size = buffer_size; reader->offset = 0; } #if HAS_CTRL /** * * Returns true iff the string txt is utf-8 * The current implementation checks it's ASCII7 (which is a valid subset of utf-8) * * @todo 20140523 edf -- internal use and only needs ASCIIZ, do handle utf-8 when it will be required (very low priority) * * @param txt * @param len * @return */ static bool is_utf8(const char *txt, u16 len) { for(u16 i = 0; i < len; i++) { if((txt[i] & 0x80) != 0) { return FALSE; } } return TRUE; } /** * * @note Yes, this COULD go in the message.* files, once they are finalised * * @param reader * @param rdatasize * @param rclass * @param txt * @param dryrun * @return */ ya_result packet_reader_read_utf8(packet_unpack_reader_data *reader, u16 rdatasize, u16 rclass, char **txt, bool dryrun) { char *tmp = NULL; ya_result return_value = ERROR; if(rclass == CLASS_ANY) { if(rdatasize != 0) { return ERROR; /* formerr */ } if(!dryrun) { free(*txt); *txt = NULL; } return_value = SUCCESS; } else { MALLOC_OR_DIE(char *, tmp, rdatasize + 1, GENERIC_TAG); packet_reader_read(reader, (u8*)tmp, rdatasize); tmp[rdatasize] = '\0'; if(is_utf8(tmp, rdatasize)) { return_value = SUCCESS; if(!dryrun) { if(rclass != CLASS_NONE) { if(*txt != NULL) { free(*txt); } *txt = tmp; tmp = NULL; } else { if(*txt != NULL) { if(strcmp(*txt, tmp) == 0) { free(*txt); *txt = NULL; } } } } } if(tmp != NULL) { free(tmp); } } return return_value; } /** * * @note Yes, this COULD go in the message.* files, once they are finalised * * @param reader * @param rdatasize * @param rclass * @param ha * @param dryrun * @return */ ya_result packet_reader_read_remote_server(packet_unpack_reader_data *reader, u16 rdatasize, u16 rclass, host_address **ha, bool dryrun) { u16 ip_port = 0; u8 ipver; u8 flags; u8 ip_buffer[16]; u8 tsig_name[MAX_DOMAIN_LENGTH]; if(rclass == CLASS_ANY) { if(rdatasize != 0) { return ERROR; /* formerr */ } if(!dryrun) { if(*ha != NULL) { host_address_delete_list(*ha); *ha = NULL; } } return SUCCESS; } ya_result return_value; if(ISOK(return_value = packet_reader_read(reader, &flags, 1))) { return_value = ERROR; ipver = flags & REMOTE_SERVER_FLAGS_IP_MASK; if((ipver == HOST_ADDRESS_IPV4) || (ipver == HOST_ADDRESS_IPV6)) { tsig_item *tsig = NULL; if(ipver == HOST_ADDRESS_IPV4) { return_value = packet_reader_read(reader, ip_buffer, 4); } else { return_value = packet_reader_read(reader, ip_buffer, 16); } if(FAIL(return_value)) { return return_value; } if((flags & REMOTE_SERVER_FLAGS_PORT_MASK) != 0) { if(FAIL(return_value = packet_reader_read_u16(reader, &ip_port))) { return return_value; } } if((flags & REMOTE_SERVER_FLAGS_KEY_MASK) != 0) { if(FAIL(return_value = packet_reader_read_fqdn(reader, tsig_name, sizeof(tsig_name)))) { return return_value; } if((tsig = tsig_get(tsig_name)) == NULL) { return ERROR; } } if(!dryrun) { host_address *address; MALLOC_OR_DIE(host_address*, address, sizeof(host_address), HOSTADDR_TAG); address->next = NULL; address->tsig = tsig; if(ipver == HOST_ADDRESS_IPV4) { memcpy(address->ip.v4.bytes, ip_buffer, 4); address->port = ip_port; address->version = HOST_ADDRESS_IPV4; } else // HOST_ADDRESS_IPV6: { memcpy(address->ip.v6.bytes, ip_buffer, 16); address->port = ip_port; address->version = HOST_ADDRESS_IPV6; } /* * Here the rclass changes the behaviour */ if(rclass != CLASS_NONE) { if(*ha == NULL) { *ha = address; } else { host_address_append_host_address(*ha, address); /* copy made */ free(address); } } else { host_address_remove_host_address(ha, address); /* not freed */ free(address); } return_value = SUCCESS; } } } return return_value; } #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/tcp_io_stream.c0000644000077100007710000000012412650131756022330 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.739344 30 ctime=1454597651.603344534 yadifa-2.1.6-5826/lib/dnscore/src/tcp_io_stream.c0000664000077100007710000002642012650131756022141 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * @{ */ #include "dnscore/dnscore-config.h" #include "dnscore/dnscore-config.h" #include #include #include #include #include #include #include #include "dnscore/tcp_io_stream.h" #include "dnscore/fdtools.h" #include "dnscore/parsing.h" #include "dnscore/format.h" #define DNSCORE_TCP_FLAGS "DNSCORE_TCP_FLAGS" // nodelay,delay,cork,nocork static bool tcp_nodelay = TRUE; static bool tcp_cork = FALSE; /* * AF_INET * AF_INET6 * AF_UNSPEC ( = 0) */ /** * * Resolves the host address * * @param host * @param port * @param sa * @param familly * @return */ ya_result gethostaddr(const char* host, u16 port, struct sockaddr *sa, int familly) { /* ------------------------------------------------------------ */ /* Create a network address structure * from the the dotted-quad format ddd.ddd.ddd.ddd into a in_addr_t */ /* If not forced in ipv6 then ... */ struct addrinfo hints; struct addrinfo *info; struct addrinfo *next; int eai_err; ZEROMEMORY(&hints, sizeof (struct addrinfo)); hints.ai_family = familly; ZEROMEMORY(sa, sizeof(struct sockaddr)); // valid use of sizeof(struct sockaddr) /* ------------------------------------------------------------ */ if((eai_err = getaddrinfo(host, NULL, &hints, &info)) != 0) { return EAI_ERROR_CODE(eai_err); // NET_UNABLE_TO_RESOLVE_HOST } next = info; while(next != NULL) { if((familly != AF_INET6) && (next->ai_family == AF_INET)) /* Only process IPv4 addresses */ { struct sockaddr_in *sai = (struct sockaddr_in *)sa; memcpy(sai, next->ai_addr, next->ai_addrlen); sai->sin_port = htons(port); #if HAS_SOCKADDR_IN_SIN_LEN sai->sin_len = sizeof(struct sockaddr_in); #endif break; } if((familly != AF_INET) && (next->ai_family == AF_INET6)) /* Only process IPv4 addresses */ { struct sockaddr_in6 *sai6 = (struct sockaddr_in6 *)sa; memcpy(sai6, next->ai_addr, next->ai_addrlen); sai6->sin6_port = htons(port); #if HAS_SOCKADDR_IN6_SIN6_LEN sai6->sin6_len = sizeof(struct sockaddr_in6); #endif break; } next = next->ai_next; } freeaddrinfo(info); if(next == NULL) /* nothing found for AF_INET */ { return NET_UNABLE_TO_RESOLVE_HOST; } return SUCCESS; } ya_result tcp_input_output_stream_connect_sockaddr(const struct sockaddr *sa, input_stream *istream_, output_stream *ostream_, struct sockaddr *bind_from, u8 to_sec) { int fd; while((fd = socket(sa->sa_family, SOCK_STREAM, 0)) < 0) { int err = errno; if(err != EINTR) { return MAKE_ERRNO_ERROR(err); } } /* * Bind the socket if required. */ if(bind_from != NULL) { while((bind(fd, bind_from, sizeof(socketaddress))) < 0) { int err = errno; if(err != EINTR) { close_ex(fd); /* could clear errno */ return MAKE_ERRNO_ERROR(err); } } } int ssec, susec, rsec, rusec; tcp_get_sendtimeout(fd, &ssec, &susec); tcp_get_recvtimeout(fd, &rsec, &rusec); tcp_set_sendtimeout(fd, to_sec, 0); tcp_set_recvtimeout(fd, to_sec, 0); tcp_set_nodelay(fd, tcp_nodelay); tcp_set_cork(fd, tcp_cork); #if HAS_SOCKADDR_SA_LEN while(connect(fd, sa, sa->sa_len) < 0) #else while(connect(fd, sa, sizeof(socketaddress)) < 0) #endif { int err = errno; if(err != EINTR) { close_ex(fd); // Linux quirk if(err == EINPROGRESS) { err = ETIMEDOUT; } return MAKE_ERRNO_ERROR(err); } } /* can only fail if fd < 0, which is never the case here */ fd_input_stream_attach(istream_, fd); fd_output_stream_attach(ostream_, fd); tcp_set_sendtimeout(fd, ssec, susec); tcp_set_recvtimeout(fd, rsec, rusec); return fd; } ya_result tcp_input_output_stream_connect_ex(const char *server, u16 port, input_stream *istream_, output_stream *ostream_, struct sockaddr *bind_from, u8 to_sec) { ya_result return_code; socketaddress sa; /* * If the client interface is specified, then use its family. * Else use the unspecified familly to let the algorithm choose the first available one. */ int family = (bind_from != NULL) ? bind_from->sa_family : AF_UNSPEC; if(ISOK(return_code = gethostaddr(server, port, &sa.sa, family))) { return_code = tcp_input_output_stream_connect_sockaddr(&sa.sa, istream_, ostream_, bind_from, to_sec); } return return_code; } ya_result tcp_input_output_stream_connect(const char *server, u16 port, input_stream *istream, output_stream *ostream) { return tcp_input_output_stream_connect_ex(server, port, istream, ostream, NULL, 0); } ya_result tcp_input_output_stream_connect_host_address(const host_address *ha, input_stream *istream_, output_stream *ostream_, u8 to_sec) { socketaddress sa; ya_result return_code; if(ISOK(return_code = host_address2sockaddr(&sa, ha))) { return_code = tcp_input_output_stream_connect_sockaddr(&sa.sa, istream_, ostream_, NULL, to_sec); } return return_code; } ya_result tcp_io_stream_connect_ex(const char *server, u16 port, io_stream *ios, struct sockaddr *bind_from) { input_stream istream; output_stream ostream; ya_result return_code; if(ISOK(return_code = tcp_input_output_stream_connect_ex(server, port, &istream, &ostream, bind_from, 0))) { io_stream_link(ios, &istream, &ostream); } return return_code; } ya_result tcp_io_stream_connect(const char *server, u16 port, io_stream *ios) { return tcp_io_stream_connect_ex(server, port, ios, NULL); } void tcp_set_linger(int fd, bool enable, int seconds) { struct linger l; l.l_onoff = (enable)?1:0; l.l_linger = seconds; setsockopt(fd, SOL_SOCKET, SO_LINGER, &l, sizeof(l)); } /** * Nagle * * @param fd * @param enable */ void tcp_set_nodelay(int fd, bool enable) { int flag = (enable)?1:0; setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof(flag) ); } #if defined(__linux__) /** * @param fd * @param enable */ void tcp_set_cork(int fd, bool enable) { int flag = (enable)?1:0; setsockopt(fd, IPPROTO_TCP, TCP_CORK, &flag, sizeof(flag) ); } #elif defined(__FreeBSD__) /** * @param fd * @param enable */ //#error THIS NEEDS TO BE TESTED ON BSD (This error message is to remind you that) void tcp_set_cork(int fd, bool enable) { int flag = (enable)?1:0; setsockopt(fd, IPPROTO_TCP, TCP_NOPUSH, &flag, sizeof(flag) ); } #else void tcp_set_cork(int fd, bool enable) { /** * Cork/NoPush have been documented as Linux/FreeBSD specifics */ } #endif void tcp_set_sendtimeout(int fd, int seconds, int useconds) { struct timeval tv; tv.tv_sec = seconds; tv.tv_usec = useconds; setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)); } void tcp_set_recvtimeout(int fd, int seconds, int useconds) { struct timeval tv; tv.tv_sec = seconds; tv.tv_usec = useconds; setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)); } void tcp_get_sendtimeout(int fd, int *seconds, int *useconds) { struct timeval tv; socklen_t tv_len = sizeof(tv); getsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &tv, &tv_len); *seconds = tv.tv_sec; *useconds = tv.tv_usec; } void tcp_get_recvtimeout(int fd, int *seconds, int *useconds) { struct timeval tv; socklen_t tv_len = sizeof(tv); getsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &tv, &tv_len); *seconds = tv.tv_sec; *useconds = tv.tv_usec; } static const char* tcp_env_keywords[4] = { "nodelay", "delay", "cork", "nocork" }; void tcp_init_with_env() { char tmp[256]; const char* tcp_flags_cfg = getenv(DNSCORE_TCP_FLAGS); if(tcp_flags_cfg != NULL) { strncpy(tmp, tcp_flags_cfg, sizeof(tmp)-1); tmp[sizeof(tmp) - 1] = '\0'; size_t tmp_len = strlen(tmp); for(int i = 0; i < tmp_len; i++) { if(tmp[i] == ',') { tmp[i] = ' '; } } const char *p = parse_skip_spaces(tmp); while(*p != '\0') { s32 keyword = -1; s32 word_len = parse_skip_word_specific(p, strlen(p), tcp_env_keywords, 4, &keyword); if(FAIL(word_len)) { break; } switch(keyword) { case 0: // nodelay tcp_nodelay = TRUE; break; case 1: // delay tcp_nodelay = FALSE; break; case 2: // cork tcp_cork = TRUE; break; case 3: // nocork tcp_cork = FALSE; break; default: osformatln(termerr, "syntax error in env %s", DNSCORE_TCP_FLAGS); flusherr(); break; } p += word_len; p = parse_skip_spaces(p); } } } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/list-sl.c0000644000077100007710000000012412650131756021067 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.733344 30 ctime=1454597651.479344534 yadifa-2.1.6-5826/lib/dnscore/src/list-sl.c0000664000077100007710000001316012650131756020675 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief A node-based single linked list * * A node-based single linked list * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnscore/dnscore-config.h" #include "dnscore/list-sl.h" #define LISTDATA_TAG 0x415441445453494c /*------------------------------------------------------------------------------ * FUNCTIONS */ /** * Remove the first item that points to data; * * @param list * @param data * @return TRUE if an item has been deleted */ bool list_sl_remove(list_sl_s *list, void *data) { list_sl_node_s **nodep = &list->first; list_sl_node_s *node = list->first; while(node->next != NULL) { if(data == node->data) { *nodep = node->next; list->size--; free(node); return TRUE; } nodep = &node->next; node = node->next; } return NULL; } /** * Remove all items from the list. * Deletes the nodes but not the data. * * @param list */ void list_sl_clear(list_sl_s *list) { list_sl_node_s *node = list->first; while(node->next != NULL) { list_sl_node_s *tmp = node; node = node->next; free(tmp); } list->first = (list_sl_node_s *)&list->sentinel; list->size = 0; } /** * Iterates through the nodes of the function, calling the comparator. * * The comparator must return: * * COLLECTION_ITEM_SKIP : go to next item * COLLECTION_ITEM_STOP : stop processing, return NULL * COLLECTION_ITEM_PROCESS_THEN_STOP : stop processing, return node data * * @param list * @param comparator * * @return a matching node or NULL */ void *list_sl_search(list_sl_s *list, result_callback_function *comparator, void *parm) { list_sl_node_s *node = list->first; while(node->next != NULL) { ya_result ret = comparator(node->data, parm); if((ret & COLLECTION_ITEM_STOP) != 0) { if((ret & COLLECTION_ITEM_PROCESS) != 0) { return node->data; } else { return NULL; } } node = node->next; } return NULL; } /** * Iterates through the nodes of the function, calling the comparator. * * The comparator must return: * * < 0 : stop processing, return NULL * = 0 : no match * > 0 : stop processing, return node data * * @param list * @param comparator * * @return a matching node or NULL */ bool list_sl_remove_match(list_sl_s *list, result_callback_function *comparator, void *parm) { list_sl_node_s **nodep = &list->first; list_sl_node_s *node = list->first; bool matched = FALSE; while(node->next != NULL) { ya_result ret = comparator(node->data, parm); if((ret & COLLECTION_ITEM_PROCESS) != 0) { list_sl_node_s* next = node->next; *nodep = node->next; list->size--; free(node); matched = true; if((ret & COLLECTION_ITEM_STOP) != 0) { break; } node = next; // node is assigned its next value (stored in *nodep), it's not using freed memory with this. nodep = &node->next; continue; } if((ret & COLLECTION_ITEM_STOP) != 0) { break; } node = *nodep; // node is assigned its next value (stored in *nodep), it's not using freed memory with this. nodep = &node->next; } return matched; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/base16.c0000644000077100007710000000012412650131756020561 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.644344 30 ctime=1454597651.304344534 yadifa-2.1.6-5826/lib/dnscore/src/base16.c0000664000077100007710000001272212650131756020372 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup base Base conversion functions * @ingroup dnscore * @brief Base 16 codec * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include "dnscore/sys_types.h" static const u8 __BASE16__[16] ={ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; /** * Encodes bytes into base16 * The output size must be at least size_in * 2 * * @param buffer_in bytes to convert * @param size_in number of bytes * @param buffer_out output buffer of a size >= size_in * 2 * * @return output size */ u32 base16_encode(const u8* buffer_in, u32 size_in, char* buffer_out) { u32 ret = size_in << 1; while(size_in > 0) { u8 c = *buffer_in++; *buffer_out++ = __BASE16__[c >> 4]; *buffer_out++ = __BASE16__[c & 0x0f]; size_in--; } return ret; } static const u8 __DEBASE16__[256] ={ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0 - 7 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 8 - 15 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 16 - 23 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 24 - 31 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 32 - 39 */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 40 - 47 ...+.../ */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* 01234567 */ 0x08, 0x09, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 89...=.. */ 0xff, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0xff, /* .ABCDEFG */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* HIJKLMNO */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* PQRSTUVW */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* XYZ..... */ 0xff, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0xff, /* .abcdefg */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* hijklmno */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* pqrstuvw */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* xyz..... */ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; /** * Decodes base16 into bytes * The output size must be at least size_in / 2 * * @param buffer_in base16 text * @param size_in number of chars * @param buffer_out output buffer of a size >= size_in / 2 * * @return output size */ ya_result base16_decode(const char* buffer_in, u32 size_in, u8* buffer_out) { if((size_in & 1) != 0) { return PARSEB16_ERROR; // wrong number of bytes } u8* in = (u8*)buffer_in; u8* out = buffer_out; while(size_in > 0) { u8 h = __DEBASE16__[*in++]; u8 l = __DEBASE16__[*in++]; if(((h | l) & 0x80) != 0) { return PARSEB16_ERROR; } *out++ = (h << 4) | l; size_in -= 2; } return (out - buffer_out); } /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/chroot.c0000644000077100007710000000012412650131756020776 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.754344 30 ctime=1454597651.341344534 yadifa-2.1.6-5826/lib/dnscore/src/chroot.c0000664000077100007710000001763612650131756020620 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup chroot * @ingroup dnscore * @brief Chroot functions * * @{ */ #include "dnscore/dnscore-config.h" #include #include #include #include "dnscore/chroot.h" #include "dnscore/logger.h" #include "dnscore/ptr_set.h" #include "dnscore/mutex.h" #define MODULE_MSG_HANDLE g_system_logger extern logger_handle *g_system_logger; static const char CHROOT_DEFAULT[] = "/"; static const char *chroot_path = CHROOT_DEFAULT; static bool chroot_jailed = FALSE; struct chroot_managed_path_s { char **managed_location; char *prefixed_path; bool chrooted; }; typedef struct chroot_managed_path_s chroot_managed_path_s; static ptr_set chroot_managed_path_set = PTR_SET_PTR_EMPTY; static mutex_t choot_managed_path_set_mtx = MUTEX_INITIALIZER; /** * chroot relative: /my-sub-dirs or my-sub-dirs * not chroot relative: /my-chroot/my-sub-dirs * * @param path * @param chroot_relative */ ya_result chroot_manage_path(char **managed_location, const char *path, bool chroot_relative) { const char *cp = chroot_get_path();; const char *prefixed_path = path; int cl = strlen(cp) - 1; if(cl < 0) { return ERROR; } if(cp[cl] != '/') { return ERROR; } if(!chroot_relative) { int pl = strlen(path); if(pl < cl) { return ERROR; } if(memcmp(path, cp, cl) != 0) { return ERROR; // prefix is wrong } prefixed_path = &path[cl]; } else { if(path[0] != '/') { return ERROR; } } mutex_lock(&choot_managed_path_set_mtx); ptr_node *node = ptr_set_avl_insert(&chroot_managed_path_set, managed_location); if(node->value == NULL) { chroot_managed_path_s *cmp; MALLOC_OR_DIE(chroot_managed_path_s*, cmp, sizeof(chroot_managed_path_s), GENERIC_TAG); cmp->managed_location = managed_location; cmp->prefixed_path = strdup(prefixed_path); cmp->chrooted = FALSE; node->value = cmp; mutex_unlock(&choot_managed_path_set_mtx); return SUCCESS; } else { // location already managed mutex_unlock(&choot_managed_path_set_mtx); return ERROR; } } ya_result chroot_unmanage_path(char **managed_location) { mutex_lock(&choot_managed_path_set_mtx); ptr_node *node = ptr_set_avl_find(&chroot_managed_path_set, managed_location); if(node != NULL) { chroot_managed_path_s *cmp = (chroot_managed_path_s*)node->value; ptr_set_avl_delete(&chroot_managed_path_set, managed_location); free(cmp); mutex_unlock(&choot_managed_path_set_mtx); return SUCCESS; } else { mutex_unlock(&choot_managed_path_set_mtx); return ERROR; } } const char * chroot_get_path() { return chroot_path; } ya_result chroot_set_path(const char *path) { if(chroot_jailed) { return CHROOT_ALREADY_JAILED; } if(path != NULL) { if(strcmp(path, chroot_path) == 0) { return SUCCESS; } struct stat fileinfo; if(stat(path, &fileinfo) < 0) { return ERRNO_ERROR; } /* Is it a directory ? */ if(!S_ISDIR(fileinfo.st_mode)) { return CHROOT_NOT_A_DIRECTORY; } if(chroot_path != CHROOT_DEFAULT) { free((char*)chroot_path); } chroot_path = strdup(path); } else { if(chroot_path != CHROOT_DEFAULT) { free((char*)chroot_path); chroot_path = CHROOT_DEFAULT; } } #ifdef DEBUG osformatln(termout, "chroot_set_path: set to '%s'", chroot_path); #endif return SUCCESS; } /** * dummy thread used to pre-load libgcc_s.so.1 (if the architecture needs this) * * @param config */ static void * chroot_jail_dummy_thread(void *parm) { pthread_exit(parm); return parm; } ya_result chroot_jail() { if(chroot_jailed) { return CHROOT_ALREADY_JAILED; } pthread_t t; /** * This thread is a workaround against libraries not being linked yet * from outside the chroot environment. * * Launching it will trigger the linkage. */ if(pthread_create(&t, NULL, chroot_jail_dummy_thread, NULL) == 0) { pthread_join(t, NULL); } else { log_err("chroot_jail: unable to start dummy thread"); } if(chroot(chroot_path) < 0) { return ERRNO_ERROR; } chroot_jailed = TRUE; chdir("/"); mutex_lock(&choot_managed_path_set_mtx); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&chroot_managed_path_set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); chroot_managed_path_s *cmp = (chroot_managed_path_s*)node->value; if(!cmp->chrooted) { char *new_path = strdup(cmp->prefixed_path); char *old_path = *cmp->managed_location; int new_path_len = strlen(new_path); bool dirsep = TRUE; int j = 1; for(int i = 1; i <= new_path_len; i++) { char c = new_path[i]; if(c == '/') { if(!dirsep) { new_path[j++] = c; } dirsep = TRUE; } else { new_path[j++] = new_path[i]; dirsep = FALSE; } } #ifdef DEBUG log_debug("chroot_jail: @%p: '%s' -> '%s'", *cmp->managed_location, old_path, new_path); #endif *cmp->managed_location = new_path; free(old_path); cmp->chrooted = TRUE; } } mutex_unlock(&choot_managed_path_set_mtx); return SUCCESS; } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/timems.c0000644000077100007710000000012412650131756020776 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.755344 30 ctime=1454597651.637344534 yadifa-2.1.6-5826/lib/dnscore/src/timems.c0000664000077100007710000000715312650131756020611 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscoretools Generic Tools * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include #include #include "dnscore/timems.h" /* * Return the time in ms */ u64 timeus() { struct timeval tv; gettimeofday(&tv, NULL); u64 r = tv.tv_sec; r *= 1000000LL; r += tv.tv_usec; return r; } u64 timems() { struct timeval tv; gettimeofday(&tv, NULL); u64 r = tv.tv_sec; r *= 1000; r += tv.tv_usec / 1000; return r; } /* * Wait until the ms is incremented, then return the time in ms */ u64 timems_new() { u64 t; u64 tms; u64 ttr; t = timeus(); tms = t/1000; do { usleep(MIN(1000 - (tms % 1000), 1)); ttr = timeus() / 1000; } while(ttr == tms); return ttr; } #define USLEEP_LIMIT 0xffffffff //#define USLEEP_LIMIT 1000000 /** * usleep only support a limited range of time (sometimes 2^32 us, sometimes < 1 s) * This wrapper ensures time supported is up to 4294967295.000000 seconds * * @param us the number of microseconds to wait for, can range from 0 to 4294967295000000 micro seconds */ void usleep_ex(u64 us_) { s64 us = (s64)us_; s64 now = timeus(); s64 limit = now + us; if(us >= USLEEP_LIMIT) { do { sleep(us / 1000000); now = timeus(); us = limit - now; } while(us >= USLEEP_LIMIT); } // us is the remaining us to wait for while(us > 0) { usleep(us); now = timeus(); us = limit - now; } } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/tsig_algorithms.c0000644000077100007710000000012412650131756022677 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.716344 30 ctime=1454597651.668344534 yadifa-2.1.6-5826/lib/dnscore/src/tsig_algorithms.c0000664000077100007710000001075512650131756022514 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup dnscore * @brief * * @{ */ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/dnscore-config.h" #include "dnscore/sys_types.h" #include "dnscore/dnsname.h" #include "dnscore/rfc.h" #include "dnscore/string_set.h" #include "dnscore/tsig.h" /* * */ static string_node *hmac_algorithms = NULL; static void tsig_string_set_insert(const char *name, u32 value) { string_node *node; u8 fqdn[MAX_DOMAIN_LENGTH]; cstr_to_dnsname(fqdn, name); node = string_set_avl_insert(&hmac_algorithms, (char*)dnsname_dup(fqdn)); node->value = value; } void tsig_register_algorithms() { tsig_string_set_insert("hmac-md5.sig-alg.reg.int", HMAC_MD5); tsig_string_set_insert("hmac-sha1", HMAC_SHA1); tsig_string_set_insert("hmac-sha224", HMAC_SHA224); tsig_string_set_insert("hmac-sha256", HMAC_SHA256); tsig_string_set_insert("hmac-sha384", HMAC_SHA384); tsig_string_set_insert("hmac-sha512", HMAC_SHA512); } void tsig_finalize_algorithms() { string_set_avl_iterator iter; string_set_avl_iterator_init(&hmac_algorithms, &iter); while(string_set_avl_iterator_hasnext(&iter)) { string_node* node = string_set_avl_iterator_next_node(&iter); free((void*)node->key); } string_set_avl_destroy(&hmac_algorithms); } u8 tsig_get_algorithm(const u8 *name) { string_node *node = string_set_avl_find(&hmac_algorithms, (char*)name); return (node != NULL) ? node->value : HMAC_UNKNOWN; } const u8* tsig_get_algorithm_name(u8 algorithm) { switch(algorithm) { case HMAC_MD5: return (u8*)"\010hmac-md5\007sig-alg\003reg\003int"; case HMAC_SHA1: return (u8*)"\011hmac-sha1"; case HMAC_SHA224: return (u8*)"\013hmac-sha224"; case HMAC_SHA256: return (u8*)"\013hmac-sha256"; case HMAC_SHA384: return (u8*)"\013hmac-sha384"; case HMAC_SHA512: return (u8*)"\013hmac-sha512"; default: return (u8*)"\004null"; /* UNKNOWN */ } } const EVP_MD * tsig_get_EVP_MD(u8 algorithm) { switch(algorithm) { #ifndef OPENSSL_NO_MD5 case HMAC_MD5: return EVP_md5(); #endif #ifndef OPENSSL_NO_SHA case HMAC_SHA1: return EVP_sha1(); #endif #ifndef OPENSSL_NO_SHA256 case HMAC_SHA224: return EVP_sha224(); case HMAC_SHA256: return EVP_sha256(); #endif #ifndef OPENSSL_NO_SHA512 case HMAC_SHA384: return EVP_sha384(); case HMAC_SHA512: return EVP_sha512(); #endif default: return EVP_md_null(); } } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/debug.c0000644000077100007710000000012412650131756020566 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.655344 30 ctime=1454597651.382344534 yadifa-2.1.6-5826/lib/dnscore/src/debug.c0000664000077100007710000010657112650131756020405 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup debug Debug functions * @ingroup dnscore * @brief Debug functions. * * Definitions of debug functions/hooks, mainly memory related. * * @{ */ #include "dnscore/dnscore-config.h" #include #include #include #include #include #include "dnscore/dnscore-config.h" #if defined(__linux__) || defined(__APPLE__) #include #if HAS_BFD_DEBUG_SUPPORT #include #ifndef DMGL_PARAMS #define DMGL_PARAMS (1 << 0) /* Include function args */ #define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ #endif #endif #endif #include "dnscore/sys_types.h" #include "dnscore/format.h" #include "dnscore/debug.h" #include "dnscore/mutex.h" #include "dnscore/logger.h" #include "dnscore/ptr_set.h" #include "dnscore/u64_set.h" #include "dnscore/list-sl.h" #undef malloc #undef free #undef realloc #undef calloc #undef debug_mtest #undef debug_stat #undef debug_mallocated #if defined(__linux__) || defined(__APPLE__) #define ZDB_DEBUG_STACKTRACE 1 #else /* __FreeBSD__ or unknown */ #define ZDB_DEBUG_STACKTRACE 0 #endif #ifdef __cplusplus extern "C" output_stream __termout__; extern "C" output_stream __termerr__; #else extern output_stream __termout__; extern output_stream __termerr__; #endif extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger /** * These are to ensure I get trashed memory at alloc and on a free. * => * No "lucky" inits. * No "lucky" destroyed uses. * */ #define DB_MALLOC_MAGIC 0xd1a2e81c #define DB_MFREED_MAGIC 0xe81cd1a2 #define MALLOC_PADDING 8 #define MALLOC_REALSIZE(mr_size_) ((mr_size_+(MALLOC_PADDING-1))&(-MALLOC_PADDING)) typedef struct db_header db_header; struct db_header { u32 magic; u32 size; #if ZDB_DEBUG_TAG_BLOCKS!=0 #define HEADER_SIZE_TAG 8 u64 tag; #else #define HEADER_SIZE_TAG 0 #endif #if ZDB_DEBUG_SERIALNUMBERIZE_BLOCKS!=0 u64 serial; #endif #if ZDB_DEBUG_CHAIN_ALLOCATED_BLOCKS!=0 #define HEADER_SIZE_CHAIN (8+(2*__SIZEOF_POINTER__)) db_header* next; db_header* previous; #else #define HEADER_SIZE_CHAIN 0 #endif #if ZDB_DEBUG_STACKTRACE intptr* _trace; #endif }; #define HEADER_SIZE sizeof(db_header) #if ZDB_DEBUG_CHAIN_ALLOCATED_BLOCKS!=0 static db_header db_mem_first = { DB_MALLOC_MAGIC, 0, #if ZDB_DEBUG_TAG_BLOCKS!=0 0xffffffffffffffffLL, #endif #if ZDB_DEBUG_SERIALNUMBERIZE_BLOCKS!=0 0, #endif #if ZDB_DEBUG_CHAIN_ALLOCATED_BLOCKS!=0 &db_mem_first, &db_mem_first, #endif #if ZDB_DEBUG_STACKTRACE NULL, #endif }; #endif #if HAS_BFD_DEBUG_SUPPORT ////////////////////////////////////////////////////////////////////////////// // // Line numbers in stacktraces // ////////////////////////////////////////////////////////////////////////////// /// @note edf: from http://en.wikibooks.org/wiki/Linux_Applications_Debugging_Techniques/The_call_stack struct bfd_node { bfd* _bfd; asymbol **_symbols; asection *_text; u32 _symbols_count; bool _has_symbols; }; typedef struct bfd_node bfd_node; static pthread_mutex_t bfd_mtx = PTHREAD_MUTEX_INITIALIZER; static bool bfd_initialised = FALSE; static ptr_set bfd_collection = PTR_SET_ASCIIZ_EMPTY; static char *proc_self_exe = NULL; static char * debug_get_self_exe() { char path[PATH_MAX]; ssize_t n = readlink("/proc/self/exe", path, sizeof(path)); if(n > 0) { path[n] = '\0'; char *ret = strdup(path); return ret; } return NULL; } /* static char * debug_get_real_file(const char *file) { char path[PATH_MAX]; ssize_t n = readlink(file, path, sizeof(path)); if(n > 0) { path[n] = '\0'; char *ret; if(strcmp(file, path) == 0) { ret = file; } else { ret = strdup(path); } return ret; } return NULL; } */ struct bfd_data { bfd_node *bfdn; bfd_vma pc; bfd_boolean found; const char *filename; const char *function; unsigned int line; }; static void debug_bfd_flags_format(const void *value, output_stream *os, s32 padding, char pad_char, bool left_justified, void* reserved_for_method_parameters) { u64 flags = (u64)value; output_stream_write(os, "{ ", 2); if(flags & HAS_RELOC) { output_stream_write(os, "RELOC ", 6); } if(flags & EXEC_P) { output_stream_write(os, "EXEC ", 5); } if(flags & HAS_LINENO) { output_stream_write(os, "LINENO ", 7); } if(flags & HAS_DEBUG) { output_stream_write(os, "DEBUG ", 6); } if(flags & HAS_SYMS) { output_stream_write(os, "SYMS ", 5); } if(flags & HAS_LOCALS) { output_stream_write(os, "LOCALS ", 6); } if(flags & DYNAMIC) { output_stream_write(os, "DYNAMIC ", 8); } output_stream_write(os, "}", 1); } static const char debug_bfd_symbol_flags_format_letter[24] = { 'l','g','D','f', '?','k','K','w', 's','o','!','C', 'W','I','F','d', 'O','R','T','e', 'E','S','u','U' }; static void debug_bfd_symbol_flags_format(const void *value, output_stream *os, s32 padding, char pad_char, bool left_justified, void* reserved_for_method_parameters) { char *p; char tmp[24]; (void)padding; (void)pad_char; (void)left_justified; (void)reserved_for_method_parameters; u32 flags = (u32)(intptr)value; if(flags != 0) { p = tmp; for(int i = 0; i < 24; i++) { if((flags & (1 << i)) != 0) { *p++ = debug_bfd_symbol_flags_format_letter[i]; } } output_stream_write(os, tmp, p - tmp); } else { tmp[0] = '-'; output_stream_write(os, tmp, 1); } } static void debug_bfd_symbol_flag_help() { log_debug( "- : no flags\n" "l : local The symbol has local scope; <> in <>. The value is the offset into the section of the data.\n" "g : global The symbol has global scope; initialized data in <>. The value is the offset into the section of the data.\n" "D : debugging The symbol is a debugging record. The value has an arbitrary meaning, unless BSF_DEBUGGING_RELOC is also set.\n" "f : function The symbol denotes a function entry point. Used in ELF, perhaps others someday.\n" "s : section Points to a section.\n" "d : dynamic Symbol is from dynamic linking information.\n" "O : object The symbol denotes a data object. Used in ELF, and perhaps others someday.\n" ); } static bool debug_bfd_resolve_address(void *address, const char *binary_file_path, const char **out_file, const char **out_function, u32 *out_line) { if(binary_file_path == NULL) { if(proc_self_exe == NULL) { proc_self_exe = debug_get_self_exe(); if(proc_self_exe == NULL) { return FALSE; } } binary_file_path = proc_self_exe; } pthread_mutex_lock(&bfd_mtx); if(!bfd_initialised) { bfd_init(); bfd_initialised = TRUE; debug_bfd_symbol_flag_help(); } ptr_node *node = ptr_set_avl_insert(&bfd_collection, (char*)binary_file_path); bfd_node *bfdn = (bfd_node*)node->value; if(bfdn == NULL) { bfd* b = bfd_openr(binary_file_path, 0); if(b != NULL) { if(bfd_check_format(b, bfd_archive)) { bfd_close(b); return FALSE; } char **matching = NULL; if(!bfd_check_format_matches(b, bfd_object, &matching)) { free(matching); bfd_close(b); return FALSE; } bfdn = (bfd_node*)malloc(sizeof(bfd_node)); ZEROMEMORY(bfdn, sizeof(bfd_node)); bfdn->_bfd = b; u32 flags = bfd_get_file_flags(b); format_writer bfd_flags_writer = {debug_bfd_flags_format, (void*)(intptr)flags}; log_debug("bfd: %s: %w", binary_file_path, &bfd_flags_writer); format_writer bfd_symbol_flags_writer = {debug_bfd_symbol_flags_format, 0}; if( (bfdn->_has_symbols = (flags & HAS_SYMS)) ) { u32 tab_n = bfd_get_symtab_upper_bound(b); u32 dyntab_n = bfd_get_dynamic_symtab_upper_bound(b); bool dynamic = (flags & DYNAMIC); u32 n = (dynamic)?dyntab_n:tab_n; bfdn->_symbols = (asymbol**)malloc(n); if(!dynamic) { bfdn->_symbols_count = bfd_canonicalize_symtab(b, bfdn->_symbols); } else { bfdn->_symbols_count = bfd_canonicalize_dynamic_symtab(b, bfdn->_symbols); } bfdn->_text = bfd_get_section_by_name(b, ".text"); asymbol** sympa = bfdn->_symbols; for(u32 i = 0; i < bfdn->_symbols_count; i++) { asymbol *sym = sympa[i]; bfd_symbol_flags_writer.value = (void*)(intptr)sym->flags; log_debug1("bfd: %s %w %p", sym->name, &bfd_symbol_flags_writer, sym->value); } } node->key = strdup(binary_file_path); node->value = bfdn; } else { ptr_set_avl_delete(&bfd_collection, binary_file_path); } } pthread_mutex_unlock(&bfd_mtx); bool ret = FALSE; if(bfdn != NULL) { intptr offset = (intptr)address; if(offset >= bfdn->_text->vma) { offset -= bfdn->_text->vma; pthread_mutex_lock(&bfd_mtx); ret = bfd_find_nearest_line(bfdn->_bfd, bfdn->_text, bfdn->_symbols, offset, out_file, out_function, out_line); #if DEBUG if(!ret) { log_debug("bfd: line not found ..."); } #endif pthread_mutex_unlock(&bfd_mtx); } else { *out_line = 0; } } return ret; } static void debug_bfd_clear_delete(void *node_) { ptr_node *node = (ptr_node*)node_; bfd_node *bfd = (bfd_node*)node->value; if(bfd != NULL) { free(bfd->_symbols); bfd_close(bfd->_bfd); free(bfd); } free(node->key); } static void debug_bfd_clear() { pthread_mutex_lock(&bfd_mtx); ptr_set_avl_callback_and_destroy(&bfd_collection, debug_bfd_clear_delete); pthread_mutex_unlock(&bfd_mtx); } #endif typedef u64_set stacktrace_set; ////////////////////////////////////////////////////////////////////////////// // // STACKTRACE // ////////////////////////////////////////////////////////////////////////////// static stacktrace_set stacktraces_list_set = U64_SET_EMPTY; static pthread_mutex_t stacktraces_mutex = PTHREAD_MUTEX_INITIALIZER; static ya_result debug_stacktraces_list_set_search(void* data, void* parm) { stacktrace trace_a = (stacktrace)data; stacktrace trace_b = (stacktrace)parm; if(data == NULL || parm == NULL) { return COLLECTION_ITEM_STOP; } for(;;) { if(*trace_a != *trace_b) { break; } if((*trace_a|*trace_b) == 0) { return COLLECTION_ITEM_PROCESS_THEN_STOP; } trace_a++; trace_b++; } return COLLECTION_ITEM_STOP; } stacktrace debug_stacktrace_get() { #ifdef __linux__ void* buffer[1024]; int n = backtrace(buffer, sizeof (buffer) / sizeof (void*)); // backtrace to key stacktrace sp = (stacktrace)buffer; u64 key = 0; for(int i = 0; i < n; i++) { key += sp[i] << ( n & 65535 ); } pthread_mutex_lock(&stacktraces_mutex); stacktrace trace; u64_node *node = u64_set_avl_insert(&stacktraces_list_set, key); if(node->value == NULL) { list_sl_s *sll; sll = (list_sl_s*)malloc(sizeof(list_sl_s)); list_sl_init(sll); node->value = sll; trace = (stacktrace)malloc((n + 2) * sizeof(intptr)); memcpy(trace, buffer, n * sizeof (void*)); trace[n] = 0; list_sl_insert(sll, trace); trace[n+1] = (intptr)backtrace_symbols(buffer, n); } else { list_sl_s *sll; sll = (list_sl_s *)node->value; trace = (stacktrace)list_sl_search(sll, debug_stacktraces_list_set_search, buffer); if(trace == NULL) { trace = (stacktrace)malloc((n + 2) * sizeof(intptr)); memcpy(trace, buffer, n * sizeof (void*)); trace[n] = 0; list_sl_insert(sll, trace); trace[n+1] = (intptr)backtrace_symbols(buffer, n); } } pthread_mutex_unlock(&stacktraces_mutex); return trace; #else return NULL; #endif } /** * clears all stacktraces from memory * should only be called at shutdown */ static void debug_stacktrace_clear_delete(void *node_) { u64_node *node = (u64_node*)node_; list_sl_s *sll = (list_sl_s *)node->value; if(sll != NULL) { stacktrace trace; while((trace = (stacktrace)list_sl_pop(sll)) != NULL) { int n = 0; while(trace[n] != 0) { ++n; } char **trace_strings = (char**)trace[n + 1]; free(trace_strings); free(trace); } } } void debug_stacktrace_clear() { pthread_mutex_lock(&stacktraces_mutex); u64_set_avl_callback_and_destroy(&stacktraces_list_set, debug_stacktrace_clear_delete); pthread_mutex_unlock(&stacktraces_mutex); #if HAS_BFD_DEBUG_SUPPORT debug_bfd_clear(); #endif } void debug_stacktrace_log(logger_handle* handle, u32 level, stacktrace trace) { #ifdef __linux__ int n = 0; if(trace != NULL) { while(trace[n] != 0) { ++n; } char **trace_strings = (char**)trace[n + 1]; for(int i = 0; i < n; i++) { void *address = (void*)trace[i]; const char *text = (trace_strings != NULL) ? trace_strings[i] : "???"; #if HAS_BFD_DEBUG_SUPPORT char *parenthesis = strchr(text, '('); if(parenthesis != NULL) { u32 n = parenthesis - text; assert(n < PATH_MAX); char binary[PATH_MAX]; memcpy(binary, text, n); binary[n] = '\0'; const char *file; const char *function; u32 line; debug_bfd_resolve_address(address, binary, &file, &function, &line); if((file != NULL) && (*file != '\0')) { logger_handle_msg(handle, level, "%p: %s (%s:%i)", address, function, file, line); } else { logger_handle_msg(handle, level, "%p: %s", address, text); } } else { #endif logger_handle_msg(handle, level, "%p %s", address, text); #if HAS_BFD_DEBUG_SUPPORT } #endif } } #else logger_handle_msg(handle, level, "backtrace not supported"); #endif } void debug_stacktrace_print(output_stream *os, stacktrace trace) { #ifdef __linux__ int n = 0; if(trace != NULL) { while(trace[n] != 0) { ++n; } } char **trace_strings = (char**)trace[n + 1]; for(int i = 0; i < n; i++) { osformatln(os, "%p %s", (void*)trace[i], (trace_strings != NULL) ? trace_strings[i] : "???"); } #else osformatln(os, "backtrace not supported"); #endif } #define REAL_SIZE(rs_size_) MALLOC_REALSIZE((rs_size_)+HEADER_SIZE) #if ZDB_DEBUG_ENHANCED_STATISTICS!=0 /* [ 0] 1.. 8 * [ 1] 9.. 16 * [ 2] 17.. 24 * ... * [ 15] 121..128 * [ 31] 248..256 * [ 32] 257..2^31 */ static u64 db_alloc_count_by_size[(ZDB_DEBUG_ENHANCED_STATISTICS_MAX_MONITORED_SIZE / 8) + 1] = { 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, 0, 0, 0, 0, 0 }; static u64 db_alloc_peak_by_size[(ZDB_DEBUG_ENHANCED_STATISTICS_MAX_MONITORED_SIZE / 8) + 1] = { 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, 0, 0, 0, 0, 0 }; #endif static u64 db_total_allocated = 0; static u64 db_total_freed = 0; static u64 db_current_allocated = 0; static u64 db_current_blocks = 0; static u64 db_peak_allocated = 0; #if ZDB_DEBUG_SERIALNUMBERIZE_BLOCKS!=0 static u64 db_next_block_serial = 0; #endif static bool db_showallocs = ZDB_DEBUG_SHOW_ALLOCS; static pthread_mutex_t alloc_mutex = PTHREAD_MUTEX_INITIALIZER; /****************************************************************************/ void debug_dump(void* data_pointer_, size_t size_, size_t line_size, bool hex, bool text) { debug_dump_ex(data_pointer_, size_, line_size, hex, text, FALSE); } /****************************************************************************/ void debug_dump_ex(void* data_pointer_, size_t size_, size_t line_size, bool hex, bool text, bool address) { if(__termout__.vtbl == NULL) { return; } osprint_dump(termout, data_pointer_, size_, line_size, (address)?OSPRINT_DUMP_ADDRESS:0 | (hex)?OSPRINT_DUMP_HEX:0 | (text)?OSPRINT_DUMP_TEXT:0); } /****************************************************************************/ /****************************************************************************/ #if defined(__linux__) bool debug_log_stacktrace(logger_handle *handle, u32 level, const char *prefix) { void* addresses[1024]; #if HAS_BFD_DEBUG_SUPPORT char binary[PATH_MAX]; #endif #if defined(__linux__) int n = backtrace(addresses, sizeof (addresses) / sizeof (void*)); if(n > 0) { char **symbols = backtrace_symbols(addresses, n); if(symbols != NULL) { for(int i = 1; i < n; i++) { char *parenthesis = strchr(symbols[i], '('); if(parenthesis != NULL) { #if HAS_BFD_DEBUG_SUPPORT u32 n = parenthesis - symbols[i]; memcpy(binary, symbols[i], n); binary[n] = '\0'; const char *func = "?"; const char *file = "?"; u32 line = ~0; debug_bfd_resolve_address(addresses[i], binary, &file, &func, &line); if((file != NULL) && (*file != '\0')) { logger_handle_msg(handle, level, "%s: %p: %s (%s:%i)", prefix, addresses[i], func, file, line); } else { logger_handle_msg(handle, level, "%s: %p: %s", prefix, addresses[i], symbols[i]); } #else logger_handle_msg(handle, level, "%s: %p: %s", prefix, addresses[i], symbols[i]); #endif } } free(symbols); } else { for(int i = 1; i < n; i++) { logger_handle_msg(handle, level, "%s: %p: ?", prefix, addresses[i]); } } } else #endif // linux only { logger_handle_msg(handle, level, "%s: ?: ?", prefix); } return TRUE; } #else bool debug_log_stacktrace(logger_handle *handle, u32 level, const char *prefix) { (void)handle; (void)level; (void)prefix; return TRUE; } #endif void* debug_malloc( size_t size_, const char* file, int line #if ZDB_DEBUG_TAG_BLOCKS!=0 , u64 tag #endif ) { size_t size = MALLOC_REALSIZE(size_); #if ZDB_DEBUG_TAG_BLOCKS != 0 assert((tag != 0) && (tag != ~0)); #endif pthread_mutex_lock(&alloc_mutex); u64 current_allocated = db_current_allocated; pthread_mutex_unlock(&alloc_mutex); if(current_allocated + size > ZDB_DEBUG_ALLOC_MAX) { if(__termout__.vtbl != NULL) { format("DB_MAX_ALLOC reached !!! (%u)", ZDB_DEBUG_ALLOC_MAX); } exit(EXIT_CODE_SELFCHECK_ERROR); } db_header* ptr = (db_header*)malloc(size + HEADER_SIZE); /* Header */ if(ptr == NULL) { perror(""); fflush(NULL); exit(EXIT_CODE_SELFCHECK_ERROR); } pthread_mutex_lock(&alloc_mutex); #if ZDB_DEBUG_STACKTRACE ptr->_trace = debug_stacktrace_get(); #endif ptr->magic = DB_MALLOC_MAGIC; ptr->size = size; #if ZDB_DEBUG_TAG_BLOCKS != 0 ptr->tag = tag; #endif #if ZDB_DEBUG_SERIALNUMBERIZE_BLOCKS != 0 ptr->serial = ++db_next_block_serial; if(ptr->serial == 0x01cb || ptr->serial == 0x01d0) { time(NULL); } #endif #if ZDB_DEBUG_CHAIN_ALLOCATED_BLOCKS != 0 ptr->next = &db_mem_first; ptr->previous = db_mem_first.previous; db_mem_first.previous->next = ptr; db_mem_first.previous = ptr; #endif db_total_allocated += size; db_current_allocated += size; db_peak_allocated = MAX(db_current_allocated, db_peak_allocated); db_current_blocks++; #if ZDB_DEBUG_ENHANCED_STATISTICS!=0 if(size_ < ZDB_DEBUG_ENHANCED_STATISTICS_MAX_MONITORED_SIZE) { db_alloc_count_by_size[(size_ - 1) >> 3]++; db_alloc_peak_by_size[(size_ - 1) >> 3]++; } else { db_alloc_count_by_size[ZDB_DEBUG_ENHANCED_STATISTICS_MAX_MONITORED_SIZE >> 3]++; db_alloc_peak_by_size[ZDB_DEBUG_ENHANCED_STATISTICS_MAX_MONITORED_SIZE >> 3]++; } #endif pthread_mutex_unlock(&alloc_mutex); if(db_showallocs) { if(__termout__.vtbl != NULL) { format("[%08x] malloc(%3x", pthread_self(), (u32)size); #if ZDB_DEBUG_TAG_BLOCKS!=0 print(" | "); debug_dump((u8*) & ptr->tag, 8, 8, FALSE, TRUE); #endif #if ZDB_DEBUG_SERIALNUMBERIZE_BLOCKS!=0 format(" | #%08llx", ptr->serial); #endif formatln(")=%p (%s:%i)", ptr + 1, file, line); } } ptr++; /* ensure the memory is not initialized "by chance" */ #if ZDB_DEBUG_MALLOC_TRASHMEMORY != 0 memset(ptr, 0xac, size_); /* AC : AlloCated */ memset(((u8*)ptr) + size_, 0xca, size - size_); /* CA : AlloCated for padding */ #endif return ptr; } void* debug_calloc( size_t size_, const char* file, int line #if ZDB_DEBUG_TAG_BLOCKS!=0 , u64 tag #endif ) { void* p = debug_malloc(size_, file, line #if ZDB_DEBUG_TAG_BLOCKS!=0 , tag #endif ); if(p != NULL) { ZEROMEMORY(p, size_); } return p; } void debug_free(void* ptr_, const char* file, int line) { if(ptr_ == NULL) { return; } db_header* ptr = (db_header*)ptr_; ptr--; if(ptr->magic != DB_MALLOC_MAGIC) { fflush(NULL); if(__termout__.vtbl != NULL) { if(ptr->magic == DB_MFREED_MAGIC) { formatln("DOUBLE FREE @ %p (%s:%i)", ptr, file, line); } else { formatln("MEMORY CORRUPTED @%p (%s:%i)", ptr, file, line); } } debug_dump(ptr, 64, 32, TRUE, TRUE); exit(EXIT_CODE_SELFCHECK_ERROR); } size_t size = ptr->size; if(db_showallocs) { if(__termout__.vtbl != NULL) { format("[%08x] free(%p [%3x]", pthread_self(), ptr + 1, (u32)size); #if ZDB_DEBUG_TAG_BLOCKS!=0 print(" | "); debug_dump((u8*) & ptr->tag, 8, 8, FALSE, TRUE); #endif #if ZDB_DEBUG_SERIALNUMBERIZE_BLOCKS!=0 format(" | #%08llx", ptr->serial); #endif formatln(") (%s:%i)", file, line); } } pthread_mutex_lock(&alloc_mutex); #if ZDB_DEBUG_CHAIN_ALLOCATED_BLOCKS!=0 ptr->previous->next = ptr->next; ptr->next->previous = ptr->previous; ptr->next = (void*)~0; ptr->previous = (void*)~0; #endif db_total_freed += size; db_current_allocated -= size; db_current_blocks--; #if ZDB_DEBUG_ENHANCED_STATISTICS!=0 if(size < ZDB_DEBUG_ENHANCED_STATISTICS_MAX_MONITORED_SIZE) { db_alloc_count_by_size[(size - 1) >> 3]--; } else { db_alloc_count_by_size[ZDB_DEBUG_ENHANCED_STATISTICS_MAX_MONITORED_SIZE >> 3]--; } #endif pthread_mutex_unlock(&alloc_mutex); ptr->magic = DB_MFREED_MAGIC; /* This is destroyed AFTER free */ memset(ptr + 1, 0xfe, size); /* FE : FrEed */ free(ptr); } void * debug_realloc(void* ptr, size_t size, const char* file, int line) { #if ZDB_DEBUG_TAG_BLOCKS!=0 u64 tag = 0x4c554e4152; #endif db_header* hdr; if(ptr != NULL) { hdr = (db_header*)ptr; hdr--; #if ZDB_DEBUG_TAG_BLOCKS!=0 tag = hdr->tag; #endif } void* newptr = debug_malloc(size, file, line #if ZDB_DEBUG_TAG_BLOCKS!=0 , tag #endif ); if(ptr != NULL) { if(hdr->size < size) { size = hdr->size; } MEMCOPY(newptr, ptr, size); debug_free(ptr, file, line); } return newptr; } char * debug_strdup(const char* str) { int l = strlen(str) + 1; char* out; MALLOC_OR_DIE(char*, out, l, ZDB_STRDUP_TAG); /* ZALLOC IMPOSSIBLE, MUST KEEP MALLOC_OR_DIE */ MEMCOPY(out, str, l); return out; } void debug_mtest(void* ptr_) { if(ptr_ == NULL) { return; } db_header* ptr = (db_header*)ptr_; ptr--; if(ptr->magic != DB_MALLOC_MAGIC) { if(__termout__.vtbl != NULL) { if(ptr->magic == DB_MFREED_MAGIC) { formatln("DOUBLE FREE @ %p", ptr); } else { formatln("MEMORY CORRUPTED @%p", ptr); } } debug_dump(ptr, 64, 32, TRUE, TRUE); exit(EXIT_CODE_SELFCHECK_ERROR); } } u32 debug_get_block_count() { return db_current_blocks; } void debug_stat(bool dump) { if(__termout__.vtbl == NULL) { return; } formatln("DB: MEM: Total Allocated=%llu", db_total_allocated); formatln("DB: MEM: Total Freed=%llu", db_total_freed); formatln("DB: MEM: Peak Usage=%llu", db_peak_allocated); formatln("DB: MEM: Allocated=%llu", db_current_allocated); formatln("DB: MEM: Blocks=%llu", db_current_blocks); formatln("DB: MEM: Monitoring Overhead=%llu (%i)", (u64)(db_current_blocks * HEADER_SIZE), (int)HEADER_SIZE); #if ZDB_DEBUG_ENHANCED_STATISTICS println("DB: MEM: Block sizes: ([size/8]={current / peak}"); int i; for(i = 0; i < (ZDB_DEBUG_ENHANCED_STATISTICS_MAX_MONITORED_SIZE >> 3); i++) { format("[%4i]={%8llu / %8llu} ;", (i + 1) << 3, db_alloc_count_by_size[i], db_alloc_peak_by_size[i]); if((i & 3) == 3) { println(""); } } formatln("[++++]={%8llu / %8llu}", db_alloc_count_by_size[ZDB_DEBUG_ENHANCED_STATISTICS_MAX_MONITORED_SIZE >> 3], db_alloc_peak_by_size[ZDB_DEBUG_ENHANCED_STATISTICS_MAX_MONITORED_SIZE >> 3]); #endif #if ZDB_DEBUG_CHAIN_ALLOCATED_BLOCKS if(dump) { db_header *ptr; u64 mintag = MAX_U64; u64 nexttag; // find the minimum for(ptr = db_mem_first.next; ptr != &db_mem_first; ptr = ptr->next) { u64 tag = ptr->tag; if(tag < mintag) { mintag = tag; } } println(""); // 0123456789ABCDEF 012345678 012345678 012345678 012345678 012345678 println("[-----TAG------] : COUNT : MIN : MAX : MEAN : TOTAL"); for(; mintag != MAX_U64; mintag = nexttag) { nexttag = MAX_U64; u32 count = 0; u32 minsize = MAX_U32; u32 maxsize = 0; u64 totalsize = 0; for(ptr = db_mem_first.next; ptr != &db_mem_first; ptr = ptr->next) { u64 tag = ptr->tag; if((tag > mintag) && (tag < nexttag)) { nexttag = tag; continue; } if(tag != mintag) { continue; } count++; totalsize += ptr->size; if(ptr->size < minsize) { minsize = ptr->size; } if(ptr->size > maxsize) { maxsize = ptr->size; } } char tag_text[9]; SET_U64_AT(tag_text[0], mintag); tag_text[8] = '\0'; formatln("%16s : %9u : %9u : %9u : %9u : %12llu", tag_text, count, minsize, maxsize, totalsize / count, totalsize); flushout(); } println(""); } if(dump) { db_header* ptr = db_mem_first.next; int index = 0; while(ptr != &db_mem_first) { formatln("block #%04x %16p [%08x]", index, (void*)& ptr[1], ptr->size); #if ZDB_DEBUG_TAG_BLOCKS debug_dump((u8*) & ptr->tag, 8, 8, FALSE, TRUE); formatln(" | "); #endif #if ZDB_DEBUG_STACKTRACE int n = 0; intptr *st = ptr->_trace; if(st != NULL) { while(st[n] != 0) { ++n; } } char **trace_strings = (char**)st[n + 1]; for(int i = 0; i < n; i++) { formatln("%p %s", (void*)st[i], (trace_strings != NULL) ? trace_strings[i] : "???"); } #endif #if ZDB_DEBUG_SERIALNUMBERIZE_BLOCKS formatln("#%08llx | ", ptr->serial); #endif osprint_dump(termout, & ptr[1], MIN(ptr->size, 128), 32, OSPRINT_DUMP_ALL); formatln("\n"); ptr = ptr->next; index++; } } #endif } void debug_dump_page(void* ptr) { if(__termout__.vtbl != NULL) { formatln("Page for %p:\n", ptr); if(ptr != NULL) { intptr p = (intptr)ptr; p = p & (~4095); debug_dump_ex((void*)p, 4096, 32, TRUE, TRUE, TRUE); } } } bool debug_mallocated(void* ptr) { if(ptr == NULL) { /* NULL is ok */ return TRUE; } db_header* hdr = (db_header*)ptr; hdr--; if(hdr->magic == DB_MALLOC_MAGIC) { return TRUE; } else if(hdr->magic == DB_MFREED_MAGIC) { if(__termout__.vtbl != NULL) { if(hdr->magic == DB_MFREED_MAGIC) { formatln("DOUBLE FREE @ %p", ptr); debug_dump_page(ptr); } } return FALSE; } else { if(__termout__.vtbl != NULL) { formatln("MEMORY CORRUPTED @%p", ptr); debug_dump_page(ptr); } assert(FALSE); return FALSE; } } #ifdef DEBUG static pthread_mutex_t debug_bench_mtx = PTHREAD_MUTEX_INITIALIZER; static debug_bench_s *debug_bench_first = NULL; void debug_bench_register(debug_bench_s *bench, const char *name) { pthread_mutex_lock(&debug_bench_mtx); debug_bench_s *b = debug_bench_first; while((b != bench) && (b != NULL)) { b = b->next; } if(b == NULL) { bench->next = debug_bench_first; bench->name = strdup(name); bench->time_min = MAX_U64; bench->time_max = 0; bench->time_total = 0; bench->time_count = 0; debug_bench_first = bench; } else { log_debug("debug_bench_register(%p,%s): duplicate", bench, name); } pthread_mutex_unlock(&debug_bench_mtx); } void debug_bench_commit(debug_bench_s *bench, u64 delta) { pthread_mutex_lock(&debug_bench_mtx); bench->time_min = MIN(bench->time_min, delta); bench->time_max = MAX(bench->time_max, delta); bench->time_total += delta; bench->time_count++; pthread_mutex_unlock(&debug_bench_mtx); } void debug_bench_logdump_all() { pthread_mutex_lock(&debug_bench_mtx); debug_bench_s *p = debug_bench_first; while(p != NULL) { double min = p->time_min; min /= 1000000.0; double max = p->time_max; max /= 1000000.0; double total = p->time_total; total /= 1000000.0; u32 count = p->time_count; log_info("bench: %12s: [%9.6fs:%9.6fs] total=%9.6fs mean=%9.6fs rate=%-12.3f/s calls=%9u", p->name, min, max, total, total / count, count / total, count); p = p->next; } pthread_mutex_unlock(&debug_bench_mtx); } #endif #ifdef DEBUG void debug_unicity_init(debug_unicity *dus) { assert(dus != NULL); pthread_mutex_init(&dus->mutex, NULL); dus->counter = 0; } void debug_unicity_acquire(debug_unicity *dus) { assert(dus != NULL); pthread_mutex_lock(&dus->mutex); dus->counter++; assert(dus->counter == 1); pthread_mutex_unlock(&dus->mutex); } void debug_unicity_release(debug_unicity *dus) { assert(dus != NULL); pthread_mutex_lock(&dus->mutex); dus->counter--; assert(dus->counter == 0); pthread_mutex_unlock(&dus->mutex); } void debug_vg(const void *b, int len) { const char *s = (const char*)b; for(int i = 0; i < len; i++) { if((s[i] >= ' ') && (s[i] < 127)) { putchar(s[i]); } else { putchar('.'); } } } #endif /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/buffer_input_stream.c0000644000077100007710000000012412650131756023543 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.723344 30 ctime=1454597651.322344534 yadifa-2.1.6-5826/lib/dnscore/src/buffer_input_stream.c0000664000077100007710000002156412650131756023360 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/buffer_input_stream.h" #define BUFFER_INPUT_STREAM_TAG 0x53495246465542 /* BUFFERIS */ typedef struct buffer_input_stream_data buffer_input_stream_data; struct buffer_input_stream_data { input_stream filtered; u32 buffer_maxsize; // physical size of the buffer u32 buffer_size; // amount of the buffer that's filled u32 buffer_offset; // position in the buffer u8 buffer[1]; }; static ya_result buffer_input_stream_read(input_stream* stream, u8* buffer, u32 len) { buffer_input_stream_data* data = (buffer_input_stream_data*)stream->data; u8* src = data->buffer; ya_result ret; u32 remaining = data->buffer_size - data->buffer_offset; if(len < remaining) { MEMCOPY(buffer, &src[data->buffer_offset], len); data->buffer_offset += len; /* There are still some bytes available */ return len; } /* len >= remaining : copy what remains in the buffer */ MEMCOPY(buffer, &src[data->buffer_offset], remaining); len -= remaining; buffer += remaining; /* NOTE: at this point the internal buffer is empty */ if(len > data->buffer_maxsize) { /* It would be pointless to buffer a read bigger than the buffer */ data->buffer_offset = data->buffer_size; /* mark the buffer as "empty" */ if(ISOK(ret = input_stream_read(&data->filtered, buffer, len))) { return remaining + len; /* the chunk we've read from the buffer + the chunk we've read from the stream */ } return ret; } #ifdef DEBUG memset(data->buffer, 0xee, data->buffer_maxsize); #endif /* What remains to read is smaller than the buffer max size */ if((ret = input_stream_read(&data->filtered, data->buffer, data->buffer_maxsize)) <= 0) { data->buffer_size = 0; data->buffer_offset = 0; return (remaining > 0) ? remaining : ERROR /* eof */; // TODO: this should be 0, not ERROR ... what are the side effects if fixed ? } MEMCOPY(buffer, data->buffer, len); /* starts at offset 0 */ data->buffer_size = ret; data->buffer_offset = len; return remaining + len; } static void buffer_input_stream_close(input_stream* stream) { buffer_input_stream_data* data = (buffer_input_stream_data*)stream->data; input_stream_close(&data->filtered); free(data); input_stream_set_void(stream); } static ya_result buffer_input_stream_skip(input_stream* stream, u32 len) { ya_result return_code; u32 total_len = len; buffer_input_stream_data* data = (buffer_input_stream_data*)stream->data; u32 remaining = data->buffer_size - data->buffer_offset; if(remaining > len) { data->buffer_offset += len; return len; } len -= remaining; data->buffer_offset = data->buffer_size; if(FAIL(return_code = input_stream_skip(&data->filtered, len))) { return return_code; } return total_len; } static const input_stream_vtbl buffer_input_stream_vtbl = { buffer_input_stream_read, buffer_input_stream_skip, buffer_input_stream_close, "buffer_input_stream" }; void buffer_input_stream_init(input_stream* filtered, input_stream* stream, int buffer_size) { buffer_input_stream_data* data; if(buffer_size == 0) { buffer_size = BUFFER_INPUT_STREAM_DEFAULT_BUFFER_SIZE; } yassert(filtered->vtbl != NULL); MALLOC_OR_DIE(buffer_input_stream_data*, data, sizeof (buffer_input_stream_data) + buffer_size - 1, BUFFER_INPUT_STREAM_TAG); data->filtered.data = filtered->data; data->filtered.vtbl = filtered->vtbl; filtered->data = NULL; filtered->vtbl = NULL; data->buffer_maxsize = buffer_size; data->buffer_size = 0; data->buffer_offset = 0; stream->data = data; stream->vtbl = &buffer_input_stream_vtbl; } ya_result buffer_input_stream_read_line(input_stream* stream, char* buffer, u32 len) { assert(stream->vtbl == &buffer_input_stream_vtbl); buffer_input_stream_data* data = (buffer_input_stream_data*)stream->data; assert(data->buffer_offset <= data->buffer_size); char *src = (char*)data->buffer; if(len == 0) { return BUFFER_WOULD_OVERFLOW; } len--; u32 total = 0; /* * look for '\n' in the remaining bytes */ char *b = &src[data->buffer_offset]; s32 n = data->buffer_size - data->buffer_offset; if(n == 0) { if((n = input_stream_read(&data->filtered, (u8*)src, data->buffer_maxsize)) <= 0) { data->buffer_offset = 0; data->buffer_size = 0; return n /* eof */; } data->buffer_offset = 0; data->buffer_size = n; b = src; } for(;;) { n = MIN((s32)len, n); #if 0 /* fix */ #else // char *eol = (char*)memchr(b, '\n', n); if(eol != NULL) { ++eol; u32 len = eol - b; data->buffer_offset = eol - src; memcpy(buffer, b, len); buffer[len] = '\0'; return total + len; } memcpy(buffer, b, n); buffer += n; #endif // total += n; len -= (s32)n; if(len == 0) { data->buffer_offset += len; *buffer = '\0'; return total; } /* What remains to read is smaller than the buffer max size */ data->buffer_offset = 0; if((n = input_stream_read(&data->filtered, (u8*)src, data->buffer_maxsize)) <= 0) { data->buffer_size = 0; *buffer = '\0'; return (total > 0) ? total : ERROR /* eof */; } data->buffer_size = n; b = src; } } input_stream* buffer_input_stream_get_filtered(input_stream *bos) { buffer_input_stream_data* data = (buffer_input_stream_data*)bos->data; return &data->filtered; } /** * Rewinds the input stream back of a given number of bytes * * @param bos * @param bytes_back * * @return bytes_back : the operation was successful * > 0 : the maximum number of bytes available for rewind at the time of the call */ ya_result buffer_input_stream_rewind(input_stream *bos, u32 bytes_back) { buffer_input_stream_data* data = (buffer_input_stream_data*)bos->data; if(bytes_back < data->buffer_offset) { data->buffer_offset -= bytes_back; return bytes_back; } else { return data->buffer_offset; } } /** * Returns true iff the input stream is a buffer input stream * * @param bos * @return */ bool is_buffer_input_stream(input_stream *bos) { return bos->vtbl == &buffer_input_stream_vtbl; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/config_file_reader.c0000644000077100007710000000012412650131756023266 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.707344 30 ctime=1454597651.359344534 yadifa-2.1.6-5826/lib/dnscore/src/config_file_reader.c0000664000077100007710000004635312650131756023106 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #define DO_PRINT 0 #include "dnscore/dnscore-config.h" #include "dnscore/config_file_reader.h" #include "dnscore/parser.h" #include "dnscore/logger.h" #include "dnscore/file_input_stream.h" #include "dnscore/typebitmap.h" #include "dnscore/config_settings.h" #define CONFIG_FILE_READER_INCLUDE_DEPTH_MAX 4 #define CFREADER_TAG 0x5245444145524641 extern logger_handle *g_zone_logger; #define MODULE_MSG_HANDLE g_zone_logger typedef struct config_file_reader config_file_reader; struct config_file_reader { parser_s parser; config_section_descriptor_s *section_descriptor; config_error_s *error_context; const char *container_name; size_t container_name_length; size_t key_length; size_t current_container_name_length; u8 container_type; u8 includes_count; bool in_container; bool expected_container; /// char text_buffer[512]; char key[256]; char current_container_name[256]; input_stream includes[CONFIG_FILE_READER_INCLUDE_DEPTH_MAX]; char* file_name[CONFIG_FILE_READER_INCLUDE_DEPTH_MAX]; }; /** * * Parses a configuration * * @param cfr * @return */ static ya_result config_file_reader_read(config_file_reader *cfr) /// config_reader { parser_s *p = &cfr->parser; ya_result return_code; for(;;) { // get the next token if(ISOK(return_code = parser_next_token(p))) { if(!(return_code & PARSER_WORD)) { if(return_code & PARSER_COMMENT) { #if DO_PRINT print("[COMMENT]"); #endif continue; } if(return_code & PARSER_EOL) { #if DO_PRINT println("[EOL]"); #endif continue; } if(return_code & PARSER_EOF) { #if DO_PRINT println("[EOF]"); #endif // EOF: close the stream and pop the next one if available // else just finish parsing --cfr->includes_count; free(cfr->file_name[cfr->includes_count]); input_stream *completed_stream = parser_pop_stream(p); input_stream_close(completed_stream); if(parser_stream_count(p) > 0) { continue; } else { break; } } continue; } p->needle_mark = p->text; // keywords u32 text_len = parser_text_length(p); const char *text = parser_text(p); #if DO_PRINT formatln("[%i]'%s'", text_len, text); #endif if(text_len > 0) { /// test of container if(text[0] == '<') { if(text[text_len - 1] != '>') { return_code = CONFIG_PARSE_SECTION_TAG_NOT_CLOSED; return return_code; } /// if there are enough characters if(text_len > 3) { // if it's beginning of a container if(text[1] != '/') { // if already in a container if(cfr->in_container) { // this is bad return_code = CONFIG_PARSE_UNEXPECTED_SECTION_OPEN; return return_code; } // if tag is the correct one if((cfr->container_name_length == text_len - 2) && (memcmp(&text[1], cfr->container_name, cfr->container_name_length) == 0)) { #if DO_PRINT print("(EXPECTED)"); output_stream_write(termout, (const u8*)cfr->container_name, cfr->container_name_length); #endif // the container is the one we expected // use the callback telling the container is starting cfr->section_descriptor->vtbl->start(cfr->section_descriptor); cfr->expected_container = TRUE; } memcpy(cfr->current_container_name, &text[1], text_len - 2); // copy between < > cfr->current_container_name_length = text_len - 2; #if DO_PRINT print("(CONTAINER)"); output_stream_write(termout, (const u8*)cfr->current_container_name, cfr->current_container_name_length); #endif // mark the container as OPEN cfr->in_container = TRUE; continue; } else // if it's end of a container { // if not in container if(!cfr->in_container) { // this is bad return_code = CONFIG_PARSE_UNEXPECTED_SECTION_CLOSE; return return_code; } // if((cfr->current_container_name_length == text_len - 3) && (memcmp(&text[2], cfr->current_container_name, cfr->current_container_name_length) == 0)) { if(cfr->expected_container) { // we are closing the container // if the current source level is below the set autodefault if(config_get_autodefault_after_source() <= config_get_source()) { // save the current source u8 level = config_get_source(); // set the source level to default config_set_source(config_get_default_source()); // apply the default values if(FAIL(return_code = config_set_section_default(cfr->section_descriptor, cfr->error_context))) { return return_code; } // restore the source level config_set_source(level); } // use the callback telling the section/container is closed if(FAIL(return_code = cfr->section_descriptor->vtbl->stop(cfr->section_descriptor))) { return return_code; } } #if DO_PRINT print("(container)"); if(cfr->expected_container) { print("(expected)"); } #endif cfr->in_container = FALSE; cfr->expected_container = FALSE; continue; } else { // this is bad return_code = CONFIG_PARSE_CLOSED_WRONG_SECTION; return return_code; } } } else { // this is bad return_code = CONFIG_PARSE_SECTION_TAG_TOO_SMALL; return return_code; } } else // the first char is not '<' : it's not a container tag { // if we are not in a container if (!cfr->in_container) { // keyword match : include file ? if(parse_word_match(text, text_len, "include", 7)) { char file_name[PATH_MAX]; if(FAIL(return_code = parser_copy_next_word(p, file_name, sizeof(file_name)))) { return_code = CONFIG_PARSE_INCLUDE_EXPECTED_FILE_PATH; return return_code; } if(return_code > 0) { ya_result err; if(ISOK(err = file_input_stream_open(file_name, &cfr->includes[cfr->includes_count]))) { parser_push_stream(&cfr->parser, &cfr->includes[cfr->includes_count]); cfr->file_name[cfr->includes_count] = strdup(file_name); ++cfr->includes_count; } else { return err; } } else { return_code = CONFIG_PARSE_INCLUDE_EXPECTED_FILE_PATH; return return_code; } } else // incorrect keyword { return_code = CONFIG_PARSE_UNKNOWN_KEYWORD; return return_code; } } else // in container if(cfr->expected_container) { // we are in a container : the current token is the key memcpy(cfr->key, text, text_len); cfr->key_length = text_len; cfr->key[text_len] = '\0'; // concat the remainder of the line for the value if(FAIL(return_code = parser_concat_next_tokens(p))) { return_code = CONFIG_PARSE_EXPECTED_VALUE; return return_code; } // get the concatenated text text = parser_text(p); #if DO_PRINT text_len = parser_text_length(p); #else parser_text_length(p); #endif // cut the text as asciiz (state can be restored) parser_text_asciiz(p); #if DO_PRINT print("[KEY]"); output_stream_write(termout, (const u8*)cfr->key, cfr->key_length); print("[VALUE]"); output_stream_write(termout, (const u8*)text, text_len); println("[EOL]"); #endif // using the descriptor table : set the value in the target struct return_code = config_value_set(cfr->section_descriptor, cfr->key, text); // restore the character cut of parser_text_unasciiz(p); if(FAIL(return_code)) { return return_code; } } } } else { // empty line } #if DO_PRINT flushout(); #endif } else { formatln("[ERROR %r]", return_code); flushout(); break; } } // for(;;) return return_code; } /** * * Parses an input stream for a section/container defined by its config sectiondescriptor. * * @param stream_name a name to identify the stream in case of error * @param ins the input stream to parse * @param csd the descriptor of the section to parse * @param cfgerr if not NULL, the error reporting structure to fill in case of error * * @return an error code */ ya_result config_file_reader_parse_stream(const char* stream_name, input_stream *ins, config_section_descriptor_s *csd, config_error_s *cfgerr) { config_file_reader *cfr; /// remove ya_result return_code; /* ------------------------------------------------------------ */ // allocates and initialises a config file reader structure MALLOC_OR_DIE(config_file_reader*, cfr, sizeof(config_file_reader), CFREADER_TAG); ZEROMEMORY(cfr, sizeof (config_file_reader)); cfr->error_context = cfgerr; if(cfgerr != NULL) { cfgerr->file[0] = '\0'; cfgerr->line[0] = '\0'; cfgerr->line_number = 0; } // initalises a parser const char *string_delimiters = "\"\"''"; const char *multiline_delimiters = "()"; const char *comment_markers = "#"; const char *blank_makers = "\040\t\r"; const char *escape_characters = ""; if(ISOK(return_code = parser_init(&cfr->parser, string_delimiters, // by 2 multiline_delimiters, // by 2 comment_markers, // by 1 blank_makers, // by 1 escape_characters))) // by 1 { // the parser is initalised : push the stream to parse to it parser_push_stream(&cfr->parser, ins); if(stream_name == NULL) { // if the stream is anonymous, give it a name. stream_name = "?"; } cfr->file_name[cfr->includes_count] = strdup(stream_name); ++cfr->includes_count; cfr->container_name = csd->vtbl->name; cfr->container_name_length = strlen(cfr->container_name); // the csd describes the section we want to parse cfr->section_descriptor = csd; // the config file reader structure is now ready : parse the stream // parsing will setup fields described by the config section descriptor if(FAIL(return_code = config_file_reader_read(cfr))) { // failure: if the error reporting is set then used it if(cfgerr != NULL) { char *file_name = cfr->file_name[cfr->includes_count - 1]; if(file_name == NULL) { file_name = "?"; } strncpy(cfgerr->file, file_name, sizeof(cfgerr->file)); size_t len = MIN(strlen(cfr->parser.line_buffer), sizeof(cfgerr->line) - 1); memcpy(cfgerr->line, cfr->parser.line_buffer, len); if(cfgerr->line[len - 1] == '\n') { cfgerr->line[len - 1] = '\0'; } cfgerr->line_number = parser_get_line_number(&cfr->parser); } } // ends parsing, this also closes the input stream pushed to the parser parser_finalize(&cfr->parser); } #ifdef DEBUG memset(cfr, 0xfe, sizeof(config_file_reader)); #endif free(cfr); return return_code; } /** * * Parses a file for a section/container defined by its config sectiondescriptor. * * @param fullpath the file path * @param csd the descriptor of the section to parse * @param cfgerr if not NULL, the error reporting structure to fill in case of error * * @return an error code */ ya_result config_file_reader_open(const char* fullpath, config_section_descriptor_s *csd, config_error_s *cfgerr) { input_stream ins; ya_result return_value; if(FAIL(return_value = file_input_stream_open(fullpath, &ins))) { //log_debug("zone file: cannot open: '%s': %r", fullpath, return_value); return return_value; } #if (DNSDB_USE_POSIX_ADVISE != 0) && (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L) && !defined(__gnu__hurd__) int fd = fd_input_stream_get_filedescriptor(&ins); posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED); #endif return_value = config_file_reader_parse_stream(fullpath, &ins, csd, cfgerr); return return_value; } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/logger.c0000644000077100007710000000012412650131756020757 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.730344 30 ctime=1454597651.482344534 yadifa-2.1.6-5826/lib/dnscore/src/logger.c0000664000077100007710000001036012650131756020564 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logger Logging functions * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include #include "dnscore/bytearray_output_stream.h" #include "dnscore/logger.h" #include "dnscore/format.h" static u32 log_memdump_ex_layout_mask = 0x000003ff; void log_memdump_set_layout(u32 group_mask, u32 separator_mask) { log_memdump_ex_layout_mask = ((group_mask << OSPRINT_DUMP_LAYOUT_GROUP_SHIFT) & OSPRINT_DUMP_LAYOUT_GROUP_MASK) | ((separator_mask << OSPRINT_DUMP_LAYOUT_SEPARATOR_SHIFT) & OSPRINT_DUMP_LAYOUT_SEPARATOR_MASK); } void log_memdump_ex(logger_handle* hndl, u32 level, const void* data_pointer_, size_t size_, size_t line_size, u32 flags) { /* * ensure there is an output for this handle/level */ if((hndl == NULL) || (level >= MSG_LEVEL_COUNT) || (hndl->channels[level].offset < 0)) { return; } output_stream os; bytearray_output_stream_context os_context; char buffer[1024]; #ifdef DEBUG assert(line_size > 0); assert(line_size < sizeof(buffer) / 8); memset(buffer, 0xba, sizeof(buffer)); #endif flags |= log_memdump_ex_layout_mask; bytearray_output_stream_init_ex_static(&os, (u8*)buffer, sizeof (buffer), 0, &os_context); const u8* data_pointer = (const u8*)data_pointer_; s32 size = size_; while(size > line_size) { osprint_dump(&os, data_pointer, line_size, line_size, flags); u32 buffer_size = bytearray_output_stream_size(&os); logger_handle_msg_text(hndl, level, buffer, buffer_size); bytearray_output_stream_reset(&os); data_pointer += line_size; size -= line_size; } if(size > 0) { osprint_dump(&os, data_pointer, size, line_size, flags); u32 buffer_size = bytearray_output_stream_size(&os); logger_handle_msg_text(hndl, level, buffer, buffer_size); } output_stream_close(&os); } void log_memdump(logger_handle* hndl, u32 level, const void* data_pointer_, size_t size_, size_t line_size) { log_memdump_ex(hndl, level, data_pointer_, size_, line_size, OSPRINT_DUMP_HEXTEXT); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/pipe_stream.c0000644000077100007710000000012412650131756022010 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.764344 30 ctime=1454597651.555344534 yadifa-2.1.6-5826/lib/dnscore/src/pipe_stream.c0000664000077100007710000002024212650131756021615 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include #include "dnscore/pipe_stream.h" #include "dnscore/logger.h" /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #define MODULE_MSG_HANDLE g_system_logger extern logger_handle *g_system_logger; #define DEBUG_PIPE_OUTPUT_STREAM 0 #define OUTPUT_OPENED 1 #define INPUT_OPENED 2 typedef struct pipe_stream_data pipe_stream_data; struct pipe_stream_data { u8* buffer; u32 buffer_size; u32 write_offset; u32 write_avail; u32 read_offset; u32 read_avail; u8 flags; }; /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ /*------------------------------------------------------------------------------ * STATIC PROTOTYPES */ /*------------------------------------------------------------------------------ * FUNCTIONS */ static ya_result pipe_stream_output_write(output_stream* stream, const u8* buffer, u32 len) { if(len == 0) { return 0; } pipe_stream_data *data = (pipe_stream_data*)stream->data; u32 remaining = len; while((remaining > 0) && (data->write_avail > 0)) { u32 chunk_len = MIN(data->buffer_size - data->write_offset, data->write_avail); chunk_len = MIN(remaining, chunk_len); #if DEBUG_PIPE_OUTPUT_STREAM log_debug("pipe: w: %d bytes", len); log_memdump_ex(g_system_logger, LOG_DEBUG, buffer, chunk_len, 16, OSPRINT_DUMP_ALL); #endif MEMCOPY(&data->buffer[data->write_offset], buffer, chunk_len); buffer += chunk_len; data->write_offset += chunk_len; data->write_avail -= chunk_len; data->read_avail += chunk_len; if(data->write_offset == data->buffer_size) { data->write_offset = 0; } remaining -= chunk_len; //usleep(1000); } len -= remaining; if((len == 0) && ( (data->flags & (INPUT_OPENED|OUTPUT_OPENED)) != (INPUT_OPENED|OUTPUT_OPENED))) { return UNEXPECTED_EOF; // if one of the sides is closed ... } return len; } static ya_result pipe_stream_output_flush(output_stream* stream) { return SUCCESS; } static void pipe_stream_output_close(output_stream* stream) { pipe_stream_data* data = (pipe_stream_data*)stream->data; data->flags &= ~OUTPUT_OPENED; if((data->flags & INPUT_OPENED) == 0) { free(data->buffer); free(data); } output_stream_set_void(stream); } static const output_stream_vtbl pipe_stream_output_vtbl = { pipe_stream_output_write, pipe_stream_output_flush, pipe_stream_output_close, "pipe_stream_output", }; static ya_result pipe_stream_input_read(input_stream* stream, u8 *buffer, u32 len) { if(len == 0) { return 0; } #ifdef DEBUG memset(buffer, 0xff, len); #endif pipe_stream_data* data = (pipe_stream_data*)stream->data; u32 remaining = len; while((remaining > 0) && (data->read_avail > 0)) { u32 chunk_len = MIN(data->buffer_size - data->read_offset, data->read_avail); chunk_len = MIN(remaining, chunk_len); MEMCOPY(buffer, &data->buffer[data->read_offset], chunk_len); buffer += chunk_len; data->read_offset += chunk_len; data->read_avail -= chunk_len; data->write_avail += chunk_len; if(data->read_offset == data->buffer_size) { data->read_offset = 0; } remaining -= chunk_len; } return len - remaining; } static ya_result pipe_stream_input_skip(input_stream* stream, u32 len) { if(len == 0) { return 0; } pipe_stream_data* data = (pipe_stream_data*)stream->data; u32 remaining = len; for(;;) { while((remaining > 0) && (data->read_avail > 0)) { u32 chunk_len = MIN(data->buffer_size - data->read_offset, data->read_avail); chunk_len = MIN(remaining, chunk_len); data->read_offset += chunk_len; data->read_avail -= chunk_len; data->write_avail += chunk_len; if(data->read_offset == data->buffer_size) { data->read_offset = 0; } remaining -= chunk_len; } if((len != remaining) || ((data->flags & OUTPUT_OPENED) == 0)) { break; } usleep(1000); } return len - remaining; } static void pipe_stream_input_close(input_stream* stream) { pipe_stream_data* data = (pipe_stream_data*)stream->data; data->flags &= ~INPUT_OPENED; if((data->flags & OUTPUT_OPENED) == 0) { free(data->buffer); free(data); } input_stream_set_void(stream); } static const input_stream_vtbl pipe_stream_input_vtbl = { pipe_stream_input_read, pipe_stream_input_skip, pipe_stream_input_close, "pipe_stream_input_stream", }; /** * Creates both output and input stream * Writing in the output stream makes it available for the input stream * This is not currently threadable. * * @param output * @param input */ void pipe_stream_init(output_stream *output, input_stream *input, u32 buffer_size) { pipe_stream_data *data; MALLOC_OR_DIE(pipe_stream_data*, data, sizeof(pipe_stream_data), GENERIC_TAG); ZEROMEMORY(data, sizeof(pipe_stream_data)); MALLOC_OR_DIE(u8*, data->buffer, buffer_size, GENERIC_TAG); #ifdef DEBUG memset(data->buffer, 0xff, buffer_size); #endif data->buffer_size = buffer_size; data->write_avail = buffer_size; data->flags = OUTPUT_OPENED|INPUT_OPENED; output->data = data; output->vtbl = &pipe_stream_output_vtbl; input->data = data; input->vtbl = &pipe_stream_input_vtbl; } /** * * Number of available bytes in the input stream * * @param input * @return */ ya_result pipe_stream_read_available(input_stream *input) { pipe_stream_data *data = (pipe_stream_data*)input->data; return data->read_avail; } /** * * Room for bytes in the output stream * * @param input * @return */ ya_result pipe_stream_write_available(output_stream *input) { pipe_stream_data *data = (pipe_stream_data*)input->data; return data->write_avail; } /* ------------------------------------------------------------ */ /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/dnsname.c0000644000077100007710000000012412650131756021125 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.652344 30 ctime=1454597651.434344534 yadifa-2.1.6-5826/lib/dnscore/src/dnsname.c0000664000077100007710000016570312650131756020746 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscore * @ingroup dnscore * @brief Functions used to manipulate dns formatted names and labels * * DNS names are stored in many ways: * _ C string : ASCII with a '\0' sentinel * _ DNS wire : label_length_byte + label_bytes) ending with a label_length_byte with a value of 0 * _ simple array of pointers to labels * _ simple stack of pointers to labels (so the same as above, but with the order reversed) * _ sized array of pointers to labels * _ sized stack of pointers to labels (so the same as above, but with the order reversed) * * @{ */ #include "dnscore/dnscore-config.h" #include #include #include #include "dnscore/dnscore-config.h" #include "dnscore/dnsname.h" #include "dnscore/rfc.h" #include "dnscore/zalloc.h" #define DNSNAMED_TAG 0x44454d414e534e44 /***************************************************************************** * * BUFFER * *****************************************************************************/ /** @brief Converts a C string to a dns name. * * Converts a C string to a dns name. * * @param[in] str a pointer to the source c-string * @param[in] name a pointer to a buffer that will get the full dns name * * @return Returns the length of the string */ /* TWO uses */ /* * This table contains TRUE for both expected name terminators */ static bool cstr_to_dnsname_terminators[256] = { TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, /* '\0' */ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, FALSE, /* '.' */ FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, }; /** * 0: out of space * 1: in space * -1: terminator * * => * * test the map * signed -> terminator * zero -> out of space * */ #if !HAS_FULL_ASCII7 /* * The list of characters that are valid in a zone: * - _ 0..9 A..Z a..z * */ static s8 cstr_to_dnsname_map[256] = {// 0 1 2 3 4 5 6 7 8 9 A B C D E F -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00 (HEX) */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1,-1, 0, /* 20 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 30 */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, /* 50 */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 70 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 */ 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; /* * The list of characters that are valid in a zone: - _ 0..9 A..Z a..z */ static s8 cstr_to_dnsname_map_nostar[256] = {// 0 1 2 3 4 5 6 7 8 9 A B C D E F -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00 (HEX) */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,-1, 0, /* 20 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 30 */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, /* 50 */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 70 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 */ 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; #else static s8 cstr_to_dnsname_map[256] = { -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 00 (HEX) */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 10 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,-1, 1, /* 20 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 30 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 50 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 70 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 */ 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; static s8 cstr_to_dnsname_map_nostar[256] = { -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 00 (HEX) */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 10 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,-1, 1, /* 20 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 30 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 50 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 70 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 */ 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; #endif // ASCII7 charset instead of strict DNS /** * This is a set for rname in the SOA TYPE * * 0: out of space * 1: in space * -1: terminator * * => * * test the map * signed -> terminator * zero -> out of space * */ #if !HAS_FULL_ASCII7 static const s8 cstr_to_dnsrname_map[256] = { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 00 (HEX) */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 10 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,-1, 0, /* 20 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 30 */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 0, 0, 1, /* 50 */ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 70 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 */ 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; #else static const s8 cstr_to_dnsrname_map[256] = { -1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 00 (HEX) */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 10 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,-1, 1, /* 20 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 30 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 40 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, /* 50 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 60 */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 70 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 80 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 90 */ 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; #endif /** * char DNS charset test * * @param c * @return TRUE iff c in in the DNS charset * */ bool dnsname_is_charspace(u8 c) { return cstr_to_dnsname_map[c] == 1; } /** * label DNS charset test * * @param label * @return TRUE iff each char in the label in in the DNS charset * */ bool dnslabel_verify_charspace(const u8 *label) { u8 n = *label; if(n > MAX_LABEL_LENGTH) { return FALSE; } const u8 *const limit = &label[n]; while(++label < limit) { u8 c = *label; if(cstr_to_dnsname_map[c] != 1) { return FALSE; } } return TRUE; } /** * dns name DNS charset test * * @param name_wire * @return TRUE if each char in the name is in the DNS charset * */ bool dnsname_verify_charspace(const u8 *name_wire) { u8 n; for(;;) { n = *name_wire; if(n == 0) { return TRUE; } if(n > MAX_LABEL_LENGTH) { return FALSE; } const u8 *const limit = &name_wire[n]; while(++name_wire <= limit) { u8 c = *name_wire; if(cstr_to_dnsname_map[c] != 1) { return FALSE; } } } } /** * label DNS charset test and set to lower case * * @param label * @return TRUE iff each char in the label in in the DNS charset * */ bool dnslabel_locase_verify_charspace(u8 *label) { u8 n = *label; if(n > MAX_LABEL_LENGTH) { return FALSE; } u8 * const limit = &label[n]; while(++label <= limit) { u8 c = *label; if(cstr_to_dnsname_map[c] != 1) { return FALSE; } *label = LOCASE(c); } return TRUE; } /** * dns name DNS charset test and set to lower case * * @param name_wire * @return TRUE iff each char in the name is in the DNS charset * */ bool dnsname_locase_verify_charspace(u8 *name_wire) { u8 n; for(;;) { n = *name_wire; if(n == 0) { return TRUE; } if(n > MAX_LABEL_LENGTH) { return FALSE; } u8 * const limit = &name_wire[n]; while(++name_wire <= limit) { u8 c = *name_wire; if(cstr_to_dnsname_map[c] != 1) { return FALSE; } *name_wire = LOCASE(c); } } } /** * dns name DNS charset test and set to lower case * * LOCASE is done using tolower(c) * * @param name_wire * @return TRUE iff each char in the name in in the DNS charset * */ bool dnsname_locase_verify_extended_charspace(u8 *name_wire) { u8 n; for(;;) { n = *name_wire; if(n == 0) { return TRUE; } if(n > MAX_LABEL_LENGTH) { return FALSE; } u8 * const limit = &name_wire[n]; while(++name_wire <= limit) { u8 c = *name_wire; if(cstr_to_dnsname_map[c] != 1) { return FALSE; } *name_wire = tolower(c); } } } /** * @brief Converts a C string to a dns name. * * Converts a C string to a dns name. * * @param[in] name_parm a pointer to a buffer that will get the full dns name * @param[in] str a pointer to the source c-string * * @return Returns the length of the string up to the last '\0' */ ya_result cstr_to_dnsname(u8* name_parm, const char* str) { u8 * const limit = &name_parm[MAX_DOMAIN_LENGTH]; u8 *s = name_parm; u8 *p = &name_parm[1]; u8 c; for(c = *str++;; c = *str++) { if(!cstr_to_dnsname_terminators[c] /*(c != '.') && (c != '\0')*/) { *p = c; } else { u8 l = p - s - 1; *s = l; s = p; if(l == 0) { break; } if(l > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } if(c == '\0') { if(p >= limit) { return DOMAIN_TOO_LONG; } *s++ = '\0'; break; } } if(++p > limit) { return DOMAIN_TOO_LONG; } } return s - name_parm; } ya_result cstr_to_locase_dnsname(u8* name_parm, const char* str) { u8 * const limit = &name_parm[MAX_DOMAIN_LENGTH]; u8 *s = name_parm; u8 *p = &name_parm[1]; u8 c; for(c = *str++;; c = *str++) { if(!cstr_to_dnsname_terminators[c] /*(c != '.') && (c != '\0')*/) { *p = LOCASE(c); } else { u8 l = p - s - 1; *s = l; s = p; if(l == 0) { break; } if(l > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } if(c == '\0') { if(p >= limit) { return DOMAIN_TOO_LONG; } *s++ = '\0'; break; } } if(++p > limit) { return DOMAIN_TOO_LONG; } } return s - name_parm; } ya_result charp_to_dnsname(u8* name_parm, const char* str, u32 str_len) { const char * const limit = &str[str_len]; u8 *s = name_parm; u8 *p = &name_parm[1]; u8 c; if(str_len >= MAX_DOMAIN_LENGTH) { return DOMAIN_TOO_LONG; } for(c = *str++; ; c = *str++) { if((str <= limit) && !cstr_to_dnsname_terminators[c] /*(c != '.') && (c != '\0')*/) { *p = c; } else { u8 l = p - s - 1; *s = l; s = p; if(l == 0) { break; } if(l > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } if(str >= limit) { *s++ = '\0'; break; } } ++p; } return s - name_parm; } ya_result charp_to_locase_dnsname(u8* name_parm, const char* str, u32 str_len) { const char * const limit = &str[str_len]; u8 *s = name_parm; u8 *p = &name_parm[1]; u8 c; if(str_len >= MAX_DOMAIN_LENGTH) { return DOMAIN_TOO_LONG; } for(c = *str++; ; c = *str++) { if((str <= limit) && !cstr_to_dnsname_terminators[c] /*(c != '.') && (c != '\0')*/) { *p = LOCASE(c); } else { u8 l = p - s - 1; *s = l; s = p; if(l == 0) { break; } if(l > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } if(str >= limit) { *s++ = '\0'; break; } } ++p; } return s - name_parm; } /** * Allows for '*' */ ya_result charp_to_locase_dnsname_with_check(u8* name_parm, const char* str, u32 str_len) { const char * const limit = &str[str_len]; u8 *s = name_parm; u8 *p = &name_parm[1]; u8 c; if(str_len >= MAX_DOMAIN_LENGTH) { return DOMAIN_TOO_LONG; } for(c = *str++; ; c = *str++) { if((str <= limit) && !cstr_to_dnsname_terminators[c] /*(c != '.') && (c != '\0')*/) { if(cstr_to_dnsname_map[c] == 0) { return INVALID_CHARSET; } *p = LOCASE(c); } else { u8 l = p - s - 1; *s = l; s = p; if(l == 0) { break; } if(l > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } if(str >= limit) { *s++ = '\0'; break; } } ++p; } return s - name_parm; } /** * @brief Converts a C string to a dns name and checks for validity * * Converts a C string to a dns name. * * @param[in] name_parm a pointer to a buffer that will get the full dns name * @param[in] str a pointer to the source c-string * * @return Returns the length of the string up to the last '\0' */ ya_result cstr_to_dnsname_with_check(u8* name_parm, const char* str) { u8 * const limit = &name_parm[MAX_DOMAIN_LENGTH]; u8 *s = name_parm; u8 *p = &name_parm[1]; u8 c; /* * I cannot check this in one go actually. * * It would work 99.9999999% of the time but if the string is "" and is at the end of a page it would overlap to a non-mapped * memory and crash. * */ if((str[0] == '.') && (str[1] == '\0')) { *name_parm = 0; return 1; } if(str[0] == '*') { if(str[1] == '\0') { name_parm[0] = 1; name_parm[1] = '*'; name_parm[2] = '\0'; return 3; } else if(str[1] == '.') { name_parm[0] = 1; name_parm[1] = '*'; str += 2; s += 2; p += 2; } else { return DOMAINNAME_INVALID; } } for(c = *str++;; c = *str++) { /* test if a switch/case is better (break mix issues for this switch in this particular loop) * * in theory this is test/jb/jz * a switch would be jmp [v] * */ if(cstr_to_dnsname_map_nostar[c] >= 0 /*(c != '.') && (c != '\0')*/) { if(cstr_to_dnsname_map_nostar[c] == 0) { return INVALID_CHARSET; } *p = c; } else { u8 l = p - s - 1; *s = l; s = p; if(l == 0) { if(c != '\0') { return DOMAINNAME_INVALID; } break; } if(l > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } if(c == '\0') { if(p >= limit) { return DOMAIN_TOO_LONG; } *s++ = '\0'; break; } } if(++p > limit) { return DOMAIN_TOO_LONG; } } return s - name_parm; } ya_result cstr_to_dnsname_with_check_len(u8* name_parm, const char* text, u32 text_len) { /* * . => 1 => 00 => 1 * * a => 1 => 01 'A' 00 => 3 * a.b => 3 => 01 'A' 01 'B' 00 => 5 * a.b. => 4 => 01 'A' 01 'B' 00 => 5 * */ u8 *label_start = name_parm; u8 *p = &name_parm[1]; u8 c; /* * I cannot check this in one go actually. * * It would work 99.9999999% of the time but if the string is "" and is at the end of a page it would overlap to a non-mapped * memory and crash. * */ if(text_len == 0) { return DOMAINNAME_INVALID; } if(text[0] == '.') { if(text_len == 1) { *name_parm = 0; return 1; } else { return DOMAINNAME_INVALID; } } if(text[0] != '*') { // ensure the length is acceptable u32 output_len = text_len + 1; if(text[text_len - 1] != '.') { output_len += 1; } if(output_len > MAX_DOMAIN_LENGTH) { return DOMAIN_TOO_LONG; } } else { if(text_len == 1) // '*' { name_parm[0] = 1; name_parm[1] = '*'; name_parm[2] = '\0'; return 3; } else if(text[1] == '.') // '*.????' note: at this point str_len is 2 or more { // ensure the length is acceptable u32 output_len = text_len + 1; if(text[text_len - 1] != '.') { output_len += 1; } if(output_len > MAX_DOMAIN_LENGTH) { return DOMAIN_TOO_LONG; } name_parm[0] = 1; name_parm[1] = '*'; if(text_len == 2) { name_parm[2] = '\0'; return 3; } text += 2; label_start += 2; p += 2; } else // '*????' { return DOMAINNAME_INVALID; } } const char * const text_limit = &text[text_len]; for(c = *text++; ; c = *text++) { /* test if a switch/case is better (break mix issues for this switch in this particular loop) * * in theory this is test/jb/jz * a switch would be jmp [v] * */ if(cstr_to_dnsname_map_nostar[c] >= 0) // (c != '.') && (c != '\0') { if(cstr_to_dnsname_map_nostar[c] == 0) { return INVALID_CHARSET; } *p++ = c; if(text == text_limit) { // close the label u8 label_length = p - label_start - 1; // size of the label if(label_length > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } *label_start = label_length; // close the fqdn *p++ = 0; return p - name_parm; } } else // reached '.' or end of cstr (which should not occur in this algorithm) { u8 label_length = p - label_start - 1; // size of the label /* if(label_length == 0) // .. case { if(c != '\0') { return DOMAINNAME_INVALID; } break; } */ if(label_length > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } *label_start = label_length; if(text == text_limit) { *p++ = '\0'; return p - name_parm; } label_start = p; p++; } } } ya_result cstr_to_locase_dnsname_with_check_len(u8* name_parm, const char* text, u32 text_len) { /* * . => 1 => 00 => 1 * * a => 1 => 01 'A' 00 => 3 * a.b => 3 => 01 'A' 01 'B' 00 => 5 * a.b. => 4 => 01 'A' 01 'B' 00 => 5 * */ u8 *label_start = name_parm; u8 *p = &name_parm[1]; u8 c; /* * I cannot check this in one go actually. * * It would work 99.9999999% of the time but if the string is "" and is at the end of a page it would overlap to a non-mapped * memory and crash. * */ if(text_len == 0) { return DOMAINNAME_INVALID; } if(text[0] == '.') { if(text_len == 1) { *name_parm = 0; return 1; } else { return DOMAINNAME_INVALID; } } if(text[0] != '*') { // ensure the length is acceptable u32 output_len = text_len + 1; if(text[text_len - 1] != '.') { output_len += 1; } if(output_len > MAX_DOMAIN_LENGTH) { return DOMAIN_TOO_LONG; } } else { if(text_len == 1) // '*' { name_parm[0] = 1; name_parm[1] = '*'; name_parm[2] = '\0'; return 3; } else if(text[1] == '.') // '*.????' note: at this point str_len is 2 or more { // ensure the length is acceptable u32 output_len = text_len + 1; if(text[text_len - 1] != '.') { output_len += 1; } if(output_len > MAX_DOMAIN_LENGTH) { return DOMAIN_TOO_LONG; } name_parm[0] = 1; name_parm[1] = '*'; if(text_len == 2) { name_parm[2] = '\0'; return 3; } text += 2; label_start += 2; p += 2; } else // '*????' { return DOMAINNAME_INVALID; } } const char * const text_limit = &text[text_len]; for(c = *text++; ; c = *text++) { /* test if a switch/case is better (break mix issues for this switch in this particular loop) * * in theory this is test/jb/jz * a switch would be jmp [v] * */ if(cstr_to_dnsname_map_nostar[c] >= 0) // (c != '.') && (c != '\0') { if(cstr_to_dnsname_map_nostar[c] == 0) { return INVALID_CHARSET; } *p++ = LOCASE(c); if(text == text_limit) { // close the label u8 label_length = p - label_start - 1; // size of the label if(label_length > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } *label_start = label_length; // close the fqdn *p++ = 0; return p - name_parm; } } else // reached '.' or end of cstr (which should not occur in this algorithm) { u8 label_length = p - label_start - 1; // size of the label /* if(label_length == 0) // .. case { if(c != '\0') { return DOMAINNAME_INVALID; } break; } */ if(label_length > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } *label_start = label_length; if(text == text_limit) { *p++ = '\0'; return p - name_parm; } label_start = p; p++; } } } ya_result cstr_to_dnsname_with_check_len_with_origin(u8* name_parm, const char* text, u32 text_len, const u8 *origin) { /* * . => 1 => 00 => 1 * * a => 1 => 01 'A' 00 => 3 * a.b => 3 => 01 'A' 01 'B' 00 => 5 * a.b. => 4 => 01 'A' 01 'B' 00 => 5 * */ u8 *label_start = name_parm; u8 *p = &name_parm[1]; u8 c; /* * I cannot check this in one go actually. * * It would work 99.9999999% of the time but if the string is "" and is at the end of a page it would overlap to a non-mapped * memory and crash. * */ if(text_len == 0) { return DOMAINNAME_INVALID; } if(text[0] == '.') { if(text_len == 1) { *name_parm = 0; return 1; } else { return DOMAINNAME_INVALID; } } if(text[0] != '*') { // ensure the length is acceptable u32 output_len = text_len + 1; if(text[text_len - 1] != '.') { output_len += 1; } if(output_len > MAX_DOMAIN_LENGTH) { return DOMAIN_TOO_LONG; } } else { if(text_len == 1) // '*' { name_parm[0] = 1; name_parm[1] = '*'; ya_result return_value = dnsname_copy(&name_parm[2], origin) + 2; return return_value; } else if(text[1] == '.') // '*.????' note: at this point str_len is 2 or more { // ensure the length is acceptable u32 output_len = text_len + 1; if(text[text_len - 1] != '.') { output_len += 1; } if(output_len > MAX_DOMAIN_LENGTH) { return DOMAIN_TOO_LONG; } name_parm[0] = 1; name_parm[1] = '*'; if(text_len == 2) { name_parm[2] = '\0'; return 3; } text += 2; label_start += 2; p += 2; } else // '*????' { return DOMAINNAME_INVALID; } } const char * const text_limit = &text[text_len]; for(c = *text++; ; c = *text++) { /* test if a switch/case is better (break mix issues for this switch in this particular loop) * * in theory this is test/jb/jz * a switch would be jmp [v] * */ if(cstr_to_dnsname_map_nostar[c] >= 0) // (c != '.') && (c != '\0') { if(cstr_to_dnsname_map_nostar[c] == 0) { return INVALID_CHARSET; } *p++ = c; if(text == text_limit) { // close the label u8 label_length = p - label_start - 1; // size of the label if(label_length > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } *label_start = label_length; // close the fqdn ya_result return_value = dnsname_copy(p, origin) + p - name_parm; return return_value; } } else // reached '.' or end of cstr (which should not occur in this algorithm) { u8 label_length = p - label_start - 1; // size of the label if(label_length > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } *label_start = label_length; if(text == text_limit) { *p++ = '\0'; return p - name_parm; } label_start = p; p++; } } } ya_result cstr_to_locase_dnsname_with_check_len_with_origin(u8* name_parm, const char* text, u32 text_len, const u8 *origin) { /* * . => 1 => 00 => 1 * * a => 1 => 01 'A' 00 => 3 * a.b => 3 => 01 'A' 01 'B' 00 => 5 * a.b. => 4 => 01 'A' 01 'B' 00 => 5 * */ u8 *label_start = name_parm; u8 *p = &name_parm[1]; u8 c; /* * I cannot check this in one go actually. * * It would work 99.9999999% of the time but if the string is "" and is at the end of a page it would overlap to a non-mapped * memory and crash. * */ if(text_len == 0) { return DOMAINNAME_INVALID; } if(text[0] == '.') { if(text_len == 1) { *name_parm = 0; return 1; } else { return DOMAINNAME_INVALID; } } if(text[0] != '*') { // ensure the length is acceptable u32 output_len = text_len + 1; if(text[text_len - 1] != '.') { output_len += 1; } if(output_len > MAX_DOMAIN_LENGTH) { return DOMAIN_TOO_LONG; } } else { if(text_len == 1) // '*' { name_parm[0] = 1; name_parm[1] = '*'; //ya_result return_value = dnsname_copy(&name_parm[2], origin) + 2; ya_result return_value = dnsname_canonize(origin, &name_parm[2]) + 2; return return_value; } else if(text[1] == '.') // '*.????' note: at this point str_len is 2 or more { // ensure the length is acceptable u32 output_len = text_len + 1; if(text[text_len - 1] != '.') { output_len += 1; } if(output_len > MAX_DOMAIN_LENGTH) { return DOMAIN_TOO_LONG; } name_parm[0] = 1; name_parm[1] = '*'; if(text_len == 2) { name_parm[2] = '\0'; return 3; } text += 2; label_start += 2; p += 2; } else // '*????' { return DOMAINNAME_INVALID; } } const char * const text_limit = &text[text_len]; for(c = *text++; ; c = *text++) { /* test if a switch/case is better (break mix issues for this switch in this particular loop) * * in theory this is test/jb/jz * a switch would be jmp [v] * */ if(cstr_to_dnsname_map_nostar[c] >= 0) // (c != '.') && (c != '\0') { if(cstr_to_dnsname_map_nostar[c] == 0) { return INVALID_CHARSET; } *p++ = LOCASE(c); if(text == text_limit) { // close the label u8 label_length = p - label_start - 1; // size of the label if(label_length > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } *label_start = label_length; // close the fqdn ya_result return_value = dnsname_copy(p, origin) + p - name_parm; return return_value; } } else // reached '.' or end of cstr (which should not occur in this algorithm) { u8 label_length = p - label_start - 1; // size of the label if(label_length > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } *label_start = label_length; if(text == text_limit) { *p++ = '\0'; return p - name_parm; } label_start = p; p++; } } } /** * @brief Converts a C string to a dns rname and checks for validity * * Converts a C string to a dns rname. * * @param[in] name_parm a pointer to a buffer that will get the full dns name * @param[in] str a pointer to the source c-string * * @return the length of the string up to the last '\0' */ ya_result cstr_to_dnsrname_with_check(u8* name_parm, const char* str) { u8 * const limit = &name_parm[MAX_DOMAIN_LENGTH]; u8 *s = name_parm; u8 *p = &name_parm[1]; u8 c; bool escaped = FALSE; /* * I cannot check this in one go actually. * * It would work 99.9999999% of the time but if the string is "" and is at the end of a page it would overlap to a non-mapped * memory and crash. * */ for(c = *str++;; c = *str++) { /* test if a switch/case is better (break mix issues for this switch in this particular loop) * * in theory this is test/jb/jz * a switch would be jmp [v] * mmhh ... * */ if((cstr_to_dnsrname_map[c] >= 0) /*(c != '.') && (c != '\0')*/ || escaped) { if(!escaped) { if(cstr_to_dnsrname_map[c] == 0) { return INVALID_CHARSET; } /* escape character */ /* AFAIK there is only one escape : '\', so why use an indexed memory to test it ? if (cstr_to_dnsrname_map[c] == 2) */ if(c == '\\') { escaped = TRUE; /* reading the next char here is wrong is the record is corrupt and ends with my-wrong-rname\. */ continue; } } *p = c; escaped = FALSE; } else { u8 l = p - s - 1; *s = l; s = p; if(l == 0) { if(c != '\0') { return DOMAINNAME_INVALID; } break; } if(l > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } if(c == '\0') { if(p >= limit) { return DOMAIN_TOO_LONG; } *s++ = '\0'; break; } } if(++p > limit) { return DOMAIN_TOO_LONG; } } if(escaped) { return DOMAINNAME_INVALID; } return s - name_parm; } /* ONE use */ ya_result cstr_get_dnsname_len(const char* str) { ya_result total = 0; const char* start; if(*str == '.') { str++; } s32 label_len; do { char c; start = str; do { c = *str++; } while(c != '.' && c != '\0'); label_len = (str - start) - 1; if(label_len > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } total += label_len + 1; if(c == '\0') { if(label_len != 0) { total++; } break; } } while(label_len != 0); return total; } /** @brief Converts a dns name to a C string * * Converts a dns name to a C string * * @param[in] name a pointer to the source dns name * @param[in] str a pointer to a buffer that will get the c-string * * @return Returns the length of the string */ /* FOUR uses */ u32 dnsname_to_cstr(char* dest_cstr, const u8* name) { #if defined(DEBUG) yassert(name != NULL); #endif char* start = dest_cstr; u8 len; len = *name++; if(len != 0) { do { MEMCOPY(dest_cstr, name, len); dest_cstr += len; *dest_cstr++ = '.'; name += len; len = *name++; } while(len != 0); } else { *dest_cstr++ = '.'; } *dest_cstr = '\0'; return (u32)(dest_cstr - start); } /** @brief Tests if two DNS labels are equals * * Tests if two DNS labels are equals * * @param[in] name_a a pointer to a dnsname to compare * @param[in] name_b a pointer to a dnsname to compare * * @return Returns TRUE if names are equal, else FALSE. */ /* ELEVEN uses */ #if HAS_MEMALIGN_ISSUES == 0 bool dnslabel_equals(const u8* name_a, const u8* name_b) { u8 len = *name_a; if(len != *name_b) { return FALSE; } len++; /* Hopefully the compiler just does register renaming */ const u32* name_a_32 = (const u32*)name_a; const u32* name_b_32 = (const u32*)name_b; int idx; int len4 = len & ~3; for(idx = 0; idx < len4; idx += 4) { if(GET_U32_AT(name_a[idx]) != GET_U32_AT(name_b[idx])) { return FALSE; } } /* Hopefully the compiler just does register renaming */ name_a = (const u8*)name_a_32; name_b = (const u8*)name_b_32; switch(len & 3) { case 0: return TRUE; case 1: return name_a[idx] == name_b[idx]; case 2: return GET_U16_AT(name_a[idx]) == GET_U16_AT(name_b[idx]); case 3: return (GET_U16_AT(name_a[idx]) == GET_U16_AT(name_b[idx])) && (name_a[idx+2] == name_b[idx+2]); } // icc complains here but is wrong. // this line cannot EVER be reached assert(FALSE); /* NOT zassert */ return FALSE; } #else bool dnslabel_equals(const u8* name_a, const u8* name_b) { u8 len = *name_a; if(*name_b == len) { return memcmp(name_a + 1, name_b + 1, len) == 0; } return FALSE; } #endif /** @brief Tests if two DNS labels are (case-insensitive) equals * * Tests if two DNS labels are (case-insensitive) equals * * @param[in] name_a a pointer to a dnsname to compare * @param[in] name_b a pointer to a dnsname to compare * * @return Returns TRUE if names are equal, else FALSE. */ #if HAS_MEMALIGN_ISSUES == 0 bool dnslabel_equals_ignorecase_left(const u8* name_a, const u8* name_b) { int len = (int)* name_a; if(len != (int)* name_b) { return FALSE; } len++; /* * Label size must match */ int idx; int len4 = len & ~3; for(idx = 0; idx < len4; idx += 4) { if(!LOCASEEQUALSBY4(&name_a[idx], &name_b[idx])) /* can be used because left is locase */ { return FALSE; } } /* Hopefully the compiler just does register renaming */ switch(len & 3) { case 0: return TRUE; case 1: return LOCASEEQUALS(name_a[idx], name_b[idx]); /* can be used because left is locase */ case 2: return LOCASEEQUALSBY2(&name_a[idx], &name_b[idx]); /* can be used because left is locase */ case 3: return LOCASEEQUALSBY3(&name_a[idx], &name_b[idx]); /* can be used because left is locase */ } assert(FALSE); /* NOT zassert */ return FALSE; } #else /** * This WILL work with label size too since a label size is 0->63 * which is well outside the [A-Za-z] space. */ bool dnslabel_equals_ignorecase_left(const u8* name_a, const u8* name_b) { return strcasecmp((const char*)name_a, (const char*)name_b) == 0; } #endif /** @brief Tests if two DNS names are equals * * Tests if two DNS labels are equals * * @param[in] name_a a pointer to a dnsname to compare * @param[in] name_b a pointer to a dnsname to compare * * @return Returns TRUE if names are equal, else FALSE. */ /* TWO uses */ bool dnsname_equals(const u8* name_a, const u8* name_b) { int la = dnsname_len(name_a); int lb = dnsname_len(name_b); if(la == lb) { return memcmp(name_a, name_b, la) == 0; } return FALSE; } /* * Comparison of a name by label */ int dnsname_compare(const u8* name_a, const u8* name_b) { for(;;) { s8 la = (s8)name_a[0]; s8 lb = (s8)name_b[0]; name_a++; name_b++; if(la == lb) { if( la > 0) { int c = memcmp(name_a, name_b, la); if( c != 0) { return c; } } else { return 0; } } else { int c = memcmp(name_a, name_b, MIN(la,lb)); if( c == 0) { c = la - lb; } return c; } name_a += la; name_b += lb; } } bool dnsname_is_subdomain(const u8* subdomain, const u8* domain) { u32 len = dnsname_len(domain); u32 sub_len = dnsname_len(subdomain); if(sub_len >= len) { subdomain += sub_len - len; if(domain[0] == subdomain[0]) { int ret = memcmp(subdomain, domain, len); return ret == 0; } } return FALSE; } /** @brief Tests if two DNS names are (ignore case) equals * * Tests if two DNS labels are (ignore case) equals * * @param[in] name_a a pointer to a LO-CASE dnsname to compare * @param[in] name_b a pointer to a dnsname to compare * * @return Returns TRUE if names are equal, else FALSE. */ /* TWO uses */ bool dnsname_equals_ignorecase(const u8* name_a, const u8* name_b) { int len; do { len = (int)*name_a++; if(len != (int)*name_b++) { return FALSE; } if(len == 0) { return TRUE; } while(len > 4 && (LOCASEEQUALSBY4(name_a++,name_b++))) { len--; } while(len > 0 && (LOCASEEQUALS(*name_a++,*name_b++))) { len--; } } while(len == 0); return FALSE; } /** @brief Returns the full length of a dns name * * Returns the full length of a dns name * * @param[in] name a pointer to the dnsname * * @return The length of the dnsname, "." ( zero ) included */ /* SEVENTEEN uses (more or less) */ u32 dnsname_len(const u8 *name) { yassert(name != NULL); const u8 *start = name; u8 c; while((c = *name++) > 0) { name += c; } return name - start; } /* ONE use */ u32 dnsname_getdepth(const u8 *name) { yassert(name != NULL); u32 d = 0; u8 c; while((c = *name) > 0) { name += c + 1; d++; } return d; } u8* dnsname_dup(const u8* src) { u8 *dst; u32 len = dnsname_len(src); MALLOC_OR_DIE(u8*, dst, len, DNSNAMED_TAG); MEMCOPY(dst, src, len); return dst; } /* ONE use */ u32 dnsname_copy(u8* dst, const u8* src) { u32 len = dnsname_len(src); MEMCOPY(dst, src, len); return len; } /** @brief Canonizes a dns name. * * Canonizes a dns name. (A.K.A : lo-cases it) * * @param[in] src a pointer to the dns name * @param[out] dst a pointer to a buffer that will hold the canonized dns name * * @return The length of the dns name */ /* TWELVE uses */ u32 dnsname_canonize(const u8* src, u8* dst) { const u8* org = src; u32 len; for(;;) { len = *src++; *dst++ = len; if(len == 0) { break; } while(len > 0) { *dst++ = LOCASE(*src++); /* Works with the dns character set */ len--; } } return (u32)(src - org); } /***************************************************************************** * * VECTOR * *****************************************************************************/ /* NO use (test) */ u32 dnslabel_vector_to_dnsname(const_dnslabel_vector_reference name, s32 top, u8* str_start) { u8* str = str_start; const_dnslabel_vector_reference limit = &name[top]; while(name <= limit) { u8* label = *name++; u8 len = label[0] + 1; MEMCOPY(str, label, len); str += len; } *str++ = 0; return str - str_start; } /* NO use (test) */ u32 dnslabel_vector_to_cstr(const_dnslabel_vector_reference name, s32 top, char* str) { const_dnslabel_vector_reference limit = &name[top]; char* start = str; while(name < limit) { u8* label = *name++; u8 len = *label++; MEMCOPY(str, label, len); str += len; *str++ = '.'; } *str++ = '\0'; return (u32)(str - start); } /* ONE use */ u32 dnslabel_vector_dnslabel_to_dnsname(const u8 *prefix, const dnsname_vector *namestack, s32 bottom, u8 *str) { u8* start = str; u32 len = *prefix; MEMCOPY(str, prefix, len + 1); str += len + 1; const_dnslabel_vector_reference name = &namestack->labels[bottom]; u32 top = namestack->size; while(bottom <= top) { u8* label = *name++; u32 len = *label; MEMCOPY(str, label, len + 1); str += len + 1; bottom--; } *str++ = '\0'; return (u32)(str - start); } u32 dnslabel_vector_len(const_dnslabel_vector_reference name, s32 top) { u32 ret = 1; for(s32 i = 0; i <= top; i++) { ret += name[i][0]; } return ret; } /* ONE use */ u32 dnsname_vector_sub_to_dnsname(const dnsname_vector *name, s32 from, u8 *name_start) { u8* str = name_start; const_dnslabel_vector_reference limit = &name->labels[name->size]; const_dnslabel_vector_reference labelp = &name->labels[from]; while(labelp <= limit) { u32 len = *labelp[0] + 1; MEMCOPY(str, *labelp, len); str += len; labelp++; } *str++ = 0; return str - name_start; } /** @brief Divides a name into sections * * Divides a name into sections. * Writes a pointer to each label of the dnsname into an array * "." is never put in there. * * @param[in] name a pointer to the dnsname * @param[out] sections a pointer to the target array of pointers * * @return The index of the top-level label ("." is never put in there) */ /* TWO uses */ s32 dnsname_to_dnslabel_vector(const u8 *dns_name, dnslabel_vector_reference labels) { yassert(dns_name != NULL && labels != NULL); s32 idx = -1; int offset = 0; for(;;) { u32 len = dns_name[offset]; if(len == 0) { break; } labels[++idx] = (u8*) & dns_name[offset]; offset += len + 1; } return idx; } /** @brief Divides a name into sections * * Divides a name into sections. * Writes a pointer to each label of the dnsname into an array * "." is never put in there. * * @param[in] name a pointer to the dnsname * @param[out] sections a pointer to the target array of pointers * * @return The index of the top-level label ("." is never put in there) */ /* TWENTY-ONE uses */ s32 dnsname_to_dnsname_vector(const u8* dns_name, dnsname_vector* name) { yassert(dns_name != NULL && name != NULL); s32 size = dnsname_to_dnslabel_vector(dns_name, name->labels); name->size = size; return size; } u32 dnsname_vector_copy(dnsname_vector* dst, const dnsname_vector* src) { dst->size = src->size; if(dst->size > 0) { memcpy(&dst->labels[0], &src->labels[0], sizeof(u8*) * dst->size); } return dst->size; } u32 dnsname_vector_len(dnsname_vector *name_vector) { u32 len = 1; for(s32 size = 0; size <= name_vector->size; size++) { len += name_vector->labels[size][0] + 1; } return len; } /***************************************************************************** * * STACK * *****************************************************************************/ /** @brief Converts a stack of dns labels to a C string * * Converts a stack of dns labels to a C string * * @param[in] name a pointer to the dnslabel stack * @param[in] top the index of the top of the stack * @param[in] str a pointer to a buffer that will get the c-string * * @return Returns the length of the string */ /* ONE use */ u32 dnslabel_stack_to_cstr(const_dnslabel_stack_reference name, s32 top, char* str) { char* start = str; while(top >= 0) { u8* label = name[top]; u8 len = *label++; MEMCOPY(str, label, len); str += len; *str++ = '.'; top--; } *str++ = '\0'; return (u32)(str - start); } /* ONE use */ u32 dnslabel_stack_to_dnsname(const_dnslabel_stack_reference name, s32 top, u8* str_start) { u8* str = str_start; const_dnslabel_stack_reference base = name; name += top; while(name >= base) { u8* label = *name--; u32 len = *label; MEMCOPY(str, label, len + 1); str += len + 1; } *str++ = '\0'; return (u32)(str - str_start); } s32 dnsname_to_dnslabel_stack(const u8* dns_name, dnslabel_stack_reference labels) { s32 label_pointers_top = -1; const u8 * label_pointers[MAX_LABEL_COUNT]; for(;;) { u8 len = *dns_name; if(len == 0) { break; } label_pointers[++label_pointers_top] = dns_name; dns_name += len + 1; } s32 size = label_pointers_top; u8** labelp = labels; while(label_pointers_top >= 0) { *labelp++ = (u8*)label_pointers[label_pointers_top--]; } return size; } /* ONE use */ u32 dnsname_stack_to_dnsname(const dnsname_stack *name_stack, u8 *name_start) { u8* name = name_start; for(s32 size = name_stack->size; size >= 0; size--) { u32 len = name_stack->labels[size][0] + 1; MEMCOPY(name, name_stack->labels[size], len); name += len; } *name++ = '\0'; return name - name_start; } u32 dnsname_stack_len(const dnsname_stack* name_stack) { u32 len = 1; for(s32 size = 0; size <= name_stack->size; size++) { len += name_stack->labels[size][0] + 1; } return len; } /* TWO uses (debug) */ u32 dnsname_stack_to_cstr(const dnsname_stack* name, char* str) { return dnslabel_stack_to_cstr(name->labels, name->size, str); } /* ONE use */ bool dnsname_equals_dnsname_stack(const u8* str, const dnsname_stack* name) { s32 size = name->size; while(size >= 0) { u8* label = name->labels[size]; u8 len = *label; if(len != *str) { return FALSE; } label++; str++; if(memcmp(str, label, len) != 0) { return FALSE; } str += len; size--; } return *str == 0; } bool dnsname_under_dnsname_stack(const u8* str, const dnsname_stack* name) { s32 size = name->size; while(size >= 0) { u8* label = name->labels[size]; u8 len = *label; if(len != *str) { return (len != 0); } label++; str++; if(memcmp(str, label, len) != 0) { return FALSE; } str += len; size--; } return *str == 0; } /* FOUR uses */ s32 dnsname_stack_push_label(dnsname_stack* dns_name, u8* dns_label) { yassert(dns_name != NULL && dns_label != NULL); dns_name->labels[++dns_name->size] = dns_label; return dns_name->size; } /* FOUR uses */ s32 dnsname_stack_pop_label(dnsname_stack* name) { yassert(name != NULL); #ifdef DEBUG name->labels[name->size] = (u8*)~0; #endif return name->size--; } s32 dnsname_to_dnsname_stack(const u8* dns_name, dnsname_stack* name) { s32 label_pointers_top = -1; u8 * label_pointers[MAX_LABEL_COUNT]; for(;;) { u8 len = *dns_name; if(len == 0) { break; } label_pointers[++label_pointers_top] = (u8*)dns_name; dns_name += len + 1; } name->size = label_pointers_top; u8** labelp = name->labels; while(label_pointers_top >= 0) { *labelp++ = label_pointers[label_pointers_top--]; } return name->size; } /** @brief Allocates and duplicates a name with ZALLOC. * * Allocates and duplicates a name ZALLOC. * * @param[in] name a pointer to the dnsname * * @return A new instance of the dnsname. */ u8* dnsname_zdup(const u8* name) { yassert(name != NULL); u32 len = dnsname_len(name); u8* dup; ZALLOC_ARRAY_OR_DIE(u8*, dup, len, ZDB_NAME_TAG); MEMCOPY(dup, name, len); // nothing wrong here return dup; } void dnsname_zfree(u8 *name) { ZFREE_ARRAY(name, dnsname_len(name)); } /** @brief Allocates and duplicates a label with ZALLOC. * * Allocates and duplicates a label with ZALLOC. * * @param[in] name a pointer to the label * * @return A new instance of the label */ u8* dnslabel_zdup(const u8* name) { yassert(name != NULL); u32 len = name[0] + 1; u8* dup; ZALLOC_ARRAY_OR_DIE(u8*, dup, len, ZDB_LABEL_TAG); MEMCOPY(dup, name, len); return dup; } void dnslabel_zfree(u8 *name) { u32 len = name[0] + 1; ZFREE_ARRAY(name, len); } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/fdtools.c0000644000077100007710000000012412650131756021152 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.768344 30 ctime=1454597651.442344534 yadifa-2.1.6-5826/lib/dnscore/src/fdtools.c0000664000077100007710000004343512650131756020770 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscoretools Generic Tools * @ingroup dnscore * @brief * * @{ */ #include "dnscore/dnscore-config.h" #include #include #include #include #include #include "dnscore/fdtools.h" #include "dnscore/timems.h" #include "dnscore/logger.h" /* GLOBAL VARIABLES */ extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger /** * Writes fully the buffer to the fd * It will only return a short count for system errors. * ie: fs full, non-block would block, fd invalid/closed, ... */ ssize_t writefully(int fd, const void *buf, size_t count) { const u8* start = (const u8*)buf; const u8* current = start; ssize_t n; while(count > 0) { if((n = write(fd, current, count)) <= 0) { if(n == 0) { break; } int err = errno; if(err == EINTR) { continue; } if(err == EAGAIN) /** @note It is nonsense to call writefully with a non-blocking fd */ { break; } if(current - start > 0) { break; } return -1; } current += n; count -= n; } return current - start; } /** * Reads fully the buffer from the fd * It will only return a short count for system errors. * ie: fs full, non-block would block, fd invalid/closed, ... */ ssize_t readfully(int fd, void *buf, size_t count) { u8* start = (u8*)buf; u8* current = start; ssize_t n; while(count > 0) { if((n = read(fd, current, count)) <= 0) { if(n == 0) { break; } int err = errno; if(err == EINTR) { continue; } if(err == EAGAIN) /** @note It is nonsense to call readfully with a non-blocking fd */ { break; } if(current - start > 0) { break; } return -1; } current += n; count -= n; } return current - start; } /** * Writes fully the buffer to the fd * It will only return a short count for system errors. * ie: fs full, non-block would block, fd invalid/closed, ... */ ssize_t writefully_limited(int fd, const void *buf, size_t count, double minimum_rate) { const u8* start = (const u8*)buf; const u8* current = start; ssize_t n; u64 tstart = timeus(); // ASSUMED : timeout set on fd for read & write while(count > 0) { if((n = write(fd, current, count)) <= 0) { if(n == 0) { break; } int err = errno; if(err == EINTR) { continue; } if(err == EAGAIN) { /* * Measure the current elapsed time * Measure the current bytes * compare with the minimum rate * act on it */ /* t is in us */ u64 now = timeus(); double t = (now - tstart); double b = (current - (u8*)buf) * 1000000.; if(b < minimum_rate * t) /* b/t < minimum_rate */ { return TCP_RATE_TOO_SLOW; } continue; } if(current - start > 0) { break; } return -1; } current += n; count -= n; } return current - start; } /** * Reads fully the buffer from the fd * It will only return a short count for system errors. * ie: fs full, non-block would block, fd invalid/closed, ... */ ssize_t readfully_limited(int fd, void *buf, size_t count, double minimum_rate) { u8* start = (u8*)buf; u8* current = start; ssize_t n; u64 tstart = timeus(); // ASSUME : timeout set on fd for read & write while(count > 0) { if((n = read(fd, current, count)) <= 0) { if(n == 0) { break; } int err = errno; if(err == EINTR) { continue; } if(err == EAGAIN) /** @note It is nonsense to call readfully with a non-blocking fd */ { /* * Measure the current elapsed time * Measure the current bytes * compare with the minimum rate * act on it */ u64 now = timeus(); /* t is in us */ double t = (now - tstart); double b = (current - (u8*)buf) * 1000000.; double expected_rate = minimum_rate * t; if(b < expected_rate) /* b/t < minimum_rate */ { log_debug("readfully_limited: rate of %f < %f (%fµs)", b, expected_rate, t); return TCP_RATE_TOO_SLOW; } continue; } if(current - start > 0) { break; } return -1; /* EOF */ } current += n; count -= n; } return current - start; } /** * Reads an ASCII text line from fd, stops at EOF or '\n' */ ssize_t readtextline(int fd, char *start, size_t count) { char *current = start; const char * const limit = &start[count]; while(current < limit) { ssize_t n; if((n = read(fd, current, 1)) > 0) { u8 c = *current; current++; count --; if(c == '\n') { break; } } else { if(n == 0) { break; } int err = errno; if(err == EINTR) { continue; } if(err == EAGAIN) { continue; } if(current - start > 0) { break; } return -1; } } return current - start; } /** * Deletes a file (see man 2 unlink). * Handles EINTR and other retry errors. * * @param fd * @return */ int unlink_ex(const char *folder, const char *filename) { char fullpath[PATH_MAX]; int l0 = strlen(folder); int l1 = strlen(filename); if(l0 + l1 < sizeof(fullpath)) { memcpy(fullpath, folder, l0); fullpath[l0] = '/'; memcpy(&fullpath[l0 + 1], filename, l1); fullpath[l0 + 1 + l1] = '\0'; return unlink(fullpath); } else { return -1; } } #if DEBUG_BENCH_FD static debug_bench_s debug_open; static debug_bench_s debug_open_create; static debug_bench_s debug_close; static bool fdtools_debug_bench_register_done = FALSE; static inline void fdtools_debug_bench_register() { if(!fdtools_debug_bench_register_done) { fdtools_debug_bench_register_done = TRUE; debug_bench_register(&debug_open, "open"); debug_bench_register(&debug_open_create, "open_create"); debug_bench_register(&debug_close, "close"); } } #endif /** * Opens a file. (see man 2 open) * Handles EINTR and other retry errors. * * @param fd * @return */ ya_result open_ex(const char *pathname, int flags) { int fd; #ifdef DEBUG log_debug6("open_ex(%s,%o)", STRNULL(pathname), flags); errno = 0; #endif #if DEBUG_BENCH_FD fdtools_debug_bench_register(); u64 bench = debug_bench_start(&debug_open); #endif while((fd = open(pathname, flags)) < 0) { int err = errno; if(err != EINTR) { break; } } #if DEBUG_BENCH_FD debug_bench_stop(&debug_open, bench); #endif #ifdef DEBUG log_debug6("open_ex(%s,%o): %r (fd)", STRNULL(pathname), flags, ERRNO_ERROR, fd); #endif return fd; } /** * Opens a file, create if it does not exist. (see man 2 open with O_CREAT) * Handles EINTR and other retry errors. * * @param fd * @return */ ya_result open_create_ex(const char *pathname, int flags, mode_t mode) { int fd; #ifdef DEBUG log_debug6("open_create_ex(%s,%o,%o)", STRNULL(pathname), flags, mode); errno = 0; #endif #if DEBUG_BENCH_FD fdtools_debug_bench_register(); u64 bench = debug_bench_start(&debug_open_create); #endif while((fd = open(pathname, flags, mode)) < 0) { int err = errno; if(err != EINTR) { // do NOT set this to an error code other than -1 //fd = MAKE_ERRNO_ERROR(err); break; } } #if DEBUG_BENCH_FD debug_bench_stop(&debug_open_create, bench); #endif #ifdef DEBUG log_debug6("open_create_ex(%s,%o,%o): %r (%i)", STRNULL(pathname), flags, mode, ERRNO_ERROR, fd); #endif return fd; } /** * Opens a file, create if it does not exist. (see man 2 open with O_CREAT) * Handles EINTR and other retry errors. * This version of open_create_ex does NOT log anything, which is very important sometimes in the logger thread * * @param fd * @return */ ya_result open_create_ex_nolog(const char *pathname, int flags, mode_t mode) { int fd; while((fd = open(pathname, flags, mode)) < 0) { int err = errno; if(err != EINTR) { // do NOT set this to an error code other than -1 //fd = MAKE_ERRNO_ERROR(err); break; } } return fd; } /** * Closes a file descriptor (see man 2 close) * Handles EINTR and other retry errors. * At return the file will be closed or not closable. * * @param fd * @return */ ya_result close_ex(int fd) { ya_result return_value = SUCCESS; #ifdef DEBUG log_debug6("close_ex(%i)", fd); errno = 0; #endif #if DEBUG_BENCH_FD fdtools_debug_bench_register(); u64 bench = debug_bench_start(&debug_close); #endif while(close(fd) < 0) { int err = errno; if(err != EINTR) { return_value = MAKE_ERRNO_ERROR(err); break; } } #if DEBUG_BENCH_FD debug_bench_stop(&debug_close, bench); #endif #ifdef DEBUG log_debug6("close_ex(%i): %r", fd, return_value); #endif return return_value; } /** * Closes a file descriptor (see man 2 close) * Handles EINTR and other retry errors. * At return the file will be closed or not closable. * * @param fd * @return */ ya_result close_ex_nolog(int fd) { ya_result return_value = SUCCESS; while(close(fd) < 0) { int err = errno; if(err != EINTR) { return_value = MAKE_ERRNO_ERROR(err); break; } } return return_value; } s64 filesize(const char *name) { struct stat s; if(stat(name, &s) >= 0) // MUST be stat { if(S_ISREG(s.st_mode)) { return s.st_size; } } return (s64)ERRNO_ERROR; } ya_result file_is_link(const char *name) { struct stat s; if(lstat(name, &s) >= 0) // MUST be lstat { return S_ISLNK(s.st_mode); } return ERRNO_ERROR; } /** * * Creates all directories on pathname. * * Could be optimised a bit : * * try the biggest path first, * going down until it works, * then create back up. * * @param pathname * @param mode * @param flags * * @return */ int mkdir_ex(const char *pathname, mode_t mode, u32 flags) { #ifdef DEBUG log_debug("mkdir_ex(%s,%o)", pathname, mode); #endif const char *s; char *t; char dir_path[PATH_MAX]; s = pathname; t = dir_path; if(pathname[0] == '/') { t[0] = '/'; t++; s++; } for(;;) { const char *p = (const char*)strchr(s, '/'); bool last = (p == NULL); if(last) { if((flags & MKDIR_EX_PATH_TO_FILE) != 0) { return s - pathname; } p = s + strlen(s); } intptr n = (p - s); memcpy(t, s, n); t[n] = '\0'; struct stat file_stat; if(stat(dir_path, &file_stat) < 0) { int err = errno; if(err != ENOENT) { #ifdef DEBUG log_debug("mkdir_ex(%s,%o): stat returned %r", pathname, mode, MAKE_ERRNO_ERROR(err)); #endif return MAKE_ERRNO_ERROR(err); } if(mkdir(dir_path, mode) < 0) { #ifdef DEBUG log_debug("mkdir_ex(%s,%o): mkdir(%s, %o) returned %r", pathname, mode, dir_path, mode, MAKE_ERRNO_ERROR(err)); #endif return ERRNO_ERROR; } } if(last) { s = &s[n]; return s - pathname; } t[n++] = '/'; t = &t[n]; s = &s[n]; } } /** * Fixes an issue with the dirent not always set as expected. * * The type can be set to DT_UNKNOWN instead of file or directory. * In that case the function will call stats to get the type. */ u8 dirent_get_file_type(const char* folder, struct dirent *entry) { u8 d_type; #ifdef _DIRENT_HAVE_D_TYPE d_type = entry->d_type; #else d_type = DT_UNKNOWN; #endif /* * If the FS OR the OS does not supports d_type : */ if(d_type == DT_UNKNOWN) { struct stat file_stat; char d_name[PATH_MAX]; snprintf(d_name, sizeof(d_name), "%s/%s", folder, entry->d_name); while(stat(d_name, &file_stat) < 0) { int e = errno; if(e != EINTR) { log_err("stat(%s): %r", d_name, ERRNO_ERROR); break; } } if(S_ISREG(file_stat.st_mode)) { d_type = DT_REG; } else if(S_ISDIR(file_stat.st_mode)) { d_type = DT_DIR; } } return d_type; } // typedef ya_result readdir_callback(const char *basedir, const char* file, u8 filetype, void *args); ya_result readdir_forall(const char *basedir, readdir_callback *func, void *args) { DIR *dir; ya_result ret; struct dirent entry; struct dirent *result; dir = opendir(basedir); if(dir == NULL) { return ERRNO_ERROR; } for(;;) { readdir_r(dir, &entry, &result); if(result == NULL) { ret = SUCCESS; break; } u8 d_type = dirent_get_file_type(basedir, result); if(FAIL(ret = func(basedir, result->d_name, d_type, args))) { return ret; } switch(ret) { case READDIR_CALLBACK_CONTINUE: { break; } case READDIR_CALLBACK_ENTER: { if(d_type == DT_DIR) { char path[PATH_MAX]; snprintf(path, sizeof(path), "%s/%s", basedir, result->d_name); if(FAIL(ret = readdir_forall(path, func, args))) { return ret; } if(ret == READDIR_CALLBACK_EXIT) { return ret; } } break; } case READDIR_CALLBACK_EXIT: { return ret; } default: { // unhandled code break; } } } return ret; } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/timeformat.c0000644000077100007710000000012412650131756021647 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.627344 30 ctime=1454597651.634344534 yadifa-2.1.6-5826/lib/dnscore/src/timeformat.c0000664000077100007710000002476112650131756021466 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup format C-string formatting * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include /* Required for BSD */ #include #include #include #include //#include "dnscore/dnscore-config.h" #include "dnscore/rfc.h" #include "dnscore/ctrl-rfc.h" #include "dnscore/format.h" #include "dnscore/dnsname.h" #include "dnscore/base32hex.h" #include "dnscore/dnsformat.h" #include "dnscore/host_address.h" #define NULL_STRING_SUBSTITUTE (u8*)"(NULL)" #define NULL_STRING_SUBSTITUTE_LEN 6 /*(sizeof(NULL_STRING_SUBSTITUTE)-1)*/ #define PORT_SEPARATOR '#' #define PORT_SEPARATOR_V4 PORT_SEPARATOR #define PORT_SEPARATOR_V6 PORT_SEPARATOR static const char dateseparator[1] = {'-'}; static const char timeseparator[1] = {':'}; static const char fracseparator[1] = {'.'}; static const char datetimeseparator[1] = {' '}; /** * dtus * * @note 64 bits epoch written up to the us */ void datetimeus_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters) { (void)padding; (void)pad_char; (void)left_justified; (void)reserved_for_method_parameters; u64 epoch_us = (u64)(intptr)val; time_t epoch = (time_t)(epoch_us / 1000000); u32 us = (u32)(epoch_us % 1000000); struct tm t; localtime_r(&epoch, &t); format_dec_u64(t.tm_year + 1900, stream, 4, '0', FALSE); output_stream_write(stream, dateseparator, 1); format_dec_u64(t.tm_mon + 1 , stream, 2, '0', FALSE); output_stream_write(stream, dateseparator, 1); format_dec_u64(t.tm_mday , stream, 2, '0', FALSE); output_stream_write(stream, datetimeseparator, 1); format_dec_u64(t.tm_hour , stream, 2, '0', FALSE); output_stream_write(stream, timeseparator, 1); format_dec_u64(t.tm_min , stream, 2, '0', FALSE); output_stream_write(stream, timeseparator, 1); format_dec_u64(t.tm_sec , stream, 2, '0', FALSE); output_stream_write(stream, fracseparator, 1); format_dec_u64(us , stream, 6, '0', FALSE); } static format_handler_descriptor datetimeus_format_handler_descriptor = { "dtus", 4, datetimeus_format_handler_method }; /** * dtms * * @note 64 bits epoch written up to the ms */ void datetimems_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters) { (void)padding; (void)pad_char; (void)left_justified; (void)reserved_for_method_parameters; u64 epoch_us = (u64)(intptr)val; time_t epoch = (time_t)(epoch_us / 1000000); u32 ms = (u32)(epoch_us % 1000000); ms /= 1000; struct tm t; localtime_r(&epoch, &t); format_dec_u64(t.tm_year + 1900, stream, 4, '0', FALSE); output_stream_write(stream, dateseparator, 1); format_dec_u64(t.tm_mon + 1 , stream, 2, '0', FALSE); output_stream_write(stream, dateseparator, 1); format_dec_u64(t.tm_mday , stream, 2, '0', FALSE); output_stream_write(stream, datetimeseparator, 1); format_dec_u64(t.tm_hour , stream, 2, '0', FALSE); output_stream_write(stream, timeseparator, 1); format_dec_u64(t.tm_min , stream, 2, '0', FALSE); output_stream_write(stream, timeseparator, 1); format_dec_u64(t.tm_sec , stream, 2, '0', FALSE); output_stream_write(stream, fracseparator, 1); format_dec_u64(ms , stream, 3, '0', FALSE); } static format_handler_descriptor datetimems_format_handler_descriptor = { "dtms", 4, datetimems_format_handler_method }; /** * dts * * @note 64 bits epoch written up to the s */ void datetime_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters) { (void)padding; (void)pad_char; (void)left_justified; (void)reserved_for_method_parameters; u64 epoch_us = (u64)(intptr)val; time_t epoch = (time_t)(epoch_us / 1000000); struct tm t; localtime_r(&epoch, &t); format_dec_u64(t.tm_year + 1900, stream, 4, '0', FALSE); output_stream_write(stream, dateseparator, 1); format_dec_u64(t.tm_mon + 1 , stream, 2, '0', FALSE); output_stream_write(stream, dateseparator, 1); format_dec_u64(t.tm_mday , stream, 2, '0', FALSE); output_stream_write(stream, datetimeseparator, 1); format_dec_u64(t.tm_hour , stream, 2, '0', FALSE); output_stream_write(stream, timeseparator, 1); format_dec_u64(t.tm_min , stream, 2, '0', FALSE); output_stream_write(stream, timeseparator, 1); format_dec_u64(t.tm_sec , stream, 2, '0', FALSE); } static format_handler_descriptor datetime_format_handler_descriptor = { "dts", 3, datetime_format_handler_method }; /** * date * * @note 64 bits epoch written up to the day */ void date_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters) { (void)padding; (void)pad_char; (void)left_justified; (void)reserved_for_method_parameters; u64 epoch_us = (u64)(intptr)val; time_t epoch = (time_t)(epoch_us / 1000000); struct tm t; localtime_r(&epoch, &t); format_dec_u64(t.tm_year + 1900, stream, 4, '0', FALSE); output_stream_write(stream, dateseparator, 1); format_dec_u64(t.tm_mon + 1 , stream, 2, '0', FALSE); output_stream_write(stream, dateseparator, 1); format_dec_u64(t.tm_mday , stream, 2, '0', FALSE); } static format_handler_descriptor date_format_handler_descriptor = { "date", 4, date_format_handler_method }; /** * time * * @note 64 bits with only HH:MM:SS */ void time_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters) { (void)padding; (void)pad_char; (void)left_justified; (void)reserved_for_method_parameters; u64 epoch_us = (u64)(intptr)val; time_t epoch = (time_t)(epoch_us / 1000000); struct tm t; localtime_r(&epoch, &t); format_dec_u64(t.tm_hour , stream, 2, '0', FALSE); output_stream_write(stream, timeseparator, 1); format_dec_u64(t.tm_min , stream, 2, '0', FALSE); output_stream_write(stream, timeseparator, 1); format_dec_u64(t.tm_sec , stream, 2, '0', FALSE); } static format_handler_descriptor time_format_handler_descriptor = { "time", 4, time_format_handler_method }; /** * dtus * * @note 32 bits epoch written up to the s */ void epoch_format_handler_method(const void *restrict val, output_stream *stream, s32 padding, char pad_char, bool left_justified, void * restrict reserved_for_method_parameters) { (void)padding; (void)pad_char; (void)left_justified; (void)reserved_for_method_parameters; time_t epoch = (time_t)(intptr)val; struct tm t; localtime_r(&epoch, &t); format_dec_u64(t.tm_year + 1900, stream, 4, '0', FALSE); output_stream_write(stream, dateseparator, 1); format_dec_u64(t.tm_mon + 1 , stream, 2, '0', FALSE); output_stream_write(stream, dateseparator, 1); format_dec_u64(t.tm_mday , stream, 2, '0', FALSE); output_stream_write(stream, datetimeseparator, 1); format_dec_u64(t.tm_hour , stream, 2, '0', FALSE); output_stream_write(stream, timeseparator, 1); format_dec_u64(t.tm_min , stream, 2, '0', FALSE); output_stream_write(stream, timeseparator, 1); format_dec_u64(t.tm_sec , stream, 2, '0', FALSE); } static format_handler_descriptor epoch_format_handler_descriptor = { "epoch", 5, epoch_format_handler_method }; static bool timeformat_class_init_done = FALSE; void timeformat_class_init() { if(timeformat_class_init_done) { return; } timeformat_class_init_done = TRUE; format_class_init(); // 64 bits format_registerclass(&datetimeus_format_handler_descriptor); format_registerclass(&datetimems_format_handler_descriptor); format_registerclass(&datetime_format_handler_descriptor); format_registerclass(&date_format_handler_descriptor); format_registerclass(&time_format_handler_descriptor); // 32 bits format_registerclass(&epoch_format_handler_descriptor); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/input_stream.c0000644000077100007710000000012412650131756022212 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.727344 30 ctime=1454597651.468344534 yadifa-2.1.6-5826/lib/dnscore/src/input_stream.c0000664000077100007710000002051612650131756022023 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include /* or netinet/in.h */ #include "dnscore/input_stream.h" #include "dnscore/rfc.h" #include "dnscore/dnscore.h" #define MODULE_MSG_HANDLE g_system_logger ya_result input_stream_read_fully(input_stream* stream, void* buffer_start, u32 len_start) { input_stream_read_method* readfunc = stream->vtbl->read; u32 len = len_start; u8* buffer = (u8*)buffer_start; ya_result ret; while(len > 0) { if(FAIL(ret = readfunc(stream, buffer, len))) { return ret; } if(ret == 0) /* eof */ { break; } buffer += ret; len -= ret; // cppcheck: false positive } /* If we only read a partial it's wrong. * If we were aked to read nothing it's ok. * If we read nothing at all we were on EOF and its still ok */ if(len > 0) { return UNABLE_TO_COMPLETE_FULL_READ; } return buffer - (u8*)buffer_start; } ya_result input_stream_skip_fully(input_stream* stream, u32 len_start) { input_stream_skip_method* skipfunc = stream->vtbl->skip; u32 len = len_start; ya_result ret; while(len > 0) { if(FAIL(ret = skipfunc(stream, len))) { return ret; } if(ret == 0) /* eof */ { break; } len -= ret; // cppcheck: false positive } /* If we only read a partial it's wrong. * If we were aked to read nothing it's ok. * If we read nothing at all we were on EOF and its still ok */ if(len > 0) { return UNABLE_TO_COMPLETE_FULL_READ; } return len_start; } ya_result input_stream_read_nu32(input_stream* stream, u32* output) { u32 data; ya_result err; if(ISOK(err = input_stream_read_fully(stream, &data, 4))) { *output = ntohl(data); } return err; } ya_result input_stream_read_nu16(input_stream* stream, u16* output) { u16 data; ya_result err; if(ISOK(err = input_stream_read_fully(stream, &data, 2))) { *output = ntohs(data); } return err; } ya_result input_stream_read_u32(input_stream* stream, u32* output) { u32 data; ya_result err; if(ISOK(err = input_stream_read_fully(stream, &data, 4))) { *output = data; } return err; } ya_result input_stream_read_u16(input_stream* stream, u16* output) { u16 data; ya_result err; if(ISOK(err = input_stream_read_fully(stream, &data, 2))) { *output = data; } return err; } ya_result input_stream_read_u8(input_stream* stream, u8* output) { return input_stream_read_fully(stream, output, 1); } ya_result input_stream_read_dnsname(input_stream* stream, u8* output_buffer) { u8 *output = output_buffer; const u8 * const limit = &output_buffer[MAX_DOMAIN_LENGTH - 1]; /* -1 because the limit is computed after the terminator */ for(;;) { int n; if(FAIL(n = input_stream_read_fully(stream, output, 1))) { return (output == output_buffer) ? 0 /* eof*/ : n; } if((n = *output++) == 0) { break; } if(n > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } u8* tmp = output; output += n; if(output >= limit) { return DOMAIN_TOO_LONG; } if(FAIL(n = input_stream_read_fully(stream, tmp, n))) { return n; } /* 0x012a = 01 '*' = wildcard */ /*if(GET_U16_AT(tmp[-1]) != NU16(0x012a))*/ { if(!dnslabel_locase_verify_charspace(&tmp[-1])) { return INVALID_CHARSET; } } } return output - output_buffer; } ya_result input_stream_read_rname(input_stream* stream, u8* output_buffer) { u8 *output = output_buffer; const u8 * const limit = &output_buffer[MAX_DOMAIN_LENGTH - 1]; /* -1 because the limit is computed after the terminator */ for(;;) { int n; if(FAIL(n = input_stream_read_fully(stream, output, 1))) { return (output == output_buffer) ? 0 /* eof*/ : n; } if((n = *output++) == 0) { break; } if(n > MAX_LABEL_LENGTH) { return LABEL_TOO_LONG; } u8* tmp = output; output += n; if(output >= limit) { return DOMAIN_TOO_LONG; } if(FAIL(n = input_stream_read_fully(stream, tmp, n))) { return n; } } return output - output_buffer; } ya_result input_stream_read_line(input_stream* stream, char *output_, int max_len) { const char * const limit = &output_[max_len]; char *output = output_; /* * Cache the method */ input_stream_read_method *read_method = stream->vtbl->read; while(output < limit) { ya_result n = read_method(stream, (u8*)output, 1); if(n <= 0) { if(n == 0) { n = ((ya_result)(output - output_)); } return n; } if(*output++ == '\n') { return ((ya_result)(output - output_)); } } return max_len; } static ya_result input_stream_void_read(input_stream* stream,u8* in_buffer,u32 in_len) { log_err("tried to read a closed stream"); return INVALID_STATE_ERROR; } static ya_result input_stream_void_skip(input_stream* stream,u32 byte_count) { log_err("tried to skip a closed stream"); return INVALID_STATE_ERROR; } static void input_stream_void_close(input_stream* stream) { log_err("tried to close a closed stream"); #ifdef DEBUG logger_flush(); abort(); #endif } static const input_stream_vtbl void_input_stream_vtbl ={ input_stream_void_read, input_stream_void_skip, input_stream_void_close, "void_input_stream", }; /** * This tools allows a safer misuse (and detection) of closed streams * It sets the stream to a sink that warns abouts its usage and for which every call that can fail fails. */ void input_stream_set_void(input_stream* stream) { stream->data = NULL; stream->vtbl = &void_input_stream_vtbl; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/rfc.c0000644000077100007710000000012412650131756020252 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.631344 30 ctime=1454597651.577344534 yadifa-2.1.6-5826/lib/dnscore/src/rfc.c0000664000077100007710000004506712650131756020073 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include //#include "dnscore/dnscore-config.h" #include "dnscore/rfc.h" #include "dnscore/ctrl-rfc.h" #include "dnscore/string_set.h" #define DNSCORE_RFC_C /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ static string_node* class_set = NULL; static string_node* type_set = NULL; const class_table qclass[] = { { CLASS_IN, CLASS_IN_NAME }, { CLASS_CS, CLASS_CS_NAME }, { CLASS_CH, CLASS_CH_NAME }, { CLASS_HS, CLASS_HS_NAME }, { CLASS_CTRL, CLASS_CTRL_NAME }, { CLASS_NONE, CLASS_NONE_NAME }, { CLASS_ANY, CLASS_ANY_NAME }, { 0, NULL } }; const type_table qtype[] = { { TYPE_A, TYPE_A_NAME }, // 1 { TYPE_NS, TYPE_NS_NAME }, // 2 { TYPE_MD, TYPE_MD_NAME }, // 3 { TYPE_MF, TYPE_MF_NAME }, // 4 { TYPE_CNAME, TYPE_CNAME_NAME }, // 5 { TYPE_SOA, TYPE_SOA_NAME }, // 6 { TYPE_MB, TYPE_MB_NAME }, // 7 { TYPE_MG, TYPE_MG_NAME }, // 8 { TYPE_MR, TYPE_MR_NAME }, // 9 { TYPE_NULL, TYPE_NULL_NAME }, // 10 { TYPE_WKS, TYPE_WKS_NAME }, // 11 { TYPE_PTR, TYPE_PTR_NAME }, // 12 { TYPE_HINFO, TYPE_HINFO_NAME }, // 13 { TYPE_MINFO, TYPE_MINFO_NAME }, // 14 { TYPE_MX, TYPE_MX_NAME }, // 15 { TYPE_TXT, TYPE_TXT_NAME }, // 16 { TYPE_RP, TYPE_RP_NAME }, // 17 { TYPE_AFSDB, TYPE_AFSDB_NAME }, // 18 { TYPE_X25, TYPE_X25_NAME }, // 19 { TYPE_ISDN, TYPE_ISDN_NAME }, // 20 { TYPE_RT, TYPE_RT_NAME }, // 21 { TYPE_NSAP, TYPE_NSAP_NAME }, // 22 { TYPE_NSAP_PTR, TYPE_NSAP_PTR_NAME }, // 23 { TYPE_SIG, TYPE_SIG_NAME }, // 24 { TYPE_KEY, TYPE_KEY_NAME }, // 25 { TYPE_PX, TYPE_PX_NAME }, // 26 { TYPE_GPOS, TYPE_GPOS_NAME }, // 27 { TYPE_AAAA, TYPE_AAAA_NAME }, // 28 { TYPE_LOC, TYPE_LOC_NAME }, // 29 { TYPE_NXT, TYPE_NXT_NAME }, // 30 { TYPE_EID, TYPE_EID_NAME }, // 31 { TYPE_NIMLOC, TYPE_NIMLOC_NAME }, // 32 { TYPE_SRV, TYPE_SRV_NAME }, // 33 { TYPE_ATMA, TYPE_ATMA_NAME }, // 34 { TYPE_NAPTR, TYPE_NAPTR_NAME }, // 35 { TYPE_KX, TYPE_KX_NAME }, // 36 { TYPE_CERT, TYPE_CERT_NAME }, // 37 { TYPE_A6, TYPE_A6_NAME }, // 38 { TYPE_DNAME, TYPE_DNAME_NAME }, // 39 { TYPE_SINK, TYPE_SINK_NAME }, // 40 { TYPE_OPT, TYPE_OPT_NAME }, // 41 { TYPE_APL, TYPE_APL_NAME }, // 42 { TYPE_DS, TYPE_DS_NAME }, // 43 { TYPE_SSHFP, TYPE_SSHFP_NAME }, // 44 { TYPE_IPSECKEY, TYPE_IPSECKEY_NAME }, // 45 { TYPE_RRSIG, TYPE_RRSIG_NAME }, // 46 { TYPE_NSEC, TYPE_NSEC_NAME }, // 47 { TYPE_DNSKEY, TYPE_DNSKEY_NAME }, // 48 { TYPE_DHCID, TYPE_DHCID_NAME }, // 49 { TYPE_NSEC3, TYPE_NSEC3_NAME }, // 50 { TYPE_NSEC3PARAM, TYPE_NSEC3PARAM_NAME }, // 51 { TYPE_TLSA, TYPE_TLSA_NAME }, // 52 { TYPE_HIP, TYPE_HIP_NAME }, // 55 { TYPE_NINFO, TYPE_NINFO_NAME }, // 56 { TYPE_RKEY, TYPE_RKEY_NAME }, // 57 { TYPE_TALINK, TYPE_TALINK_NAME }, // 58 { TYPE_CDS, TYPE_CDS_NAME }, // 59 { TYPE_SPF, TYPE_SPF_NAME }, // 99 { TYPE_UINFO, TYPE_UINFO_NAME }, // 100 { TYPE_NID, TYPE_NID_NAME }, // 104 { TYPE_L32, TYPE_L32_NAME }, // 105 { TYPE_L64, TYPE_L64_NAME }, // 106 { TYPE_LP, TYPE_LP_NAME }, // 107 { TYPE_EUI48, TYPE_EUI48_NAME }, // 108 { TYPE_EUI64, TYPE_EUI64_NAME }, // 109 { TYPE_TKEY, TYPE_TKEY_NAME }, // 249 { TYPE_TSIG, TYPE_TSIG_NAME }, // 250 { TYPE_IXFR, TYPE_IXFR_NAME }, // 251 { TYPE_AXFR, TYPE_AXFR_NAME }, // 252 { TYPE_MAILB, TYPE_MAILB_NAME }, // 253 { TYPE_MAILA, TYPE_MAILA_NAME }, // 254 { TYPE_ANY, TYPE_ANY_NAME }, // 255 { TYPE_URI, TYPE_URI_NAME }, // 256 { TYPE_CAA, TYPE_CAA_NAME }, // 257 { TYPE_TA, TYPE_TA_NAME }, // 32768 { TYPE_DLV, TYPE_DLV_NAME }, // 32769 #if HAS_DYNAMIC_PROVISIONING { TYPE_ZONE_TYPE, TYPE_ZONE_TYPE_NAME }, { TYPE_ZONE_FILE, TYPE_ZONE_FILE_NAME }, { TYPE_ZONE_NOTIFY, TYPE_ZONE_NOTIFY_NAME }, { TYPE_ZONE_MASTER, TYPE_ZONE_MASTER_NAME }, { TYPE_ZONE_DNSSEC, TYPE_ZONE_DNSSEC_NAME }, { TYPE_ZONE_SLAVES, TYPE_ZONE_SLAVES_NAME }, { TYPE_SIGINTV, TYPE_SIGINTV_NAME }, { TYPE_SIGREGN, TYPE_SIGREGN_NAME }, { TYPE_SIGJITR, TYPE_SIGJITR_NAME }, { TYPE_NTFRC, TYPE_NTFRC_NAME }, { TYPE_NTFRP, TYPE_NTFRP_NAME }, { TYPE_NTFRPI, TYPE_NTFRPI_NAME }, { TYPE_NTFAUTO, TYPE_NTFAUTO_NAME }, #endif #if 1//HAS_CTRL { TYPE_CTRL_SRVCFGRELOAD, TYPE_CTRL_SRVCFGRELOAD_NAME }, { TYPE_CTRL_SRVQUERYLOG, TYPE_CTRL_SRVQUERYLOG_NAME }, { TYPE_CTRL_SRVLOGREOPEN, TYPE_CTRL_SRVLOGREOPEN_NAME }, { TYPE_CTRL_SRVSHUTDOWN, TYPE_CTRL_SHUTDOWN_NAME }, { TYPE_CTRL_ZONECFGRELOAD, TYPE_CTRL_ZONECFGRELOAD_NAME }, { TYPE_CTRL_ZONECFGRELOADALL, TYPE_CTRL_ZONECFGRELOADALL_NAME }, { TYPE_CTRL_ZONEFREEZE, TYPE_CTRL_ZONEFREEZE_NAME }, { TYPE_CTRL_ZONEFREEZEALL, TYPE_CTRL_ZONEFREEZEALL_NAME }, { TYPE_CTRL_ZONERELOAD, TYPE_CTRL_ZONERELOAD_NAME }, { TYPE_CTRL_ZONEUNFREEZE, TYPE_CTRL_ZONEUNFREEZE_NAME }, { TYPE_CTRL_ZONEUNFREEZEALL, TYPE_CTRL_ZONEUNFREEZEALL_NAME }, { TYPE_CTRL_ZONESYNC, TYPE_CTRL_ZONESYNC_NAME }, #endif { 0, NULL } }; static char *opcode[16] = { "QUERY", "IQUERY", "STATUS", "NOTIFY", "UPDATE", "?", "?", "?", "?", "CTRL", /* special for yadifa client for view the result in verbose mode */ "?", "?", "?", "?", "?", "?" }; static char *rcode[32] = { "NOERROR", // 0 /* No error rfc 1035 */ "FORMERR", // 1 /* Format error rfc 1035 */ "SERVFAIL", // 2 /* Server failure rfc 1035 */ "NXDOMAIN", // 3 /* Name error rfc 1035 */ "NOTIMP", // 4 /* Not implemented rfc 1035 */ "REFUSED", // 5 /* Refused rfc 1035 */ "YXDOMAIN", // 6 /* Name exists when it should not rfc 2136 */ "YXRRSET", // 7 /* RR Set exists when it should not rfc 2136 */ "NXRRSET", // 8 /* RR set that should exist doesn't rfc 2136 */ "NOTAUTH", // 9 /* Server not Authortative for zone rfc 2136 */ "NOTZONE", // 10 /* Name not contained in zone rfc 2136 */ "?", "?", "?", "?", "?", "BADVERS", // 16 /* Bad OPT Version rfc 2671 / rfc 6891 */ #if 0 /* fix */ #else // THX "-", "-", "-", "-", "-", "-", #endif // THX "-", "-", "-", "-", "-", "-", "-", "-", "-" }; const char* get_opcode(u16 o) { return opcode[o & 0x0f]; } const char* get_rcode(u16 r) { return rcode[r & 0x1f]; } const char* get_name_from_class(u16 c) { switch(c) { case CLASS_IN: return CLASS_IN_NAME; case CLASS_HS: return CLASS_HS_NAME; case CLASS_CH: return CLASS_CH_NAME; case CLASS_CTRL: return CLASS_CTRL_NAME; case CLASS_ANY: return CLASS_ANY_NAME; default: return NULL; } } const char* get_name_from_type(u16 t) { switch(t) { case TYPE_A: return TYPE_A_NAME; case TYPE_NS: return TYPE_NS_NAME; case TYPE_MD: return TYPE_MD_NAME; case TYPE_MF: return TYPE_MF_NAME; case TYPE_CNAME: return TYPE_CNAME_NAME; case TYPE_SOA: return TYPE_SOA_NAME; case TYPE_MB: return TYPE_MB_NAME; case TYPE_MG: return TYPE_MG_NAME; case TYPE_MR: return TYPE_MR_NAME; case TYPE_NULL: return TYPE_NULL_NAME; case TYPE_WKS: return TYPE_WKS_NAME; case TYPE_PTR: return TYPE_PTR_NAME; case TYPE_HINFO: return TYPE_HINFO_NAME; case TYPE_MINFO: return TYPE_MINFO_NAME; case TYPE_MX: return TYPE_MX_NAME; case TYPE_TXT: return TYPE_TXT_NAME; case TYPE_RP: return TYPE_RP_NAME; case TYPE_AFSDB: return TYPE_AFSDB_NAME; case TYPE_X25: return TYPE_X25_NAME; case TYPE_ISDN: return TYPE_ISDN_NAME; case TYPE_RT: return TYPE_RT_NAME; case TYPE_NSAP: return TYPE_NSAP_NAME; case TYPE_NSAP_PTR: return TYPE_NSAP_PTR_NAME; case TYPE_SIG: return TYPE_SIG_NAME; case TYPE_KEY: return TYPE_KEY_NAME; case TYPE_PX: return TYPE_PX_NAME; case TYPE_GPOS: return TYPE_GPOS_NAME; case TYPE_AAAA: return TYPE_AAAA_NAME; case TYPE_LOC: return TYPE_LOC_NAME; case TYPE_NXT: return TYPE_NXT_NAME; case TYPE_EID: return TYPE_EID_NAME; case TYPE_NIMLOC: return TYPE_NIMLOC_NAME; case TYPE_SRV: return TYPE_SRV_NAME; case TYPE_ATMA: return TYPE_ATMA_NAME; case TYPE_NAPTR: return TYPE_NAPTR_NAME; case TYPE_KX: return TYPE_KX_NAME; case TYPE_CERT: return TYPE_CERT_NAME; case TYPE_A6: return TYPE_A6_NAME; case TYPE_DNAME: return TYPE_DNAME_NAME; case TYPE_SINK: return TYPE_SINK_NAME; case TYPE_OPT: return TYPE_OPT_NAME; case TYPE_APL: return TYPE_APL_NAME; case TYPE_DS: return TYPE_DS_NAME; case TYPE_SSHFP: return TYPE_SSHFP_NAME; case TYPE_IPSECKEY: return TYPE_IPSECKEY_NAME; case TYPE_RRSIG: return TYPE_RRSIG_NAME; case TYPE_NSEC: return TYPE_NSEC_NAME; case TYPE_DNSKEY: return TYPE_DNSKEY_NAME; case TYPE_DHCID: return TYPE_DHCID_NAME; case TYPE_NSEC3: return TYPE_NSEC3_NAME; case TYPE_NSEC3PARAM: return TYPE_NSEC3PARAM_NAME; case TYPE_TLSA: return TYPE_TLSA_NAME; case TYPE_HIP: return TYPE_HIP_NAME; case TYPE_NINFO: return TYPE_NINFO_NAME; case TYPE_RKEY: return TYPE_RKEY_NAME; case TYPE_TALINK: return TYPE_TALINK_NAME; case TYPE_SPF: return TYPE_SPF_NAME; case TYPE_UINFO: return TYPE_UINFO_NAME; case TYPE_TKEY: return TYPE_TKEY_NAME; case TYPE_TSIG: return TYPE_TSIG_NAME; case TYPE_IXFR: return TYPE_IXFR_NAME; case TYPE_AXFR: return TYPE_AXFR_NAME; case TYPE_MAILB: return TYPE_MAILB_NAME; case TYPE_MAILA: return TYPE_MAILA_NAME; case TYPE_ANY: return TYPE_ANY_NAME; case TYPE_URI: return TYPE_URI_NAME; case TYPE_CAA: return TYPE_CAA_NAME; case TYPE_TA: return TYPE_TA_NAME; case TYPE_DLV: return TYPE_DLV_NAME; default: return NULL; } } /** \brief Check in search table of class for the value * * @param[in] src data to be found in table * @param[out] dst value found in table * * @retval OK * @retval NOK */ int get_class_from_name(const char *src, u16 *dst) { const string_node *node = string_set_avl_find(&class_set, (const char *)src); if(node != NULL) { u16 c = node->value; *dst = c; return c; } else { /** @note supports CLASS# syntax (rfc 3597) */ if(strncasecmp(src, "CLASS", 5) == 0) { char *endptr; long long int val; src += 5; val = strtoll(src, &endptr, 10); int err = errno; if(!((endptr == src) || (err == EINVAL) || (err == ERANGE) || ((val & 0xffffLL) != val))) { u16 c = htons((u16)val); *dst = c; return c; } } return UNKNOWN_DNS_CLASS; } } /** \brief Check in global table qtype for the value * * @param[in] src data to be found in table * @param[oet] dst value found in table * * @retval OK * @retval NOK */ int get_type_from_name(const char *src, u16 *dst) { string_node *node = string_set_avl_find(&type_set, (const char *)src); if(node != NULL) { u16 t = node->value; *dst = t; return 0; } else { /** @note supports TYPE# syntax (rfc 3597) */ if(strncasecmp(src, "TYPE", 4) == 0) { char *endptr; long long int val; src += 4; errno = 0; val = strtoll(src, &endptr, 10); int err = errno; if(!((endptr == src) || (err == EINVAL) || (err == ERANGE) || ((val & 0xffffLL) != val))) { u16 t = htons((u16)val); *dst = t; return 1; } } return UNKNOWN_DNS_TYPE; } } int get_class_from_case_name(const char *src, u16 *dst) { char txt[16]; s32 n = strlen(src); if(n > sizeof(txt)) { return UNKNOWN_DNS_CLASS; } for(s32 i = 0; i < n; i++) { txt[i] = toupper(src[i]); } txt[n] = '\0'; return get_class_from_name(txt, dst); } int get_type_from_case_name(const char *src, u16 *dst) { char txt[16]; s32 n = strlen(src); if(n > sizeof(txt)) { return UNKNOWN_DNS_TYPE; } for(s32 i = 0; i < n; i++) { txt[i] = toupper(src[i]); } txt[n] = '\0'; ya_result ret = get_type_from_name(txt, dst); return ret; } int get_type_from_case_name_len(const char *src, int src_len, u16 *dst) { char txt[16]; if(src_len > sizeof(txt)) { return UNKNOWN_DNS_TYPE; } for(s32 i = 0; i < src_len; i++) { txt[i] = toupper(src[i]); } txt[src_len] = '\0'; ya_result ret = get_type_from_name(txt, dst); return ret; } void rfc_init() { int i; string_set_avl_init(&class_set); for(i = 0; qclass[i].id != 0; i++) { string_node* node = string_set_avl_insert(&class_set, qclass[i].data); node->value = qclass[i].id; } string_set_avl_init(&type_set); for(i = 0; qtype[i].id != 0; i++) { string_node* node = string_set_avl_insert(&type_set, qtype[i].data); node->value = qtype[i].id; } } void rfc_finalize() { string_set_avl_destroy(&class_set); string_set_avl_destroy(&type_set); } ya_result get_value_from_casename(const value_name_table *table, const char *name, u32 *out_value) { while(table->data != NULL) { if(strcasecmp(table->data, name) == 0) { *out_value = table->id; return SUCCESS; } table++; } return UNKNOWN_NAME; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/xfr_input_stream.c0000644000077100007710000000012412650131756023071 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.790344 30 ctime=1454597651.656344534 yadifa-2.1.6-5826/lib/dnscore/src/xfr_input_stream.c0000664000077100007710000007174512650131756022714 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup dnscore * @brief * * @{ */ #include "dnscore/dnscore-config.h" #include #include #include #include #include #include #include "dnscore/xfr_input_stream.h" #include "dnscore/zalloc.h" #include "dnscore/packet_reader.h" #include "dnscore/format.h" #include "dnscore/file_input_stream.h" #include "dnscore/file_output_stream.h" #include "dnscore/buffer_input_stream.h" #include "dnscore/buffer_output_stream.h" #include "dnscore/fdtools.h" #include "dnscore/pipe_stream.h" #include "dnscore/message.h" /* it depends if host is DARWIN or LINUX */ #ifdef HAVE_SYS_SYSLIMITS_H #ifndef __FreeBSD__ #include #endif #elif HAVE_LINUX_LIMITS_H #include #endif /* HAVE_SYS_SYSLIMITS_H */ #define MODULE_MSG_HANDLE g_system_logger #define DEBUG_XFR_INPUT_STREAM 0 typedef struct xfr_input_stream_data xfr_input_stream_data; struct xfr_input_stream_data { output_stream pipe_stream_output; input_stream pipe_stream_input; input_stream source_stream; packet_unpack_reader_data reader; message_data *message; const u8 *origin; u8 *first_soa_record; u32 first_soa_record_size; u16 ancount; u16 xfr_mode; u32 record_index; // index of the record in the stream u32 last_serial; ya_result last_error; bool eos; bool ixfr_mark; #if DNSCORE_HAS_TSIG_SUPPORT bool last_message_had_tsig; bool need_cleanup_tsig; #endif }; /** * Reads from the (tcp) input stream for an xfr * Detects the xfr type * Copies into the right file * * @return error code */ #if HAS_NON_AA_AXFR_SUPPORT /* * Non-RFC-compliant masks (allows AA bit not set) * * It seems (some?) Microsoft DNS answers to an AXFR query without setting the AA bit * * The RFC 5936 states that in the case of an AXFR answer with no error (RCODE set to 0), * the AA bit MUST be set. * */ #ifdef WORDS_BIGENDIAN #define AXFR_MESSAGE_HEADER_MASK (( (u64) 0 ) | \ (((u64) (QR_BITS | TC_BITS )) << 40 )| \ (((u64) ( RA_BITS | RCODE_BITS )) << 32 ) | \ ( (u64) 1LL << 16 )) #define AXFR_MESSAGE_HEADER_RESULT (( (u64) (QR_BITS ) << 40 ) | \ ( ((u64) 1LL) << 16 )) #define AXFR_NEXT_MESSAGE_HEADER_MASK (( (u64) 0LL ) | \ (((u64) ( QR_BITS | TC_BITS )) << 40 )| \ (((u64) ( RCODE_BITS )) << 32 )) #define AXFR_NEXT_MESSAGE_HEADER_RESULT (((u64) ( QR_BITS )) << 40 ) #else #define AXFR_MESSAGE_HEADER_MASK (( (u64) 0LL ) | \ (((u64) ( QR_BITS | TC_BITS )) << 16 )| \ (((u64) ( RCODE_BITS )) << 24 ) | \ (((u64) 1LL) << 40 )) #define AXFR_MESSAGE_HEADER_RESULT ((((u64) ( QR_BITS )) << 16 )| \ (((u64) 1LL) << 40 )) #define AXFR_NEXT_MESSAGE_HEADER_MASK (( (u64) 0LL ) | \ (((u64) ( QR_BITS | TC_BITS )) << 16 )| \ (((u64) ( RCODE_BITS )) << 24 )) #define AXFR_NEXT_MESSAGE_HEADER_RESULT (((u64) ( QR_BITS )) << 16 ) #endif #else /* * RFC compliant masks (AA bit must be set) */ #ifdef WORDS_BIGENDIAN #define AXFR_MESSAGE_HEADER_MASK (( (u64) 0 ) | \ (((u64) (QR_BITS | AA_BITS | TC_BITS )) << 40 )| \ (((u64) ( RA_BITS | RCODE_BITS )) << 32 ) | \ ( (u64) 1LL << 16 )) #define AXFR_MESSAGE_HEADER_RESULT (( (u64) (QR_BITS | AA_BITS) << 40 ) | \ ( ((u64) 1LL) << 16 )) #define AXFR_NEXT_MESSAGE_HEADER_MASK (( (u64) 0LL ) | \ (((u64) ( QR_BITS | AA_BITS | TC_BITS )) << 40 )| \ (((u64) ( RCODE_BITS )) << 32 )) #define AXFR_NEXT_MESSAGE_HEADER_RESULT (((u64) ( QR_BITS | AA_BITS )) << 40 ) #else #define AXFR_MESSAGE_HEADER_MASK (( (u64) 0LL ) | \ (((u64) ( QR_BITS | AA_BITS | TC_BITS )) << 16 )| \ (((u64) ( RCODE_BITS )) << 24 ) | \ (((u64) 1LL) << 40 )) #define AXFR_MESSAGE_HEADER_RESULT ((((u64) ( QR_BITS | AA_BITS )) << 16 )| \ (((u64) 1LL) << 40 )) #define AXFR_NEXT_MESSAGE_HEADER_MASK (( (u64) 0LL ) | \ (((u64) ( QR_BITS | AA_BITS | TC_BITS )) << 16 )| \ (((u64) ( RCODE_BITS )) << 24 )) #define AXFR_NEXT_MESSAGE_HEADER_RESULT (((u64) ( QR_BITS | AA_BITS )) << 16 ) #endif #endif /* * Reads the content of a message from the reader field in data (packet reader) * The ancount field in data contains the number of records to read * Every record read is written to the output pipe */ static ya_result xfr_input_stream_read_packet(xfr_input_stream_data *data) { message_data *message = data->message; packet_unpack_reader_data *reader = &data->reader; u8 *record = &message->pool_buffer[0]; u32 record_len; ya_result return_value = SUCCESS; #if DEBUG_XFR_INPUT_STREAM log_debug("xfr_input_stream_read_packet(%p) ancount=%hd record_index=%u", data, data->ancount, data->record_index); #endif while((data->ancount > 0) && (pipe_stream_write_available(&data->pipe_stream_output) > 2048 )) { --data->ancount; if(FAIL(record_len = packet_reader_read_record(reader, record, RDATA_MAX_LENGTH + 1))) { if(record_len != UNSUPPORTED_TYPE) { data->eos = TRUE; return_value = record_len; break; } log_err("xfr_input_stream: skipped unsupported record #%d %{recordwire}", data->record_index, record); data->record_index++; continue; } #if DEBUG_XFR_INPUT_STREAM log_debug("xfr_input_stream: #%u %{recordwire}", data->record_index, record); #endif u8 *ptr = record + dnsname_len(record); u16 rtype = GET_U16_AT(*ptr); switch(rtype) { case TYPE_SOA: { /* handle SOA case */ if(!dnsname_equals(record, data->origin)) { data->eos = TRUE; return_value = ERROR; // OWNER OF SOA RECORD SHOULD BE ORIGIN (protocol error) return return_value; } ptr += 10; /* type class ttl rdata_size */ ptr += dnsname_len(ptr); ptr += dnsname_len(ptr); u32 soa_serial = ntohl(GET_U32_AT(*ptr)); if(data->xfr_mode == TYPE_ANY) { if(data->record_index == 1) { /* * This is an IXFR, the first record is not sent up */ data->xfr_mode = TYPE_IXFR; } else { output_stream_write(&data->pipe_stream_output, data->first_soa_record, data->first_soa_record_size); data->xfr_mode = TYPE_AXFR; } } if(soa_serial == data->last_serial) { if(data->xfr_mode == TYPE_AXFR || ((data->xfr_mode == TYPE_IXFR) && data->ixfr_mark)) { return_value = SUCCESS; /* * The last record of an AXFR must be written, * the last record of an IXFR must not. */ if(data->xfr_mode == TYPE_AXFR) { return_value = output_stream_write(&data->pipe_stream_output, record, record_len); } /* done */ data->eos = TRUE; return return_value; // reached the end } /* IXFR needs to find the mark twice */ data->ixfr_mark = TRUE; } break; } case TYPE_IXFR: case TYPE_AXFR: case TYPE_OPT: case TYPE_ANY: return INVALID_PROTOCOL; default: if(data->record_index == 1) { // special case to detect an AXFR returned by an IXFR query if(data->xfr_mode == TYPE_ANY) { data->xfr_mode = TYPE_AXFR; if(FAIL(return_value = output_stream_write(&data->pipe_stream_output, data->first_soa_record, data->first_soa_record_size))) { return return_value; } } else { return_value = ERROR; return return_value; // invalid status } } break; } if(FAIL(return_value = output_stream_write(&data->pipe_stream_output, record, record_len))) { data->eos = TRUE; break; } if(return_value != record_len) { return UNEXPECTED_EOF; } data->record_index++; } return return_value; } static ya_result xfr_input_stream_read(input_stream *is, u8 *buffer, u32 len) { xfr_input_stream_data *data = (xfr_input_stream_data*)is->data; input_stream *source_stream = &data->source_stream; message_data *message = data->message; #if DNSCORE_HAS_TSIG_SUPPORT const tsig_item *tsig = message->tsig.tsig; #endif packet_unpack_reader_data *reader = &data->reader; if(FAIL(data->last_error)) { return data->last_error; } ya_result return_value = SUCCESS; /* while there is not enough bytes on the input */ while(pipe_stream_read_available(&data->pipe_stream_input) < len) { /* read the packet and write on the output (so it can be read back on the input) */ if(FAIL(return_value = xfr_input_stream_read_packet(data))) { break; } if(data->eos) { break; } if(data->ancount > 0) { break; } /* next TCP chunk */ #ifdef DEBUG memset(&message->buffer[0], 0xee, sizeof(message->buffer)); #endif u16 tcplen; return_value = input_stream_read_nu16(source_stream, &tcplen); /* this is wrong ... */ if(return_value != 2) { #ifdef DEBUG log_debug("xfr_input_stream_read: next message is %ld bytes long", return_value); #endif break; } if(tcplen == 0) { return_value = UNEXPECTED_EOF; break; } if(FAIL(return_value = input_stream_read_fully(source_stream, message->buffer, tcplen))) { break; } #if DEBUG_XFR_INPUT_STREAM log_memdump(g_system_logger, MSG_DEBUG1, &message->buffer[0], tcplen, 32); #endif message->received = return_value; #ifdef DEBUG memset(&message->buffer[tcplen], 0xdd, DNSPACKET_MAX_LENGTH + 1 - tcplen); #endif /* * Check the headers */ const u64 *h64 = (u64*)message->buffer; const u64 m64 = AXFR_NEXT_MESSAGE_HEADER_MASK; const u64 r64 = AXFR_NEXT_MESSAGE_HEADER_RESULT; if(((*h64&m64) != r64) || (MESSAGE_NS(message->buffer) != 0)) { u8 code = MESSAGE_RCODE(message->buffer); if(code != 0) { return_value = MAKE_DNSMSG_ERROR(code); } else { return_value = UNPROCESSABLE_MESSAGE; } break; } #if DNSCORE_HAS_TSIG_SUPPORT if((data->last_message_had_tsig = (tsig != NULL))) { /* verify the TSIG * * AR > 0 * skip ALL the records until the last AR * it MUST be a TSIG * It's the first TSIG answering to our query * verify it * */ message->tsig.tsig = NULL; if(FAIL(return_value = tsig_message_extract(message))) { break; } if((return_value == 1) && (message->tsig.tsig != tsig)) { /* This is not the one we started with */ log_debug("xfr_input_stream: signature key does not match"); return_value = TSIG_BADSIG; break; } if(FAIL(return_value = tsig_verify_tcp_next_message(message))) { break; } } #endif message_header *header = (message_header*)message->buffer; data->ancount = ntohs(header->ancount); packet_reader_init(reader, message->buffer, message->received); reader->offset = DNS_HEADER_LENGTH; u16 n = ntohs(header->qdcount); while(n > 0) { if(FAIL(return_value = packet_reader_skip_fqdn(reader))) { break; } packet_reader_skip(reader, 4); n--; } } // for(;;) /* process all TCP chunks */ if(ISOK(return_value)) { if((return_value = pipe_stream_read_available(&data->pipe_stream_input)) > 0) // never fails { if(FAIL(return_value = input_stream_read(&data->pipe_stream_input, buffer, len))) { #if DNSCORE_HAS_TSIG_SUPPORT if(data->need_cleanup_tsig) { tsig_verify_tcp_last_message(message); data->need_cleanup_tsig = FALSE; } #endif } } else { // here, return_value == 0 #if DNSCORE_HAS_TSIG_SUPPORT if(tsig != NULL) { tsig_verify_tcp_last_message(message); data->need_cleanup_tsig = FALSE; if(!data->last_message_had_tsig) { /* * The stream didn't end with a TSIG * It's bad. * */ log_err("xfr_input_stream: TSIG enabled answer didn't ended with a signed packet"); return_value = TSIG_BADSIG; } } #endif } } else { #if DNSCORE_HAS_TSIG_SUPPORT // cleanup tsig_verify_tcp_last_message(message); data->need_cleanup_tsig = FALSE; #endif } data->last_error = return_value; return return_value; } static ya_result xfr_input_stream_skip(input_stream *is, u32 len) { /* * The reader is too complicated to implement a skip, so skip is a wrapped read */ u32 remaining = len; ya_result return_value = SUCCESS; u8 buffer[512]; while(remaining > 0) { u32 n = MIN(remaining, sizeof(buffer)); return_value = xfr_input_stream_read(is, buffer, n); if(return_value <= 0) /* FAIL or EOF */ { break; } remaining -= return_value; } if(len != remaining) { return_value = len - remaining; } return return_value; } static void xfr_input_stream_close(input_stream *is) { xfr_input_stream_data *data = (xfr_input_stream_data*)is->data; if(data->need_cleanup_tsig) { log_err("TSIG has not been cleared"); data->need_cleanup_tsig = FALSE; } output_stream_close(&data->pipe_stream_output); input_stream_close(&data->pipe_stream_input); free(data->first_soa_record); #ifdef DEBUG memset(data, 0xfe, sizeof(xfr_input_stream_data)); #endif ZFREE(data, xfr_input_stream_data); // used to be leaked ? input_stream_set_void(is); } static const input_stream_vtbl xfr_input_stream_vtbl = { xfr_input_stream_read, xfr_input_stream_skip, xfr_input_stream_close, "xfr_input_stream", }; /** * * @param is the input stream with the AXFR or IXFR, wire format * @param flags mostly XFR_ALLOW_AXFR or XFR_ALLOW_IXFR * @param origin the domain of the zone * @param base_data_path the folder where to put the journal (or journal hash directories and journal) * @param current_serial the serial currently available * @param loaded_serial a pointer to get the serial available after loading * @param message the message that led to this download * * @return an error code, TYPE_AXFR, TYPE_IXFR, TYPE_NONE */ ya_result xfr_input_stream_init(input_stream* filtering_stream, const u8 *origin, input_stream *xfr_source_stream, message_data *message, u32 current_serial, xfr_copy_flags flags) { yassert(filtering_stream != NULL && origin != NULL && xfr_source_stream != NULL && message != NULL); input_stream *is = xfr_source_stream; packet_unpack_reader_data reader; u8 *buffer; u8 *record; u8 *ptr; #if DNSCORE_HAS_TSIG_SUPPORT const tsig_item *tsig; #endif ya_result record_len; ya_result return_value; u32 origin_len; u32 last_serial = 0; u16 tcplen; u16 qtype; u16 qclass; u16 old_mac_size; bool last_message_had_tsig; bool need_cleanup_tsig = FALSE; #if DNSCORE_HAS_TSIG_SUPPORT u8 old_mac[64]; #endif /* * ensure the stream will be unusable if the initialisation fails */ input_stream_set_void(filtering_stream); /* * Start by reading the first packet, and determine if it's an AXFR or an IXFR (for the name) * note: it's read and converted to the host endianness */ if(!is_fd_input_stream(is)) { // expected file input stream return INVALID_ARGUMENT_ERROR; } //buffer_input_stream_init(is, is, 4096); /* TCP length */ if(FAIL(return_value = input_stream_read_nu16(is, &tcplen))) { return return_value; } if(return_value != 2) { return UNEXPECTED_EOF; } /* if the length is not enough, return the most appropriate error code */ origin_len = dnsname_len(origin); if(tcplen < DNS_HEADER_LENGTH + origin_len + 4) { return_value = UNEXPECTED_EOF; if(tcplen >= DNS_HEADER_LENGTH) { if(ISOK(return_value = input_stream_read_fully(is, message->pool_buffer, DNS_HEADER_LENGTH))) { return_value = MAKE_DNSMSG_ERROR(MESSAGE_RCODE(message->pool_buffer)); } } /* TODO: retry ? */ return return_value; } /* read the whole message */ buffer = &message->buffer[0]; record = &message->pool_buffer[0]; assert(sizeof(message->pool_buffer) >= 255 + 10 + 65535); if(FAIL(return_value = input_stream_read_fully(is, buffer, tcplen))) { return return_value; } #if DEBUG_XFR_INPUT_STREAM log_memdump(g_system_logger, MSG_DEBUG1, &message->buffer[0], tcplen, 32); #endif message->received = return_value; /* check the message makes sense */ const u64 *h64 = (u64*)buffer; u64 m64 = AXFR_MESSAGE_HEADER_MASK; u64 r64 = AXFR_MESSAGE_HEADER_RESULT; if(((*h64&m64) != r64) || (MESSAGE_NS(message->buffer) != 0)) { u8 code = MESSAGE_RCODE(message->buffer); if(code != 0) { return_value = MAKE_DNSMSG_ERROR(code); } else { return_value = UNPROCESSABLE_MESSAGE; } return return_value; } //m64 = AXFR_NEXT_MESSAGE_HEADER_MASK; //r64 = AXFR_NEXT_MESSAGE_HEADER_RESULT; packet_reader_init(&reader, buffer, tcplen); reader.offset = DNS_HEADER_LENGTH; packet_reader_read_fqdn(&reader, record, RDATA_MAX_LENGTH + 1); if(!dnsname_equals(record, origin)) { return INVALID_PROTOCOL; } if(FAIL(return_value = packet_reader_read_u16(&reader, &qtype))) { return return_value; } if(return_value != 2) { return UNEXPECTED_EOF; } /* * check that we are allowed to process this particular kind of transfer * note : this does not determine what is REALLY begin transferred */ switch(qtype) { case TYPE_AXFR: { if((flags & XFR_ALLOW_AXFR) == 0) { return INVALID_PROTOCOL; } break; } case TYPE_IXFR: { if((flags & XFR_ALLOW_IXFR) == 0) { return INVALID_PROTOCOL; } break; } default: { return INVALID_PROTOCOL; } } if(FAIL(return_value = packet_reader_read_u16(&reader, &qclass))) { return return_value; } if(qclass != CLASS_IN) { /** wrong answer */ return INVALID_PROTOCOL; } /* check for TSIG and verify */ u16 ancount = ntohs(MESSAGE_AN(buffer)); #if DNSCORE_HAS_TSIG_SUPPORT if((last_message_had_tsig = ((tsig = message->tsig.tsig) != NULL))) { /* verify the TSIG * * AR > 0 * skip ALL the records until the last AR * it MUST be a TSIG * It's the first TSIG answering to our query * verify it * */ message->tsig.tsig = NULL; old_mac_size = message->tsig.mac_size; memcpy(old_mac, message->tsig.mac, old_mac_size); if(FAIL(return_value = tsig_message_extract(message))) { log_debug("xfr_input_stream: error extracting the signature"); return return_value; } if(return_value == 0) { log_debug("xfr_input_stream: no signature when one was requested"); return TSIG_BADSIG; /* no signature, when one was requested, is a bad signature */ } if(message->tsig.tsig != tsig) { /* This is not the one we started with */ log_debug("xfr_input_stream: signature key does not match"); return TSIG_BADSIG; } /// check that the tsig in the message matches the one that was sent if(FAIL(return_value = tsig_verify_tcp_first_message(message, old_mac, old_mac_size))) { return return_value; } reader.packet_size = message->received; need_cleanup_tsig = TRUE; } #endif log_debug("xfr_input_stream: expecting %5d answer records", ancount); /* * read the SOA (it MUST be an SOA) */ if(FAIL(record_len = packet_reader_read_record(&reader, record, RDATA_MAX_LENGTH + 1))) { return record_len; } if(!dnsname_equals(record, origin)) { return INVALID_PROTOCOL; } ptr = &record[origin_len]; if(GET_U16_AT(*ptr) != TYPE_SOA) { return INVALID_PROTOCOL; } ptr += 8; /* type class ttl */ u16 rdata_size = ntohs(GET_U16_AT(*ptr)); if(rdata_size < 22) { return INVALID_PROTOCOL; } rdata_size -= 16; ptr += 2; /* rdata size */ s32 len = dnsname_len(ptr); if(len >= rdata_size) { return INVALID_PROTOCOL; } rdata_size -= len; ptr += len; len = dnsname_len(ptr); if(len >= rdata_size) { return INVALID_PROTOCOL; } rdata_size -= len; if(rdata_size != 4) { return INVALID_PROTOCOL; } ptr += len; // if the serial of the SOA is the same one as we know, then there is no // need to download the zone last_serial = ntohl(GET_U32_AT(*ptr)); if(last_serial == current_serial) { //args->out_loaded_serial = args->current_serial; return ZONE_ALREADY_UP_TO_DATE; } xfr_input_stream_data *data; ZALLOC_OR_DIE(xfr_input_stream_data*, data, xfr_input_stream_data, GENERIC_TAG); ZEROMEMORY(data, sizeof(xfr_input_stream_data)); /* * We have got the first SOA * Next time we find this SOA (second next time for IXFR) the stream, it will be the end of the stream */ /* * The stream can be AXFR or IXFR. * The only way to know this is to look at the records, maybe on many packets. * If there are two SOA (different serial numbers) for the start, then it's an IXFR, else it's an AXFR. * * OPEN A PIPE STREAM "XFRs" * * Save the first SOA */ MALLOC_OR_DIE(u8*, data->first_soa_record, record_len, GENERIC_TAG); MEMCOPY(data->first_soa_record, record, record_len); data->first_soa_record_size = record_len; filtering_stream->vtbl = &xfr_input_stream_vtbl; filtering_stream->data = data; pipe_stream_init(&data->pipe_stream_output, &data->pipe_stream_input, 65536); MEMCOPY(&data->reader, &reader, sizeof(packet_unpack_reader_data)); data->origin = origin; data->message = message; data->ancount = ancount - 1; data->record_index++; data->last_serial = last_serial; data->xfr_mode = TYPE_ANY; data->ixfr_mark = FALSE; data->last_message_had_tsig = last_message_had_tsig; data->source_stream = *is; data->need_cleanup_tsig = need_cleanup_tsig; /* * Then we read all records for all packets * If we find an SOA ... * AXFR: it has to be the last serial and it is the end of the stream. * IXFR: if it's not the last serial it has to go from step to step * AND once we have reached the "last serial" once, the next hit is the end of the stream. */ data->eos = FALSE; /* * In order to know what the type is, read the first packet. */ return_value = xfr_input_stream_read_packet(data); if(FAIL(return_value)) { xfr_input_stream_close(filtering_stream); } return return_value; } ya_result xfr_input_stream_get_type(input_stream *in_xfr_input_stream) { xfr_input_stream_data *data = (xfr_input_stream_data*)in_xfr_input_stream->data; return data->xfr_mode; } const u8* xfr_input_stream_get_origin(input_stream *in_xfr_input_stream) { xfr_input_stream_data *data = (xfr_input_stream_data*)in_xfr_input_stream->data; return data->origin; } ya_result xfr_input_stream_get_serial(input_stream *in_xfr_input_stream) { xfr_input_stream_data *data = (xfr_input_stream_data*)in_xfr_input_stream->data; return data->last_serial; } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/packet_writer.c0000644000077100007710000000012412650131756022343 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.761344 30 ctime=1454597651.540344534 yadifa-2.1.6-5826/lib/dnscore/src/packet_writer.c0000664000077100007710000002140712650131756022154 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnspacket DNS Messages * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/dnsname.h" #include "dnscore/logger.h" #include "dnscore/message.h" #include "dnscore/rfc.h" extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger /* * */ ya_result packet_writer_init(packet_writer* pc, u8* packet, u32 packet_offset, u32 size_limit) { pc->pool_head = pc->pool; pc->head = NULL; #ifdef DEBUG memset(&packet[packet_offset], 0xff, size_limit - packet_offset); #endif packet_dictionary_node* child_node = NULL; u32 offset = DNS_HEADER_LENGTH; u8* fqdn = &packet[offset]; while(*fqdn != 0) { packet_dictionary_node* node = pc->pool_head++; node->next = NULL; node->child = child_node; node->label = fqdn; node->offset = offset; u8 len = fqdn[0] + 1; fqdn += len; offset += len; child_node = node; } #ifdef DEBUG fqdn += 1 + 2 + 2; if(packet_offset != fqdn - packet) { log_err("packet_writer_init expected %u = %u", packet_offset, fqdn - packet); } #endif pc->head = child_node; pc->packet = packet; pc->packet_offset = packet_offset; pc->packet_limit = size_limit; return SUCCESS; } void packet_writer_create(packet_writer* pc, u8* packet, u16 limit) { pc->pool_head = pc->pool; pc->head = NULL; pc->packet = packet; pc->packet_offset = DNS_HEADER_LENGTH; pc->packet_limit = limit; } ya_result packet_writer_add_fqdn_uncompressed(packet_writer* pc, const u8* fqdn) { pc->packet_offset += dnsname_copy(&pc->packet[pc->packet_offset], fqdn); return pc->packet_offset; } ya_result packet_writer_add_fqdn(packet_writer* pc, const u8* fqdn) { dnslabel_vector name; s32 top = dnsname_to_dnslabel_vector(fqdn, name); s32 best_top = top + 1; packet_dictionary_node* best = NULL; packet_dictionary_node* node = pc->head; u8* packet_base = pc->packet; u32 offset = pc->packet_offset; /* Look for the name in the compression dictionary */ while((top >= 0) && (node != NULL)) { if(dnslabel_equals_ignorecase_left(name[top], node->label)) { /* we got a match on this level */ best = node; best_top = top; node = node->child; top--; } else { /* no match, try the next sibling */ node = node->next; } } /* Every label in the interval [0;best_top is new */ /* Create a compression dictionary entry for each of them * along with their writing. */ packet_dictionary_node* child_node = NULL; u8* packet = &packet_base[offset]; top = 0; while(top < best_top) { u8 len = name[top][0] + 1; MEMCOPY(packet, name[top], len); if(offset <= 0x3fff) { node = pc->pool_head++; node->next = NULL; node->child = child_node; node->label = packet; node->offset = offset; child_node = node; } packet += len; offset += len; top++; } if(best != NULL) { /* found a (partial) match */ /* Add the new chain to the parent */ if(child_node != NULL) { child_node->next = best->child; best->child = child_node; } *packet++ = (best->offset >> 8) | 0xc0; *packet = (best->offset & 0xff); offset += 2; } else { /* create a new entry */ /* child_node can be null if we tried to write something beyond the * 16KB limit * */ if(child_node != NULL) { child_node->next = pc->head; pc->head = child_node; } *packet = 0; offset++; } pc->packet_offset = offset; return offset; } ya_result packet_writer_add_rdata(packet_writer* pc, u16 rr_type, const u8* rdata, u16 rdata_size) { yassert(pc->packet_offset + rdata_size < pc->packet_limit); u32 offset = pc->packet_offset; pc->packet_offset += 2; switch(rr_type) { case TYPE_MX: packet_writer_add_bytes(pc, rdata, 2); rdata += 2; /* Fallthrough */ case TYPE_NS: case TYPE_CNAME: case TYPE_DNAME: case TYPE_PTR: case TYPE_MB: case TYPE_MD: case TYPE_MF: case TYPE_MG: case TYPE_MR: /* ONE NAME record */ { packet_writer_add_fqdn(pc, rdata); packet_writer_set_u16(pc, htons(pc->packet_offset - offset - 2), offset); break; } case TYPE_SOA: { u32 len1 = dnsname_len(rdata); packet_writer_add_fqdn(pc, rdata); rdata += len1; u32 len2 = dnsname_len(rdata); packet_writer_add_fqdn(pc, rdata); rdata += len2; packet_writer_add_bytes(pc, rdata, 20); packet_writer_set_u16(pc, htons(pc->packet_offset - offset - 2), offset); break; } default: { packet_writer_set_u16(pc, htons(rdata_size), offset); packet_writer_add_bytes(pc, rdata, rdata_size); break; } } /* switch(type) */ return pc->packet_offset; } /** * Writes the content of the buffer of a packet writer to a TCP output stream, * that is: first the size of the buffer in network endiant 16 bits followed * by the actual content of the buffer * * @param pw the packet writer whose content needs to be written * @param tcpos the TCP output stream * * @return an error code or the size of the buffer */ ya_result write_tcp_packet(packet_writer *pw, output_stream *tcpos) { int n; if(FAIL(n = output_stream_write_nu16(tcpos, pw->packet_offset))) { return n; } if(FAIL(n = output_stream_write(tcpos, pw->packet, pw->packet_offset))) { return n; } return n; } ya_result packet_writer_add_record(packet_writer* pw, const u8* fqdn, u16 rr_type, u16 rr_class, u32 rr_ttl, const u8* rdata, u16 rdata_size) { ya_result return_code; u32 offset = pw->packet_offset; if(ISOK(return_code = packet_writer_add_fqdn(pw, fqdn))) { if(pw->packet_limit - pw->packet_offset >= 10) { packet_writer_add_u16(pw, rr_type); packet_writer_add_u16(pw, rr_class); packet_writer_add_u32(pw, rr_ttl); if(ISOK(return_code = packet_writer_add_rdata(pw, rr_type, rdata, rdata_size))) { return pw->packet_offset; } } } pw->packet_offset = offset; return return_code; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/clone_input_output_stream.c0000644000077100007710000000012412650131756025012 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.688344 30 ctime=1454597651.345344534 yadifa-2.1.6-5826/lib/dnscore/src/clone_input_output_stream.c0000664000077100007710000001203312650131756024616 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/clone_input_output_stream.h" #include "dnscore/zalloc.h" #define CLONE_INPUT_OUTPUT_STREAM_TAG 0x534f49454e4f4c43 /* CLONEIOS */ typedef struct clone_input_output_stream_data clone_input_output_stream_data; struct clone_input_output_stream_data { input_stream cloned; output_stream copy; }; static ya_result clone_input_output_stream_read(input_stream* stream, u8* buffer, u32 len) { clone_input_output_stream_data* data = (clone_input_output_stream_data*)stream->data; ya_result return_value; if(ISOK(return_value = input_stream_read(&data->cloned, buffer, len))) { output_stream_write(&data->copy, buffer, return_value); } return return_value; } static void clone_input_output_stream_close(input_stream* stream) { clone_input_output_stream_data* data = (clone_input_output_stream_data*)stream->data; input_stream_close(&data->cloned); output_stream_close(&data->copy); ZFREE(data, clone_input_output_stream_data); input_stream_set_void(stream); } static u8 skip[4] = {'S', 'K', 'I', 'P'}; static ya_result clone_input_output_stream_skip(input_stream* stream, u32 len) { clone_input_output_stream_data* data = (clone_input_output_stream_data*)stream->data; ya_result return_code; if(ISOK(return_code = input_stream_skip(&data->cloned, len))) { int n = return_code; while(n > 4) { output_stream_write(&data->copy, skip, 4); n -= 4; } output_stream_write(&data->copy, skip, n); } return return_code; } static const input_stream_vtbl clone_input_output_stream_vtbl ={ clone_input_output_stream_read, clone_input_output_stream_skip, clone_input_output_stream_close, "clone_input_output_stream" }; ya_result clone_input_output_stream_init(input_stream *cis, input_stream *in_cloned, output_stream *out_stream) { clone_input_output_stream_data* data; if((in_cloned->vtbl == NULL) || (out_stream == NULL)) { return OBJECT_NOT_INITIALIZED; } ZALLOC_OR_DIE(clone_input_output_stream_data*, data, clone_input_output_stream_data, CLONE_INPUT_OUTPUT_STREAM_TAG); data->cloned.data = in_cloned->data; data->cloned.vtbl = in_cloned->vtbl; data->copy.data = out_stream->data; data->copy.vtbl = out_stream->vtbl; in_cloned->data = NULL; in_cloned->vtbl = NULL; out_stream->data = NULL; out_stream->vtbl = NULL; cis->data = data; cis->vtbl = &clone_input_output_stream_vtbl; return SUCCESS; } input_stream * clone_input_output_stream_get_cloned(input_stream *cis) { clone_input_output_stream_data *data = (clone_input_output_stream_data*)cis->data; return &data->cloned; } output_stream * clone_input_output_stream_get_copy(input_stream *cis) { clone_input_output_stream_data *data = (clone_input_output_stream_data*)cis->data; return &data->copy; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/dns-udp.c0000644000077100007710000000012412650131756021052 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.687344 30 ctime=1454597651.404344534 yadifa-2.1.6-5826/lib/dnscore/src/dns-udp.c0000664000077100007710000022240712650131756020666 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/dns_resource_record.h" #include "dnscore/thread_pool.h" #include "dnscore/random.h" #include "dnscore/message.h" #include "dnscore/tcp_io_stream.h" #include "dnscore/ptr_set.h" #include "dnscore/pool.h" #include "dnscore/service.h" #include "dnscore/async.h" #include "dnscore/mutex.h" #include "dnscore/list-dl.h" #include "dnscore/dns-udp.h" #include "dnscore/fdtools.h" extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger #define HAS_TC_FALLBACK_TO_TCP_SUPPORT 1 #define DNS_UDP_SIMPLE_QUERY 0 #define DNS_UDP_SIMPLE_MESSAGE_FLAG_NONE 0 #define DNS_UDP_SIMPLE_MESSAGE_FLAG_DNSSEC 1 #define DNS_SIMPLE_MESSAGE_RETRIES_DEFAULT 2 // 3 tries total #define DNSSMAND_TAG 0x444e414d53534e44 #define DNSSMESG_TAG 0x4753454d53534e44 const u8 V4_WRAPPED_IN_V6[12] = {0,0,0,0,0,0,0,0,0,0,255,255}; static struct service_s dns_udp_send_handler = UNINITIALIZED_SERVICE; static struct service_s dns_udp_receive_handler = UNINITIALIZED_SERVICE; static struct service_s dns_udp_timeout_handler = UNINITIALIZED_SERVICE; static async_queue_s dns_udp_send_handler_queue; static bool dns_udp_handler_initialized = FALSE; //static smp_int domain_test_count = SMP_INT_INITIALIZER; static int dns_udp_send_service(struct service_worker_s *worker); static int dns_udp_receive_service(struct service_worker_s *worker); static int dns_udp_timeout_service(struct service_worker_s *worker); static int *dns_udp_socket = NULL; static list_dl_s *volatile dns_udp_high_priority = NULL; static u32 dns_udp_socket_count = 0; static pool_s dns_simple_message_pool; static pool_s message_data_pool; static pool_s dns_simple_message_async_node_pool; static mutex_t sendto_statistics_mtx = MUTEX_INITIALIZER; static mutex_t recvfrom_statistics_mtx = MUTEX_INITIALIZER; static volatile u32 sendto_epoch = 0; static volatile u32 sendto_total = 0; static volatile u32 sendto_packets = 0; static volatile u32 sendto_packets_aggregated = 0; static volatile u32 recvfrom_epoch = 0; static volatile u32 recvfrom_total = 0; static volatile u32 recvfrom_packets = 0; #if HAS_TC_FALLBACK_TO_TCP_SUPPORT static struct thread_pool_s *tcp_query_thread_pool = NULL; #endif /* * accurate rate measurement tool */ #define RATE_WINDOW_SLOT_TIME 500000 struct rate_s { mutex_t mtx; volatile u64 basetime; volatile u64 bytes_sent_window[2]; volatile u64 rate_max; volatile u32 slot; }; typedef struct rate_s rate_s; void rate_init(rate_s *r, u64 rate_max) { ZEROMEMORY(r, sizeof(rate_s)); mutex_init(&r->mtx); r->basetime = timeus(); r->rate_max = rate_max; } void rate_finalise(rate_s *r) { mutex_destroy(&r->mtx); } void rate_wait(rate_s *r, u32 bytes_to_add) { for(;;) { mutex_lock(&r->mtx); u64 now = timeus(); // d is the time elapsed since last measurement in us u64 delta_time_us = (now - r->basetime) | 1; // avoid divide by zero without a compare/jump is more important that high accuracy // slot WILL be the index in the bytes sent window // but first look where we are, where we were and // what needs to be cleaned u64 slot = delta_time_us / RATE_WINDOW_SLOT_TIME; u64 dslot = slot - r->slot; switch(dslot) { case 0: // same slot { log_debug6("rate: SAME: base=%llu, delta=%llu, slot=%llu, waitfor=%u, rate_max=%llu", r->basetime, delta_time_us, slot&1, bytes_to_add, r->rate_max); break; } case 1: // slot moved { r->basetime = now - RATE_WINDOW_SLOT_TIME; log_debug6("rate: NEXT: base=%llu, delta=%llu, slot=%llu, waitfor=%u, rate_max=%llu", r->basetime, delta_time_us, slot&1, bytes_to_add, r->rate_max); r->bytes_sent_window[slot&1] = 0; break; } default: // both slots are too old { log_debug6("rate: BOTH: base=%llu, delta=%llu, slot=%llu, waitfor=%u, rate_max=%llu", r->basetime, delta_time_us, slot&1, bytes_to_add, r->rate_max); r->basetime = now; r->bytes_sent_window[0] = 0; r->bytes_sent_window[1] = 0; break; } } r->slot = slot; slot &= 1; // sum the windows to get the current bytes per second u64 bytes_sent = r->bytes_sent_window[0] + r->bytes_sent_window[1]; u64 new_total = bytes_sent + bytes_to_add; u64 new_rate = (1000000 * new_total) / delta_time_us; if(new_rate < r->rate_max) { r->bytes_sent_window[slot] += bytes_to_add; mutex_unlock(&r->mtx); log_debug6("rate: SENT: base=%llu, delta=%llu, slot=%llu, byte_sent=%llu, waitfor=%u, new_rate=%llu, rate_max=%llu", r->basetime, delta_time_us, slot&1, bytes_sent, bytes_to_add, new_rate, r->rate_max); break; } else { mutex_unlock(&r->mtx); log_debug6("rate: WAIT: base=%llu, delta=%llu, slot=%llu, byte_sent=%llu, waitfor=%u, new_rate=%llu, rate_max=%llu", r->basetime, delta_time_us, slot&1, bytes_sent, bytes_to_add, new_rate, r->rate_max); // it is possible to compute an accurate sleep time // right now I just do a 1ms pause (interruptable) usleep(1000); } } } static int dns_udp_send_simple_message_node_compare(const void *key_a, const void *key_b); static ptr_set message_collection = { NULL, dns_udp_send_simple_message_node_compare}; static mutex_t message_collection_mtx; static rate_s dns_udp_send_rate; static volatile s64 message_collection_keys = 0; static volatile s64 message_collection_size = 0; static const dns_udp_settings_s default_dns_udp_settings = { DNS_UDP_TIMEOUT_US, DNS_UDP_SEND_RATE, DNS_UDP_SEND_QUEUE, DNS_UDP_PORT_COUNT, DNS_UDP_RETRY_COUNT }; static const dns_udp_settings_s *dns_udp_settings = &default_dns_udp_settings; static void * dns_simple_message_async_node_pool_alloc(void *_ignored_) { dns_simple_message_async_node_s *sma; (void)_ignored_; MALLOC_OR_DIE(dns_simple_message_async_node_s*, sma, sizeof(dns_simple_message_async_node_s), DNSSMAND_TAG); // POOL ZEROMEMORY(sma, sizeof(dns_simple_message_async_node_s)); return sma; } static void dns_simple_message_async_node_pool_free(void *sma, void *_ignored_) { (void)_ignored_; memset(sma, 0xd0, sizeof(dns_simple_message_async_node_s)); free(sma); // POOL } static void * dns_simple_message_pool_alloc(void *_ignored_) { dns_simple_message_s *m; (void)_ignored_; MALLOC_OR_DIE(dns_simple_message_s*, m, sizeof(dns_simple_message_s), DNSSMESG_TAG); // POOL ZEROMEMORY(m, sizeof(dns_simple_message_s)); return m; } static void dns_simple_message_pool_free(void *p, void *_ignored_) { (void)_ignored_; memset(p, 0xd1, sizeof(dns_simple_message_s)); #ifdef DEBUG dns_simple_message_s *msg = (dns_simple_message_s*)p; msg->rc.value = 0; #endif free(p); // POOL } static void * message_data_pool_alloc(void *_ignored_) { message_data *m; (void)_ignored_; MALLOC_OR_DIE(message_data*, m, sizeof(message_data), MESGDATA_TAG); // POOL ZEROMEMORY(m, sizeof(message_data)); return m; } static void message_data_pool_free(void *p, void *_ignored_) { (void)_ignored_; memset(p, 0xd2, sizeof(message_data)); free(p); // POOL } static void dns_udp_handler_message_collection_free_node_callback(void *n) { ptr_node *node = (ptr_node *)n; dns_simple_message_s *simple_message = (dns_simple_message_s*)node->key; dns_udp_simple_message_release(simple_message); } void dns_udp_handler_configure(const dns_udp_settings_s *settings) { if(settings == NULL) { settings = &default_dns_udp_settings; } dns_udp_settings = settings; } int dns_udp_handler_init() { int err = SUCCESS; if(!dns_udp_handler_initialized) { if(dns_udp_settings->port_count == 0) { return INVALID_ARGUMENT_ERROR; // invalid value } error_register(DNS_UDP_TIMEOUT, "query timed out"); error_register(DNS_UDP_INTERNAL, "internal error"); message_edns0_setmaxsize(4096); rate_init(&dns_udp_send_rate, dns_udp_settings->send_rate); // bytes-per-second u32 worker_count = dns_udp_settings->port_count; // open "worker_count" udp sockets (V6) dns_udp_socket_count = worker_count; MALLOC_OR_DIE(int*, dns_udp_socket, sizeof(int) * dns_udp_socket_count, GENERIC_TAG); // DON'T POOL for(int i = 0; i < dns_udp_socket_count; i++) // dns_udp_socket_count is guaranteed > 0 { int s; if( (s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) { for(int j = 0; j < i; j++) { if(dns_udp_socket[j] != ~0) { log_debug1("dns_udp_handler_init: closing socket %i", dns_udp_socket[j]); close_ex(dns_udp_socket[j]); dns_udp_socket[j] = ~0; } } return ERRNO_ERROR; } // dns_udp_socket[i] = s; struct sockaddr_in6 sin6; ZEROMEMORY(&sin6, sizeof(sin6)); sin6.sin6_family = AF_INET6; socklen_t sin6len = sizeof(sin6); if(bind(s, (struct sockaddr*)&sin6, sin6len) < 0) { err = ERRNO_ERROR; log_err("bind: %r", err); for(int j = 0; j < i; j++) { if(dns_udp_socket[j] != ~0) { log_debug1("dns_udp_handler_init: closing socket %i", dns_udp_socket[j]); close_ex(dns_udp_socket[j]); dns_udp_socket[j] = ~0; } } free(dns_udp_socket); dns_udp_socket = NULL; dns_udp_socket_count = 0; return err; } } // scan-build false positive: dns_udp_socket_count > 0 MALLOC_OR_DIE(list_dl_s*, dns_udp_high_priority, sizeof(list_dl_s) * dns_udp_socket_count, GENERIC_TAG); // DON'T POOL, count ALWAYS > 0 for(int i = 0; i < dns_udp_socket_count; i++) { list_dl_init(&dns_udp_high_priority[i]); } // each couple of socket will be the responsibility of a writer if(ISOK(err = service_init_ex(&dns_udp_send_handler, dns_udp_send_service, "dns-udp-send", worker_count))) { async_queue_init(&dns_udp_send_handler_queue, dns_udp_settings->queue_size, 1, 100000, "dns-udp-send"); if(ISOK(err = service_init_ex(&dns_udp_receive_handler, dns_udp_receive_service, "dns-udp-receive", worker_count))) { if(ISOK(err = service_init(&dns_udp_timeout_handler, dns_udp_timeout_service, "dns-udp-timeout"))) { #if HAS_TC_FALLBACK_TO_TCP_SUPPORT if((tcp_query_thread_pool = thread_pool_init_ex(1, 0x4000, "dns-tcp-query")) != NULL) { #endif pool_init(&dns_simple_message_async_node_pool, dns_simple_message_async_node_pool_alloc, dns_simple_message_async_node_pool_free, NULL, "dns simple message answer"); pool_init(&dns_simple_message_pool, dns_simple_message_pool_alloc, dns_simple_message_pool_free, NULL, "dns simple message"); pool_init(&message_data_pool, message_data_pool_alloc, message_data_pool_free, NULL, "message data"); #ifndef VALGRIND_FRIENDLY pool_set_size(&dns_simple_message_async_node_pool, 0x10000); pool_set_size(&dns_simple_message_pool, 0x10000); pool_set_size(&message_data_pool, 0x2000); message_data_pool.hard_limit = TRUE; #else // for valgrind pool_set_size(&dns_simple_message_async_node_pool, 0); pool_set_size(&dns_simple_message_pool, 0); pool_set_size(&message_data_pool, 0); #endif dns_udp_handler_initialized = TRUE; return SUCCESS; #if HAS_TC_FALLBACK_TO_TCP_SUPPORT } else { service_finalize(&dns_udp_timeout_handler); err = ERROR; } #endif } service_finalize(&dns_udp_receive_handler); } service_finalize(&dns_udp_send_handler); } for(int i = 0; i < dns_udp_socket_count; i++) { if(dns_udp_socket[i] != ~0) { log_debug1("dns_udp_handler_init: closing socket %i", dns_udp_socket[i]); close_ex(dns_udp_socket[i]); dns_udp_socket[i] = ~0; } //list_dl_s *list = &dns_udp_high_priority[i]; } free(dns_udp_high_priority); dns_udp_high_priority = NULL; free(dns_udp_socket); // One array, don't pool dns_udp_socket = NULL; dns_udp_socket_count = 0; } return err; } int dns_udp_handler_start() { int err = ERROR; if(dns_udp_handler_initialized) { if(ISOK(err = service_start(&dns_udp_send_handler))) { if(ISOK(err = service_start(&dns_udp_receive_handler))) { if(ISOK(err = service_start(&dns_udp_timeout_handler))) { return err; } service_stop(&dns_udp_receive_handler); service_wait(&dns_udp_receive_handler); } service_stop(&dns_udp_send_handler); service_wait(&dns_udp_send_handler); } } return err; } int dns_udp_handler_stop() { int err = SUCCESS; int err0 = SUCCESS; int err1 = SUCCESS; int err2 = SUCCESS; int err3 = SUCCESS; int err4 = SUCCESS; if(!dns_udp_handler_initialized) { return SERVICE_NOT_INITIALISED; } #if HAS_TC_FALLBACK_TO_TCP_SUPPORT if(tcp_query_thread_pool != NULL) { if(FAIL(err0 = thread_pool_destroy(tcp_query_thread_pool))) { log_err("failed to stop tcp_query_thread_pool: %r", err0); err = err0; } tcp_query_thread_pool = NULL; } #endif if(!service_stopped(&dns_udp_send_handler)) { if(FAIL(err1 = service_stop(&dns_udp_send_handler))) { log_err("failed to stop dns_udp_send_handler: %r", err1); err = err1; } } if(!service_stopped(&dns_udp_receive_handler)) { if(FAIL(err2 = service_stop(&dns_udp_receive_handler))) { log_err("failed to stop dns_udp_receive_handler: %r", err2); err = err2; } } if(!service_stopped(&dns_udp_timeout_handler)) { if(FAIL(err3 = service_stop(&dns_udp_timeout_handler))) { log_err("failed to stop dns_udp_timeout_handler: %r", err3); err = err3; } } log_debug("closing %i sockets", dns_udp_socket_count); for(int i = 0; i < dns_udp_socket_count; i++) { if(dns_udp_socket[i] != ~0) { log_debug1("dns_udp_handler_stop: closing socket %i", dns_udp_socket[i]); close_ex(dns_udp_socket[i]); dns_udp_socket[i] = ~0; } } log_debug("closed %i sockets", dns_udp_socket_count); // cleans-up whatever is waiting ... // but there is some issue here. the program stuck on the async_wait, // probably because the data was already freed (race?) if(dns_udp_high_priority != NULL) { for(int i = 0; i < dns_udp_socket_count; i++) { list_dl_s *list = &dns_udp_high_priority[i]; async_message_s *async; while((async = (async_message_s*)list_dl_remove_first(list)) != NULL) { dns_simple_message_s *simple_message = (dns_simple_message_s*)async->args; simple_message->sent_time_us = MAX_S64; simple_message->worker_index = i; simple_message->source_port = 0; // pre-increase the RC because of this new reference (into the DB) // dns_udp_simple_message_retain(simple_message); async->error_code = DNS_UDP_CANCEL; //dns_udp_simple_message_answer_call_handlers(simple_message); log_debug("send: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x) is cancelled", simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status); simple_message->received_time_us = MAX_U64; dns_simple_message_async_node_s *node = simple_message->async_node.next; while(node != NULL) { // the handler MUST release one reference dns_udp_simple_message_retain(simple_message); node->async->error_code = DNS_UDP_CANCEL; node->async->handler(node->async); node = node->next; } // there is no need to retain, the reference from the collection has not been decreased yet simple_message->async_node.async->error_code = DNS_UDP_CANCEL; simple_message->async_node.async->handler(simple_message->async_node.async); simple_message = NULL; //async->handler(async); //async_wait_progress(aw, 1); } } } if(ISOK(err1)) { service_wait(&dns_udp_send_handler); } if(ISOK(err2)) { service_wait(&dns_udp_receive_handler); } if(ISOK(err3)) { service_wait(&dns_udp_timeout_handler); } if(ISOK(err4)) { dns_udp_socket_count = 0; } dns_udp_cancel_all_queries(); return err; } int dns_udp_handler_finalize() { if(!dns_udp_handler_initialized) { return SUCCESS; } dns_udp_handler_stop(); service_finalize(&dns_udp_send_handler); service_finalize(&dns_udp_receive_handler); service_finalize(&dns_udp_timeout_handler); for(int i = 0; i < dns_udp_socket_count; i++) { if(dns_udp_socket[i] != ~0) { log_debug1("dns_udp_handler_finalize: closing socket %i", dns_udp_socket[i]); if(shutdown(dns_udp_socket[i], SHUT_RDWR) < 0) { log_debug1("dns_udp_handler_stop: unable to shutdown socket %i: %r", dns_udp_socket[i], ERRNO_ERROR); } close_ex(dns_udp_socket[i]); dns_udp_socket[i] = ~0; } } free(dns_udp_socket); // One array, don't pool dns_udp_socket = NULL; if(dns_udp_high_priority != NULL) { free(dns_udp_high_priority); dns_udp_high_priority = NULL; } dns_udp_socket_count = 0; async_queue_finalize(&dns_udp_send_handler_queue); ptr_set_avl_callback_and_destroy(&message_collection, dns_udp_handler_message_collection_free_node_callback); message_collection_keys = 0; message_collection_size = 0; pool_finalize(&dns_simple_message_async_node_pool); pool_finalize(&dns_simple_message_pool); pool_finalize(&message_data_pool); rate_finalise(&dns_udp_send_rate); dns_udp_handler_initialized = FALSE; return SUCCESS; } static int dns_udp_send_simple_message_node_compare(const void *key_a, const void *key_b) { dns_simple_message_s *a = (dns_simple_message_s*)key_a; dns_simple_message_s *b = (dns_simple_message_s*)key_b; // test queried type int ka = a->qclass; ka <<= 16; ka |= a->qtype; int kb = b->qclass; kb <<= 16; kb |= b->qtype; if((ka -= kb) != 0) { return ka; } // test name server address if((ka = host_address_compare(a->name_server, b->name_server)) != 0) { return ka; } // test queried domain return dnsname_compare(a->fqdn, b->fqdn); } static message_data * dns_udp_allocate_message_data(struct service_worker_s *worker) { for(;;) { message_data *mesg = (message_data*)pool_alloc(&message_data_pool); if(mesg != NULL) { ZEROMEMORY(mesg, sizeof(message_data)); return mesg; } if(!service_shouldrun(worker)) { return NULL; } sleep(1); } } /** * Calls the handlers of the aggregated queries on a message. * * First calls the handlers for the list of aggregated. * Then calls the handler for original one. * * @param simple_message */ static void dns_udp_simple_message_answer_call_handlers(dns_simple_message_s *simple_message) { s64 start = timeus(); dns_simple_message_async_node_s *node = simple_message->async_node.next; while(node != NULL) { // the handler MUST release one reference so we increase it here dns_udp_simple_message_retain(simple_message); if((node->async != NULL) && (node->async->handler != NULL)) { node->async->handler(node->async); } else { if(node->async != NULL) { log_err("receive: async=%p handler=%p", node->async, node->async->handler); } else { log_err("receive: async=%p handler=?", node->async); } } node = node->next; } #ifdef DEBUG if(simple_message->rc.value > 1) { log_warn("receive: message RC is not 1 (%i)", simple_message->rc.value); } #endif assert(simple_message->rc.value > 0); // there is no need to retain, the reference from the collection has not been decreased yet simple_message->async_node.async->handler(simple_message->async_node.async); s64 end = timeus(); double dps = end - start; dps /= 1000000.0; log_debug("receive: handler processing took %6.3fs", dps); } #if HAS_TC_FALLBACK_TO_TCP_SUPPORT struct dns_udp_tcp_query_thread_params { dns_simple_message_s *simple_message; struct service_worker_s *worker; }; typedef struct dns_udp_tcp_query_thread_params dns_udp_tcp_query_thread_params; int dns_udp_tcp_query_count = 0; int dns_udp_tcp_query_failures = 0; static void* dns_udp_tcp_query_thread(void *args) { dns_udp_tcp_query_thread_params *parms = (dns_udp_tcp_query_thread_params*)args; dns_simple_message_s *simple_message = (dns_simple_message_s *)parms->simple_message; struct service_worker_s *worker = (struct service_worker_s *)parms->worker; ZFREE(parms, dns_udp_tcp_query_thread_params); ya_result ret; random_ctx rndctx = thread_pool_get_random_ctx(); yassert(simple_message->answer == NULL); message_data *mesg = dns_udp_allocate_message_data(worker); dns_udp_tcp_query_count++; if(mesg != NULL) { simple_message->dns_id = (u16)random_next(rndctx); message_make_query_ex(mesg, simple_message->dns_id, simple_message->fqdn, simple_message->qtype, simple_message->qclass, simple_message->flags); if(simple_message->recurse) { MESSAGE_HIFLAGS(mesg->buffer) |= RD_BITS; } // send message socketaddress sa; //socklen_t sa_len = sizeof(sa.sa6); if(ISOK(ret = host_address2sockaddr(&sa, simple_message->name_server))) { s32 retries = (s32)dns_udp_settings->retry_count; do { // send the packet simple_message->sent_time_us = timeus(); log_notice("send: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x) using TCP", simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status); simple_message->received_time_us = timeus(); s64 dt = MAX(simple_message->received_time_us - simple_message->sent_time_us, 0); double dts = dt; dts/=1000000.0; ret = message_query_tcp_with_timeout(mesg, simple_message->name_server, dns_udp_settings->timeout / 1000000); if(ISOK(ret)) { log_notice("receive: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x) [%6.3fs] using TCP", simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status, dts); simple_message->status &= ~DNS_SIMPLE_MESSAGE_STATUS_COLLECTED; simple_message->status |= DNS_SIMPLE_MESSAGE_STATUS_RECEIVED; simple_message->answer = mesg; mesg = NULL; dns_udp_simple_message_answer_call_handlers(simple_message); // dns_udp_simple_message_answer_call_handlers does a retain //dns_udp_simple_message_release(simple_message); simple_message = NULL; break; } else { if(--retries >= 0) { log_warn("send: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x) [%6.3fs] using TCP failed: %r, retrying", simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status, dts, ret); } else { log_err("send: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x) [%6.3fs] using TCP failed: %r, no retries left", simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status, dts, ret); } } } while(retries >= 0); } } else { log_err("send: tcp was unable to allocate a message"); ret = ERROR; } if(FAIL(ret)) { dns_udp_tcp_query_failures++; log_err("send: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x) using TCP failed: %r", simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status, ret); if(ret == MAKE_ERRNO_ERROR(EAGAIN)) { ret = DNS_UDP_TIMEOUT; } simple_message->received_time_us = MAX_U64; dns_simple_message_async_node_s *node = simple_message->async_node.next; while(node != NULL) { // the handler MUST release one reference dns_udp_simple_message_retain(simple_message); node->async->error_code = ret; node->async->handler(node->async); node = node->next; } // there is no need to retain, the reference from the collection has not been decreased yet simple_message->async_node.async->error_code = ret; simple_message->async_node.async->handler(simple_message->async_node.async); simple_message = NULL; } if(mesg != NULL) { memset(mesg, 0xd6, sizeof(message_data)); pool_release(&message_data_pool, mesg); } // simple_message->async_node.async->handler(simple_message->async_node.async); return NULL; } static void dns_udp_tcp_query(dns_simple_message_s *simple_message, struct service_worker_s *worker) { dns_udp_tcp_query_thread_params *parms; ZALLOC_OR_DIE(dns_udp_tcp_query_thread_params*, parms, dns_udp_tcp_query_thread_params, GENERIC_TAG); parms->simple_message = simple_message; parms->worker = worker; thread_pool_enqueue_call(tcp_query_thread_pool, dns_udp_tcp_query_thread, parms, NULL, "dns-udp-tcp"); } #endif int dns_udp_send_simple_message(const host_address* name_server, const u8 *fqdn, u16 qtype, u16 qclass, u16 flags, async_done_callback *cb, void* cbargs) { log_debug("query: %{hostaddr} %{dnsname} %{dnstype} %{dnsclass} %s", name_server, fqdn, &qtype, &qclass, (flags!=0)?"":"+dnssec"); async_message_s *domain_message = async_message_alloc(); dns_simple_message_s *simple_message = (dns_simple_message_s*)pool_alloc(&dns_simple_message_pool); #ifdef DEBUG memset(simple_message, 0xac, sizeof(dns_simple_message_s)); #endif simple_message->name_server = host_address_copy(name_server); // MALLOCATED MEMORY RETURNED simple_message->answer = NULL; simple_message->async_node.async = domain_message; simple_message->async_node.next = NULL; simple_message->queued_time_us = timeus(); simple_message->sent_time_us = MAX_S64; simple_message->received_time_us = 0; simple_message->qtype = qtype; simple_message->qclass = qclass; simple_message->retries_left = DNS_SIMPLE_MESSAGE_RETRIES_DEFAULT; simple_message->flags = flags; simple_message->dns_id = 0; simple_message->status = DNS_SIMPLE_MESSAGE_STATUS_QUEUED; simple_message->recurse = FALSE; group_mutex_init(&simple_message->mtx); #if DNS_SIMPLE_MESSAGE_HAS_WAIT_COND pthread_cond_init(&simple_message->mtx_cond, NULL); #endif simple_message->owner = 0; smp_int_init(&simple_message->rc); // sets it to 0 simple_message->rc.value = 1; // no need to lock it yet to change it to 1 dnsname_canonize(fqdn, simple_message->fqdn); log_debug5("new message@%p: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr}", simple_message, simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server); domain_message->id = DNS_UDP_SIMPLE_QUERY; domain_message->args = simple_message; domain_message->handler = cb; domain_message->handler_args = cbargs; async_message_call(&dns_udp_send_handler_queue, domain_message); return SUCCESS; } int dns_udp_send_recursive_message(const host_address* name_server, const u8 *fqdn, u16 qtype, u16 qclass, u16 flags, async_done_callback *cb, void* cbargs) { log_debug("query: %{hostaddr} %{dnsname} %{dnstype} %{dnsclass} %s (recursive)", name_server, fqdn, &qtype, &qclass, (flags!=0)?"":"+dnssec"); async_message_s *domain_message = async_message_alloc(); dns_simple_message_s *simple_message = (dns_simple_message_s*)pool_alloc(&dns_simple_message_pool); #ifdef DEBUG memset(simple_message, 0xac, sizeof(dns_simple_message_s)); #endif simple_message->name_server = host_address_copy(name_server); // MALLOCATED MEMORY RETURNED simple_message->answer = NULL; simple_message->async_node.async = domain_message; simple_message->async_node.next = NULL; simple_message->queued_time_us = timeus(); simple_message->sent_time_us = MAX_S64; simple_message->received_time_us = 0; simple_message->qtype = qtype; simple_message->qclass = qclass; simple_message->retries_left = DNS_SIMPLE_MESSAGE_RETRIES_DEFAULT; simple_message->flags = flags; simple_message->dns_id = 0; simple_message->status = DNS_SIMPLE_MESSAGE_STATUS_QUEUED; simple_message->recurse = TRUE; group_mutex_init(&simple_message->mtx); #if DNS_SIMPLE_MESSAGE_HAS_WAIT_COND pthread_cond_init(&simple_message->mtx_cond, NULL); #endif simple_message->owner = 0; smp_int_init(&simple_message->rc); // sets it to 0 simple_message->rc.value = 1; // no need to lock it yet to change it to 1 dnsname_canonize(fqdn, simple_message->fqdn); log_debug5("new message@%p: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr}", simple_message, simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server); domain_message->id = DNS_UDP_SIMPLE_QUERY; domain_message->args = simple_message; domain_message->handler = cb; domain_message->handler_args = cbargs; async_message_call(&dns_udp_send_handler_queue, domain_message); return SUCCESS; } struct dns_udp_send_simple_message_sync_s { struct async_wait_s wait; dns_simple_message_s *simple_message; }; static void dns_udp_send_simple_message_sync_handler(struct async_message_s *msg) { dns_simple_message_s *simple_message = (dns_simple_message_s*)msg->args; struct dns_udp_send_simple_message_sync_s *args = (struct dns_udp_send_simple_message_sync_s*)msg->handler_args; args->simple_message = simple_message; args->wait.error_code = msg->error_code; async_wait_progress(&args->wait, 1); } int dns_udp_send_recursive_message_sync(const host_address* name_server, const u8 *fqdn, u16 qtype, u16 qclass, u16 flags, dns_simple_message_s **to_release) { struct dns_udp_send_simple_message_sync_s args; async_wait_init(&args.wait, 1); args.simple_message = NULL; int err = dns_udp_send_recursive_message(name_server, fqdn, qtype, qclass, flags, dns_udp_send_simple_message_sync_handler, &args); if(ISOK(err)) { async_wait(&args.wait); err = args.wait.error_code; if(to_release != NULL) { *to_release = args.simple_message; } } async_wait_finalize(&args.wait); return err; } int dns_udp_send_simple_message_sync(const host_address* name_server, const u8 *fqdn, u16 qtype, u16 qclass, u16 flags, dns_simple_message_s **to_release) { struct dns_udp_send_simple_message_sync_s args; async_wait_init(&args.wait, 1); args.simple_message = NULL; int err = dns_udp_send_simple_message(name_server, fqdn, qtype, qclass, flags, dns_udp_send_simple_message_sync_handler, &args); if(ISOK(err)) { async_wait(&args.wait); err = args.wait.error_code; if(to_release != NULL) { *to_release = args.simple_message; } } async_wait_finalize(&args.wait); return err; } bool dns_udp_simple_message_trylock(dns_simple_message_s *message) { log_debug7("dns_udp_simple_message_lock(%p) try locking (#%i)", message, message->rc.value); if(group_mutex_trylock(&message->mtx, GROUP_MUTEX_WRITE)) { if(message->owner == 0) { message->owner = pthread_self(); } log_debug7("dns_udp_simple_message_lock(%p) --- locked", message); //mutex_unlock(&message->mtx); return TRUE; } else { log_debug7("dns_udp_simple_message_lock(%p) NOT locked", message); return FALSE; } } void dns_udp_simple_message_lock(dns_simple_message_s *message) { log_debug7("dns_udp_simple_message_lock(%p) locking", message); group_mutex_lock(&message->mtx, GROUP_MUTEX_WRITE); #if DNS_SIMPLE_MESSAGE_HAS_WAIT_COND while( message->owner != 0 ) { pthread_cond_wait(&message->mtx_cond, &message->mtx); } #endif message->owner = pthread_self(); log_debug7("dns_udp_simple_message_lock(%p) locked", message); } void dns_udp_simple_message_unlock(dns_simple_message_s *message) { log_debug7("dns_udp_simple_message_lock(%p) unlocking", message); //mutex_lock(&message->mtx); message->owner = 0; #if DNS_SIMPLE_MESSAGE_HAS_WAIT_COND pthread_cond_broadcast(&message->mtx_cond); #endif group_mutex_unlock(&message->mtx, GROUP_MUTEX_WRITE); log_debug7("dns_udp_simple_message_lock(%p) unlocked", message); } void dns_udp_simple_message_retain(dns_simple_message_s *simple_message) { log_debug7("dns_udp_simple_message_retain(%p)", simple_message); int n = smp_int_inc_get(&simple_message->rc); if(n == 1) { log_warn("dns_udp_simple_message_retain(%p) : retained from 0", simple_message); } } void dns_udp_simple_message_release(dns_simple_message_s *simple_message) { #ifdef DEBUG u16 qtype = simple_message->qtype; u16 qclass = simple_message->qclass; u32 fqdn_len; u8 fqdn[MAX_DOMAIN_LENGTH]; if((fqdn_len = dnsname_len(simple_message->fqdn)) <= sizeof(fqdn)) { memcpy(fqdn, simple_message->fqdn, fqdn_len); } else { log_err("dns_udp_simple_message_release(%p) looks broken", simple_message); memcpy(fqdn, "\006BROKEN", 8); logger_flush(); abort(); } #endif int n = smp_int_dec_get(&simple_message->rc); if(n <= 0) { log_debug7("dns_udp_simple_message_release(%p) destroying", simple_message); if(n < 0) { log_err("dns_udp_simple_message_release(%p) : NEGATIVE RC: type=%{dnstype} class=%{dnsclass} status=%x", simple_message, &simple_message->qtype, &simple_message->qclass, simple_message->status); logger_flush(); abort(); } log_debug7("dns_udp_simple_message_release(%p) : %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x)", simple_message, simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status); // clear the answer if(simple_message->answer != NULL) { memset(simple_message->answer, 0xd4, sizeof(message_data)); pool_release(&message_data_pool, simple_message->answer); simple_message->answer = NULL; } // clear the name server (hostaddr) host_address_delete(simple_message->name_server); simple_message->name_server = NULL; // release the sync if(simple_message->async_node.async != NULL) { async_message_release(simple_message->async_node.async); //--message_collection_size; this one is with keys simple_message->async_node.async = NULL; } dns_simple_message_async_node_s *node = simple_message->async_node.next; while(node != NULL) { if(node->async != NULL) { async_message_release(node->async); --message_collection_size; node->async = NULL; } dns_simple_message_async_node_s *prev = node; node = node->next; #ifdef DEBUG memset(prev, 0xd7, sizeof(dns_simple_message_async_node_s)); #endif pool_release(&dns_simple_message_async_node_pool, prev); } simple_message->async_node.next = NULL; // release the mutexes #if DNS_SIMPLE_MESSAGE_HAS_WAIT_COND for(;;) { int err = pthread_cond_destroy(&simple_message->mtx_cond); if(err == 0) { break; } log_err("dns_udp_simple_message_release(%p) pthread_cond_destroy failed: %r", simple_message, MAKE_ERRNO_ERROR(err)); usleep(10); } #endif group_mutex_destroy(&simple_message->mtx); smp_int_destroy(&simple_message->rc); u8 status = simple_message->status | DNS_SIMPLE_MESSAGE_STATUS_INVALID; memset(simple_message, 0xd5, sizeof(dns_simple_message_s)); #if DEBUG simple_message->rc.value = -12345678; #endif simple_message->status = status; log_debug7("dns_udp_simple_message_release(%p) destroyed (%x)", simple_message, simple_message->status); pool_release(&dns_simple_message_pool, simple_message); } else { // nothing to do yet. // note that since the message is not locked, the content CANNOT be printed #ifndef DEBUG log_debug7("dns_udp_simple_message_release(%p) (%x)", simple_message, n); #else log_debug7("dns_udp_simple_message_release(%p) (%x) : %{dnsname} %{dnstype} %{dnsclass}", simple_message, n, fqdn, &qtype, &qclass); #endif } } static void dns_udp_aggregate_simple_messages(dns_simple_message_s *head, dns_simple_message_s *tail) { dns_simple_message_async_node_s *node = (dns_simple_message_async_node_s*)pool_alloc(&dns_simple_message_async_node_pool); dns_udp_simple_message_lock(head); dns_udp_simple_message_lock(tail); log_debug6("dns_udp_aggregate_simple_messages(%p, %p) head %p->%p", head, tail, &head->async_node, head->async_node.next); // prepare the container to match the simple message's // append the current list to the new node (should be only one item) node->next = tail->async_node.next; // node->async = tail->async_node.async; tail->async_node.next = NULL; tail->async_node.async = NULL; node->async->args = head; // change the linked message to the first one log_debug6("dns_udp_aggregate_simple_messages(%p, %p) edit %p->%p", head, tail, node, node->next); // update the first_message for the whole list (every time ?) dns_simple_message_async_node_s *sm_last_node = node; while(sm_last_node->next != NULL) { sm_last_node = sm_last_node->next; log_debug6("dns_udp_aggregate_simple_messages(%p, %p) edit %p->%p. Updating message as %p (was %p)", head, tail, sm_last_node, sm_last_node->next, sm_last_node->async->args, head); sm_last_node->async->args = head; // change the linked message to the first one } // last node of the list, append the original list to the current list sm_last_node->next = head->async_node.next; head->async_node.next = node; // the list is ready #ifdef DEBUG while(node != NULL) { log_debug6("dns_udp_aggregate_simple_messages(%p, %p) node %p=>%p", head, tail, node, node->next); node = node->next; } #endif head->status |= DNS_SIMPLE_MESSAGE_STATUS_AGGREGATED; // added sendto_packets_aggregated++; log_debug5("added message@%p to message@%p: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} %s (%x)", tail, head, head->fqdn, &head->qtype, &head->qclass, head->name_server, (head->recurse)?"rd":"", head->status); // adding a query grants a new retry ++head->retries_left; dns_udp_simple_message_unlock(tail); // unlock B dns_udp_simple_message_unlock(head); } static int dns_udp_send_simple_message_process(async_message_s *domain_message, random_ctx rndctx, u16 source_port, int s, u32 worker_index) { dns_simple_message_s *simple_message = (dns_simple_message_s*)domain_message->args; // check if in pending collection #if DEBUG if((domain_message->start_time & 0x8000000000000000LL) != 0) { logger_flush(); abort(); } #endif log_debug("sending: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x)", simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status); // don't give a sent time until it's actually sent (high loads could trigger a timeout before the packet is sent) simple_message->sent_time_us = MAX_S64; simple_message->worker_index = worker_index; simple_message->source_port = source_port; // pre-increase the RC because of this new reference (into the DB) dns_udp_simple_message_retain(simple_message); /// @note: at this point, in a normal usage, the RC of simple_message should be 2 // lock the collection mutex_lock(&message_collection_mtx); // lock A // lock the simple message dns_udp_simple_message_lock(simple_message); // lock B ptr_node *node = ptr_set_avl_insert(&message_collection, simple_message); simple_message->status |= DNS_SIMPLE_MESSAGE_STATUS_COLLECTED; simple_message->status &= ~DNS_SIMPLE_MESSAGE_STATUS_QUEUED; dns_udp_simple_message_unlock(simple_message); int return_code; if(node->value == NULL) { ++message_collection_keys; // newly inserted // put in pending collection // RC already increased node->value = domain_message; mutex_unlock(&message_collection_mtx); // unlock A dns_udp_simple_message_lock(simple_message); log_debug5("set message@%p: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} %s (%x)", domain_message, simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, (simple_message->recurse)?"rd":"", simple_message->status); // generate message message_data mesg; if(simple_message->dns_id == 0) { simple_message->dns_id = (u16)random_next(rndctx); } message_make_query_ex(&mesg, simple_message->dns_id, simple_message->fqdn, simple_message->qtype, simple_message->qclass, simple_message->flags); if(simple_message->recurse) { MESSAGE_HIFLAGS(mesg.buffer) |= RD_BITS; } // send message socketaddress sa; socklen_t sa_len = sizeof(sa.sa6); return_code = host_address2sockaddr(&sa, simple_message->name_server); dns_udp_simple_message_unlock(simple_message); if(ISOK(return_code)) { for(;;) { // send the packet rate_wait(&dns_udp_send_rate, mesg.send_length); //rate_wait(&dns_udp_send_rate, 1); if((return_code = sendto(s, mesg.buffer, mesg.send_length, 0, &sa.sa, sa_len)) == mesg.send_length) { dns_udp_simple_message_lock(simple_message); simple_message->status |= DNS_SIMPLE_MESSAGE_STATUS_SENT; log_notice("sent: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x)", simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status); simple_message->sent_time_us = timeus(); dns_udp_simple_message_unlock(simple_message); // unlock B // one RC can be released dns_udp_simple_message_release(simple_message); /// @note at this point the RC is set to 1, but /// it potentially could be 0 (and thus simple_message could already be destroyed) // message should NOT be used after this point // u64 now = time(NULL); mutex_lock(&sendto_statistics_mtx); if(sendto_epoch == now) { sendto_total += return_code; sendto_packets++; mutex_unlock(&sendto_statistics_mtx); } else { u32 st = sendto_total; u32 sq = sendto_packets; u32 sqa = sendto_packets_aggregated; sendto_epoch = now; sendto_total = return_code; sendto_packets = 0; sendto_packets_aggregated = 0; mutex_unlock(&sendto_statistics_mtx); log_debug("sent: total=%db/s (packets=%d/aggregated=%d/s)", st, sq, sqa); } // return return_code; } // an error occurred int err = errno; if((err != EINTR) && (err != EAGAIN)) { return_code = MAKE_ERRNO_ERROR(err); break; } // try again } } // error occurred while sending the message dns_udp_simple_message_lock(simple_message); simple_message->status |= DNS_SIMPLE_MESSAGE_STATUS_FAILURE; log_err("error sending: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x): %r", simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status, return_code); dns_udp_simple_message_unlock(simple_message); mutex_lock(&message_collection_mtx); // ensure that the node still exists ptr_node *node = ptr_set_avl_find(&message_collection, simple_message); if(node != NULL) { ptr_set_avl_delete(&message_collection, simple_message); --message_collection_keys; // one RC can be released for the collection dns_udp_simple_message_lock(simple_message); simple_message->status &= ~DNS_SIMPLE_MESSAGE_STATUS_COLLECTED; dns_udp_simple_message_unlock(simple_message); dns_udp_simple_message_release(simple_message); } else { // even if this is possible, this should NEVER happen log_debug6("the message @%p had been removed from the collection already", simple_message); } mutex_unlock(&message_collection_mtx); /// @note RC = 1 // the handler NEEDS to do the final release domain_message->error_code = return_code; domain_message->handler(domain_message); return return_code; } else { // append the async callback to the dns_simple_message structure // the first message for this query, it will reference the new message dns_simple_message_s *old_message = (dns_simple_message_s *)node->key; // aggregate /append simple_message to first_message dns_udp_aggregate_simple_messages(old_message, simple_message); ++message_collection_size; mutex_unlock(&message_collection_mtx); // one RC can be released from the collection dns_udp_simple_message_release(simple_message); // one RC can be released from this reference dns_udp_simple_message_release(simple_message); // should be destroyed at this point return SUCCESS; } } static int dns_udp_send_service(struct service_worker_s *worker) { struct sockaddr_in6 sin6; random_ctx rndctx; const u32 worker_index = worker->worker_index; log_debug("send: service started (%u/%u)", worker_index + 1, worker->service->worker_count); const int my_socket = dns_udp_socket[worker_index]; rndctx = thread_pool_get_random_ctx(); ZEROMEMORY(&sin6, sizeof(sin6)); socklen_t sin6len = sizeof(sin6); getsockname(my_socket, (struct sockaddr*)&sin6, &sin6len); const u16 source_port = sin6.sin6_port; while(service_shouldrun(worker)) { // timeout high priority list. async_message_s *async; // I'm using the worker lock to synchronise with its counterpart, // so I don't have to create yet another mutex mutex_lock(&worker->lock); u32 high_priority_size = list_dl_size(&dns_udp_high_priority[worker_index]); async = list_dl_dequeue(&dns_udp_high_priority[worker_index]); mutex_unlock(&worker->lock); if(async == NULL) { async = async_message_next(&dns_udp_send_handler_queue); if(async == NULL) { continue; } } else { log_debug("send: processing timeout retry (%u still in high priority queue)", high_priority_size); } log_debug6("send: processing message (%u still in queue)", async_queue_size(&dns_udp_send_handler_queue)); switch(async->id) { case DNS_UDP_SIMPLE_QUERY: { log_debug6("DNS_UDP_SIMPLE_QUERY"); dns_udp_send_simple_message_process(async, rndctx, source_port, my_socket, worker_index); break; } default: { log_err("DNS_UDP_? %u", async->id); async->error_code = SERVICE_ID_ERROR; async->handler(async); break; } } } service_set_stopping(worker); log_debug("send: service stopped (%u/%u)", worker_index + 1, worker->service->worker_count); return 0; } static int dns_udp_receive_service(struct service_worker_s *worker) { log_debug("receive: service started (%u/%u)", worker->worker_index + 1, worker->service->worker_count); int my_socket = dns_udp_socket[worker->worker_index]; // u16 port; struct sockaddr_in6 sin6; ZEROMEMORY(&sin6, sizeof(sin6)); socklen_t sin6len = sizeof(sin6); getsockname(my_socket, (struct sockaddr*)&sin6, &sin6len); tcp_set_recvtimeout(my_socket, dns_udp_settings->timeout / 1000000LL, dns_udp_settings->timeout % 1000000LL); // port = sin6.sin6_port; message_data *mesg; for(;;) { mesg = (message_data*)pool_alloc(&message_data_pool); if(mesg != NULL) { ZEROMEMORY(mesg, sizeof(message_data)); break; } if(!service_shouldrun(worker)) { break; } sleep(1); } host_address sender_host_address; while(service_shouldrun(worker)) { int n; yassert(mesg != NULL); mesg->addr_len = sizeof(mesg->other); if((n = recvfrom(my_socket, mesg->buffer, sizeof(mesg->buffer), 0, &mesg->other.sa, &mesg->addr_len)) >= 0) { if(n > 0) { log_debug6("receive: recvfrom(%i, ... , %{sockaddr}) = %i", my_socket, &mesg->other, n); } else { log_debug6("receive: empty packet"); } mesg->received = n; u64 now = time(NULL); mutex_lock(&recvfrom_statistics_mtx); if(recvfrom_epoch == now) { recvfrom_total += n; recvfrom_packets++; mutex_unlock(&recvfrom_statistics_mtx); } else { recvfrom_epoch = now; u32 rt = recvfrom_total; recvfrom_total = n; u32 rq = recvfrom_packets; recvfrom_packets = 0; mutex_unlock(&recvfrom_statistics_mtx); log_debug("receive: recvfrom: %d b/s %d p/s", rt, rq); } ya_result return_code; if(ISOK(return_code = message_process_lenient(mesg))) { // look in the timeout collection host_address_set_with_sockaddr(&sender_host_address, &mesg->other); if(sender_host_address.version == 6) { if(memcmp(sender_host_address.ip.v6.bytes, V4_WRAPPED_IN_V6, sizeof(V4_WRAPPED_IN_V6)) == 0) { // unwrap u32 ipv4 = sender_host_address.ip.v6.dwords[3]; sender_host_address.ip.v4.value = ipv4; sender_host_address.version = 4; } } dns_simple_message_s message; message.name_server = &sender_host_address; message.sent_time_us = MAX_S64; message.received_time_us = 0; message.retries_left = 0; int len = dnsname_copy(message.fqdn, mesg->qname); if(ISOK(len)) { message.qtype = GET_U16_AT(mesg->buffer[12 + len]); message.qclass = GET_U16_AT(mesg->buffer[12 + len + 2]); // remove it from the collection mutex_lock(&message_collection_mtx); ptr_node *node = ptr_set_avl_find(&message_collection, &message); if(node != NULL) { // proceed bool truncated = MESSAGE_TC(mesg->buffer); dns_simple_message_s *simple_message = (dns_simple_message_s*)node->key; dns_udp_simple_message_lock(simple_message); ptr_set_avl_delete(&message_collection, simple_message); --message_collection_keys; // the message is not in the timeout collection anymore // it should contain an answer, or an error, ... or a message with the TC bit on if(!truncated) { simple_message->status &= ~DNS_SIMPLE_MESSAGE_STATUS_COLLECTED; simple_message->status |= DNS_SIMPLE_MESSAGE_STATUS_RECEIVED; } dns_udp_simple_message_unlock(simple_message); mutex_unlock(&message_collection_mtx); // RC is supposed to be 1 #ifdef DEBUG if(simple_message->rc.value != 1) { log_warn("receive: message RC is not 1 (%i)", simple_message->rc.value); } #endif simple_message->received_time_us = timeus(); s64 dt = MAX(simple_message->received_time_us - simple_message->sent_time_us, 0); double dts = dt; dts/=1000000.0; #if HAS_TC_FALLBACK_TO_TCP_SUPPORT if(!truncated) { #endif simple_message->answer = mesg; log_notice("receive: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x) [%6.3fs]", message.fqdn, &message.qtype, &message.qclass, message.name_server, simple_message->status, dts); dns_udp_simple_message_answer_call_handlers(simple_message); // allocate the next buffer, handle the hard_limit of the pool: // when the pool has reached peak capacity, allocation returns NULL mesg = dns_udp_allocate_message_data(worker); #if HAS_TC_FALLBACK_TO_TCP_SUPPORT } else { // the message has been truncated // it should be queried again using TCP log_notice("receive: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x) [%6.3fs]: truncated", message.fqdn, &message.qtype, &message.qclass, message.name_server, simple_message->status, dts); dns_udp_tcp_query(simple_message, worker); } #endif } else { mutex_unlock(&message_collection_mtx); // unknown log_warn("receive: unexpected message %{dnsname} %{dnstype} %{dnsclass}", message.fqdn, &message.qtype, &message.qclass); } } else { log_err("receive: an error occurred while copying the name '%{dnsname}': %r", mesg->qname, len); } } else { if(service_shouldrun(worker)) { log_err("receive: cannot handle answer: %r", return_code); } } } else { int err = errno; if(err == EINTR) { #ifdef DEBUG log_debug7("receive: recvfrom EINTR"); #endif continue; } if(err == EAGAIN) { #ifdef DEBUG log_debug7("receive: recvfrom EAGAIN"); #endif continue; } log_err("receive: recvfrom error: %r", MAKE_ERRNO_ERROR(err)); } } if(mesg != NULL) { memset(mesg, 0xd6, sizeof(message_data)); pool_release(&message_data_pool, mesg); } service_set_stopping(worker); log_debug("receive: service stopped (%u/%u)", worker->worker_index + 1, worker->service->worker_count); return 0; } static void dns_udp_timeout_service_cull(ptr_vector *todeletep) { int messages_count = 0; int failed_tries = 0; mutex_lock(&message_collection_mtx); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&message_collection, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); dns_simple_message_s *simple_message = (dns_simple_message_s *)node->key; messages_count++; if(dns_udp_simple_message_trylock(simple_message)) { u64 now = timeus(); if(simple_message->sent_time_us != MAX_S64) { #ifdef DEBUG if(now < simple_message->sent_time_us) { log_debug("message was sent %llu in the future! (sent at %llu, now is %llu, really %llu)", simple_message->sent_time_us - now, simple_message->sent_time_us, now, timeus()); } #endif if(now - simple_message->sent_time_us > dns_udp_settings->timeout) // older than 3s ? => remove { // timed out // retain because the reference is now in two collection dns_udp_simple_message_retain(simple_message); simple_message->status |= DNS_SIMPLE_MESSAGE_STATUS_TIMEDOUT; ptr_vector_append(todeletep, simple_message); } } // else this message has not been sent yet dns_udp_simple_message_unlock(simple_message); } else { failed_tries++; } } if(failed_tries > 0) { log_warn("timeout: failed to lock %i messages (on a total of %i)", failed_tries, messages_count); } for(int i = 0; i <= ptr_vector_last_index(todeletep); i++) { dns_simple_message_s *simple_message = (dns_simple_message_s *)ptr_vector_get(todeletep, i); ptr_set_avl_delete(&message_collection, simple_message); // release because it has been removed from one collection --message_collection_keys; dns_udp_simple_message_release(simple_message); simple_message->status &= ~DNS_SIMPLE_MESSAGE_STATUS_COLLECTED; } mutex_unlock(&message_collection_mtx); } static int dns_udp_timeout_service(struct service_worker_s *worker) { log_debug("dns_udp_timeout_service started"); ptr_vector todelete = EMPTY_PTR_VECTOR; while(service_shouldrun(worker)) { sleep(1); if(!service_shouldrun(worker)) { break; } ptr_vector_empties(&todelete); dns_udp_timeout_service_cull(&todelete); u64 now = timeus(); for(int i = 0; i <= ptr_vector_last_index(&todelete); i++) { dns_simple_message_s *simple_message = (dns_simple_message_s *)ptr_vector_get(&todelete, i); log_debug("timeout: [r=%i] %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x) (sent at %llu, now is %llu)", simple_message->retries_left, simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status, simple_message->sent_time_us, now); if(simple_message->retries_left > 0) { simple_message->retries_left--; async_message_s* async = simple_message->async_node.async; log_debug5("timeout: re-queueing message with id=%i", async->id); /** * @note Here was the issue. The messages are queued so it can take a long time until they are retried. */ async->id = DNS_UDP_SIMPLE_QUERY; async->start_time = timeus(); struct service_worker_s *owning_worker = service_get_worker(&dns_udp_send_handler, simple_message->worker_index); assert(owning_worker != NULL); mutex_lock(&owning_worker->lock); list_dl_enqueue(&dns_udp_high_priority[simple_message->worker_index], async); mutex_unlock(&owning_worker->lock); } else { simple_message->received_time_us = MAX_U64; yassert(now >= simple_message->sent_time_us); double dts = now - simple_message->sent_time_us; dts /= 1000000.0; log_notice("receive: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x) timed-out [%6.3fs]", simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status, dts); dns_simple_message_async_node_s *node = simple_message->async_node.next; while(node != NULL) { // the handler MUST release one reference dns_udp_simple_message_retain(simple_message); node->async->error_code = DNS_UDP_TIMEOUT; node->async->handler(node->async); node = node->next; } // there is no need to retain, the reference from the collection has not been decreased yet simple_message->async_node.async->error_code = DNS_UDP_TIMEOUT; simple_message->async_node.async->handler(simple_message->async_node.async); } } } service_set_stopping(worker); ptr_vector_destroy(&todelete); log_debug("dns_udp_timeout_service stopped"); return 0; } void dns_udp_cancel_all_queries() { int messages_count = 0; int failed_tries = 0; ptr_vector todelete = EMPTY_PTR_VECTOR; u64 now = timeus(); mutex_lock(&message_collection_mtx); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&message_collection, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); dns_simple_message_s *simple_message = (dns_simple_message_s *)node->key; messages_count++; if(dns_udp_simple_message_trylock(simple_message)) { now = timeus(); if(simple_message->sent_time_us != MAX_S64) { #ifdef DEBUG if(now < simple_message->sent_time_us) { log_debug("message was sent %llu in the future! (sent at %llu, now is %llu, really %llu)", simple_message->sent_time_us - now, simple_message->sent_time_us, now, timeus()); } #endif if(now - simple_message->sent_time_us > dns_udp_settings->timeout) // older than 3s ? => remove { // timed out // retain because the reference is now in two collection dns_udp_simple_message_retain(simple_message); simple_message->status |= DNS_SIMPLE_MESSAGE_STATUS_TIMEDOUT|DNS_SIMPLE_MESSAGE_STATUS_INVALID; ptr_vector_append(&todelete, simple_message); } } #ifdef DEBUG else { if(now - simple_message->sent_time_us > dns_udp_settings->timeout) { log_warn("timeout: message would have wrongly been timed-out"); } } #endif dns_udp_simple_message_unlock(simple_message); } else { failed_tries++; } } if(failed_tries > 0) { log_warn("timeout: failed to lock %i messages (on a total of %i)", failed_tries, messages_count); } for(int i = 0; i <= ptr_vector_last_index(&todelete); i++) { dns_simple_message_s *simple_message = (dns_simple_message_s *)ptr_vector_get(&todelete, i); ptr_set_avl_delete(&message_collection, simple_message); --message_collection_keys; // release because it has been removed from one collection dns_udp_simple_message_release(simple_message); simple_message->status &= ~DNS_SIMPLE_MESSAGE_STATUS_COLLECTED; } mutex_unlock(&message_collection_mtx); for(int i = 0; i <= ptr_vector_last_index(&todelete); i++) { dns_simple_message_s *simple_message = (dns_simple_message_s *)ptr_vector_get(&todelete, i); log_debug("cancel: [r=%i] %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x) (sent at %llu, now is %llu)", simple_message->retries_left, simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status, simple_message->sent_time_us, now); simple_message->received_time_us = MAX_U64; yassert(now >= simple_message->sent_time_us); double dts = now - simple_message->sent_time_us; dts /= 1000000.0; log_notice("cancel: %{dnsname} %{dnstype} %{dnsclass} to %{hostaddr} (%x) cancelled [%6.3fs]", simple_message->fqdn, &simple_message->qtype, &simple_message->qclass, simple_message->name_server, simple_message->status, dts); dns_simple_message_async_node_s *node = simple_message->async_node.next; while(node != NULL) { // the handler MUST release one reference dns_udp_simple_message_retain(simple_message); node->async->error_code = DNS_UDP_CANCEL; node->async->handler(node->async); node = node->next; } // there is no need to retain, the reference from the collection has not been decreased yet simple_message->async_node.async->error_code = DNS_UDP_CANCEL; simple_message->async_node.async->handler(simple_message->async_node.async); } } u32 dns_udp_send_queue_size() { u32 ret = async_queue_size(&dns_udp_send_handler_queue); return ret; } u32 dns_udp_pending_queries_count() { return message_collection_keys; } u32 dns_udp_pending_feedback_count() { return message_collection_keys + message_collection_size; } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/empty-input-stream.c0000644000077100007710000000012412650131756023264 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.702344 30 ctime=1454597651.438344534 yadifa-2.1.6-5826/lib/dnscore/src/empty-input-stream.c0000664000077100007710000000734012650131756023075 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include "dnscore/empty-input-stream.h" #define EIS_CLOSED 2 #define EIS_READONCE 1 #define EIS_CANREADMASK (EIS_CLOSED|EIS_READONCE) #define EIS_CANREAD 0 struct empty_input_stream_data { union { void* _voidp; u32 flags; } data; const input_stream_vtbl *vtbl; }; typedef struct empty_input_stream_data empty_input_stream_data; static ya_result empty_input_stream_read(input_stream* stream_, u8* buffer, u32 len) { empty_input_stream_data *eis = (empty_input_stream_data*)stream_->data; if((eis->data.flags & EIS_CANREADMASK) == EIS_CANREAD) // closed read-once { if(len > 0) { eis->data.flags |= EIS_READONCE; // read-once } return 0; } else { return -1; } } static void empty_input_stream_close(input_stream* stream_) { empty_input_stream_data* eis = (empty_input_stream_data*)stream_->data; eis->data.flags |= EIS_CLOSED; } static ya_result empty_input_stream_skip(input_stream* stream_, u32 len) { empty_input_stream_data* eis = (empty_input_stream_data*)stream_->data; if((eis->data.flags & EIS_CANREADMASK) == EIS_CANREAD) // closed read-once { if(len > 0) { eis->data.flags |= EIS_READONCE; // read-once } return 0; } else { return -1; } } static const input_stream_vtbl empty_input_stream_vtbl ={ empty_input_stream_read, empty_input_stream_skip, empty_input_stream_close, "empty_input_stream" }; void empty_input_stream_init(input_stream *stream) { stream->data = NULL; stream->vtbl = &empty_input_stream_vtbl; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/logger-output-stream.c0000644000077100007710000000012412650131756023606 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.761344 30 ctime=1454597651.502344534 yadifa-2.1.6-5826/lib/dnscore/src/logger-output-stream.c0000664000077100007710000001466312650131756023425 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/logger_handle.h" #include "dnscore/zalloc.h" /* * This structure is supposed to match the output_stream one * It helps using the void* data as an int without a INT_AT(x) kind of macro */ typedef struct logger_output_stream_data logger_output_stream_data; struct logger_output_stream_data { logger_handle *handle; char *line; u32 line_offset; u32 line_size; u32 level; }; typedef struct logger_output_stream logger_output_stream; struct logger_output_stream { logger_output_stream_data *data; const output_stream_vtbl *vtbl; }; static ya_result logger_output_stream_write(output_stream* stream_, const u8* buffer, u32 len_) { logger_output_stream* stream = (logger_output_stream*)stream_; u32 len = len_; for(;;) { const u8 *eol = (const u8*)memchr(buffer, '\n', len); if(eol == NULL) { break; } u32 line_len = eol - buffer; // merge with the buffer if it exists if(stream->data->line_offset == 0) { logger_handle_msg_text(stream->data->handle, stream->data->level, (const char*)buffer, line_len); ++line_len; buffer += line_len; len -= line_len; } else { // merge with the buffer int remaining = stream->data->line_size - stream->data->line_offset; if(remaining >= line_len) { memcpy(&stream->data->line[stream->data->line_offset], buffer, line_len); stream->data->line_offset += line_len; logger_handle_msg_text(stream->data->handle, stream->data->level, stream->data->line, stream->data->line_offset); } else { memcpy(&stream->data->line[stream->data->line_offset], buffer, remaining); stream->data->line_offset += remaining; logger_handle_msg_text(stream->data->handle, stream->data->level, stream->data->line, stream->data->line_offset); line_len -= remaining; logger_handle_msg_text(stream->data->handle, stream->data->level, (const char*)buffer, line_len); } ++line_len; buffer += line_len; len -= line_len; stream->data->line_offset = 0; } } // no EOL, try to flush what remains while(len > 0) { int remaining = stream->data->line_size - stream->data->line_offset; if(remaining >= len) { memcpy(&stream->data->line[stream->data->line_offset], buffer, len); stream->data->line_offset += len; break; } else { memcpy(&stream->data->line[stream->data->line_offset], buffer, remaining); logger_handle_msg_text(stream->data->handle, stream->data->level, stream->data->line, stream->data->line_size); stream->data->line_offset = 0; len -= remaining; } } return len_; } static ya_result logger_output_stream_flush(output_stream* stream_) { (void)stream_; //logger_flush(); return SUCCESS; } static void logger_output_stream_close(output_stream* stream_) { logger_output_stream* stream = (logger_output_stream*)stream_; free(stream->data->line); ZFREE(stream->data, logger_output_stream_data); output_stream_set_void(stream_); } static const output_stream_vtbl logger_output_stream_vtbl = { logger_output_stream_write, logger_output_stream_flush, logger_output_stream_close, "logger_output_stream", }; ya_result logger_output_stream_open(output_stream* stream, logger_handle *handle, u16 level, u32 max_line_len) { if(stream == NULL || handle == NULL || level == 0 || max_line_len < 64 || max_line_len > 65536) { return INVALID_ARGUMENT_ERROR; } logger_output_stream_data *data; ZALLOC_OR_DIE(logger_output_stream_data*, data, logger_output_stream_data, GENERIC_TAG); data->handle = handle; data->level = level; MALLOC_OR_DIE(char*, data->line, max_line_len, GENERIC_TAG); data->line_offset = 0; data->line_size = max_line_len; stream->data = data; stream->vtbl = &logger_output_stream_vtbl; return SUCCESS; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/service.c0000644000077100007710000000012412650131756021140 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.717344 30 ctime=1454597651.585344534 yadifa-2.1.6-5826/lib/dnscore/src/service.c0000664000077100007710000004334112650131756020752 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include "dnscore/dnscore-config.h" #if HAS_PTHREAD_SETNAME_NP #ifdef DEBUG #define _GNU_SOURCE 1 #endif #endif #include #include #include #include "dnscore/ptr_set.h" #include "dnscore/logger.h" #include "dnscore/thread_pool.h" #include "dnscore/service.h" extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger static int service_ptr_set_compare(const void *node_a, const void *node_b) { struct service_s *a = (struct service_s *)node_a; struct service_s *b = (struct service_s *)node_b; return strcmp(a->name, b->name); } static ptr_set service_set = {NULL, service_ptr_set_compare}; static mutex_t service_set_mutex = MUTEX_INITIALIZER; static void* service_thread(void *args) { struct service_worker_s *worker = (struct service_worker_s *)args; if(worker == NULL) { log_err("service: with NULL entry point"); pthread_exit(NULL); return NULL; } sigset_t set; sigemptyset(&set); sigaddset(&set, SIGQUIT); sigaddset(&set, SIGTERM); sigaddset(&set, SIGINT); sigaddset(&set, SIGSTOP); sigaddset(&set, SIGCONT); pthread_sigmask(SIG_BLOCK, &set, NULL); struct service_s *desc = (struct service_s *)worker->service; thread_pool_setup_random_ctx(); if(worker->service->worker_count == 1) { log_debug("service: %s starting", desc->name); #ifdef HAS_PTHREAD_SETNAME_NP #ifdef DEBUG pthread_setname_np(pthread_self(), desc->name); #endif #endif } else { log_debug("service: %s starting (%i/%i)", desc->name, worker->worker_index + 1, worker->service->worker_count); #ifdef HAS_PTHREAD_SETNAME_NP #ifdef DEBUG // 16 is the size limit for this, cfr man page if(strlen(desc->name) >= 16) { pthread_setname_np(pthread_self(), desc->name); } else { char tmp_name[16]; snformat(tmp_name, sizeof(tmp_name), "%s:%d", desc->name, worker->worker_index + 1); pthread_setname_np(pthread_self(), tmp_name); } #endif #endif } if(desc->entry_point != NULL) { worker->return_code = desc->entry_point(worker); log_debug("service: %s terminated with: %r", desc->name, worker->return_code); mutex_lock(&worker->lock); worker->flags = SERVICE_OFF; mutex_unlock(&worker->lock); } else { worker->return_code = SERVICE_WITHOUT_ENTRY_POINT; log_debug("service: NULL entry point", worker->return_code); } thread_pool_destroy_random_ctx(); pthread_exit(NULL); return NULL; } int service_init_ex(struct service_s *desc, service_main *entry_point, const char* name, u32 count) { if(count == 0) { return INVALID_ARGUMENT_ERROR; } ZEROMEMORY(desc, sizeof(struct service_s)); desc->name = (char*)name; mutex_lock(&service_set_mutex); ptr_node *node = ptr_set_avl_find(&service_set, desc); mutex_unlock(&service_set_mutex); if(node == NULL) { log_debug("service: %s init %i workers", name, count); desc->entry_point = entry_point; desc->name = strdup(name); MALLOC_OR_DIE(struct service_worker_s*, desc->worker, sizeof(struct service_worker_s) * count, GENERIC_TAG); // DON'T POOL desc->worker_count = count; for(u32 i = 0; i < count; i++) { mutex_init(&desc->worker[i].lock); desc->worker[i].service = desc; desc->worker[i].tid = 0; desc->worker[i].worker_index = i; desc->worker[i].return_code = 0; desc->worker[i].flags = 0; } mutex_lock(&service_set_mutex); ptr_set_avl_insert(&service_set, desc); mutex_unlock(&service_set_mutex); return SUCCESS; } else { log_debug("service: %s already initialized", name); desc->name = NULL; return SERVICE_ALREADY_INITIALISED; } } int service_init(struct service_s *desc, service_main *entry_point, const char* name) { return service_init_ex(desc, entry_point, name, 1); } int service_finalize(struct service_s *desc) { log_debug("service: %s finalize", STRNULL(desc->name)); if(desc->name == NULL) { return INVALID_STATE_ERROR; } service_stop(desc); service_wait(desc); mutex_lock(&service_set_mutex); ptr_set_avl_delete(&service_set, desc); mutex_unlock(&service_set_mutex); for(u32 i = 0; i < desc->worker_count; i++) { mutex_destroy(&desc->worker[i].lock); } ZEROMEMORY(desc->worker, sizeof(struct service_worker_s) * desc->worker_count); free(desc->worker); desc->worker = NULL; desc->worker_count = 0; desc->entry_point = NULL; free(desc->name); desc->name = NULL; return SUCCESS; } int service_start(struct service_s *desc) { log_debug("service: %s start", desc->name); u32 success = 0; u32 failure = 0; u32 now = time(NULL); desc->last_seen_alive = now; for(u32 i = 0; i < desc->worker_count; i++) { struct service_worker_s *worker = &desc->worker[i]; mutex_lock(&worker->lock); if(worker->flags == SERVICE_OFF) { worker->flags = SERVICE_START; mutex_unlock(&worker->lock); } else { worker->return_code = SERVICE_ALREADY_RUNNING; mutex_unlock(&worker->lock); log_warn("service_start: worker #%u already up and running", i); // service worker already up, ignore continue; } if(pthread_create(&worker->tid, NULL, service_thread, worker) == 0) { success++; } else { int err = ERRNO_ERROR; mutex_lock(&worker->lock); worker->last_seen_alive = now; worker->tid = 0; worker->return_code = err; worker->flags = SERVICE_OFF; mutex_unlock(&worker->lock); log_err("service_start: failed with: %r", err); failure++; } } if(failure > 0) { log_err("service_start: service workers did not initialise properly (%u failures over %u workers)", failure, desc->worker_count); if(success > 0) { log_err("service_start: but %u of the workers have been properly initialised", success); } return INVALID_STATE_ERROR; } return success; } int service_stop(struct service_s *desc) { log_debug("service: %s stop", desc->name); int err = SERVICE_NOT_RUNNING; for(u32 i = 0; i < desc->worker_count; i++) { struct service_worker_s *worker = &desc->worker[i]; mutex_lock(&worker->lock); u8 f = worker->flags; if((f & (SERVICE_START|SERVICE_STOP)) == SERVICE_START) { worker->flags |= SERVICE_STOP; err = SUCCESS; } mutex_unlock(&worker->lock); if((f != 0) && (worker->tid != 0)) { pthread_kill(worker->tid, SIGUSR1); } } return err; } int service_wait(struct service_s *desc) { log_debug("service: %s wait", desc->name); for(;;) { u32 running = desc->worker_count; for(u32 i = 0; i < desc->worker_count; i++) { struct service_worker_s *worker = &desc->worker[i]; mutex_lock(&worker->lock); u8 f = worker->flags; mutex_unlock(&worker->lock); if(f == SERVICE_OFF) { running--; } else { if(pthread_kill(worker->tid, 0) != 0) { log_err("service: %s thread %p died on us", desc->name, worker->tid); running--; mutex_lock(&worker->lock); worker->flags = SERVICE_OFF; mutex_unlock(&worker->lock); } else { pthread_kill(worker->tid, SIGINT); } } } if(running == 0) { break; } usleep(10000); log_debug("service: %s wait ... (%u/%u running)", desc->name, running, desc->worker_count); } for(u32 i = 0; i < desc->worker_count; i++) { struct service_worker_s *worker = &desc->worker[i]; if(worker->tid == 0) { continue; } log_debug("service: %s join ... (%u/%u)", desc->name, i, desc->worker_count); int err = pthread_join(worker->tid, NULL); switch(err) { case 0: { // success break; } case EINVAL: { log_err("service: %s thread %p is not joinable", desc->name, worker->tid); break; } case ESRCH: { log_debug("service: %s thread %p does not exist", desc->name, worker->tid); break; } case EDEADLK: { log_err("service: %s thread %p is deadlocked", desc->name, worker->tid); break; } default: { log_warn("service: %s thread %p joining returned an unexpected error code %i", desc->name, worker->tid, err); } } worker->flags = 0; worker->tid = 0; } log_debug("service: %s all %u workers are stopped", desc->name, desc->worker_count); return 0; } bool service_servicing(struct service_s *desc) { for(u32 i = 0; i < desc->worker_count; i++) { struct service_worker_s *worker = &desc->worker[i]; mutex_lock(&worker->lock); u8 f = worker->flags; mutex_unlock(&worker->lock); if((f & (SERVICE_START|SERVICE_STOP|SERVICE_SERVICING|SERVICE_STOPPING)) != (SERVICE_START|SERVICE_SERVICING)) { return FALSE; } } return TRUE; } int service_set_servicing(struct service_worker_s *worker) { int err = SERVICE_NOT_RUNNING; log_debug("service: %s running", worker->service->name); mutex_lock(&worker->lock); if((worker->flags & (SERVICE_START|SERVICE_STOP)) == SERVICE_START) { worker->flags |= SERVICE_SERVICING; err = SUCCESS; } mutex_unlock(&worker->lock); return err; } bool service_stopped(struct service_s *desc) { for(u32 i = 0; i < desc->worker_count; i++) { struct service_worker_s *worker = &desc->worker[i]; mutex_lock(&worker->lock); u8 f = worker->flags; mutex_unlock(&worker->lock); if(f != SERVICE_OFF) { return FALSE; } } return TRUE; } int service_set_stopping(struct service_worker_s *worker) { int err = SERVICE_NOT_RUNNING; log_debug("service: %s stopping", worker->service->name); mutex_lock(&worker->lock); if((worker->flags & SERVICE_STOP) != 0) { worker->flags |= SERVICE_STOPPING; worker->flags &= ~SERVICE_SERVICING; err = SUCCESS; } mutex_unlock(&worker->lock); return err; } ya_result service_wait_servicing(struct service_s *desc) { while(service_started(desc)) { if(service_servicing(desc)) { return SUCCESS; } else { sleep(1); } } return SERVICE_NOT_RUNNING; } int service_shouldrun(struct service_worker_s *worker) { mutex_lock(&worker->lock); u8 f = worker->flags; mutex_unlock(&worker->lock); time_t now = time(NULL); worker->last_seen_alive = now; worker->service->last_seen_alive = now; return (f & (SERVICE_START | SERVICE_STOP)) == SERVICE_START; } int service_check_all_alive() { time_t now = time(NULL); mutex_lock(&service_set_mutex); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&service_set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); struct service_s *desc = (struct service_s *)node->key; if(desc->last_seen_alive > 0) { s32 adt = now - desc->last_seen_alive; if(adt > 5) { log_warn("service '%s' has not been seen alive for %u seconds", desc->name, adt); for(u32 i = 0; i < desc->worker_count; i++) { adt = now - desc->worker[i].last_seen_alive; if(adt > 5) { log_warn("service '%s' worker #%u has not been seen alive for %u seconds", desc->name, i, adt); } } } } else { // not started yet // ignore it } } mutex_unlock(&service_set_mutex); return SUCCESS; } struct service_worker_s* service_worker_get_sibling(const struct service_worker_s* worker, u32 idx) { if(worker != NULL) { if(worker->service != NULL) { if(worker->service->worker_count > idx) { return &worker->service->worker[idx]; } } } return NULL; } struct service_worker_s* service_get_worker(const struct service_s *service, u32 idx) { if(service != NULL) { if(service->worker_count > idx) { return &service->worker[idx]; } } return NULL; } void service_signal_worker(const struct service_s *service, u32 idx, int signo) { if(service != NULL) { if(service->worker_count > idx) { struct service_worker_s* worker = &service->worker[idx]; if(worker->tid != 0) { pthread_kill(worker->tid, signo); } } } } void service_signal_all_workers(const struct service_s *service, int signo) { if(service != NULL) { for(u32 i = 0; i < service->worker_count; i++) { struct service_worker_s *worker = &service->worker[i]; if(worker->tid == 0) { continue; } pthread_kill(worker->tid, signo); } } } void service_stop_all() { mutex_lock(&service_set_mutex); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&service_set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); struct service_s *desc = (struct service_s *)node->key; log_debug("service_stop_all: stop '%s'", STRNULL(desc->name)); service_stop(desc); } ptr_set_avl_iterator_init(&service_set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); struct service_s *desc = (struct service_s *)node->key; log_debug("service_stop_all: wait '%s'", STRNULL(desc->name)); service_wait(desc); } mutex_unlock(&service_set_mutex); } void service_start_all() { mutex_lock(&service_set_mutex); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&service_set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); struct service_s *desc = (struct service_s *)node->key; log_debug("service_start_all: start '%s'", STRNULL(desc->name)); service_start(desc); } mutex_unlock(&service_set_mutex); } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/typebitmap.c0000644000077100007710000000012412650131756021656 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.691344 30 ctime=1454597651.641344534 yadifa-2.1.6-5826/lib/dnscore/src/typebitmap.c0000664000077100007710000001354112650131756021467 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ //#include "dnscore/dnscore-config.h" #include "dnscore/dnscore-config.h" #include "dnscore/rfc.h" #include "dnscore/typebitmap.h" /* * Call this with the context->type_bitmap_field set */ void type_bit_maps_write(u8* output, type_bit_maps_context* context) { /* No types at all ? Should NOT have been called */ yassert(context->type_bit_maps_size > 2); u8* type_bitmap_field = context->type_bitmap_field; u8* window_size = context->window_size; for(s32 i = 0; i <= context->last_type_window; i++) { u8 bytes = window_size[i]; if(bytes == 0) { continue; } *output++ = i; *output++ = bytes; u32 wo = i << 5; /* 256 bits = 32 bytes = 2^5 */ u32 wo_limit = wo + bytes; for(; wo < wo_limit; wo++) { *output++ = type_bitmap_field[wo]; } } } s32 type_bit_maps_expand(type_bit_maps_context* context, u8* type_bitmap, u32 size) { const u8 * const limit = type_bitmap + size; s32 last_type = -1; while(type_bitmap < limit) { u8 wn = *type_bitmap++; last_type = wn; u8 ws = *type_bitmap++; if(ws == 0) /* Blocks with no types present MUST NOT be included */ { continue; } u8* wp = &context->type_bitmap_field[wn << 8]; context->window_size[wn] = MAX(context->window_size[wn], ws); while(ws-- > 0) { *wp++ = *type_bitmap++; } } return last_type; } bool type_bit_maps_merge(type_bit_maps_context* context, u8* type_bitmap_a, u32 a_size, u8* type_bitmap_b, u32 b_size) { if(a_size == b_size) { if(memcmp(type_bitmap_a, type_bitmap_b, a_size) == 0) { return FALSE; /* Nothing to do. Both bitmaps are equals */ } } u8* type_bitmap_field = context->type_bitmap_field; u8* window_size = context->window_size; ZEROMEMORY(window_size, sizeof (context->window_size)); ZEROMEMORY(type_bitmap_field, sizeof (context->type_bitmap_field)); s32 last_type_a = type_bit_maps_expand(context, type_bitmap_a, a_size); s32 last_type_b = type_bit_maps_expand(context, type_bitmap_b, b_size); u32 type_bit_maps_size = 0; s32 last_type_window = MAX(last_type_a, last_type_b); for(s32 i = 0; i <= last_type_window; i++) { u8 ws = window_size[i]; if(ws > 0) { type_bit_maps_size += 1 + 1 + ws; } } return TRUE; } void type_bit_maps_output_stream_write(output_stream* os, type_bit_maps_context* context) { /* No types at all */ if(context->type_bit_maps_size == 0) { return; } u8* type_bitmap_field = context->type_bitmap_field; u8* window_size = context->window_size; for(s32 i = 0; i <= context->last_type_window; i++) { u8 bytes = window_size[i]; if(bytes > 0) { output_stream_write_u8(os, i); output_stream_write_u8(os, bytes); output_stream_write(os, &type_bitmap_field[i << 5], bytes); } } } bool type_bit_maps_gettypestatus(u8* packed_type_bitmap, u32 size, u16 type) { u8 window_index = (type >> 8); /* Skip to the right window */ while(size > 2) { u8 current_index = *packed_type_bitmap++; u8 current_size = *packed_type_bitmap++; if(current_index >= window_index) { if(current_index == window_index) { u32 byte_offset = (type >> 3); if(byte_offset < current_size) { return (packed_type_bitmap[byte_offset] & (0x80 >> (type & 7))) != 0; } } break; } size -= 2; size -= current_size; packed_type_bitmap += current_size; } return FALSE; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/sys_get_cpu_count.c0000644000077100007710000000012412650131756023234 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.709344 30 ctime=1454597651.600344534 yadifa-2.1.6-5826/lib/dnscore/src/sys_get_cpu_count.c0000664000077100007710000000527412650131756023051 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup cpu CPU * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include #include "dnscore/sys_types.h" /* * */ static int cpu_count_override = 0; void sys_set_cpu_count(int override) { if(override < 0) { override = 0; } cpu_count_override = override; } ya_result sys_get_cpu_count() { if(cpu_count_override == 0) { int cc = sysconf(_SC_NPROCESSORS_ONLN); if( cc <= 0 ) { /* * This fix has been made for FreeBSD that returns -1 for the above call */ cc = 1; } return cc; } return cpu_count_override; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/basic-priority-queue.c0000644000077100007710000000012412650131756023562 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.731344 30 ctime=1454597651.319344534 yadifa-2.1.6-5826/lib/dnscore/src/basic-priority-queue.c0000664000077100007710000001132412650131756023370 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief A node-based single linked list * * A node-based single linked list * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnscore/dnscore-config.h" #include "dnscore/basic-priority-queue.h" #define LISTDATA_TAG 0x415441445453494c /*------------------------------------------------------------------------------ * FUNCTIONS */ /** * Initialises a list. * * @param list */ void bpqueue_init(bpqueue_s *list) { list->first = NULL; list->last = NULL; list->size = 0; } /** * Adds an item at the head of the list. * * @param list * @param data */ void bpqueue_enqueue(bpqueue_s *list, void *data, u32 priority) { bpqueue_node_s *node; MALLOC_OR_DIE(bpqueue_node_s*, node, sizeof(bpqueue_node_s), GENERIC_TAG); node->data = data; node->priority = priority; if(list->size > 0) { if(list->last->priority <= priority) { // append node->next = NULL; list->last->next = node; list->last = node; } else if(list->first->priority > priority) { node->next = list->first; list->first = node; } else { // seek and insert // there are at least two items in the list // the item WILL be added before the last one bpqueue_node_s *prev = list->first; while(prev->next->priority <= priority) { prev = prev->next; } node->next = prev->next; prev->next = node; } list->size++; } else { node->next = NULL; list->first = node; list->last = node; list->size = 1; } } /** * Remove the first item from the list. * Deletes the node but not the data. * The data is returned. * * @param list * @return the data or NULL if the list is empty */ void* bpqueue_dequeue(bpqueue_s *list) { if(list->size > 0) { bpqueue_node_s *node = list->first; void *data = node->data; list->first = node->next; list->size--; if(list->size == 0) { list->last = NULL; } free(node); return data; } else { return NULL; } } /** * Remove all items from the list. * Deletes the nodes but not the data. * * @param list */ void bpqueue_clear(bpqueue_s *list) { bpqueue_node_s *node = list->first; while(node->next != NULL) { bpqueue_node_s *tmp = node; node = node->next; free(tmp); } list->first = NULL; list->last = NULL; list->size = 0; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/pid.c0000644000077100007710000000012412650131756020254 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.768344 30 ctime=1454597651.551344534 yadifa-2.1.6-5826/lib/dnscore/src/pid.c0000664000077100007710000001675512650131756020077 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include "dnscore/sys_types.h" #include "dnscore/logger.h" #include "dnscore/parser.h" #include "dnscore/fdtools.h" #include #include #include #include #include /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger /*------------------------------------------------------------------------------ * STATIC PROTOTYPES */ /*------------------------------------------------------------------------------ * FUNCTIONS */ /** \brief Create or overwrite the \b pid \b file with its new process id * * @param[in] config is a config_data structure * * @retval OK * @retval YDF_ERROR_CHOWN if can not "chown" * @return otherwise log_quit will stop the program with correct exit code */ ya_result pid_file_create(pid_t *pid, const char *pid_file_path, uid_t new_uid, gid_t new_gid) { int fd; mode_t permissions = 0644; char buffer[16]; uid_t uid = getuid(); /* ------------------------------------------------------------ */ if(strlen(pid_file_path) > PATH_MAX) { log_err("path %s is too big", pid_file_path); exit(EXIT_FAILURE); } *pid = getpid(); int buffer_len = snprintf(buffer, sizeof (buffer), "%d\n", *pid); yassert(buffer_len > 0); if(FAIL(fd = open_create_ex(pid_file_path, O_WRONLY | O_CREAT | O_TRUNC, permissions))) { return ERRNO_ERROR; } if(writefully(fd, buffer, buffer_len) > 0) { if (uid == 0) // only applicable if you are root { if(chown(pid_file_path, new_uid, new_gid) >= 0) { close_ex(fd); log_debug("created pid file: '%s'", pid_file_path); return SUCCESS; } else { log_err("can't chown '%s' to %s.%s", pid_file_path, new_uid, new_gid); } } else { return SUCCESS; } } else { log_err("can't write pid to '%s'", pid_file_path); } close_ex(fd); return ERRNO_ERROR; } /** \brief Read \b pid \b file, program quits on log_quit * * @param[in] path * @param[in] file_name * * @retval pid * @retval NOK (negative number), * @return otherwise log_quit will stop the program with correct exit code */ pid_t pid_file_read(const char *pid_file_path) { ssize_t received; int fd; char *p; u32 pid; char buffer[8 + 1]; /* ------------------------------------------------------------ */ if(strlen(pid_file_path) > PATH_MAX) { log_err("path %s is too big", pid_file_path); exit(EXIT_FAILURE); } if(0 > (fd = open_ex(pid_file_path, O_RDONLY))) { if(errno != ENOENT) { log_err("can't open '%s': %r", pid_file_path, ERRNO_ERROR); exit(EXIT_FAILURE); } return NOK; /* no file found : not running assumed */ } if(0 > (received = readfully(fd, buffer, sizeof(buffer) - 1))) { log_err("can't open '%s'", pid_file_path); exit(EXIT_FAILURE); } close_ex(fd); /* close the pid file */ if(!received) /* received == 0 => error */ { return NOK; } buffer[received] = '\0'; /* Append a terminator for strlen */ p = buffer; while(isdigit(*p)!=0) p++; /* Cut after the first character that is not a digit (ie: CR LF ...) */ *p = '\0'; if(FAIL(parse_u32_check_range(buffer, &pid, 0, 99999, 10))) { log_err("incorrect pid number"); exit(EXIT_FAILURE); } return (pid_t)pid; } /** \brief Check if program is already running * * @param[in] config is a config_data structure * * @return NONE * @return otherwise log_quit will stop the program with correct exit code */ ya_result pid_check_running_program(const char *program_name, const char *pid_file_path) { pid_t pid; /* ------------------------------------------------------------ */ if(pid_file_path == NULL) { log_err("pid file path is wrong"); return INVALID_PATH; } if(ISOK(pid = pid_file_read(pid_file_path))) { if(kill(pid, 0) == 0 || errno == EPERM) { log_err("%s already running with pid: %lu (%s)", program_name, pid, pid_file_path); return PID_LOCKED; } } return SUCCESS; } void pid_file_destroy(const char *pid_file) { if(FAIL(unlink(pid_file))) { int err = errno; // don't complain if the file has already been destroyed if(err != ENOENT) { formatln("%s could not be removed (%s)", pid_file, strerror(err)); flushout(); } } } /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/bytearray_output_stream.c0000644000077100007710000000012412650131756024475 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.714344 30 ctime=1454597651.334344534 yadifa-2.1.6-5826/lib/dnscore/src/bytearray_output_stream.c0000664000077100007710000002054412650131756024307 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/bytearray_output_stream.h" #include "dnscore/zalloc.h" #define BYTE_ARRAY_OUTPUT_STREAM_TAG 0x534f4142 /* BAOS */ #define BYTE_ARRAY_OUTPUT_STREAM_DATA_TAG 0x41544144534f4142 /* BAOSDATA */ #define BYTE_ARRAY_OUTPUT_STREAM_BUFF_TAG 0x46465542534f4142 /* BAOSBUFF */ #define BYTEARRAY_STARTSIZE 1024 typedef struct bytearray_output_stream_data bytearray_output_stream_data; /** * @NOTE: if this changes, take care that bytearray_output_stream_context in the header file has at least the SAME SIZE */ struct bytearray_output_stream_data { u8* buffer; u32 buffer_size; u32 buffer_offset; u8 flags; }; static ya_result bytearray_output_stream_write(output_stream* stream, const u8* buffer, u32 len) { if(len == 0) { return 0; } bytearray_output_stream_data* data = (bytearray_output_stream_data*)stream->data; u32 remaining = data->buffer_size - data->buffer_offset; if(len > remaining) { /* Either we can resize, either we have to trunk */ if((data->flags & BYTEARRAY_DYNAMIC) != 0) { u8* newbuffer; u32 newsize = data->buffer_size; do { newsize = newsize * 2; } while(newsize < data->buffer_size + len); MALLOC_OR_DIE(u8*, newbuffer, newsize, BYTE_ARRAY_OUTPUT_STREAM_BUFF_TAG); MEMCOPY(newbuffer, data->buffer, data->buffer_offset); if((data->flags & BYTEARRAY_OWNED) != 0) { free(data->buffer); } data->buffer = newbuffer; data->buffer_size = newsize; data->flags |= BYTEARRAY_OWNED; } else { len = remaining; } } MEMCOPY(&data->buffer[data->buffer_offset], buffer, len); data->buffer_offset += len; return len; } static ya_result bytearray_output_stream_flush(output_stream* stream) { return SUCCESS; } static void bytearray_output_stream_close(output_stream* stream) { bytearray_output_stream_data* data = (bytearray_output_stream_data*)stream->data; if((data->flags & BYTEARRAY_OWNED) != 0) { #ifdef DEBUG memset(data->buffer, 0xe5, data->buffer_size); #endif free(data->buffer); } if((data->flags & BYTEARRAY_ZALLOC_CONTEXT) != 0) { ZFREE(data,bytearray_output_stream_data); } output_stream_set_void(stream); } static const output_stream_vtbl bytearray_output_stream_vtbl = { bytearray_output_stream_write, bytearray_output_stream_flush, bytearray_output_stream_close, "bytearray_output_stream", }; void bytearray_output_stream_init_ex_static(output_stream* out_stream, u8* array,u32 size, u8 flags, bytearray_output_stream_context *ctx) { bytearray_output_stream_data *data = (bytearray_output_stream_data*)ctx; if(array == NULL) { flags |= BYTEARRAY_OWNED; if(size == 0) { flags |= BYTEARRAY_DYNAMIC; size = BYTEARRAY_STARTSIZE; } MALLOC_OR_DIE(u8*, array, size, BYTE_ARRAY_OUTPUT_STREAM_BUFF_TAG); } data->buffer = array; data->buffer_size = size; data->buffer_offset = 0; data->flags = flags; out_stream->data = data; out_stream->vtbl = &bytearray_output_stream_vtbl; } void bytearray_output_stream_init_ex(output_stream* out_stream, u8* array, u32 size, u8 flags) { bytearray_output_stream_data* data; ZALLOC_OR_DIE(bytearray_output_stream_data*, data, bytearray_output_stream_data, BYTE_ARRAY_OUTPUT_STREAM_DATA_TAG); flags |= BYTEARRAY_ZALLOC_CONTEXT; bytearray_output_stream_init_ex_static(out_stream, array, size, flags, (bytearray_output_stream_context*)data); } void bytearray_output_stream_init(output_stream* out_stream, u8* array, u32 size) { bytearray_output_stream_init_ex(out_stream, array, size, 0); } void bytearray_output_stream_reset(output_stream* stream) { bytearray_output_stream_data* data = (bytearray_output_stream_data*)stream->data; data->buffer_offset = 0; } u32 bytearray_output_stream_size(output_stream* stream) { bytearray_output_stream_data* data = (bytearray_output_stream_data*)stream->data; return data->buffer_offset; } u8* bytearray_output_stream_buffer(output_stream* stream) { bytearray_output_stream_data* data = (bytearray_output_stream_data*)stream->data; return data->buffer; } u8* bytearray_output_stream_detach(output_stream* stream) { bytearray_output_stream_data* data = (bytearray_output_stream_data*)stream->data; data->flags &= ~BYTEARRAY_OWNED; return data->buffer; } void bytearray_output_stream_set(output_stream* stream, u8 *buffer, u32 buffer_size, bool owned) { bytearray_output_stream_data* data = (bytearray_output_stream_data*)stream->data; if((data->buffer != buffer) && ((data->flags & BYTEARRAY_OWNED) != 0)) { free(data->buffer); } data->buffer = buffer; data->buffer_offset = buffer_size; data->buffer_size = buffer_size; data->flags = (data->flags & BYTEARRAY_ZALLOC_CONTEXT) | ((owned)?BYTEARRAY_OWNED:0); } /** * @param out_stream * @param by * @return the actual rewind_count */ u32 bytearray_output_stream_rewind(output_stream* out_stream, u32 rewind_count) { bytearray_output_stream_data* data = (bytearray_output_stream_data*)out_stream->data; if(rewind_count < data->buffer_offset) { data->buffer_offset -= rewind_count; } else { rewind_count = data->buffer_offset; data->buffer_offset = 0; } return rewind_count; } u8* bytearray_output_stream_zdup(output_stream* out_stream) { bytearray_output_stream_data* data = (bytearray_output_stream_data*)out_stream->data; u8 *ret; u32 n = MAX(data->buffer_offset, 1); // because allocating 0 bytes can be an hassle ZALLOC_ARRAY_OR_DIE(u8*, ret, n, GENERIC_TAG); memcpy(ret, data->buffer, n); return ret; } u8* bytearray_output_stream_dup(output_stream* out_stream) { bytearray_output_stream_data* data = (bytearray_output_stream_data*)out_stream->data; u8 *ret; u32 n = MAX(data->buffer_offset, 1); // because allocating 0 bytes can be an hassle MALLOC_OR_DIE(u8*, ret, n, GENERIC_TAG); memcpy(ret, data->buffer, n); return ret; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/thread_pool.c0000644000077100007710000000012412650131756022000 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.757344 30 ctime=1454597651.607344534 yadifa-2.1.6-5826/lib/dnscore/src/thread_pool.c0000664000077100007710000007236512650131756021622 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include "dnscore/dnscore-config.h" #if HAS_PTHREAD_SETNAME_NP #ifdef DEBUG #define _GNU_SOURCE 1 #endif #endif #include #include #include #include "dnscore/threaded_queue.h" #include "dnscore/thread_pool.h" #include "dnscore/logger.h" #include "dnscore/format.h" #include "dnscore/u32_set.h" #include "dnscore/zalloc.h" #include "dnscore/mutex.h" /* 0 = nothing, 1 = warns and worse, 2 = info and worse, 3 = debug and worse */ #define VERBOSE_THREAD_LOG 3 /* Disable when in release mode */ #ifndef DEBUG #undef VERBOSE_THREAD_LOG #define VERBOSE_THREAD_LOG 0 #endif #define MODULE_MSG_HANDLE g_system_logger extern logger_handle *g_system_logger; #define THREADPOOL_TAG 0x4c4f4f5044524854 /* THRDPOOL */ #define THREADPOOL_QUEUE_SIZE_FACTOR 4096 /* 2 */ #define THREADPOOL_FLAG_PAUSED 1 typedef struct threaded_queue_task threaded_queue_task; struct threaded_queue_task { thread_pool_function* function; void* parm; thread_pool_task_counter *counter; const char* categoryname; /* so it's easy to know what thread is running*/ }; typedef struct thread_descriptor_s thread_descriptor_s; struct thread_descriptor_s { struct thread_pool_s *pool; pthread_t id; volatile u8 status; char info[255]; }; /* The array of thread descriptors*/ static pthread_key_t pthread_pool_random_key = ~0; static pthread_once_t pthread_pool_random_key_once = PTHREAD_ONCE_INIT; static mutex_t thread_pool_set_mutex = MUTEX_INITIALIZER; static u32_set thread_pool_set = U32_SET_EMPTY; static u32 thread_pool_id_next = 0; #ifdef DEBUG static smp_int thread_pool_waiting = SMP_INT_INITIALIZER; static smp_int thread_pool_running = SMP_INT_INITIALIZER; #endif struct thread_pool_s { mutex_t mtx; struct thread_descriptor_s **descriptors; threaded_queue queue; u8 thread_pool_size; u8 flags; char *pool_name; u32 id; }; typedef struct thread_pool_s thread_pool_s; void thread_pool_counter_init(thread_pool_task_counter *counter, s32 value) { mutex_init(&counter->mutex); counter->value = value; } void thread_pool_counter_destroy(thread_pool_task_counter *counter) { mutex_destroy(&counter->mutex); } s32 thread_pool_counter_get_value(thread_pool_task_counter *counter) { s32 ret; mutex_lock(&counter->mutex); ret = counter->value; mutex_unlock(&counter->mutex); return ret; } s32 thread_pool_counter_add_value(thread_pool_task_counter *counter, s32 value) { s32 ret; mutex_lock(&counter->mutex); counter->value += value; ret = counter->value; mutex_unlock(&counter->mutex); return ret; } static void pthread_pool_random_key_finalize(void *unused) { #if VERBOSE_THREAD_LOG > 2 log_debug("thread: random thread-local key finalize"); #endif } static void pthread_pool_random_key_init() { #if VERBOSE_THREAD_LOG > 2 log_debug("thread: random thread-local key init"); #endif if(pthread_key_create(&pthread_pool_random_key, pthread_pool_random_key_finalize) < 0) { log_quit("pthread_key_create = %r", ERRNO_ERROR); } } int thread_pool_queue_size(thread_pool_s *tp) { int size = threaded_queue_size(&tp->queue); return size; } static void* thread_pool_thread(void *args) { /* * Dequeue from the task queue * If what we got is NULL then it's time to stop * Else we run it */ thread_descriptor_s* desc = (thread_descriptor_s*)args; threaded_queue *queue = &desc->pool->queue; #if VERBOSE_THREAD_LOG > 1 pthread_t id = desc->id; #endif #if VERBOSE_THREAD_LOG > 2 log_debug("thread: %x started (pool '%s')", desc->id, STRNULL(desc->pool->pool_name)); #endif if(pthread_getspecific(pthread_pool_random_key) == NULL) { random_ctx rndctx = random_init_auto(); if(pthread_setspecific(pthread_pool_random_key, rndctx) < 0) { log_quit("pthread_setspecific = %r", ERRNO_ERROR); } } #if VERBOSE_THREAD_LOG > 2 log_debug("thread: %x random thread-local variable ready", desc->id); #endif for(;;) { #ifdef DEBUG #ifdef HAS_PTHREAD_SETNAME_NP if(desc->pool->pool_name != NULL) { pthread_setname_np(pthread_self(), desc->pool->pool_name); } #endif #endif #ifdef DEBUG smp_int_inc(&thread_pool_waiting); #endif desc->status = THREAD_STATUS_WAITING; void* data = threaded_queue_dequeue(queue); #ifdef DEBUG smp_int_dec(&thread_pool_waiting); #endif if(data == NULL) { #if VERBOSE_THREAD_LOG > 1 log_debug("thread: %x got terminate", id); #endif desc->status = THREAD_STATUS_TERMINATING; break; } desc->status = THREAD_STATUS_WORKING; threaded_queue_task* task = (threaded_queue_task*)data; thread_pool_task_counter *counter = task->counter; thread_pool_function* function = task->function; void* parm = task->parm; const char* categoryname = task->categoryname; ZFREE(task, threaded_queue_task); strncpy(desc->info, categoryname, sizeof(desc->info)); if(counter != NULL) { thread_pool_counter_add_value(counter, +1); } #if VERBOSE_THREAD_LOG > 3 log_debug("thread: %x %s::%p(%p) begin", id, categoryname, function, parm); #endif #ifdef HAS_PTHREAD_SETNAME_NP #ifdef DEBUG pthread_setname_np(pthread_self(), desc->info); #endif #endif #ifdef DEBUG smp_int_inc(&thread_pool_running); #endif function(parm); #ifdef DEBUG smp_int_dec(&thread_pool_running); #endif #if VERBOSE_THREAD_LOG > 3 log_debug("thread: %x %s::%p(%p) end", id, categoryname, function, parm); #endif if(counter != NULL) { thread_pool_counter_add_value(counter, -1); } memcpy(desc->info, "IDLE", 5); } #if VERBOSE_THREAD_LOG > 2 log_debug("thread: %x finalising random thread-local variable", desc->id); #endif random_ctx rndctx = pthread_getspecific(pthread_pool_random_key); if(rndctx != NULL) { random_finalize(rndctx); (void) pthread_setspecific(pthread_pool_random_key, NULL); } #if VERBOSE_THREAD_LOG > 1 log_debug("thread: %x stopped", id); #endif pthread_exit(NULL); // end of the thread from the pool return NULL; } random_ctx thread_pool_get_random_ctx() { random_ctx rndctx = pthread_getspecific(pthread_pool_random_key); return rndctx; } /** * This MUST be called at the start or a thread that will, one way or another, use * the random function. In doubt, do it. So just do it. * * @note: It's automatically done for all threads from the pool. * @note: It's made on the core alarm function (the one also responsible for * flushing & cie) */ void thread_pool_setup_random_ctx() { #ifdef DEBUG log_debug7("thread_pool_setup_random_ctx()", ERRNO_ERROR); #endif (void) pthread_once(&pthread_pool_random_key_once, pthread_pool_random_key_init); if(pthread_getspecific(pthread_pool_random_key) == NULL) { random_ctx rndctx = random_init_auto(); if(pthread_setspecific(pthread_pool_random_key, rndctx) != 0) { log_quit("pthread_setspecific = %r", ERRNO_ERROR); } } } void thread_pool_destroy_random_ctx() { random_ctx rndctx; #ifdef DEBUG log_debug7("thread_pool_destroy_random_ctx()", ERRNO_ERROR); #endif (void) pthread_once(&pthread_pool_random_key_once, pthread_pool_random_key_init); if((rndctx = pthread_getspecific(pthread_pool_random_key)) != NULL) { random_finalize(rndctx); if(pthread_setspecific(pthread_pool_random_key, NULL) != 0) { log_quit("pthread_setspecific = %r", ERRNO_ERROR); } } else { log_warn("no random context for thread"); } } static thread_descriptor_s* thread_pool_create_thread(thread_pool_s *tp) { thread_descriptor_s *td = NULL; MALLOC_OR_DIE(thread_descriptor_s*, td, sizeof(thread_descriptor_s), THREADPOOL_TAG); ZEROMEMORY(td, sizeof(thread_descriptor_s)); td->pool = tp; td->status = THREAD_STATUS_STARTING; int ret; if((ret = pthread_create(&td->id, NULL, thread_pool_thread, td)) != 0) { OSDEBUG(termerr, "thread_pool_set_pool_size: pthread_create : oops: (%i) %s\n", ret, strerror(ret)); free(td); return NULL; } return td; } struct thread_pool_s* thread_pool_init_ex(u8 thread_count, u32 queue_size, const char *pool_name) { #if VERBOSE_THREAD_LOG > 1 log_debug("thread_pool_init(%d, %d, %s)", thread_count, queue_size, STRNULL(pool_name)); #endif if(thread_count == 0) { return NULL; } if(queue_size == 0) { queue_size = thread_count; } if(pool_name == NULL) { pool_name = "thread-pool"; } thread_pool_setup_random_ctx(); thread_pool_s *tp; MALLOC_OR_DIE(thread_pool_s*, tp, sizeof(thread_pool_s), GENERIC_TAG); ZEROMEMORY(tp, sizeof(thread_pool_s)); #ifdef HAS_PTHREAD_SETNAME_NP #ifdef DEBUG tp->pool_name = strdup(pool_name); #endif #endif thread_descriptor_s** thread_descriptors; mutex_init(&tp->mtx); tp->thread_pool_size = thread_count; u8 i; /* thread creation loop counter */ threaded_queue_init(&tp->queue, queue_size); MALLOC_OR_DIE(thread_descriptor_s**, thread_descriptors, thread_count * sizeof (thread_descriptor_s*), THREADPOOL_TAG); for(i = 0; i < thread_count; i++) { thread_descriptor_s *td; if((td = thread_pool_create_thread(tp)) == NULL) { free(thread_descriptors); threaded_queue_finalize(&tp->queue); return NULL; } thread_descriptors[i] = td; } tp->descriptors = thread_descriptors; for(;;) { mutex_lock(&thread_pool_set_mutex); u32 id = thread_pool_id_next++; u32_node *node = u32_set_avl_insert(&thread_pool_set, id); mutex_unlock(&thread_pool_set_mutex); if(node->value == NULL) { tp->id = id; node->value = tp; break; } } return tp; } struct thread_pool_s* thread_pool_init(u8 thread_count, u32 queue_size) { struct thread_pool_s* tp = thread_pool_init_ex(thread_count, queue_size, NULL); return tp; } u8 thread_pool_get_size(struct thread_pool_s *tp) { return tp->thread_pool_size; } #ifdef DEBUG static void thread_pool_debug_dump(struct thread_pool_s* tp) { struct thread_descriptor_s **d = tp->descriptors; u8 n = tp->thread_pool_size; u8 i = 0; while(n-- > 0) { log_debug("thread_pool_debug_dump %d, %x, %x, %s", i, d[i]->id, d[i]->status, d[i]->info); i++; } } #endif /** * Enqueues a function to be executed by a thread pool * * @param tp the thread pool * @param func the function * @param parm the parameter for the function * @param counter an optional counter that will be incremented just before the function is called, and decremented just after * @param categoryname an optional string that will be along the thread, mostly for debugging * * @return SUCCESS */ ya_result thread_pool_enqueue_call(struct thread_pool_s* tp, thread_pool_function func, void* parm, thread_pool_task_counter *counter, const char* categoryname) { #ifdef DEBUG int running = smp_int_get(&thread_pool_running); int waiting = smp_int_get(&thread_pool_waiting); log_debug("thread_pool_enqueue_call(%p,%p,%p,%s), queue size = %d+1, wait=%d, run=%d",func,parm,counter,(categoryname!=NULL)?categoryname:"NULL",threaded_queue_size(&tp->queue), waiting, running); static u32 last_dump_time = 0; u32 now = time(NULL); if(now - last_dump_time > 30) { thread_pool_debug_dump(tp); last_dump_time = now; } #endif threaded_queue_task* task; ZALLOC_OR_DIE(threaded_queue_task*, task, threaded_queue_task, THREADPOOL_TAG); task->function = func; task->parm = parm; task->counter = counter; if(categoryname == NULL) { categoryname = "anonymous"; } task->categoryname = categoryname; threaded_queue_enqueue(&tp->queue, task); return SUCCESS; } static ya_result thread_pool_stop(struct thread_pool_s* tp) { if(tp == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } thread_descriptor_s** td; u8 tps = tp->thread_pool_size; u8 i; mutex_lock(&tp->mtx); td = tp->descriptors; mutex_unlock(&tp->mtx); if(td == NULL) { #if VERBOSE_THREAD_LOG > 1 log_debug("thread_pool_stop called on a NULL set"); #endif return SERVICE_NOT_RUNNING; } if((tp->flags & THREADPOOL_FLAG_PAUSED) != 0) { #if VERBOSE_THREAD_LOG > 1 log_debug("thread_pool_stop called on a NULL set"); #endif return SERVICE_ALREADY_PAUSED; } /* * Sending a node with data == NULL will kill one thread * * I have to launch one for each thread. */ for(i = 0; i < tps; i++) { switch(td[i]->status) /* Unimportant W -> R race */ { case THREAD_STATUS_TERMINATING: #if VERBOSE_THREAD_LOG > 1 log_debug("thread: #%i [%x]: already terminating", i, td[i]->id); #endif threaded_queue_enqueue(&tp->queue, NULL); break; case THREAD_STATUS_TERMINATED: #if VERBOSE_THREAD_LOG > 1 log_debug("thread: #%i [%x]: already terminated", i, td[i]->id); #endif threaded_queue_enqueue(&tp->queue, NULL); break; case THREAD_STATUS_WORKING: #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i [%x]: working: sending stop", i, td[i]->id); #endif threaded_queue_enqueue(&tp->queue, NULL); break; case THREAD_STATUS_WAITING: #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i [%x]: waiting: sending stop", i, td[i]->id); #endif threaded_queue_enqueue(&tp->queue, NULL); break; default: #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i [%x]: sending stop on %i status", i, td[i]->id, td[i]->status); #endif threaded_queue_enqueue(&tp->queue, NULL); break; } } /* * I need to wait for each thread */ for(i = 0; i < tps; i++) { int err; /* * @NOTE: helgrind will complain here about a r/w race condition * This is not a problem. The thread keeps its working status (in a volatile) * And this loop only tries to wait if the status is not "done" yet. * * @TODO: look at PTHREAD_CREATE_JOINABLE */ if(td[i]->status != THREAD_STATUS_TERMINATING && td[i]->status != THREAD_STATUS_TERMINATED) { #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i [%x]: waiting termination", i, td[i]->id); #endif if((err = pthread_join(td[i]->id, NULL)) != 0) { #if VERBOSE_THREAD_LOG > 3 log_debug("thread: error joining #%i [%x] %i %r", i, td[i]->id, err, ERRNO_ERROR); #endif } } td[i]->status = THREAD_STATUS_TERMINATED; #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i: stopped", i); #endif // keep the descriptor for the resume } tp->flags |= THREADPOOL_FLAG_PAUSED; return SUCCESS; } static ya_result thread_pool_start(struct thread_pool_s* tp) { if(tp == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } if((tp->flags & THREADPOOL_FLAG_PAUSED) == 0) { return INVALID_STATE_ERROR; } thread_descriptor_s** thread_descriptors = tp->descriptors; u8 tps = tp->thread_pool_size; u8 i; if(thread_descriptors == NULL) { #if VERBOSE_THREAD_LOG > 1 log_debug("thread_pool_stop called on a NULL set"); #endif return SERVICE_NOT_RUNNING; } for(i = 0; i < tps; i++) { /* * @NOTE: helgrind will complain here about a r/w race condition * This is not a problem. The thread keeps its working status (in a volatile) * And this loop only tries to wait if the status is not "done" yet. * * @TODO: look at PTHREAD_CREATE_JOINABLE */ u8 status = thread_descriptors[i]->status; switch(status) { case THREAD_STATUS_TERMINATING: case THREAD_STATUS_TERMINATED: // all good break; default: log_err("thread_pool_stop: '%s' has status %hhu", STRNULL(tp->pool_name), status); return SERVICE_HAS_RUNNING_THREADS; } } for(i = 0; i < tps; i++) { int ret; thread_descriptors[i]->status = THREAD_STATUS_STARTING; if((ret = pthread_create(&thread_descriptors[i]->id, NULL, thread_pool_thread, thread_descriptors[i])) != 0) { return ret; } #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i: started again", i); #endif // keep the descriptor for the resume } tp->flags &= ~THREADPOOL_FLAG_PAUSED; return SUCCESS; } ya_result thread_pool_resize(struct thread_pool_s* tp, u8 new_size) { if(tp == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } mutex_lock(&tp->mtx); thread_descriptor_s** tds; u8 tps = tp->thread_pool_size; u8 i; if(tps == new_size) { // nothing to do mutex_unlock(&tp->mtx); return tps; } tds = tp->descriptors; tp->descriptors = NULL; // allocate a new struct, reuse thestructs thread_descriptor_s** thread_descriptors; MALLOC_OR_DIE(thread_descriptor_s**, thread_descriptors, sizeof (thread_descriptor_s*) * new_size, THREADPOOL_TAG); // if grow if(new_size > tps) { // copy the current ones memcpy(thread_descriptors, tds, sizeof(thread_descriptor_s*) * tps); // create new threads [tps;new_size[ for(i = tps; i < new_size; i++) { thread_descriptor_s *td; if((td = thread_pool_create_thread(tp)) == NULL) { // failed to allocate one thread ... // it's bad. keep what we have. log_err("thread_pool: could not resize from %u to %u, cutting at %u", tps, new_size, i - 1); logger_flush(); if(i == tps) { free(thread_descriptors); thread_descriptors = tds; new_size = tps; } else { free(tds); new_size = i - 1; } tp->descriptors = thread_descriptors; tp->thread_pool_size = new_size; mutex_unlock(&tp->mtx); return new_size; } thread_descriptors[i] = td; } } else { // copy what we can memcpy(thread_descriptors, tds, sizeof(thread_descriptor_s*) * new_size); // stop threads [new_size;tps[ for(i = new_size; i < tps; i++) { switch(tds[i]->status) /* Unimportant W -> R race */ { case THREAD_STATUS_TERMINATING: #if VERBOSE_THREAD_LOG > 1 log_debug("thread: #%i [%x]: already terminating", i, tds[i]->id); #endif threaded_queue_enqueue(&tp->queue, NULL); break; case THREAD_STATUS_TERMINATED: #if VERBOSE_THREAD_LOG > 1 log_debug("thread: #%i [%x]: already terminated", i, tds[i]->id); #endif threaded_queue_enqueue(&tp->queue, NULL); break; case THREAD_STATUS_WORKING: #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i [%x]: working: sending stop", i, tds[i]->id); #endif threaded_queue_enqueue(&tp->queue, NULL); break; case THREAD_STATUS_WAITING: #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i [%x]: waiting: sending stop", i, tds[i]->id); #endif threaded_queue_enqueue(&tp->queue, NULL); break; default: #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i [%x]: sending stop on %i status", i, tds[i]->id, tds[i]->status); #endif threaded_queue_enqueue(&tp->queue, NULL); break; } } /* * I need to wait for each thread */ for(i = new_size; i < tps; i++) { int err; /* * @NOTE: helgrind will complain here about a r/w race condition * This is not a problem. The thread keeps its working status (in a volatile) * And this loop only tries to wait if the status is not "done" yet. * * @TODO: look at PTHREAD_CREATE_JOINABLE */ if(tds[i]->status != THREAD_STATUS_TERMINATING && tds[i]->status != THREAD_STATUS_TERMINATED) { #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i [%x]: waiting termination", i, tds[i]->id); #endif if((err = pthread_join(tds[i]->id, NULL)) != 0) { #if VERBOSE_THREAD_LOG > 3 log_debug("thread: error joining #%i [%x] %i %r", i, tds[i]->id, err, ERRNO_ERROR); #endif } } tds[i]->status = THREAD_STATUS_TERMINATED; #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i: terminated", i); #endif free(tds[i]); tds[i] = NULL; } } free(tds); tp->descriptors = thread_descriptors; tp->thread_pool_size = new_size; mutex_unlock(&tp->mtx); return new_size; } ya_result thread_pool_destroy(struct thread_pool_s* tp) { if(tp == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } thread_descriptor_s** td; u8 tps = tp->thread_pool_size; u8 i; mutex_lock(&tp->mtx); td = tp->descriptors; tp->descriptors = NULL; mutex_unlock(&tp->mtx); if(td == NULL) { #if VERBOSE_THREAD_LOG > 1 log_debug("thread_pool_destroy called on a NULL set (already done)"); #endif return THREAD_DOUBLEDESTRUCTION_ERROR; /* double call */ } mutex_lock(&thread_pool_set_mutex); u32_set_avl_delete(&thread_pool_set, tp->id); mutex_unlock(&thread_pool_set_mutex); tp->thread_pool_size = 0; /* * Sending a node with data == NULL will kill one thread * * I have to launch one for each thread. */ for(i = 0; i < tps; i++) { switch(td[i]->status) /* Unimportant W -> R race */ { case THREAD_STATUS_TERMINATING: #if VERBOSE_THREAD_LOG > 1 log_debug("thread: #%i [%x]: already terminating", i, td[i]->id); #endif threaded_queue_enqueue(&tp->queue, NULL); break; case THREAD_STATUS_TERMINATED: #if VERBOSE_THREAD_LOG > 1 log_debug("thread: #%i [%x]: already terminated", i, td[i]->id); #endif threaded_queue_enqueue(&tp->queue, NULL); break; case THREAD_STATUS_WORKING: #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i [%x]: working: sending stop", i, td[i]->id); #endif threaded_queue_enqueue(&tp->queue, NULL); break; case THREAD_STATUS_WAITING: #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i [%x]: waiting: sending stop", i, td[i]->id); #endif threaded_queue_enqueue(&tp->queue, NULL); break; default: #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i [%x]: sending stop on %i status", i, td[i]->id, td[i]->status); #endif threaded_queue_enqueue(&tp->queue, NULL); break; } } /* * I need to wait for each thread */ for(i = 0; i < tps; i++) { int err; /* * @NOTE: helgrind will complain here about a r/w race condition * This is not a problem. The thread keeps its working status (in a volatile) * And this loop only tries to wait if the status is not "done" yet. * * @TODO: look at PTHREAD_CREATE_JOINABLE */ if(td[i]->status != THREAD_STATUS_TERMINATING && td[i]->status != THREAD_STATUS_TERMINATED) { #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i [%x]: waiting termination", i, td[i]->id); #endif if((err = pthread_join(td[i]->id, NULL)) != 0) { #if VERBOSE_THREAD_LOG > 3 log_debug("thread: error joining #%i [%x] %i %r", i, td[i]->id, err, ERRNO_ERROR); #endif } } td[i]->status = THREAD_STATUS_TERMINATED; #if VERBOSE_THREAD_LOG > 2 log_debug("thread: #%i: terminated", i); #endif free(td[i]); td[i] = NULL; } free(td); #if VERBOSE_THREAD_LOG > 2 log_debug("thread: thread_pool_destroy: finalize"); #endif threaded_queue_finalize(&tp->queue); if(tp->pool_name != NULL) { free(tp->pool_name); } free(tp); return SUCCESS; } ya_result thread_pool_stop_all() { ya_result err = SUCCESS; mutex_lock(&thread_pool_set_mutex); u32_set_avl_iterator iter; u32_set_avl_iterator_init(&thread_pool_set, &iter); while(u32_set_avl_iterator_hasnext(&iter)) { u32_node *node = u32_set_avl_iterator_next_node(&iter); if(node->value != NULL) { thread_pool_s *tp = (thread_pool_s*)node->value; log_debug("stopping thread pool '%s'", STRNULL(tp->pool_name)); if(FAIL(err = thread_pool_stop(tp))) { log_err("thread_pool_stop_all failed on '%s' with %r", STRNULL(tp->pool_name), err); break; } } } mutex_unlock(&thread_pool_set_mutex); return err; } ya_result thread_pool_start_all() { ya_result err = SUCCESS; mutex_lock(&thread_pool_set_mutex); u32_set_avl_iterator iter; u32_set_avl_iterator_init(&thread_pool_set, &iter); while(u32_set_avl_iterator_hasnext(&iter)) { u32_node *node = u32_set_avl_iterator_next_node(&iter); if(node->value != NULL) { thread_pool_s *tp = (thread_pool_s*)node->value; log_debug("starting thread pool '%s'", STRNULL(tp->pool_name)); if(FAIL(err = thread_pool_start(tp))) { log_err("thread_pool_start_all failed on '%s' with %r", STRNULL(tp->pool_name), err); break; } } } mutex_unlock(&thread_pool_set_mutex); return err; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/hsdllist.c0000644000077100007710000000012412650131756021326 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.732344 30 ctime=1454597651.460344534 yadifa-2.1.6-5826/lib/dnscore/src/hsdllist.c0000664000077100007710000001027612650131756021141 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include "dnscore/hsdllist.h" static void hsdllist_free_nothing(void *data) { (void)data; } void hsdllist_init(hsdllist_s *lst) { lst->first.next = &lst->last; lst->first.prev = NULL; lst->first.data = NULL; lst->last.prev = &lst->first; lst->last.next = NULL; lst->last.data = NULL; lst->size = 0; lst->node_allocator = &libc_allocator; lst->data_free_callback = hsdllist_free_nothing; } void hsdllist_destroy(hsdllist_s *lst) { hsdllist_node_s *node = lst->first.next; for(u32 n = lst->size; n > 0; n--) { hsdllist_node_s *next_node = node->next; void *data = node->data; afree(lst->node_allocator, node); lst->data_free_callback(data); node = next_node; } lst->first.next = &lst->last; lst->last.prev = &lst->first; lst->size = 0; } void hsdllist_append(hsdllist_s *lst, void *data) { hsdllist_node_s *new_node = aalloc(lst->node_allocator,sizeof(hsdllist_node_s)); new_node->next = &lst->last; new_node->prev = lst->last.prev; new_node->data = data; lst->last.prev = new_node; lst->size++; } void hsdllist_insert(hsdllist_s *lst, void *data) { hsdllist_node_s *new_node = aalloc(lst->node_allocator,sizeof(hsdllist_node_s)); new_node->next = lst->first.next; new_node->prev = &lst->first; new_node->data = data; lst->first.next = new_node; lst->size++; } u32 hsdllist_size(hsdllist_s *lst) { return lst->size; } void* hsdllist_remove_last(hsdllist_s *lst) { if(lst->size > 0) { lst->size--; hsdllist_node_s *node = lst->last.prev; lst->last.prev = node->prev; node->prev->next = &lst->last; void *data = node->data; afree(lst->node_allocator, node); return data; } return NULL; } void* hsdllist_remove_first(hsdllist_s *lst) { if(lst->size > 0) { lst->size--; hsdllist_node_s *node = lst->first.next; lst->first.next = node->next; node->next->prev = &lst->first; void *data = node->data; afree(lst->node_allocator, node); return data; } return NULL; } /** * @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/parser.c0000644000077100007710000000012412650131756020774 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.712344 30 ctime=1454597651.543344534 yadifa-2.1.6-5826/lib/dnscore/src/parser.c0000664000077100007710000007664312650131756020621 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include #include #include #include #include #include #include #include #include #include "dnscore/timems.h" #include "dnscore/logger.h" #include "dnscore/file_output_stream.h" #include "dnscore/file_input_stream.h" #include "dnscore/logger_channel_stream.h" #include "dnscore/buffer_input_stream.h" #include "dnscore/base16.h" #include "dnscore/base32hex.h" #include "dnscore/base64.h" #include "dnscore/parser.h" #define DO_PRINT 0 #define DO_BUFFERIZE 1 #define PARSER_STREAM_BUFFER_SIZE 4096 static const char eol_park_needle[2] = {' ', '\0'}; static bool parser_init_error_codes_done = FALSE; static inline ya_result parser_set_couples(parser_s *parser, const char* input, u8 kind, u8 closer_kind) { u32 n = strlen(input); if((n & 1) != 0) { return PARSER_ODD_CHAR_NUMBER; } for(int i = 0; i < n; i+= 2) { parser->char_type[(u8)input[i]] = kind; if(closer_kind != PARSER_CHAR_TYPE_IGNORE) { parser->char_type[(u8)input[i + 1]] = closer_kind; } parser->delimiter_close[(u8)input[i]] = input[i + 1]; } return n>>1; } static inline u32 parser_set_singleton(parser_s *parser, const char* input, u8 kind) { u32 n = strlen(input); for(int i = 0; i < n; i++) { parser->char_type[(u8)input[i]] = kind; } return n; } void parser_init_error_codes() { if(parser_init_error_codes_done) { return; } parser_init_error_codes_done = TRUE; error_register(PARSER_SYNTAX_ERROR_MULTILINE,"PARSER_SYNTAX_ERROR_MULTILINE"); error_register(PARSER_SYNTAX_ERROR_EXPECTED_EOL,"PARSER_SYNTAX_ERROR_EXPECTED_EOL"); error_register(PARSER_SYNTAX_ERROR_LINE_TOO_BIG,"PARSER_SYNTAX_ERROR_LINE_TOO_BIG"); error_register(PARSER_BUFFER_TOO_SMALL,"PARSER_BUFFER_TOO_SMALL"); error_register(PARSER_NO_INPUT,"PARSER_NO_INPUT"); error_register(PARSER_ODD_CHAR_NUMBER,"PARSER_ODD_CHAR_NUMBER"); error_register(PARSER_LINE_ENDED_WITH_ESCAPE,"PARSER_LINE_ENDED_WITH_ESCAPE"); error_register(PARSER_UNEXPECTED_STRING_DELIMITER,"PARSER_UNEXPECTED_STRING_DELIMITER"); error_register(PARSER_EXPECTED_STRING_END_DELIMITER,"PARSER_EXPECTED_STRING_END_DELIMITER"); error_register(PARSER_INCLUDE_DEPTH_TOO_BIG,"PARSER_INCLUDE_DEPTH_TOO_BIG"); error_register(PARSER_UNKNOWN_TIME_UNIT,"PARSER_UNKNOWN_TIME_UNIT"); error_register(PARSER_NO_MARK_SET,"PARSER_NO_MARK_SET"); error_register(PARSER_REACHED_END_OF_LINE,"PARSER_REACHED_END_OF_LINE"); error_register(PARSER_FOUND_WORD,"PARSER_FOUND_WORD"); error_register(PARSER_REACHED_END_OF_FILE, "PARSER_REACHED_END_OF_FILE"); } ya_result parser_init(parser_s *parser, const char *string_delimiters, // by 2 const char *multiline_delimiters, // by 2 const char *comment_markers, // by 1 const char *blank_makers, // by 1 const char *escape_characters // by 1 ) { ya_result return_code = SUCCESS; /// @note may be improved if we spawn parser a lot ZEROMEMORY(parser, sizeof(parser_s)); // if(ISOK(return_code = parser_set_couples(parser, string_delimiters, PARSER_CHAR_TYPE_STRING_DELIMITER, PARSER_CHAR_TYPE_IGNORE))) { parser->string_delimiters_count = return_code; if(ISOK(return_code = parser_set_couples(parser, multiline_delimiters, PARSER_CHAR_TYPE_MULTILINE_DELIMITER, PARSER_CHAR_TYPE_MULTILINE_DELIMITER_END))) { parser->multiline_delimiters_count = return_code; parser->comment_marker_count = parser_set_singleton(parser, comment_markers, PARSER_CHAR_TYPE_COMMENT_MARKER); parser->comment_marker = comment_markers; parser->blank_marker_count = parser_set_singleton(parser, blank_makers, PARSER_CHAR_TYPE_BLANK_MARKER); parser->blank_marker = blank_makers; parser->escape_characters_count =parser_set_singleton(parser, escape_characters, PARSER_CHAR_TYPE_ESCAPE_CHARACTER); parser->escape_characters = escape_characters; parser_set_singleton(parser, "\n", PARSER_CHAR_TYPE_EOL); } } return return_code; } ya_result parser_finalize(parser_s *parser) { for(;;) { input_stream *is = parser_pop_stream(parser); if(is == NULL) { break; } input_stream_close(is); input_stream_set_void(is); } return SUCCESS; } static inline u32 parser_line_size(parser_s *parser) { return (u32)(parser->limit - parser->needle); } static inline ya_result parser_clear_escape_codes(char **startp, int *lenp, char escape_char, char *new_start) { char *start = *startp; char *escape_char_ptr; int len = *lenp; if((escape_char_ptr = memchr(start, escape_char, len)) != NULL) { char *op = new_start; for(;;) { size_t n = escape_char_ptr - start; // is the escape code is at the last position ? if(n + 1 == len) { // oops return PARSER_LINE_ENDED_WITH_ESCAPE; } memcpy(op, start, n); #if 0 /* fix */ #else op[n] = escape_char_ptr[1]; op += n + 1; start = escape_char_ptr + 2; len -= n + 2; #endif yassert(len >= 0); if(len == 0) { break; } if((escape_char_ptr = memchr(start, escape_char, len)) == NULL) { // copy the remaining bytes memcpy(op, start, len); op += len; break; } } *startp = new_start; *lenp = op - new_start; } // else we have nothing more to do return len; } /** * * returns the token type * * @param parser * @return */ static inline ya_result parser_read_line(parser_s *parser) { ya_result return_code; if(parser_line_size(parser) == 0) { // read next line if(parser->input_stream_stack_size == 0) { return_code = PARSER_NO_INPUT; // no input file/stream return return_code; } char *buffer = parser->line_buffer; char *limit = &parser->line_buffer[sizeof(parser->line_buffer)]; for(;;) { if(limit - buffer == 0) { return PARSER_SYNTAX_ERROR_LINE_TOO_BIG; } #if DO_BUFFERIZE return_code = buffer_input_stream_read_line(parser->input_stream_stack[parser->input_stream_stack_size - 1], buffer, limit - buffer); #else return_code = input_stream_read_line(parser->input_stream_stack[parser->input_stream_stack_size - 1], buffer, limit - buffer); #endif if(return_code > 0) { // one line has been read (maybe) buffer += return_code; if(return_code > 1) { if(buffer[-2] == parser->escape_characters[0]) { // the EOL was escaped, concat the next line ... // do NOT remove the escape code now continue; } } parser->limit = buffer; parser->needle = parser->line_buffer; parser->line_number++; } else { // error or end of stream parser->limit = parser->line_buffer; parser->needle = parser->line_buffer; if(return_code == 0) { if(parser->multiline != 0) { return_code = PARSER_SYNTAX_ERROR_MULTILINE; } } } return return_code; } } return PARSER_EOF; } ya_result parser_next_token(parser_s *parser) { ya_result return_code; for(;;) { if((return_code = parser_read_line(parser)) <= 0) { if(return_code == 0) { return PARSER_EOF; } return return_code; } // there are bytes return_code = 0; for(char *needle = parser->needle; needle < parser->limit; needle++) { u8 b = (u8)*needle; // test for multiline close switch(parser->char_type[b]) { case PARSER_CHAR_TYPE_ESCAPE_CHARACTER: // the text starts after the next char, whatever it is needle++; //b = (u8)*needle; // no "break" here : fall through required case PARSER_CHAR_TYPE_NORMAL: { // BLANK or MULTI => done // STRING => error // COMMENT => CUT bool has_escapes = FALSE; parser->text = needle++; for(; needle < parser->limit; needle++) { b = (u8)*needle; switch(parser->char_type[b]) { case PARSER_CHAR_TYPE_MULTILINE_DELIMITER_END: { if((parser->multiline) != 0 && (b == parser->multiline)) { b = ' '; *needle = b; parser->multiline = 0; } else { return PARSER_SYNTAX_ERROR_MULTILINE; } // we got the whole word parser->text_length = needle - parser->text; parser->needle = needle + 1; goto parser_next_token_end_of_token_found; /********* GOTO G O T O GOTO **********/ } case PARSER_CHAR_TYPE_MULTILINE_DELIMITER: // TODO: handle BEGIN END and BOTH { if(parser->multiline == 0) { parser->multiline = parser->delimiter_close[b]; } else { return PARSER_SYNTAX_ERROR_MULTILINE; } *needle = ' '; // we got the whole word parser->text_length = needle - parser->text; parser->needle = needle + 1; goto parser_next_token_end_of_token_found; /********* GOTO G O T O GOTO **********/ } case PARSER_CHAR_TYPE_EOL: { // only tell we got an EOL if we are not on "multiline" if(parser->multiline != 0) { *needle = ' '; } // we got the whole word parser->text_length = needle - parser->text; parser->needle = needle; goto parser_next_token_end_of_token_found; /********* GOTO G O T O GOTO **********/ } case PARSER_CHAR_TYPE_BLANK_MARKER: { // we got the whole word parser->text_length = needle - parser->text; parser->needle = needle + 1; goto parser_next_token_end_of_token_found; /********* GOTO G O T O GOTO **********/ } case PARSER_CHAR_TYPE_ESCAPE_CHARACTER: { needle++; has_escapes = TRUE; break; } case PARSER_CHAR_TYPE_COMMENT_MARKER: { // we got the whole word parser->text_length = needle - parser->text; parser->needle = needle; goto parser_next_token_end_of_token_found; /********* GOTO G O T O GOTO **********/ } case PARSER_CHAR_TYPE_STRING_DELIMITER: { // parse error return PARSER_UNEXPECTED_STRING_DELIMITER; } //case PARSER_CHAR_TYPE_NORMAL: default: { break; } } // end switch char type } // end for needle parser_next_token_end_of_token_found: ; // at this point we have a full token (maybe still escaped) int token_len = needle - parser->text; if(has_escapes) { yassert(parser->escape_characters_count <= 1); if(parser->escape_characters_count == 1) { ya_result err; char escape_char = parser->escape_characters[0]; if(FAIL(err = parser_clear_escape_codes(&parser->text, &token_len, escape_char, parser->extra_buffer))) { return err; } } parser->needle = needle + token_len; } parser->text_length = token_len; return return_code | PARSER_WORD; } case PARSER_CHAR_TYPE_COMMENT_MARKER: { // cut line parser->text = needle; parser->text_length = parser->limit - needle; parser->needle = parser->limit; if(parser->multiline == 0) { parser->needle_mark = NULL; return return_code | PARSER_COMMENT | PARSER_EOL; } else { return return_code | PARSER_COMMENT; } } case PARSER_CHAR_TYPE_MULTILINE_DELIMITER_END: { if((parser->multiline) != 0 && (b == parser->multiline)) { /*b = ' '; *needle = b;*/ parser->multiline = 0; } else { return PARSER_SYNTAX_ERROR_MULTILINE; } break; } case PARSER_CHAR_TYPE_STRING_DELIMITER: { // find the end char ... // note: see strpbrk char end_char = parser->delimiter_close[b]; char *string_end; for(;;) { needle++; string_end = memchr(needle, end_char, parser->limit - needle); if(string_end != NULL) { if(parser->char_type[(u8)string_end[-1]] != PARSER_CHAR_TYPE_ESCAPE_CHARACTER) { break; } // this one was escaped ... string_end++; // needle = string_end + 1 and try again ? if(string_end > parser->limit) { return PARSER_EXPECTED_STRING_END_DELIMITER; } needle = string_end; //string_end = memchr(string_end, end_char, parser->limit - string_end); } else { // syntax error @TODO return PARSER_EXPECTED_STRING_END_DELIMITER; } } int token_len = string_end - needle; yassert(parser->escape_characters_count <= 1); for(u32 escape_index = 0; escape_index < parser->escape_characters_count; escape_index++) { ya_result err; char escape_char = parser->escape_characters[escape_index]; if(FAIL(err = parser_clear_escape_codes(&needle, &token_len, escape_char, parser->extra_buffer))) { return err; } } parser->text = needle; parser->text_length = token_len; parser->needle = string_end + 1; // end of token ... return ? return return_code | PARSER_WORD; } case PARSER_CHAR_TYPE_MULTILINE_DELIMITER: { if(parser->multiline == 0) { parser->multiline = parser->delimiter_close[b]; } else { return PARSER_SYNTAX_ERROR_MULTILINE; } *needle = ' '; break; } case PARSER_CHAR_TYPE_EOL: { // only tell we got an EOL if we are not on "multiline" if(parser->multiline == 0) { parser->needle = parser->limit; parser->text_length = 0; parser->needle_mark = NULL; return PARSER_EOL; } *needle = ' '; } case PARSER_CHAR_TYPE_BLANK_MARKER: { return_code |= PARSER_BLANK_START; break; } } } // reached the end of line without a token : EOL // if we are not on a multiline: return EOL parser->needle = parser->limit; parser->text_length = 0; if(parser->multiline == 0) { return PARSER_EOL; } // else read the next line (loop) } // never reached return 0; } void parser_set_eol(parser_s *parser) { parser->needle = (char*)&eol_park_needle[0]; parser->limit = (char*)&eol_park_needle[1]; } ya_result parser_next_characters(parser_s *parser) { parser->text = parser->needle; parser->text_length = parser->limit - parser->needle; if(parser->multiline != 0) { u32 offset = parser->text_length; memcpy(parser->additional_buffer, parser->text, offset); parser->additional_buffer[offset++] = ' '; ya_result ret; do { ret = parser_next_token(parser); const char *text = parser_text(parser); size_t text_length = parser_text_length(parser); size_t new_length = offset + text_length + 1; if(new_length > sizeof(parser->additional_buffer)) { return PARSER_SYNTAX_ERROR_LINE_TOO_BIG; } memcpy(&parser->additional_buffer[offset], text, text_length); offset = new_length; parser->additional_buffer[offset - 1] = ' '; } while((ret & (PARSER_EOF|PARSER_EOL)) == 0); parser->text = parser->additional_buffer; parser->text_length = offset - 1; } parser->needle = (char*)&eol_park_needle[0]; parser->limit = (char*)&eol_park_needle[1]; return parser->text_length; } ya_result parser_next_characters_nospace(parser_s *parser) { parser->text = parser->needle; parser->text_length = parser->limit - parser->needle; if(parser->multiline != 0) { u32 offset = parser->text_length; memcpy(parser->additional_buffer, parser->text, offset); ya_result ret; do { ret = parser_next_token(parser); const char *text = parser_text(parser); size_t text_length = parser_text_length(parser); size_t new_length = offset + text_length; if(new_length > sizeof(parser->additional_buffer)) { return PARSER_SYNTAX_ERROR_LINE_TOO_BIG; } memcpy(&parser->additional_buffer[offset], text, text_length); offset = new_length; } while((ret & (PARSER_EOF|PARSER_EOL)) == 0); parser->text = parser->additional_buffer; parser->text_length = offset; } char* text = parser->text; while(parser->char_type[(u8)*text] == PARSER_CHAR_TYPE_BLANK_MARKER) { text++; } parser->text_length -= text - parser->text; parser->text = text; parser->needle = (char*)&eol_park_needle[0]; parser->limit = (char*)&eol_park_needle[1]; return parser->text_length; } ya_result parser_concat_next_tokens(parser_s *parser) { ya_result ret; size_t offset = 0; // char space = parser->blank_marker[0]; char space = ' '; do { ret = parser_next_token(parser); if(ret & PARSER_WORD) { // if((ret & PARSER_COMMENT) != 0) // { // continue; // } const char *text = parser_text(parser); size_t text_length = parser_text_length(parser); size_t new_length = offset + text_length; if(new_length > sizeof(parser->additional_buffer)) { return PARSER_SYNTAX_ERROR_LINE_TOO_BIG; } memcpy(&parser->additional_buffer[offset], text, text_length); offset = new_length; parser->additional_buffer[offset] = space; offset++; } } while((ret & (PARSER_EOF|PARSER_EOL)) == 0); // remove the last space, because we always add a space offset--; char *text = parser->additional_buffer; parser->text_length = offset - (text - parser->additional_buffer); parser->text = text; parser->needle = (char*)&eol_park_needle[0]; parser->limit = (char*)&eol_park_needle[1]; return parser->text_length; } ya_result parser_concat_next_tokens_nospace(parser_s *parser) { ya_result ret; size_t offset = 0; do { ret = parser_next_token(parser); if((ret & PARSER_COMMENT) != 0) { continue; } const char *text = parser_text(parser); size_t text_length = parser_text_length(parser); size_t new_length = offset + text_length; if(new_length > sizeof(parser->additional_buffer)) { return PARSER_SYNTAX_ERROR_LINE_TOO_BIG; } memcpy(&parser->additional_buffer[offset], text, text_length); offset = new_length; } while((ret & (PARSER_EOF|PARSER_EOL)) == 0); char* text = parser->additional_buffer; while(parser->char_type[(u8)*text] == PARSER_CHAR_TYPE_BLANK_MARKER) { text++; } parser->text_length = offset - (text - parser->additional_buffer); parser->text = text; parser->needle = (char*)&eol_park_needle[0]; parser->limit = (char*)&eol_park_needle[1]; return parser->text_length; } ya_result parser_push_stream(parser_s *p, input_stream *is) { if(p->input_stream_stack_size < PARSER_INCLUDE_DEPTH_MAX ) { #if DO_BUFFERIZE buffer_input_stream_init(is, is, PARSER_STREAM_BUFFER_SIZE); #endif p->input_stream_stack[p->input_stream_stack_size] = is; p->line_number_stack[p->input_stream_stack_size] = p->line_number; ++p->input_stream_stack_size; return p->input_stream_stack_size; } return PARSER_INCLUDE_DEPTH_TOO_BIG; } /** * @param p * @return the popped stream or NULL if the stack is empty */ input_stream * parser_pop_stream(parser_s *p) { input_stream *is = NULL; if(p->input_stream_stack_size > 0) { is = p->input_stream_stack[--p->input_stream_stack_size]; #ifdef DEBUG p->input_stream_stack[p->input_stream_stack_size] = NULL; #endif p->line_number = p->line_number_stack[p->input_stream_stack_size]; } return is; } /////////////////////////////////////////////////////////////////////////////// ya_result parser_copy_next_ttl(parser_s *p, s32 *out_value) { ya_result return_code = parser_next_word(p); if(ISOK(return_code)) { const char *text = parser_text(p); u32 text_len = parser_text_length(p); char lc = text[text_len - 1]; if(isdigit(lc)) { return_code = parse_s32_check_range_len_base10(text, text_len, out_value, 0, MAX_S32); } else { s64 mult = 1; text_len--; switch(lc) { case 'w': case 'W': mult = 60 * 60 * 24 * 7; break; case 'd': case 'D': mult = 60 * 60 * 24; break; case 'h': case 'H': mult = 60 * 60; break; case 'm': case 'M': mult = 60; break; case 's': case 'S': break; default: { return PARSER_UNKNOWN_TIME_UNIT; } } s32 ttl32; if(ISOK(return_code = parse_s32_check_range_len_base10(text, text_len, &ttl32, 0, MAX_S32))) { mult *= ttl32; if(mult <= MAX_S32) { *out_value = (s32)mult; } else { return_code = PARSEINT_ERROR; } } } } return return_code; } ya_result parser_type_bit_maps_initialize(parser_s *p, type_bit_maps_context* context) { u16 type; u8 *type_bitmap_field = context->type_bitmap_field; u8 *window_size = context->window_size; u32 type_bit_maps_size = 0; u8 ws; /* ------------------------------------------------------------ */ ZEROMEMORY(window_size, sizeof(context->window_size)); context->last_type_window = -1; ZEROMEMORY(type_bitmap_field, sizeof(context->type_bitmap_field)); ya_result return_code; do { if(FAIL(return_code = parser_next_token(p))) { return return_code; } if((return_code & PARSER_WORD) != 0) { const char *text = parser_text(p); u32 text_len = parser_text_length(p); ya_result ret; // MUST use another return variable than return_code if(FAIL(ret = get_type_from_case_name_len(text, text_len, &type))) { return ret; } type = ntohs(type); /* types are now stored in NETWORK order */ /* Network bit order */ type_bitmap_field[type >> 3] |= 1 << (7 - (type & 7)); window_size[type >> 8] = ((type & 0xf8) >> 3) + 1; context->last_type_window = MAX(type >> 8, context->last_type_window); } } while((return_code & (PARSER_EOF|PARSER_EOL)) == 0); for(s32 i = 0; i <= context->last_type_window; i++) { ws = window_size[i]; if(ws > 0) { type_bit_maps_size += 1 + 1 + ws; } } context->type_bit_maps_size = type_bit_maps_size; return type_bit_maps_size; } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/threaded_dll_cw.c0000644000077100007710000000012412650131756022604 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.673344 30 ctime=1454597651.630344534 yadifa-2.1.6-5826/lib/dnscore/src/threaded_dll_cw.c0000664000077100007710000002154612650131756022421 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include #include "dnscore/threaded_dll_cw.h" #define MODULE_MSG_HANDLE g_system_logger extern logger_handle *g_system_logger; #define THREADED_QUEUE_TAG 0x455545555154 /* TQUEUE */ #define DLL_POOL 1 /* * Note: * * If a mutex_init fails, it's because of a resource, memory or rights issue. * So the application will fail soon enough. * I still should check this and exit. * * mutex_lock will fail only if the current thread aleady owns the mutex * * mutex_unlock will fail only if the current thread does not owns the mutex * */ void threaded_dll_cw_init(threaded_dll_cw *queue, int max_size) { #ifdef DEBUG memset(queue, 0xff, sizeof(threaded_dll_cw)); #endif list_dl_init(&queue->queue); #if DLL_POOL queue->pool = NULL; #endif mutex_init(&queue->mutex); cond_init(&queue->cond_read); cond_init(&queue->cond_write); queue->max_size = max_size; } void threaded_dll_cw_finalize(threaded_dll_cw *queue) { /** * If the queue is not empty : too bad ! * * It's the responsibility of the caller to ensure the queue and set of listeners is empty. */ mutex_lock(&queue->mutex); while(list_dl_size(&queue->queue) > 0) { void *leaked_data = list_dl_dequeue(&queue->queue); log_err("threaded_dll_cw_finalize: leaked data @%p", leaked_data); } #if DLL_POOL list_dl_node_s *node = queue->pool; while(node != NULL) { list_dl_node_s *node_next = node->next; list_dl_node_free(node); node = node_next; } #endif mutex_unlock(&queue->mutex); cond_finalize(&queue->cond_write); cond_finalize(&queue->cond_read); mutex_destroy(&queue->mutex); #ifdef DEBUG memset(queue, 0xde, sizeof(threaded_dll_cw)); #endif } void threaded_dll_cw_enqueue(threaded_dll_cw *queue, void *constant_pointer) { /* * Ensure I'm allowed to work on queue (only one working on it) */ mutex_lock(&queue->mutex); while(list_dl_size(&queue->queue) >= queue->max_size) { cond_wait(&queue->cond_write, &queue->mutex); } #if DLL_POOL list_dl_node_s *node; if(queue->pool != NULL) { node = queue->pool; queue->pool = node->next; } else { node = list_dl_node_alloc(); } node->data = constant_pointer; list_dl_insert_node(&queue->queue, node); #else list_dl_enqueue(&queue->queue, constant_pointer); #endif /* * We are done here, we can always signal the readers */ cond_notify(&queue->cond_read); mutex_unlock(&queue->mutex); } bool threaded_dll_cw_try_enqueue(threaded_dll_cw* queue, void* constant_pointer) { /* * Ensure I'm allowed to work on queue (only one working on it) */ if(mutex_trylock(&queue->mutex) != 0) { return FALSE; } if( list_dl_size(&queue->queue) >= queue->max_size ) { mutex_unlock(&queue->mutex); return FALSE; } /* * Set the data to the write position, * and move the write position to the next slot * */ #if DLL_POOL list_dl_node_s *node; if(queue->pool != NULL) { node = queue->pool; queue->pool = node->next; } else { node = list_dl_node_alloc(); } node->data = constant_pointer; list_dl_insert_node(&queue->queue, node); #else list_dl_enqueue(&queue->queue, constant_pointer); #endif cond_notify(&queue->cond_read); mutex_unlock(&queue->mutex); return TRUE; } void* threaded_dll_cw_dequeue(threaded_dll_cw *queue) { /* * Ensure I'm allowed to work on queue (only one working on it) */ mutex_lock(&queue->mutex); while(list_dl_size(&queue->queue) == 0) { cond_wait(&queue->cond_read, &queue->mutex); } bool write_blocked = (list_dl_size(&queue->queue) == queue->max_size); #if DLL_POOL list_dl_node_s *node = list_dl_remove_last_node(&queue->queue); void *data = node->data; node->next = queue->pool; queue->pool = node; #else void *data = list_dl_dequeue(&queue->queue); #endif if(write_blocked) /* enqueue has just been locked -> unlock */ { /* * The queue is full : the queuers are waiting. * Since we will are removing something, we can free (one of) them. * (They will however still be locked until the queue mutex is released) */ cond_notify(&queue->cond_write); } /* * We are done here. */ mutex_unlock(&queue->mutex); return data; } void* threaded_dll_cw_try_dequeue(threaded_dll_cw *queue) { mutex_lock(&queue->mutex); if(list_dl_size(&queue->queue) == 0) { mutex_unlock(&queue->mutex); return NULL; } /* * Get the data from the read position, * and move the read position to the next slot * */ bool write_blocked = (list_dl_size(&queue->queue) == queue->max_size); #if DLL_POOL list_dl_node_s *node = list_dl_remove_last_node(&queue->queue); void *data = node->data; node->next = queue->pool; queue->pool = node; #else void *data = list_dl_dequeue(&queue->queue); #endif if(write_blocked) /* enqueue has just been locked -> unlock */ { /* * The queue is full : the queuers are waiting. * Since we will are removing something, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ cond_notify(&queue->cond_write); } /* * We are done here. */ mutex_unlock(&queue->mutex); return data; } void threaded_dll_cw_wait_empty(threaded_dll_cw *queue) { int size; for(;;) { mutex_lock(&queue->mutex); size = list_dl_size(&queue->queue); mutex_unlock(&queue->mutex); if(size == 0) { break; } usleep(1000); } } int threaded_dll_cw_size(threaded_dll_cw *queue) { int size; mutex_lock(&queue->mutex); size = list_dl_size(&queue->queue); mutex_unlock(&queue->mutex); return size; } int threaded_dll_cw_room(threaded_dll_cw *queue) { int room; mutex_lock(&queue->mutex); room = queue->max_size - list_dl_size(&queue->queue); mutex_unlock(&queue->mutex); return room; } ya_result threaded_dll_cw_set_maxsize(threaded_dll_cw *queue, int max_size) { ya_result ret; mutex_lock(&queue->mutex); if(max_size >= list_dl_size(&queue->queue)) { queue->max_size = max_size; } ret = queue->max_size; // can only grow : wake up the writers that may be blocked because there was no room left in the queue cond_notify(&queue->cond_write); mutex_unlock(&queue->mutex); return ret; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/config_struct.c0000644000077100007710000000012412650131756022351 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.726344 30 ctime=1454597651.374344534 yadifa-2.1.6-5826/lib/dnscore/src/config_struct.c0000664000077100007710000001055612650131756022165 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include "dnscore/config_settings.h" static ya_result config_section_struct_init(struct config_section_descriptor_s *csd) { // NOP (void)csd; return SUCCESS; } static ya_result config_section_struct_start(struct config_section_descriptor_s *csd) { // NOP (void)csd; return SUCCESS; } static ya_result config_section_struct_stop(struct config_section_descriptor_s *csd) { // NOP (void)csd; return SUCCESS; } static ya_result config_section_struct_postprocess(struct config_section_descriptor_s *csd) { // NOP (void)csd; return SUCCESS; } static ya_result config_section_struct_finalise(struct config_section_descriptor_s *csd) { if(csd != NULL) { if(csd->vtbl != NULL) { free((char*)csd->vtbl->name); free((config_section_descriptor_vtbl_s*)csd->vtbl); } free(csd); } return SUCCESS; } static ya_result config_section_struct_set_wild(struct config_section_descriptor_s *csd, const char *key, const char *value) { return CONFIG_UNKNOWN_SETTING; } static ya_result config_section_struct_print_wild(struct config_section_descriptor_s *csd, output_stream *os, const char *key) { return CONFIG_UNKNOWN_SETTING; } static const config_section_descriptor_vtbl_s config_section_struct_descriptor = { NULL, NULL, config_section_struct_set_wild, config_section_struct_print_wild, config_section_struct_init, config_section_struct_start, config_section_struct_stop, config_section_struct_postprocess, config_section_struct_finalise }; /// register a simple (static) struct ya_result config_register_struct(const char *name, config_table_descriptor_item_s *table, void *data_struct, s32 priority) { config_section_descriptor_vtbl_s *vtbl; MALLOC_OR_DIE(config_section_descriptor_vtbl_s*, vtbl, sizeof(config_section_descriptor_vtbl_s), GENERIC_TAG); memcpy(vtbl, &config_section_struct_descriptor, sizeof(config_section_descriptor_vtbl_s)); vtbl->name = strdup(name); vtbl->table = table; config_section_descriptor_s *desc; MALLOC_OR_DIE(config_section_descriptor_s*, desc, sizeof(config_section_descriptor_s), GENERIC_TAG); desc->base = data_struct; desc->vtbl = vtbl; ya_result return_code = config_register(desc, priority); if(FAIL(return_code)) { free((char*)vtbl->name); free(vtbl); free(desc); } return return_code; // scan-build false positive: either it is freed, either it is stored in a global collection } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/dnskey_dsa.c0000644000077100007710000000012412651632654021630 xustar000000000000000027 mtime=1453798828.948622 27 atime=1454597464.702344 30 ctime=1454597651.426344534 yadifa-2.1.6-5826/lib/dnscore/src/dnskey_dsa.c0000664000077100007710000005267212651632654021451 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnskey DNSSEC keys functions * @ingroup dnsdbdnssec * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnscore/dnscore-config.h" #include #include #include #include #include #include #include #include #include "dnscore/dnscore.h" #include "dnscore/sys_types.h" #include "dnscore/base64.h" #include "dnscore/logger.h" #include "dnscore/dnskey.h" #include "dnscore/dnskey_dsa.h" #include "dnscore/dnssec_errors.h" #include "dnscore/dnskey.h" #define MODULE_MSG_HANDLE g_system_logger /// @note 20151118 edf -- names MUST end with ':' static const struct structdescriptor struct_DSA[] ={ {"Prime(p)", offsetof(DSA, p), STRUCTDESCRIPTOR_BN}, {"Subprime(q)", offsetof(DSA, q), STRUCTDESCRIPTOR_BN}, {"Base(g)", offsetof(DSA, g), STRUCTDESCRIPTOR_BN}, {"Private_value(x)", offsetof(DSA, priv_key), STRUCTDESCRIPTOR_BN}, {"Public_value(y)", offsetof(DSA, pub_key), STRUCTDESCRIPTOR_BN}, {NULL, 0, 0} }; static int dsa_getnid(u8 algorithm) { switch(algorithm) { case DNSKEY_ALGORITHM_DSASHA1_NSEC3: case DNSKEY_ALGORITHM_DSASHA1: { return NID_sha1; } default: { return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; } } } static DSA* dsa_dnskey_key_scan(FILE *f) { char tmp_label[1024]; /*char tmp_in[BASE64_ENCODED_SIZE(DNSSEC_MAXIMUM_KEY_SIZE_BYTES)];*/ u8 tmp_out[DNSSEC_MAXIMUM_KEY_SIZE_BYTES]; DSA* dsa = DSA_new(); while(!feof(f)) { tmp_label[0] = '\0'; if(fgets(tmp_label, sizeof (tmp_label), f) == (char*)EOF) /* comparison ptr/int ? man fgets */ { break; } char *tmp_in = strchr(tmp_label, ':'); if(tmp_in == NULL) { /* error */ break; } *tmp_in = '\0'; while(*++tmp_in == ' '); size_t tmp_in_len = strcspn(tmp_in, " \t\r\n"); tmp_in[tmp_in_len] = '\0'; if(strcmp(tmp_label, "Private-key-format") == 0) { if(memcmp(tmp_in, "v1.", 3) != 0) /* Assume that all 1.x formatted keys will be recognisable */ { break; } } else if(strcmp(tmp_label, "Algorithm") == 0) /* only accept algorithms NSEC3-DSA-SHA1 and NSEC-DSA-SHA1 */ { int alg = atoi(tmp_in); if(FAIL(dsa_getnid(alg))) { log_err("unsupported DSA algorithm '%s'", tmp_in); break; } } else { for(const struct structdescriptor *sd = struct_DSA; sd->name != NULL; sd++) { if(strcmp(tmp_label, sd->name) == 0) { BIGNUM **valuep = (BIGNUM**)&(((u8*)dsa)[sd->address]); if(*valuep != NULL) { log_err("field %s has already been initialized", tmp_label); fseek(f, 0, SEEK_END); break; } ya_result n = base64_decode(tmp_in, tmp_in_len, tmp_out); if(FAIL(n)) { log_err("unable to decode field %s (%s)", tmp_label, tmp_in); fseek(f, 0, SEEK_END); break; } *valuep = BN_bin2bn(tmp_out, n, NULL); break; } } /* for each possible field */ } } if((dsa->p == NULL) || (dsa->q == NULL) || (dsa->g == NULL) || (dsa->priv_key == NULL) || (dsa->pub_key == NULL)) { DSA_free(dsa); dsa = NULL; } return dsa; } static DSA* dsa_genkey(u32 size) { yassert(size >= DNSSEC_MINIMUM_KEY_SIZE && size <= DNSSEC_MAXIMUM_KEY_SIZE); int err; DSA* dsa; dsa = DSA_generate_parameters(size, NULL,0, NULL, NULL, NULL, NULL); yassert(dsa != NULL); err = DSA_generate_key(dsa); /* no callback */ if(err == 0) { // error DSA_free(dsa); dsa = NULL; } return dsa; } static ya_result dsa_signdigest(dnssec_key *key, u8 *digest, u32 digest_len, u8 *output) { DSA_SIG *sig = DSA_do_sign(digest, digest_len, key->key.dsa); if(sig != NULL) { u32 t = BN_num_bytes(key->key.dsa->pub_key) >> 3; u32 rn = BN_num_bytes(sig->r); *output++ = t; BN_bn2bin(sig->r, output); output += rn; BN_bn2bin(sig->s, output); DSA_SIG_free(sig); return (rn << 1) + 1; } else { unsigned long ssl_err; while((ssl_err = ERR_get_error()) != 0) { char buffer[256]; ERR_error_string_n(ssl_err, buffer, sizeof(buffer)); log_err("digest signature returned an ssl error %08x %s", ssl_err, buffer); } ERR_clear_error(); return DNSSEC_ERROR_DSASIGNATUREFAILED; } } static bool dsa_verifydigest(dnssec_key* key, u8* digest, u32 digest_len, u8* signature, u32 signature_len) { yassert(signature_len <= DNSSEC_MAXIMUM_KEY_SIZE_BYTES); #ifdef DEBUG log_debug6("dsa_verifydigest(K%{dnsname}-%03d-%05d, @%p, @%p)", key->owner_name, key->algorithm, key->tag, digest, signature); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG6, digest, digest_len, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG6, signature, signature_len, 32); #endif DSA_SIG sig; if(signature_len != 41) { log_warn("DSA signature expected to be 41 bytes long"); } if((signature_len & 1) == 0) { log_err("DSA signature size expected to be an odd number"); return FALSE; } u8 t = *signature++; if(t != 8) { log_warn("DSA T!=8"); } signature_len--; signature_len >>= 1; sig.r = BN_bin2bn(signature, signature_len, NULL); signature += signature_len; sig.s = BN_bin2bn(signature, signature_len, NULL); int err = DSA_do_verify(digest, digest_len, &sig, key->key.dsa); BN_free(sig.r); BN_free(sig.s); if(err != 1) { unsigned long ssl_err; while((ssl_err = ERR_get_error()) != 0) { char buffer[256]; ERR_error_string_n(ssl_err, buffer, sizeof (buffer)); log_err("digest verification returned an ssl error %08x %s", ssl_err, buffer); } ERR_clear_error(); return FALSE; } return TRUE; } static DSA* dsa_public_load(const u8* rdata, u16 rdata_size) { if(rdata == NULL) { return NULL; } const u8 *inptr = rdata; u32 t; t = *inptr; u32 pgy_len = 64 + (t << 3); if(rdata_size != 1 + 20 + 3 * pgy_len) { return NULL; } inptr++; BIGNUM* q; BIGNUM* p; BIGNUM* g; BIGNUM* y; q = BN_bin2bn(inptr, 20, NULL); if(q == NULL) { log_err("dsa_public_load: NULL q"); return NULL; } inptr += 20; p = BN_bin2bn(inptr, pgy_len, NULL); if(p == NULL) { log_err("dsa_public_load: NULL p"); BN_free(q); return NULL; } inptr += pgy_len; g = BN_bin2bn(inptr, pgy_len, NULL); if(g == NULL) { log_err("dsa_public_load: NULL g"); BN_free(q); BN_free(p); return NULL; } inptr += pgy_len; y = BN_bin2bn(inptr, pgy_len, NULL); if(y == NULL) { log_err("dsa_public_load: NULL y"); BN_free(q); BN_free(p); BN_free(g); return NULL; } DSA* dsa; dsa = DSA_new(); yassert(dsa != NULL); dsa->q = q; dsa->p = p; dsa->g = g; dsa->pub_key = y; return dsa; } static u32 dsa_public_store(DSA* dsa, u8* output_buffer) { unsigned char* outptr = output_buffer; BIGNUM* q = dsa->q; BIGNUM* p = dsa->p; BIGNUM* g = dsa->g; BIGNUM* y = dsa->pub_key; u32 q_n = BN_num_bytes(q); if(q_n != 20) { return 0; } u32 p_n = BN_num_bytes(p); u32 g_n = BN_num_bytes(g); u32 y_n = BN_num_bytes(y); if((p_n != g_n) || (p_n != y_n)) { return 0; } s32 t = p_n; t -= 64; if(t < 0) { return 0; } if((t & 7) != 0) { return 0; } t >>= 3; *outptr++ = t; BN_bn2bin(q, outptr); outptr += q_n; BN_bn2bin(p, outptr); outptr += p_n; BN_bn2bin(g, outptr); outptr += g_n; BN_bn2bin(y, outptr); outptr += y_n; return outptr - output_buffer; } static u32 dsa_dnskey_public_store(dnssec_key *key, u8 *rdata) { u32 len; SET_U16_AT(rdata[0], key->flags); rdata[2] = DNSKEY_PROTOCOL_FIELD; rdata[3] = key->algorithm; len = dsa_public_store(key->key.dsa, &rdata[4]) + 4; return len; } static u32 dsa_public_getsize(DSA* dsa) { BIGNUM* q = dsa->q; BIGNUM* p = dsa->p; BIGNUM* g = dsa->g; BIGNUM* y = dsa->pub_key; u32 q_n = BN_num_bytes(q); u32 p_n = BN_num_bytes(p); u32 g_n = BN_num_bytes(g); u32 y_n = BN_num_bytes(y); return 1 + q_n + p_n + g_n + y_n; } static u32 dsa_dnskey_public_getsize(dnssec_key* key) { return dsa_public_getsize(key->key.dsa) + 4; } static void dsa_free(dnssec_key* key) { DSA* dsa = key->key.dsa; DSA_free(dsa); key->key.dsa = NULL; } static bool dsa_equals(dnssec_key* key_a,dnssec_key* key_b) { /* RSA, compare modulus and exponent, exponent first (it's the smallest) */ if(key_a == key_b) { return TRUE; } if(dnssec_key_tag_field_set(key_a) && dnssec_key_tag_field_set(key_b)) { if(key_a->tag != key_b->tag) { return FALSE; } } if((key_a->flags == key_b->flags) && (key_a->algorithm == key_b->algorithm)) { if(strcmp(key_a->origin, key_b->origin) == 0) { DSA* a_dsa = key_a->key.dsa; DSA* b_dsa = key_b->key.dsa; if(BN_cmp(a_dsa->q, b_dsa->q) == 0) { if(BN_cmp(a_dsa->p, b_dsa->p) == 0) { if(BN_cmp(a_dsa->g, b_dsa->g) == 0) { if(BN_cmp(a_dsa->pub_key, b_dsa->pub_key) == 0) { if(a_dsa->priv_key != NULL) { if(b_dsa->priv_key != NULL) { return BN_cmp(a_dsa->priv_key, b_dsa->priv_key) == 0; } } else { return b_dsa->priv_key == NULL; } } } } } } } return FALSE; } const struct structdescriptor * dsa_get_fields_descriptor(dnssec_key* key) { return struct_DSA; } static const dnssec_key_vtbl dsa_vtbl = { dsa_signdigest, dsa_verifydigest, dsa_dnskey_public_getsize, dsa_dnskey_public_store, dsa_free, dsa_equals, dsa_get_fields_descriptor, "DSA" }; ya_result dsa_initinstance(DSA* dsa, u8 algorithm, u16 flags, const char* origin, dnssec_key** out_key) { int nid; u8 rdata[DNSSEC_MAXIMUM_KEY_SIZE_BYTES]; /* 4096 bits -> 1KB */ *out_key = NULL; if(FAIL(nid = dsa_getnid(algorithm))) { return nid; } #ifdef DEBUG memset(rdata, 0xff, sizeof (rdata)); #endif u32 rdata_size = dsa_public_getsize(dsa); if(rdata_size > DNSSEC_MAXIMUM_KEY_SIZE_BYTES) { return DNSSEC_ERROR_KEYISTOOBIG; } SET_U16_AT(rdata[0], flags); // NATIVEFLAGS rdata[2] = DNSKEY_PROTOCOL_FIELD; rdata[3] = algorithm; if(dsa_public_store(dsa, &rdata[4]) != rdata_size) { return DNSSEC_ERROR_UNEXPECTEDKEYSIZE; /* Computed size != real size */ } /* Note : + 4 because of the flags,protocol & algorithm bytes * are not taken in account */ u16 tag = dnskey_get_key_tag_from_rdata(rdata, rdata_size + 4); dnssec_key* key = dnskey_newemptyinstance(algorithm, flags, origin); key->key.dsa = dsa; key->vtbl = &dsa_vtbl; key->tag = tag; key->nid = nid; if(dsa->priv_key != NULL) { key->status |= DNSKEY_KEY_IS_PRIVATE; } *out_key = key; return SUCCESS; } ya_result dsa_loadprivate(FILE* private, u8 algorithm, u16 flags, const char* origin, dnssec_key** out_key) { *out_key = NULL; if(private == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } if((algorithm != DNSKEY_ALGORITHM_DSASHA1_NSEC3) && (algorithm != DNSKEY_ALGORITHM_DSASHA1)) { return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; } ya_result return_value = ERROR; DSA *dsa = dsa_dnskey_key_scan(private); if(dsa != NULL) { dnssec_key *key; if(ISOK(return_value = dsa_initinstance(dsa, algorithm, flags, origin, &key))) { *out_key = key; return return_value; } DSA_free(dsa); } return return_value; } ya_result dsa_private_parse_field(dnssec_key *key, parser_s *p) { if(key == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } if(key->nid != 0) { // already set return INVALID_STATE_ERROR; } switch(key->algorithm) { case DNSKEY_ALGORITHM_DSASHA1_NSEC3: case DNSKEY_ALGORITHM_DSASHA1: break; default: return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; break; } ya_result ret = ERROR; if(key->key.dsa == NULL) { key->key.dsa = DSA_new(); key->vtbl = &dsa_vtbl; } DSA *dsa = key->key.dsa; u32 label_len = parser_text_length(p); const char *label = parser_text(p); bool parsed_it = FALSE; u8 tmp_out[DNSSEC_MAXIMUM_KEY_SIZE_BYTES]; for(const struct structdescriptor *sd = struct_DSA; sd->name != NULL; sd++) { if(memcmp(label, sd->name, label_len) == 0) { BIGNUM **valuep = (BIGNUM**)&(((u8*)dsa)[sd->address]); ret = parser_next_word(p); if((*valuep != NULL) || FAIL(ret)) { return ret; } u32 word_len = parser_text_length(p); const char *word = parser_text(p); ya_result n = base64_decode(word, word_len, tmp_out); if(FAIL(n)) { log_err("unable to decode field %s", sd->name); return n; } *valuep = BN_bin2bn(tmp_out, n, NULL); if(*valuep == NULL) { log_err("unable to get big number from field %s", sd->name); return DNSSEC_ERROR_BNISNULL; } parsed_it = TRUE; break; } } /* for each possible field */ if(!parsed_it) { return SUCCESS; // unknown keyword (currently : ignore) } if((dsa->p != NULL) && (dsa->q != NULL) && (dsa->g != NULL) && /*(dsa->priv_key != NULL) &&*/ (dsa->pub_key != NULL)) { yassert(key->nid == 0); int nid; if(FAIL(nid = dsa_getnid(key->algorithm))) { return nid; } u32 rdata_size = dsa_public_getsize(dsa); u8 *rdata = tmp_out; if(rdata_size > DNSSEC_MAXIMUM_KEY_SIZE_BYTES) { return DNSSEC_ERROR_KEYISTOOBIG; } SET_U16_AT(rdata[0], key->flags); rdata[2] = DNSKEY_PROTOCOL_FIELD; rdata[3] = key->algorithm; if(dsa_public_store(dsa, &rdata[4]) != rdata_size) { return DNSSEC_ERROR_UNEXPECTEDKEYSIZE; /* Computed size != real size */ } /* Note : + 4 because of the flags,protocol & algorithm bytes * are not taken in account */ u16 tag = dnskey_get_key_tag_from_rdata(rdata, rdata_size + 4); key->tag = tag; key->nid = nid; key->status |= DNSKEY_KEY_IS_VALID; } if(((key->status & DNSKEY_KEY_IS_VALID) != 0) && (dsa->priv_key != NULL)) { key->status |= DNSKEY_KEY_IS_PRIVATE; } return ret; } ya_result dsa_loadpublic(const u8 *rdata, u16 rdata_size, const char *origin, dnssec_key** out_key) { *out_key = NULL; if(rdata == NULL || rdata_size <= 6 || origin == NULL) { /* bad */ return UNEXPECTED_NULL_ARGUMENT_ERROR; } u16 flags = ntohs(GET_U16_AT(rdata[0])); u8 algorithm = rdata[3]; if((algorithm != DNSKEY_ALGORITHM_DSASHA1_NSEC3) && (algorithm != DNSKEY_ALGORITHM_DSASHA1)) { return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; } rdata += 4; rdata_size -= 4; ya_result return_value = ERROR; DSA *dsa = dsa_public_load(rdata, rdata_size); if(dsa != NULL) { dnssec_key *key; if(ISOK(return_value = dsa_initinstance(dsa, algorithm, flags, origin, &key))) { *out_key = key; return return_value; } DSA_free(dsa); } return return_value; } ya_result dsa_newinstance(u32 size, u8 algorithm, u16 flags, const char* origin, dnssec_key** out_key) { *out_key = NULL; if(size > DNSSEC_MAXIMUM_KEY_SIZE) { return DNSSEC_ERROR_KEYISTOOBIG; } if((algorithm != DNSKEY_ALGORITHM_DSASHA1_NSEC3) && (algorithm != DNSKEY_ALGORITHM_DSASHA1)) { return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; } ya_result return_value = ERROR; DSA *dsa = dsa_genkey(size); if(dsa != NULL) { dnssec_key *key; if(ISOK(return_value = dsa_initinstance(dsa, algorithm, flags, origin, &key))) { *out_key = key; return return_value; } DSA_free(dsa); } return return_value; } ya_result dsa_storeprivate(FILE* private, dnssec_key* key) { if(private == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } if((key->algorithm != DNSKEY_ALGORITHM_DSASHA1_NSEC3) && (key->algorithm != DNSKEY_ALGORITHM_DSASHA1)) { return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; } u8 tmp_in[DNSSEC_MAXIMUM_KEY_SIZE_BYTES]; char tmp_out[BASE64_ENCODED_SIZE(DNSSEC_MAXIMUM_KEY_SIZE_BYTES)]; DSA* dsa = key->key.dsa; /* Modulus */ fprintf(private, "Private-key-format: v1.2\nAlgorithm: %i (?)", key->algorithm); /// @todo 20140523 edf -- handle v1.3 */ ya_result return_code = ERROR; for(const struct structdescriptor *sd = struct_DSA; sd->name != NULL; sd++) { fprintf(private, "%s: ", sd->name); BIGNUM **valuep = (BIGNUM**)&(((u8*)dsa)[sd->address]); // WRITE_BIGNUM_AS_BASE64(private, *valuep, tmp_in, tmp_out); if(FAIL(return_code = dnskey_write_bignum_as_base64(private, *valuep, tmp_in, sizeof(tmp_in), tmp_out, sizeof(tmp_out)))) { break; } fputs("\n", private); } return return_code; } /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/dnskey-keyring.c0000644000077100007710000000012412650131756022443 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.624344 30 ctime=1454597651.423344534 yadifa-2.1.6-5826/lib/dnscore/src/dnskey-keyring.c0000664000077100007710000001102712650131756022251 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup dnskey DNSSEC keys functions * @ingroup dnsdbdnssec * @addtogroup dnskey DNSKEY functions * @brief * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ /* #include #include */ #include "dnscore/dnscore-config.h" #include "dnscore/dnskey-keyring.h" ya_result dnskey_keyring_init(dnskey_keyring *ks) { u32_set_avl_init(&ks->tag_to_key); mutex_init(&ks->mtx); return SUCCESS; } ya_result dnskey_keyring_add(dnskey_keyring *ks, dnssec_key* key) { u32 hash = key->algorithm; hash <<= 16; hash |= key->tag; mutex_lock(&ks->mtx); u32_node *node = u32_set_avl_insert(&ks->tag_to_key, hash); if(node->value == NULL) { node->value = key; mutex_unlock(&ks->mtx); return SUCCESS; } else { mutex_unlock(&ks->mtx); return DNSSEC_ERROR_KEYRING_ALGOTAG_COLLISION; } } dnssec_key* dnskey_keyring_get(dnskey_keyring *ks, u8 algorithm, u16 tag, const u8 *domain) { u32 hash = algorithm; hash <<= 16; hash |= tag; mutex_lock(&ks->mtx); u32_node *node = u32_set_avl_find(&ks->tag_to_key, hash); if(node != NULL) { dnssec_key *key = (dnssec_key*)node->value; mutex_unlock(&ks->mtx); if((key != NULL) && dnsname_equals(key->owner_name, domain)) { return key; } } else { mutex_unlock(&ks->mtx); } return NULL; } dnssec_key* dnskey_keyring_remove(dnskey_keyring *ks, u8 algorithm, u16 tag, const u8 *domain) { u32 hash = algorithm; hash <<= 16; hash |= tag; mutex_unlock(&ks->mtx); u32_node *node = u32_set_avl_find(&ks->tag_to_key, hash); if(node != NULL) { dnssec_key *key = (dnssec_key*)node->value; mutex_unlock(&ks->mtx); if((key != NULL) && dnsname_equals(key->owner_name, domain)) { u32_set_avl_delete(&ks->tag_to_key, hash); return key; } } else { mutex_unlock(&ks->mtx); } return NULL; } static void dnskey_keyring_destroy_callback(void *node_keyp) { u32_node *node = (u32_node*)node_keyp; dnssec_key *key = (dnssec_key*)node->value; dnssec_key *key_next; while(key != NULL) { key_next = key->next; key->next = NULL; dnskey_free(key); key = key_next; } } void dnskey_keyring_destroy(dnskey_keyring *ks) { mutex_lock(&ks->mtx); u32_set_avl_callback_and_destroy(&ks->tag_to_key, dnskey_keyring_destroy_callback); mutex_unlock(&ks->mtx); mutex_destroy(&ks->mtx); } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/dnskey.c0000644000077100007710000000012412650131756020775 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.754344 30 ctime=1454597651.419344534 yadifa-2.1.6-5826/lib/dnscore/src/dnskey.c0000664000077100007710000003400212650131756020601 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** * @defgroup dnskey DNSSEC keys functions * @ingroup dnsdbdnssec * @addtogroup dnskey DNSKEY functions * @brief * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnscore/dnscore-config.h" #include #include #include "openssl/sha.h" #include "dnscore/dnsname.h" #include "dnscore/dnskey.h" #include "dnscore/dnskey_rsa.h" #include "dnscore/dnskey_dsa.h" #include "dnscore/digest.h" #include "dnscore/base64.h" #define ZDB_DNSKEY_TAG 0x59454b534e44 #define ZDB_DNSKEY_NAME_TAG 0x454d414e59454b /* unsigned long ac; * assumed to be 32 bits or larger * int i; * loop index * for ( ac = 0, i = 0; i < keysize; ++i ) ac += (i & 1) ? key[i] : key[i] << 8; ac += (ac >> 16) & 0xFFFF; return ac & 0xFFFF; => s=0; s+=key[0] s+=key[1]<<8 s+=key[2] s+=key[3]<<8 Basically it's a sum of little-endian unsigned 16 bits words And the reference implementation does not match the definition. "ignoring any carry bits" Yes ? So this is wrong : ac += (i & 1) ? key[i] : key[i] << 8; The least significant byte will have the add carry bit carried to the most signiticant byte. */ u16 dnskey_get_key_tag_from_rdata(const u8* dnskey_rdata, u32 dnskey_rdata_size) { u32 sum = 0; u32 sumh = 0; while(dnskey_rdata_size > 1) { sumh += *dnskey_rdata++; sum += *dnskey_rdata++; dnskey_rdata_size -= 2; } if(dnskey_rdata_size != 0) { sumh += *dnskey_rdata++; } sum += sumh << 8; sum += sum >> 16; return (u16)sum; } unsigned int dnskey_get_key_tag_from_rdata_reference(unsigned char key[], /* the RDATA part of the DNSKEY RR */ unsigned int keysize /* the RDLENGTH */ ) { unsigned long ac; /* assumed to be 32 bits or larger */ int i; /* loop index */ for(ac = 0, i = 0; i < keysize; ++i) ac += (i & 1) ? key[i] : key[i] << 8; ac += (ac >> 16) & 0xFFFF; return ac & 0xFFFF; } ya_result dnskey_digest_init(digest_s *ctx, u8 algorithm) { switch(algorithm) { case DNSKEY_ALGORITHM_DSASHA1: case DNSKEY_ALGORITHM_RSASHA1: case DNSKEY_ALGORITHM_DSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA1_NSEC3: digest_sha1_init(ctx); break; case DNSKEY_ALGORITHM_RSASHA256_NSEC3: digest_sha256_init(ctx); break; case DNSKEY_ALGORITHM_RSASHA512_NSEC3: digest_sha512_init(ctx); break; default: return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; } return SUCCESS; } ya_result dnskey_generate_ds_rdata(u8 digest_type, const u8 *dnskey_fqdn, const u8 *dnskey_rdata,u16 dnskey_rdata_size, u8 *out_rdata) { digest_s ctx; s32 digest_size; switch(digest_type) { case DS_DIGEST_SHA1: digest_sha1_init(&ctx); break; case DS_DIGEST_SHA256: digest_sha256_init(&ctx); break; default: return DNSSEC_ERROR_UNSUPPORTEDDIGESTALGORITHM; } digest_size = digest_get_size(&ctx); u16 tag = dnskey_get_key_tag_from_rdata(dnskey_rdata, dnskey_rdata_size); u8 algorithm = dnskey_rdata[3]; digest_update(&ctx, dnskey_fqdn, dnsname_len(dnskey_fqdn)); digest_update(&ctx, dnskey_rdata, dnskey_rdata_size); out_rdata[0] = tag >> 8; out_rdata[1] = tag; out_rdata[2] = algorithm; out_rdata[3] = digest_type; digest_final(&ctx, &out_rdata[4], digest_size); return 4 + digest_size; } // sanitises an origin static char* origin_dup_sanitize(const char* origin) { char* ret; if(origin == NULL) { MALLOC_OR_DIE(char*, ret, 2, GENERIC_TAG); ret[0] = '.'; ret[1] = '\0'; return ret; } int origin_len = strlen(origin); if(origin_len == 0) { MALLOC_OR_DIE(char*, ret, 2, GENERIC_TAG); ret[0] = '.'; ret[1] = '\0'; return ret; } if(origin[origin_len - 1] == '.') { origin_len++; MALLOC_OR_DIE(char*, ret, origin_len, GENERIC_TAG); //MEMCOPY(ret, origin, origin_len); for(int i = 0; i < origin_len; i++) { ret[i] = tolower(origin[i]); } } else { MALLOC_OR_DIE(char*, ret, origin_len + 2, GENERIC_TAG); //MEMCOPY(ret, origin, origin_len); for(int i = 0; i < origin_len; i++) { ret[i] = tolower(origin[i]); } ret[origin_len++] = '.'; ret[origin_len] = '\0'; } return ret; } /* * Creates an empty key, it will then have to be initialized with a "real" key */ dnssec_key* dnskey_newemptyinstance(u8 algorithm, u16 flags, const char *origin) { yassert(origin != NULL); dnssec_key* key; MALLOC_OR_DIE(dnssec_key*, key, sizeof(dnssec_key), ZDB_DNSKEY_TAG); ZEROMEMORY(key, sizeof(dnssec_key)); key->origin = origin_dup_sanitize(origin); /* origin is allocated with ZALLOC using ZALLOC_STRING_OR_DIE * In this mode, the byte before the pointer is the size of the string. */ MALLOC_OR_DIE(u8*, key->owner_name, cstr_get_dnsname_len(key->origin), ZDB_DNSKEY_NAME_TAG); cstr_to_dnsname(key->owner_name, key->origin); key->epoch_created = MAX_U32; key->epoch_publish = MAX_U32; key->epoch_activate = MAX_U32; key->epoch_revoke = MAX_U32; key->epoch_inactive = MAX_U32; key->epoch_delete = MAX_U32; key->flags = flags; key->algorithm = algorithm; /*key->key.X=....*/ /*key->tag=00000*/ /*key->is_private=TRUE;*/ return key; } ya_result dnskey_new_from_rdata(const u8 *rdata, u16 rdata_size, const char *origin, dnssec_key **out_key) { if(out_key == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } //u16 flags = ntohs(GET_U16_AT(rdata[0])); u8 algorithm = rdata[3]; ya_result return_value; *out_key = NULL; switch(algorithm) { case DNSKEY_ALGORITHM_RSASHA1: case DNSKEY_ALGORITHM_RSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA256_NSEC3: case DNSKEY_ALGORITHM_RSASHA512_NSEC3: return_value = rsa_loadpublic(rdata, rdata_size, origin, out_key); break; case DNSKEY_ALGORITHM_DSASHA1: case DNSKEY_ALGORITHM_DSASHA1_NSEC3: return_value = dsa_loadpublic(rdata, rdata_size, origin, out_key); break; default: return_value = DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; break; } return return_value; } void dnskey_free(dnssec_key *key) { #ifdef DEBUG if(key->next != NULL) { // log_err("dnskey_free(%p): a key should be detached from its list before destruction", key); logger_flush(); abort(); } #endif if(key->vtbl != NULL) { key->vtbl->dnskey_key_free(key); } free(key->origin); free(key->owner_name); #ifdef DEBUG memset(key, 0xfe, sizeof(dnssec_key)); #endif free(key); } ya_result dnskey_write_bignum_as_base64(FILE *f_, const BIGNUM* num_, u8 *tmp_in_, u32 tmp_in_size, char *tmp_out_, u32 tmp_out_size) { if(num_ == NULL) { return DNSSEC_ERROR_BNISNULL; } u32 n = BN_num_bytes(num_); if(n > tmp_in_size) { return DNSSEC_ERROR_BNISBIGGERTHANBUFFER; } BN_bn2bin(num_, tmp_in_); n = base64_encode(tmp_in_,n,tmp_out_); if((n = fwrite(tmp_out_,n,1,f_))!=1) { return DNSSEC_ERROR_KEYWRITEERROR; } return SUCCESS; } /** * Returns the most relevant publication time. * * publish > activate > created > now * * @param key * @return */ u32 dnskey_get_publish_epoch(dnssec_key *key) { u32 ret = 0; if(key->epoch_publish != 0) { ret = key->epoch_publish; } else if(key->epoch_activate != 0) { ret = key->epoch_activate; } else if(key->epoch_created != 0) { ret = key->epoch_created; } else { ret = time(NULL); } return ret; } /** * Returns the most relevant activation time. * * activate > publish > created > now * * @param key * @return */ u32 dnskey_get_activate_epoch(dnssec_key *key) { u32 ret = 0; if(key->epoch_activate != 0) { ret = key->epoch_activate; } else if(key->epoch_publish != 0) { ret = key->epoch_publish; } else if(key->epoch_created != 0) { ret = key->epoch_created; } else { ret = time(NULL); } return ret; } /** * Returns the most relevant revocation time. * * revoke > never * * @param key * @return */ u32 dnskey_get_revoke_epoch(dnssec_key *key) { u32 ret = 0; if(key->epoch_revoke != 0) { ret = key->epoch_revoke; } else { ret = MAX_U32; } return ret; } /** * Returns the most relevant inactivation time. * * inactive > delete > never * * @param key * @return */ u32 dnskey_get_inactive_epoch(dnssec_key *key) { u32 ret = 0; if(key->epoch_inactive != 0) { ret = key->epoch_inactive; } else if(key->epoch_delete != 0) { ret = key->epoch_delete; } else { ret = MAX_U32; } return ret; } /** * Returns the most relevant delete time. * * delete > inactive > never * * @param key * @return */ u32 dnskey_get_delete_epoch(dnssec_key *key) { u32 ret = 0; if(key->epoch_delete != 0) { ret = key->epoch_delete; } else if(key->epoch_inactive != 0) { ret = key->epoch_inactive; } else { ret = MAX_U32; } return ret; } /** * * Compares two keys for equality * * @param a * @param b * @return */ bool dnssec_key_equals(dnssec_key* a, dnssec_key* b) { if(a == b) { return TRUE; } if((a->tag == b->tag) && (a->flags == b->flags) && (a->algorithm == b->algorithm)) { /* Compare the origin */ if(strcmp(a->origin, b->origin) == 0) { /* Compare the content of the key */ return a->vtbl->dnssec_key_equals(a, b); } } return FALSE; } u16 dnssec_key_get_tag(dnssec_key *key) { if((key->status & DNSKEY_KEY_TAG_SET) == 0) { u8 rdata[2048]; u32 rdata_size = key->vtbl->dnskey_key_writerdata(key, rdata); u16 tag = dnskey_get_key_tag_from_rdata(rdata, rdata_size); key->tag = tag; key->status |= DNSKEY_KEY_TAG_SET; } return key->tag; } u8 dnssec_key_get_algorithm(dnssec_key *key) { return key->algorithm; } const u8 * dnssec_key_get_domain(dnssec_key *key) { return key->owner_name; } bool dnssec_key_is_private(dnssec_key *key) { return (key->status & DNSKEY_KEY_IS_PRIVATE) != 0; } /** * Adds/Remove a key from a key chain. * The 'next' field of the key is used. * A key can only be in one chain at a time. * This is meant to be used in the keystore. * * @param keyp */ void dnskey_key_add_in_chain(dnssec_key *key, dnssec_key **prevp) { u16 key_tag = dnssec_key_get_tag(key); while(*prevp != NULL) { if(dnssec_key_get_tag(*prevp) > key_tag) { key->next = *prevp; *prevp = key; return; } prevp = &((*prevp)->next); } // append *prevp = key; key->next = NULL; } /** * Adds/Remove a key from a key chain. * The 'next' field of the key is used. * A key can only be in one chain at a time. * This is meant to be used in the keystore. * * @param keyp */ void dnskey_key_remove_from_chain(dnssec_key *key, dnssec_key **prevp) { u16 key_tag = dnssec_key_get_tag(key); while(*prevp != NULL) { u16 tag; if((tag = dnssec_key_get_tag(*prevp)) >= key_tag) { if(tag == key_tag) { *prevp = (*prevp)->next; // now (and only now) the next field can (and must) be cleared key->next = NULL; } break; } prevp = &((*prevp)->next); } } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/pace.c0000644000077100007710000000012412650131756020410 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.723344 30 ctime=1454597651.532344534 yadifa-2.1.6-5826/lib/dnscore/src/pace.c0000664000077100007710000001106512650131756020220 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include #include "dnscore/logger.h" #include "dnscore/pace.h" extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger #define PACE_DUMP 0 #define PACE_MODE_SMOOTH 0 #define PACE_MODE_HARD 1 #define PACE_MODE PACE_MODE_HARD void pace_init(pace_s *pace, u64 min_us, u64 max_us, const char *name) { if(min_us > max_us) { u64 tmp = max_us; max_us = min_us; min_us = tmp; } pace->min_us = min_us; pace->max_us = max_us; #if PACE_MODE == PACE_MODE_SMOOTH pace->current_us = (max_us + min_us) >> 1; #else pace->current_us = min_us; #endif pace->counter = 0; pace->name = name; } /** * Will pause for a while */ void pace_wait(pace_s *pace) { u64 start = timeus(); if((pace->counter > 0) && ((pace->counter & 3) != 0)) { #if defined(PACE_DUMP) && (PACE_DUMP > 0) u64 current = pace->current_us; #endif pace->current_us <<= 1; if(pace->current_us == 0) { pace->current_us = 1; } if(pace->current_us > pace->max_us) { pace->current_us = pace->max_us; } #if defined(PACE_DUMP) && (PACE_DUMP > 0) if(current != pace->current_us) { log_debug("pace: '%s' waiting for %lluµs (#%llu)", pace->name, pace->current_us, pace->counter); } #endif } else { pace->wait_start = start; #if defined(PACE_DUMP) && (PACE_DUMP > 0) log_debug("pace: '%s' waiting for %lluµs (#%llu)", pace->name, pace->current_us, pace->counter); #endif } pace->counter++; u64 elapsed = 0; u64 current = pace->current_us; do { if(elapsed > current) { log_err("pace_wait: impossible! elapsed = %llu > %llu", elapsed, current); break; } usleep(current - elapsed); u64 now = timeus(); if(now < start) { log_err("pace_wait: now=%llu < start=%llu (%llu)", now, start, start-now); break; } elapsed = now - start; } while(elapsed < current); } /** * Will update the pace taking the fact that now we have work to do */ void pace_work(pace_s *pace) { pace->wait_end = timeus(); #if defined(PACE_DUMP) && (PACE_DUMP > 0) log_debug("pace: '%s' working after %lluµs (%lluµs #%llu)", pace->name, pace->wait_end - pace->wait_start, pace->current_us, pace->counter); #endif pace->counter = 0; #if PACE_MODE == PACE_MODE_SMOOTH pace->current_us >>= 1; if(pace->current_us < pace->min_us) { pace->current_us = pace->min_us; } #else pace->current_us = pace->min_us; #endif } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/mt_output_stream.c0000644000077100007710000000012412650131756023113 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.637344 30 ctime=1454597651.521344534 yadifa-2.1.6-5826/lib/dnscore/src/mt_output_stream.c0000664000077100007710000001163612650131756022727 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/mt_output_stream.h" #include "dnscore/mutex.h" #define MT_OUTPUT_STREAM_TAG 0x534F544D /* MTOS */ typedef struct mt_output_stream_data mt_output_stream_data; struct mt_output_stream_data { output_stream filtered; mutex_t mutex; cond_t cond; volatile s32 locked; }; static ya_result mt_write(output_stream *stream, const u8 *buffer, u32 len) { mt_output_stream_data *data = (mt_output_stream_data *) stream->data; mutex_lock(&data->mutex); data->locked++; while(data->locked > 1) { cond_wait(&data->cond, &data->mutex); } ya_result ret = output_stream_write(&data->filtered, buffer, len); data->locked--; cond_notify(&data->cond); mutex_unlock(&data->mutex); return ret; } static ya_result mt_flush(output_stream *stream) { mt_output_stream_data *data = (mt_output_stream_data *) stream->data; mutex_lock(&data->mutex); data->locked++; while(data->locked > 1) { cond_wait(&data->cond, &data->mutex); } ya_result ret = output_stream_flush(&data->filtered); data->locked--; cond_notify(&data->cond); mutex_unlock(&data->mutex); return ret; } static void mt_close(output_stream *stream) { mt_output_stream_data *data = (mt_output_stream_data *) stream->data; mutex_lock(&data->mutex); data->locked++; while(data->locked > 1) { cond_wait(&data->cond, &data->mutex); } output_stream_set_void(stream); output_stream_close(&data->filtered); data->locked--; cond_notify(&data->cond); mutex_unlock(&data->mutex); cond_finalize(&data->cond); mutex_destroy(&data->mutex); free(data); } static const output_stream_vtbl mt_output_stream_vtbl = { mt_write, mt_flush, mt_close, "mt_output_stream", }; ya_result mt_output_stream_init(output_stream *filtered, output_stream *stream) { mt_output_stream_data *data; if(filtered->vtbl == NULL) { return INVALID_STATE_ERROR; } MALLOC_OR_DIE(mt_output_stream_data*, data, sizeof(mt_output_stream_data), MT_OUTPUT_STREAM_TAG); data->filtered.data = filtered->data; data->filtered.vtbl = filtered->vtbl; filtered->data = NULL; /* Clean the filtered BEFORE setting up the stream */ filtered->vtbl = NULL; mutex_init(&data->mutex); cond_init(&data->cond); data->locked = 0; stream->data = data; stream->vtbl = &mt_output_stream_vtbl; return SUCCESS; } output_stream * mt_output_stream_get_filtered(output_stream *bos) { mt_output_stream_data *data = (mt_output_stream_data *) bos->data; return &data->filtered; } bool is_mt_output_stream(const output_stream* bos) { return bos->vtbl == &mt_output_stream_vtbl; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/digest_sha0.c0000644000077100007710000000012412650131756021672 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.751344 30 ctime=1454597651.386344534 yadifa-2.1.6-5826/lib/dnscore/src/digest_sha0.c0000664000077100007710000000501212650131756021475 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include "dnscore/digest.h" #ifndef OPENSSL_NO_SHA0 s32 digest_sha0_update(digest_s* ctx, const void* buffer, u32 size) { return SHA_Update(&ctx->ctx.sha0, buffer, size) - 1; } s32 digest_sha0_final(digest_s* ctx, void *outbuffer, u32 outsize) { if(outsize >= SHA_DIGEST_LENGTH) { return SHA_Final(outbuffer, &ctx->ctx.sha0) - 1; } return -2; } s32 digest_sha0_get_size(digest_s* ctx) { return SHA_DIGEST_LENGTH; } static const struct digest_vtbl sha0_vtbl = { digest_sha0_update, digest_sha0_final, digest_sha0_get_size, "SHA0" }; void digest_sha0_init(digest_s *ctx) { ctx->vtbl = &sha0_vtbl; SHA_Init(&ctx->ctx.sha0); } #endif yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/threaded_ringbuffer_cw.c0000644000077100007710000000012412650131756024162 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.693344 30 ctime=1454597651.622344534 yadifa-2.1.6-5826/lib/dnscore/src/threaded_ringbuffer_cw.c0000664000077100007710000003006012650131756023766 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/threaded_ringbuffer_cw.h" #define THREADED_QUEUE_TAG 0x455545555154 /* TQUEUE */ /* * Note: * * If a pthread_mutex_init fails, it's because of a resource, memory or rights issue. * So the application will fail soon enough. * I still should check this and exit. * * pthread_mutex_lock will fail only if the current thread aleady owns the mutex * * pthread_mutex_unlock will fail only if the current thread does not owns the mutex * */ void threaded_ringbuffer_cw_init(threaded_ringbuffer_cw *queue, int max_size) { #ifdef DEBUG memset(queue, 0xff, sizeof(threaded_ringbuffer_cw)); #endif MALLOC_OR_DIE(void**, queue->buffer, sizeof (void*) * max_size, THREADED_QUEUE_TAG); queue->buffer_limit = &queue->buffer[max_size]; queue->write_slot = queue->buffer; queue->read_slot = queue->buffer; pthread_mutex_init(&queue->mutex, NULL); pthread_cond_init(&queue->cond_read, NULL); pthread_cond_init(&queue->cond_write, NULL); queue->max_size = max_size; queue->size = 0; } void threaded_ringbuffer_cw_finalize(threaded_ringbuffer_cw *queue) { /** * If the queue is not empty : too bad ! * * It's the responsibility of the caller to ensure the queue and set of listeners is empty. */ free(queue->buffer); queue->buffer = NULL; pthread_cond_destroy(&queue->cond_write); pthread_cond_destroy(&queue->cond_read); pthread_mutex_destroy(&queue->mutex); #ifdef DEBUG memset(queue, 0xde, sizeof(threaded_ringbuffer_cw)); #endif } void threaded_ringbuffer_cw_enqueue(threaded_ringbuffer_cw *queue, void *constant_pointer) { /* * Ensure I'm allowed to work on queue (only one working on it) */ pthread_mutex_lock(&queue->mutex); while( queue->size >= queue->max_size ) { pthread_cond_wait(&queue->cond_write, &queue->mutex); } /* * Set the data to the write position, * and move the write position to the next slot * */ /** * @note: "if(overflow) reset" is (much) faster than MOD(limit) */ *queue->write_slot++ = constant_pointer; if(queue->write_slot == queue->buffer_limit) { queue->write_slot = queue->buffer; } queue->size++; /* * We are done here, we can always signal the readers */ pthread_cond_broadcast(&queue->cond_read); pthread_mutex_unlock(&queue->mutex); } bool threaded_ringbuffer_cw_try_enqueue(threaded_ringbuffer_cw* queue, void* constant_pointer) { /* * Ensure I'm allowed to work on queue (only one working on it) */ if(pthread_mutex_trylock(&queue->mutex) != 0) { return FALSE; } if( queue->size >= queue->max_size ) { return FALSE; } /* * Set the data to the write position, * and move the write position to the next slot * */ /** * @note: "if(overflow) reset" is (much) faster than MOD(limit) */ *queue->write_slot++ = constant_pointer; if(queue->write_slot == queue->buffer_limit) { queue->write_slot = queue->buffer; } queue->size++; /* * We are done here, we can always signal the readers */ pthread_cond_broadcast(&queue->cond_read); pthread_mutex_unlock(&queue->mutex); return TRUE; } void* threaded_ringbuffer_cw_peek(threaded_ringbuffer_cw *queue) { /* * Ensure I'm allowed to work on queue (only one working on it) */ pthread_mutex_lock(&queue->mutex); while( queue->size == 0 ) { pthread_cond_wait(&queue->cond_read,&queue->mutex); } /* * Get the data from the read position, * and move the read position to the next slot * */ void* data = *queue->read_slot; /* * We are done here. */ pthread_mutex_unlock(&queue->mutex); return data; } void* threaded_ringbuffer_cw_try_peek(threaded_ringbuffer_cw *queue) { pthread_mutex_lock(&queue->mutex); if( queue->size == 0 ) { pthread_mutex_unlock(&queue->mutex); return NULL; } /* * Get the data from the read position, * and move the read position to the next slot * */ void* data = *queue->read_slot; /* * We are done here. */ pthread_mutex_unlock(&queue->mutex); return data; } void* threaded_ringbuffer_cw_dequeue(threaded_ringbuffer_cw *queue) { /* * Ensure I'm allowed to work on queue (only one working on it) */ pthread_mutex_lock(&queue->mutex); while( queue->size == 0 ) { pthread_cond_wait(&queue->cond_read,&queue->mutex); } /* * Get the data from the read position, * and move the read position to the next slot * */ void* data = *queue->read_slot++; if(queue->read_slot == queue->buffer_limit) { queue->read_slot = queue->buffer; } if(queue->size-- == queue->max_size) /* enqueue has just been locked -> unlock */ { /* * The queue is full : the queuers are waiting. * Since we will are removing something, we can free (one of) them. * (They will however still be locked until the queue mutex is released) */ pthread_cond_broadcast(&queue->cond_write); } /* * We are done here. */ pthread_mutex_unlock(&queue->mutex); return data; } void* threaded_ringbuffer_cw_try_dequeue(threaded_ringbuffer_cw *queue) { pthread_mutex_lock(&queue->mutex); if( queue->size == 0 ) { pthread_mutex_unlock(&queue->mutex); return NULL; } /* * Get the data from the read position, * and move the read position to the next slot * */ void* data = *queue->read_slot++; if(queue->read_slot == queue->buffer_limit) { queue->read_slot = queue->buffer; } if(queue->size-- == queue->max_size) /* enqueue has just been locked -> unlock */ { /* * The queue is full : the queuers are waiting. * Since we will are removing something, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ pthread_cond_broadcast(&queue->cond_write); } /* * We are done here. */ pthread_mutex_unlock(&queue->mutex); return data; } u32 threaded_ringbuffer_cw_dequeue_set(threaded_ringbuffer_cw *queue, void **array, u32 array_size) { /* * Ensure I'm allowed to work on queue (only one working on it) */ pthread_mutex_lock(&queue->mutex); while( queue->size == 0 ) { pthread_cond_wait(&queue->cond_read,&queue->mutex); } /* * Get up to array_size times the data from the read position, * and move the read position to the next slot * */ bool unlock_enqueue = queue->size == queue->max_size; /* enqueue has just been locked -> schedule unlock */ u32 loops = MIN(queue->size, array_size); /* The amount we will be able to extract */ void ** const limit = &array[loops]; /* compute the limit so we only have one increment and one compare */ while(array < limit) { void* data = *queue->read_slot++; *array++ = data; if(queue->read_slot == queue->buffer_limit) { queue->read_slot = queue->buffer; } if(data == NULL) /* Break if a terminator is found*/ { loops -= limit - array; break; } } queue->size -= loops; /* adjust the size */ if(unlock_enqueue) /* enqueue has just been locked -> unlock */ { /* * The queue is full : the queuers are waiting. * Since we will are removing something, we car free (one of) them. * (They will however still be locked until the queue mutex is released) */ pthread_cond_broadcast(&queue->cond_write); } /* * We are done here. */ pthread_mutex_unlock(&queue->mutex); return loops; /* Return the amount we got from the queue */ } void threaded_ringbuffer_cw_wait_empty(threaded_ringbuffer_cw *queue) { int size; for(;;) { pthread_mutex_lock(&queue->mutex); size = queue->size; pthread_mutex_unlock(&queue->mutex); if(size == 0) { break; } usleep(1000); } } int threaded_ringbuffer_cw_size(threaded_ringbuffer_cw *queue) { int size; pthread_mutex_lock(&queue->mutex); size = queue->size; pthread_mutex_unlock(&queue->mutex); return size; } int threaded_ringbuffer_cw_room(threaded_ringbuffer_cw *queue) { int room; pthread_mutex_lock(&queue->mutex); room = queue->max_size - queue->size; pthread_mutex_unlock(&queue->mutex); return room; } ya_result threaded_ringbuffer_cw_set_maxsize(threaded_ringbuffer_cw *queue, int max_size) { ya_result ret = ERROR; pthread_mutex_lock(&queue->mutex); if(max_size >= queue->size) { void** tmp; MALLOC_OR_DIE(void**, tmp, sizeof (void*) * max_size, THREADED_QUEUE_TAG); /* * Copy from the read to the write position */ void** p = tmp; u32 count = queue->size; while(count-- > 0) { *p++ = *queue->read_slot++; // wrap when the end is reached if(queue->read_slot == queue->buffer_limit) { queue->read_slot = queue->buffer; } } /* * At this point ... * * tmp is the new "read" * p is the new "write", but it could be at the limit * */ free(queue->buffer); queue->buffer = tmp; queue->buffer_limit = &tmp[max_size]; queue->read_slot = tmp; if(p == queue->buffer_limit) { p = tmp; } queue->write_slot = p; queue->max_size = max_size; } ret = queue->max_size; pthread_mutex_unlock(&queue->mutex); return ret; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/buffer_output_stream.c0000644000077100007710000000012412650131756023744 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.667344 30 ctime=1454597651.326344534 yadifa-2.1.6-5826/lib/dnscore/src/buffer_output_stream.c0000664000077100007710000001327112650131756023555 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/buffer_output_stream.h" #define BUFFER_OUTPUT_STREAM_TAG 0x534F5246465542 /* BUFFROS */ typedef struct buffer_output_stream_data buffer_output_stream_data; struct buffer_output_stream_data { output_stream filtered; u32 buffer_maxsize; u32 buffer_offset; u8 buffer[1]; }; static ya_result buffer_output_stream_write(output_stream* stream, const u8* buffer, u32 len) { buffer_output_stream_data* data = (buffer_output_stream_data*)stream->data; u8* src = data->buffer; ya_result ret; u32 remaining = data->buffer_maxsize - data->buffer_offset; if(len < remaining) { MEMCOPY(&src[data->buffer_offset], buffer, len); data->buffer_offset += len; /* There are still some bytes available */ return len; } /* len >= remaining : fill the buffer */ MEMCOPY(&src[data->buffer_offset], buffer, remaining); len -= remaining; buffer += remaining; /* NOTE: at this point the internal buffer is full : write it */ if(FAIL(ret = output_stream_write(&data->filtered, src, data->buffer_maxsize))) { return ret; } if(len > data->buffer_maxsize) { /* It would be pointless to buffer a write bigger than the buffer */ data->buffer_offset = 0; /* mark the buffer as "empty" */ if(FAIL(ret = output_stream_write(&data->filtered, buffer, len))) { return ret; } return remaining + len; /* the chunk we've write from the buffer + the chunk we've write from the stream */ } /* What remains to write is smaller than the buffer max size */ MEMCOPY(src, buffer, len); data->buffer_offset = len; return remaining + len; } static ya_result buffer_output_stream_flush(output_stream* stream) { buffer_output_stream_data* data = (buffer_output_stream_data*)stream->data; if(data->buffer_offset > 0) { ya_result ret; if(FAIL(ret = output_stream_write(&data->filtered, data->buffer, data->buffer_offset))) { return ret; } data->buffer_offset = 0; } return output_stream_flush(&data->filtered); } static void buffer_output_stream_close(output_stream* stream) { buffer_output_stream_flush(stream); buffer_output_stream_data* data = (buffer_output_stream_data*)stream->data; output_stream_close(&data->filtered); free(data); output_stream_set_void(stream); } static const output_stream_vtbl buffer_output_stream_vtbl ={ buffer_output_stream_write, buffer_output_stream_flush, buffer_output_stream_close, "buffer_output_stream", }; ya_result buffer_output_stream_init(output_stream* filtered, output_stream* stream, int buffer_size) { buffer_output_stream_data* data; if(filtered->vtbl == NULL) { return OBJECT_NOT_INITIALIZED; } MALLOC_OR_DIE(buffer_output_stream_data*, data, sizeof (buffer_output_stream_data) + buffer_size - 1, BUFFER_OUTPUT_STREAM_TAG); data->filtered.data = filtered->data; data->filtered.vtbl = filtered->vtbl; data->buffer_maxsize = buffer_size; data->buffer_offset = 0; output_stream_set_void(filtered); stream->data = data; stream->vtbl = &buffer_output_stream_vtbl; return SUCCESS; } output_stream* buffer_output_stream_get_filtered(output_stream* bos) { buffer_output_stream_data* data = (buffer_output_stream_data*)bos->data; yassert(bos->vtbl == &buffer_output_stream_vtbl); return &data->filtered; } bool is_buffer_output_stream(output_stream* os) { return os->vtbl == &buffer_output_stream_vtbl; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/file_input_stream.c0000644000077100007710000000012412650131756023211 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.630344 30 ctime=1454597651.445344534 yadifa-2.1.6-5826/lib/dnscore/src/file_input_stream.c0000664000077100007710000001553112650131756023023 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #if _FILE_OFFSET_BITS != 64 #define _LARGEFILE64_SOURCE #endif #include "dnscore/dnscore-config.h" #include #include #include #include #include #include "dnscore/file_input_stream.h" #include "dnscore/fdtools.h" #include "dnscore/timems.h" typedef struct file_input_stream file_input_stream; struct file_input_stream { union { void* _voidp; int fd; } data; const input_stream_vtbl* vtbl; }; #if DEBUG_BENCH_FD static debug_bench_s debug_read; static bool file_input_stream_debug_bench_register_done = FALSE; static inline void file_input_stream_debug_bench_register() { if(!file_input_stream_debug_bench_register_done) { file_input_stream_debug_bench_register_done = TRUE; debug_bench_register(&debug_read, "read"); } } #endif /* * Maybe I should not do a "read-fully" here ... */ static ya_result file_read(input_stream* stream_, u8* buffer, u32 len) { #if DEBUG_BENCH_FD file_input_stream_debug_bench_register(); u64 bench = debug_bench_start(&debug_read); #endif file_input_stream* stream = (file_input_stream*)stream_; u8* start = buffer; while(len > 0) { #if defined(SSIZE_MAX) && (SSIZE_MAX < 0xffffffffU) ssize_t ret = read(stream->data.fd, buffer, MIN(len, SSIZE_MAX)); #else ssize_t ret = read(stream->data.fd, buffer, len); #endif if(ret < 0) { int err = errno; if(err == EINTR) { continue; } /* error */ return MAKE_ERRNO_ERROR(err); } if(ret == 0) /* EOF */ { break; } buffer += ret; len -= ret; } #if DEBUG_BENCH_FD debug_bench_stop(&debug_read, bench); #endif return buffer - start; } static void file_close(input_stream* stream_) { file_input_stream* stream = (file_input_stream*)stream_; assert((stream->data.fd < 0)||(stream->data.fd >2)); if(stream->data.fd != ~0) { close_ex(stream->data.fd); } input_stream_set_void(stream_); } static ya_result file_skip(input_stream* stream_, u32 len) { file_input_stream* stream = (file_input_stream*)stream_; if(lseek(stream->data.fd, len, SEEK_CUR) >= 0) { return len; } return ERRNO_ERROR; } static const input_stream_vtbl file_input_stream_vtbl ={ file_read, file_skip, file_close, "file_input_stream" }; ya_result fd_input_stream_attach(input_stream *stream_, int fd) { file_input_stream* stream = (file_input_stream*)stream_; if(fd < 0) { return ERRNO_ERROR; } stream->data.fd = fd; stream->vtbl = &file_input_stream_vtbl; return SUCCESS; } void fd_input_stream_detach(input_stream *stream_) { file_input_stream* stream = (file_input_stream*)stream_; stream->data.fd = -1; } ya_result file_input_stream_open(const char *filename, input_stream *stream_) { int fd = open_ex(filename, O_RDONLY); #if (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L) && !defined(__gnu__hurd__) if(fd >= 0) { posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL); } #endif return fd_input_stream_attach(stream_, fd); } ya_result file_input_stream_open_ex(const char *filename, int flags, input_stream *stream_) { int fd = open_ex(filename, O_RDONLY | flags); #if (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L) && !defined(__gnu__hurd__) if(fd >= 0) { posix_fadvise(fd, 0, 0, POSIX_FADV_SEQUENTIAL); } #endif return fd_input_stream_attach(stream_, fd); } ya_result fd_input_stream_get_filedescriptor(input_stream* stream_) { file_input_stream* stream = (file_input_stream*)stream_; return stream->data.fd ; } ya_result fd_input_stream_seek(input_stream* stream_, u64 offset) { if(is_fd_input_stream(stream_)) { file_input_stream* stream = (file_input_stream*)stream_; int ret; #if _FILE_OFFSET_BITS == 64 ret = lseek(stream->data.fd, offset, SEEK_SET); #else ret = lseek64(stream->data.fd, offset, SEEK_SET); #endif if(ret >= 0) { return SUCCESS; } else { return ERRNO_ERROR; } } else { return INCORRECT_RDATA; } } bool is_fd_input_stream(input_stream* stream_) { file_input_stream* stream = (file_input_stream*)stream_; return (stream != NULL) && (stream->vtbl == &file_input_stream_vtbl); } void file_input_steam_advise_sequential(input_stream* stream_) { file_input_stream* stream = (file_input_stream*)stream_; #if (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L) && !defined(__gnu_hurd__) if(stream->data.fd >= 0) { posix_fadvise(stream->data.fd, 0, 0, POSIX_FADV_SEQUENTIAL); } #endif } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/ptr_set.c0000644000077100007710000000012412650131756021160 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.640344 30 ctime=1454597651.562344534 yadifa-2.1.6-5826/lib/dnscore/src/ptr_set.c0000664000077100007710000001630412650131756020771 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnscore/dnscore-config.h" #include #include #define _PTR_SET_COLLECTION_C #define DEBUG_LEVEL 0 #include "dnscore/ptr_set.h" #include "dnscore/zalloc.h" #define AVL_NODE_TAG 0x0045444F4E4c5641 /* "AVLNODE" */ /* * The following macros are defining relevant fields in the node */ /* * Access to the field that points to the left child */ #define AVL_LEFT_CHILD(node) ((node)->children.lr.left) /* * Access to the field that points to the right child */ #define AVL_RIGHT_CHILD(node) ((node)->children.lr.right) /* * Access to the field that points to one of the children (0: left, 1: right) */ #define AVL_CHILD(node,id) ((node)->children.child[(id)]) /* * OPTIONAL : Access to the field that points the parent of the node. * * This field is optional but is mandatory if AVL_HAS_PARENT_POINTER is not 0 */ #define AVL_PARENT(node) ((node)->parent) /* * Access to the field that keeps the balance (a signed byte) */ #define AVL_BALANCE(node) ((node)->balance) /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE void* /* * */ #define AVL_REFERENCE_FORMAT_STRING "%p" #define AVL_REFERENCE_FORMAT(reference) ((void*)reference) /* * A macro to initialize a node and setting the reference */ #define AVL_INIT_NODE(node,reference) node->key = reference #if 0 /* fix */ #else /* * A macro to allocate a new node */ #define AVL_ALLOC_NODE(node,reference) \ ZALLOC_OR_DIE(AVL_NODE_TYPE*, node, AVL_NODE_TYPE, AVL_NODE_TAG); \ ZEROMEMORY(node,sizeof(AVL_NODE_TYPE)); /* * A macro to free a node */ #define AVL_FREE_NODE(node) ZFREE(node, AVL_NODE_TYPE) #endif /* * A macro to print the node */ #define AVL_DUMP_NODE(node) format("node@%p",(node)); /* * A macro that returns the reference field of the node. * It must be of type REFERENCE_TYPE */ #define AVL_REFERENCE(node) (node)->key #define AVL_REFERENCE_IS_POINTER TRUE #define AVL_REFERENCE_IS_CONST FALSE /* * A macro to compare two references * Returns TRUE if and only if the references are equal. */ #define AVL_ISEQUAL(reference_a,reference_b) (tree->compare((reference_a),(reference_b)) == 0) /* * A macro to compare two references * Returns TRUE if and only if the first one is bigger than the second one. */ #define AVL_ISBIGGER(reference_a,reference_b) (tree->compare((reference_a),(reference_b)) > 0) /* * Copies the payload of a node * It MUST NOT copy the "proprietary" node fields : children, parent, balance */ //#define AVL_COPY_PAYLOAD(node_trg,node_src) {(node_trg)->data = (node_src)->data;(node_trg)->key = (node_src)->key;} #define AVL_COPY_PAYLOAD(node_trg,node_src) {(node_trg)->data = (node_src)->data;(node_trg)->key = (node_src)->key;} /* * A macro to preprocess a node before it is preprocessed for a delete (detach) * If there was anything to do BEFORE deleting a node, we would do it here * After this macro is exectuted, the node * _ is detached, then deleted with FREE_NODE * _ has got its content overwritten by the one of another node, then the other * node is deleted with FREE_NODE */ #define AVL_NODE_DELETE_CALLBACK(node) #include "dnscore/avl.c.inc" int ptr_set_ptr_node_compare(const void *node_a, const void *node_b) { return ((intptr)node_a) - ((intptr)node_b); } int ptr_set_asciizp_node_compare(const void *node_a, const void *node_b) { return strcmp((const char*)node_a, (const char*)node_b); } int ptr_set_dnsname_node_compare(const void *node_a, const void *node_b) { return dnsname_compare((const u8*)node_a, (const u8*)node_b); } // key = fqdn (cannot be NULL) int ptr_set_dnslabel_node_compare(const void *node_a, const void *node_b) { const u8 *a = (const u8*)node_a; const u8 *b = (const u8*)node_b; int n = MIN(*a, *b) + 1; return memcmp(a, b, n); } int ptr_set_nullable_asciizp_node_compare(const void *node_a, const void *node_b) { if(node_a != NULL) { if(node_b != NULL) { return strcmp((const char*)node_a, (const char*)node_b); } else { return -1; } } else { return (node_b == NULL)?0:1; } } int ptr_set_nullable_dnsname_node_compare(const void *node_a, const void *node_b) { if(node_a != NULL) { if(node_b != NULL) { return dnsname_compare((const u8*)node_a, (const u8*)node_b); } else { return -1; } } else { return (node_b == NULL)?0:1; } } int ptr_set_host_address_node_compare(const void *node_a, const void *node_b) { if(node_a != NULL) { if(node_b != NULL) { return host_address_compare((const host_address*)node_a, (const host_address*)node_b); } else { return -1; } } else { return (node_b == NULL)?0:1; } } void* ptr_set_avl_iterator_hasnext_next_value(ptr_set_avl_iterator *iterp) { if(ptr_set_avl_iterator_hasnext(iterp)) { ptr_node *node = ptr_set_avl_iterator_next_node(iterp); void *ptr = node->value; return ptr; } else { return NULL; } } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/logger_handle.c0000644000077100007710000000012412650131756022272 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.749344 30 ctime=1454597651.498344534 yadifa-2.1.6-5826/lib/dnscore/src/logger_handle.c0000664000077100007710000021432212650131756022103 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup logger Logging functions * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include "dnscore/dnscore-config.h" #if HAS_PTHREAD_SETNAME_NP #ifdef DEBUG #define _GNU_SOURCE 1 #endif #endif #include #include #include #include #include #include #include #include #include "dnscore/logger_channel_stream.h" #include "dnscore/ptr_vector.h" #include "dnscore/threaded_queue.h" #include "dnscore/zalloc.h" #include "dnscore/file_output_stream.h" #include "dnscore/bytearray_output_stream.h" #include "dnscore/bytezarray_output_stream.h" #include "dnscore/format.h" #include "dnscore/dnscore.h" #include "dnscore/async.h" #include "dnscore/ptr_set.h" #define LOGGER_HANDLE_TAG 0x4c444e48474f4c /* LOGHNDL */ // If the logger thread queues a log message, and the log queue is full (ie: because the disk is full) a dead-lock may ensue. // So queued-logging is to be avoided in the logger thread // That being said, DEBUG_LOG_HANDLER and DEBUG_LOG_MESSAGES may trigger this issue as it is a debug, dev-only, feature. #define DEBUG_LOG_HANDLER 0 #define DEBUG_LOG_MESSAGES 0 #if DEBUG_LOG_MESSAGES == 1 #pragma message("DEBUG_LOG_MESSAGES") #endif #define COLUMN_SEPARATOR " | " #define COLUMN_SEPARATOR_SIZE 3 #define LOGGER_HANDLE_FORMATTED_LENGTH 8 #define MODULE_MSG_HANDLE g_system_logger extern logger_handle *g_system_logger; #define LOGRMSG_TAG 0x47534d52474f4c #define LOGRTEXT_TAG 0x5458455452474f4c struct logger_handle; #define LOGGER_MESSAGE_TYPE_TEXT 0 // send a text to output #define LOGGER_MESSAGE_TYPE_STOP 1 // stop the service #define LOGGER_MESSAGE_TYPE_CHANNEL_FLUSH_ALL 2 // flush all channels #define LOGGER_MESSAGE_TYPE_CHANNEL_REOPEN_ALL 3 // reopen all channels #define LOGGER_MESSAGE_TYPE_CHANNEL_CLOSE_ALL 12 // close all channels #define LOGGER_MESSAGE_TYPE_IGNORE 4 // no operation #define LOGGER_MESSAGE_TYPE_CHANNEL_GET_USAGE_COUNT 5 // grabs the number of uses of the channel, or -1 if not registered #define LOGGER_MESSAGE_TYPE_CHANNEL_REGISTER 6 // register a new channel #define LOGGER_MESSAGE_TYPE_CHANNEL_UNREGISTER 7 // unregister a channel #define LOGGER_MESSAGE_TYPE_HANDLE_CREATE 8 // open a new handle #define LOGGER_MESSAGE_TYPE_HANDLE_CLOSE 9 // close a handle #define LOGGER_MESSAGE_TYPE_HANDLE_NAME_ADD_CHANNEL 10 // add a channel to a handle identified by its name #define LOGGER_MESSAGE_TYPE_HANDLE_NAME_REMOVE_CHANNEL 11 // remove a channel from a handle identified by its name #define LOGGER_MESSAGE_TYPE_HANDLE_NAME_COUNT_CHANNELS 13 // return the number of channels linked to this logger struct logger_message_text_s { u8 type; // 0 0 u8 level; // u16 flags; // u16 text_length; // u16 text_buffer_length; // align 64 struct logger_handle *handle; // 8 8 u8 *text; // 12 16 struct timeval tv; // 16 24 const u8* prefix; // 24 32 u16 prefix_length; // 28 40 s16 rc; // 30 42 reference count for the repeats #if defined(DEBUG) || HAS_LOG_PID_ALWAYS_ON pid_t pid; // 32 44 #endif #if defined(DEBUG) || HAS_LOG_THREAD_ID_ALWAYS_ON pthread_t thread_id; // 36 48 #endif // 40 56 }; struct logger_message_channel_flush_all_s { u8 type; u8 val8; u16 val16; u32 val32; // align 64 async_wait_s *aw; }; struct logger_message_channel_reopen_all_s { u8 type; u8 val8; u16 val16; u32 val32; // align 64 async_wait_s *aw; }; struct logger_message_channel_get_usage_count_s { u8 type; u8 val8; u16 val16; u32 val32; // align 64 async_wait_s *aw; const char* channel_name; s32 *countp; }; struct logger_message_channel_register_s { u8 type; u8 val8; u16 val16; u32 val32; // align 64 async_wait_s *aw; const char* channel_name; struct logger_channel *channel; }; struct logger_message_channel_unregister_s { u8 type; u8 val8; u16 val16; u32 val32; // align 64 async_wait_s *aw; const char* channel_name; }; /// @note no need for reopen struct logger_message_stop_s { u8 type; u8 val8; u16 val16; u32 val32; // align 64 async_wait_s *aw; }; /// @note no need for ignore struct logger_message_handle_create_s { u8 type; u8 val8; u16 val16; u32 val32; // align 64 async_wait_s *aw; const char *logger_name; logger_handle **handle_holder; }; struct logger_message_handle_close_s { u8 type; u8 val8; u16 val16; u32 val32; // align 64 async_wait_s *aw; const char *logger_name; }; struct logger_message_handle_add_channel_s { u8 type; u8 val8; u16 val16; u32 val32; // align 64 async_wait_s *aw; const char *logger_name; const char *channel_name; u16 level; }; struct logger_message_handle_remove_channel_s { u8 type; u8 val8; u16 val16; u32 val32; // align 64 async_wait_s *aw; const char *logger_name; const char *channel_name; }; struct logger_message_handle_count_channels_s { u8 type; u8 val8; u16 val16; u32 val32; // align 64 async_wait_s *aw; const char *logger_name; s32 *countp; }; union logger_message { u8 type; struct logger_message_text_s text; struct logger_message_stop_s stop; // no specific data for ignore struct logger_message_channel_flush_all_s channel_flush_all; struct logger_message_channel_reopen_all_s channel_reopen_all; struct logger_message_channel_get_usage_count_s get_usage_count; struct logger_message_channel_register_s channel_register; struct logger_message_channel_unregister_s channel_unregister; struct logger_message_handle_create_s handle_create; struct logger_message_handle_close_s handle_close; struct logger_message_handle_add_channel_s handle_add_channel; struct logger_message_handle_remove_channel_s handle_remove_channel; struct logger_message_handle_count_channels_s handle_count_channels; }; typedef union logger_message logger_message; /// tree set initialised empty with a comparator for ASCIIZ char* keys static ptr_set logger_channels = PTR_SET_ASCIIZ_EMPTY; static ptr_vector logger_handles = EMPTY_PTR_VECTOR; static pthread_mutex_t logger_mutex; static threaded_queue logger_commit_queue = THREADED_QUEUE_NULL; static pthread_t logger_thread_id = 0; static u32 exit_level = MSG_CRIT; static const char acewnid[16 + 1] = "!ACEWNID1234567"; static volatile bool logger_started = FALSE; static volatile bool logger_initialised = FALSE; static volatile bool logger_queue_initialised = FALSE; static volatile bool logger_handle_init_done = FALSE; static volatile bool logger_reopen_requested = FALSE; static volatile u8 logger_level = MSG_ALL; #if DEBUG_LOG_MESSAGES != 0 static smp_int allocated_messages_count = SMP_INT_INITIALIZER; static time_t allocated_messages_count_stats_time = 0; #endif static void logger_handle_trigger_shutdown() { flusherr(); logger_flush(); abort(); } /******************************************************************************* * * Logger message functions * *******************************************************************************/ static inline logger_message* logger_message_alloc() { /// @todo 20140523 edf -- use a better allocation mechanism logger_message* message; ZALLOC_OR_DIE(logger_message*, message, logger_message, LOGRMSG_TAG); #if DEBUG_LOG_MESSAGES != 0 smp_int_inc(&allocated_messages_count); #endif return message; } static inline void logger_message_free(logger_message *message) { ZFREE(message, logger_message); #if DEBUG_LOG_MESSAGES != 0 smp_int_dec(&allocated_messages_count); #endif } /******************************************************************************* * * Logger handle functions * *******************************************************************************/ static ya_result logger_service_handle_remove_channel(logger_handle *handle, const char *channel_name); static void logger_service_handle_remove_all_channel(logger_handle *handle); static int logger_handle_compare(const void* a, const void* b) { logger_handle* ha = *(logger_handle**)a; logger_handle* hb = *(logger_handle**)b; if(ha == hb) { return 0; } return strcmp(ha->name, hb->name); } static int logger_handle_compare_match(const void* key, const void* value) { const char* hkey = (const char*)key; const logger_handle* hvalue = (const logger_handle*)value; return strcmp(hkey, hvalue->name); } static void logger_handle_free(void* ptr) { logger_handle* handle = (logger_handle*)ptr; #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_handle_free(%s@%p)", handle->name, ptr); flushout(); #endif logger_service_handle_remove_all_channel(handle); for(u8 lvl = 0; lvl < MSG_LEVEL_COUNT; lvl++) { ptr_vector_destroy(&handle->channels[lvl]); } if(handle->global_reference != NULL) { *handle->global_reference = NULL; } #ifdef DEBUG memset((char*)handle->formatted_name, 0xfe, strlen(handle->formatted_name)); #endif free((char*)handle->formatted_name); #ifdef DEBUG memset((char*)handle->name, 0xfe, strlen(handle->name)); #endif free((char*)handle->name); #ifdef DEBUG memset(handle, 0xfe, sizeof(logger_handle)); #endif free(handle); } /******************************************************************************* * * Logger channel functions * *******************************************************************************/ logger_channel* logger_channel_alloc() { logger_channel* chan; #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_channel_alloc()"); flushout(); #endif MALLOC_OR_DIE(logger_channel*, chan, sizeof(logger_channel), 0x4e414843474f4c); /* LOGCHAN */ chan->data = NULL; chan->vtbl = NULL; /* dummy to avoid a NULL test */ logger_message* last_message = logger_message_alloc(); last_message->type = LOGGER_MESSAGE_TYPE_TEXT; ZALLOC_ARRAY_OR_DIE(u8*, last_message->text.text, 1, LOGRTEXT_TAG); *last_message->text.text = '\0'; last_message->text.text_length = 1; last_message->text.text_buffer_length = 1; last_message->text.flags = 0; last_message->text.rc = 1; chan->last_message = last_message; chan->last_message_count = 0; chan->linked_handles = 0; return chan; } static void logger_channel_free(logger_channel *channel) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_channel_free(%p), linked to %d", channel, channel->linked_handles); flushout(); #endif assert(channel->linked_handles == 0); // don't yassert logger_message* last_message = channel->last_message; if(--last_message->text.rc == 0) { ZFREE_ARRAY(last_message->text.text, last_message->text.text_buffer_length); logger_message_free(last_message); } if(channel->vtbl != NULL) { logger_channel_close(channel); } free(channel); } static logger_channel* logger_service_channel_get(const char *channel_name) { logger_channel *channel = NULL; ptr_node *node = ptr_set_avl_find(&logger_channels, channel_name); if(node != NULL) { channel = (logger_channel*)node->value; } #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_channel_get(%s) = %p", channel_name, channel); flushout(); #endif return channel; } static ya_result logger_service_channel_register(const char *channel_name, logger_channel *channel) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_channel_register(%s,%p)", channel_name, channel); flushout(); #endif if(channel->linked_handles != 0) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_channel_register(%s,%p) ALREADY LINKED", channel_name, channel); flushout(); #endif return LOGGER_CHANNEL_HAS_LINKS; } if(logger_service_channel_get(channel_name) != NULL) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_channel_register(%s,%p) NAME ALREADY USED", channel_name, channel); flushout(); #endif return LOGGER_CHANNEL_ALREADY_REGISTERED; } ptr_node *node = ptr_set_avl_insert(&logger_channels, strdup(channel_name)); node->value = channel; return SUCCESS; } static ya_result logger_service_channel_unregister(const char *channel_name) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_channel_unregister(%s)", channel_name); flushout(); #endif logger_channel *channel; ptr_node *node = ptr_set_avl_find(&logger_channels, channel_name); if(node == NULL) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_channel_unregister(%s) NAME NOT USED", channel_name); flushout(); #endif return LOGGER_CHANNEL_NOT_REGISTERED; } channel = (logger_channel*)node->value; if(channel->linked_handles != 0) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_channel_unregister(%s) STILL LINKED", channel_name); flushout(); #endif return LOGGER_CHANNEL_HAS_LINKS; } char *key = (char*)node->key; ptr_set_avl_delete(&logger_channels, channel_name); free(key); // remove the channel from all the handles for(s32 i = 0; i < ptr_vector_size(&logger_handles); i++) { logger_handle *handle = (logger_handle*)ptr_vector_get(&logger_handles, i); logger_service_handle_remove_channel(handle, channel_name); } logger_channel_free(channel); return SUCCESS; } static void logger_service_channel_unregister_all() { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_channel_unregister_all()"); flushout(); #endif // for all channels ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&logger_channels, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); logger_channel *channel = (logger_channel*)node->value; char *channel_name = (char*)node->key; #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_channel_unregister_all() : channel %s@%p", channel_name, channel); flushout(); #endif // for all handles for(s32 i = 0; i < ptr_vector_size(&logger_handles); i++) { logger_handle *handle = (logger_handle*)ptr_vector_get(&logger_handles, i); #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_channel_unregister_all() : channel %s@%p : handle %s@%p", channel_name, channel, handle->name, handle); flushout(); #endif // remove channel from handle logger_service_handle_remove_channel(handle, channel_name); } assert(channel->linked_handles == 0); // I can do this since iteration and destroy does not care about // keys nor values node->value = NULL; node->key = NULL; logger_channel_free(channel); free(channel_name); } ptr_set_avl_destroy(&logger_channels); } /** * Used to find a channel in the channel array in a handle */ static int logger_handle_channel_compare_match(const void *a, const void *b) { const logger_channel* channel_a = (const logger_channel*)a; const logger_channel* channel_b = (const logger_channel*)b; if(channel_a == channel_b) { return 0; } return 1; } /** * INTERNAL: used by the service */ static logger_handle* logger_service_handle_create(const char *name) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_handle_create(%s)", name); flushout(); #endif logger_handle* handle = (logger_handle*)ptr_vector_search(&logger_handles, name, logger_handle_compare_match); if(handle == NULL) { MALLOC_OR_DIE(logger_handle*, handle, sizeof (logger_handle), LOGGER_HANDLE_TAG); handle->name = strdup(name); int len = strlen(name); handle->formatted_name_len = LOGGER_HANDLE_FORMATTED_LENGTH; MALLOC_OR_DIE(char*, handle->formatted_name, handle->formatted_name_len + 1, LOGGER_HANDLE_TAG); memset((char*)handle->formatted_name, ' ', LOGGER_HANDLE_FORMATTED_LENGTH); memcpy((char*)handle->formatted_name, name, MIN(len , LOGGER_HANDLE_FORMATTED_LENGTH)); char *sentinel = (char*)&handle->formatted_name[handle->formatted_name_len]; *sentinel = '\0'; int i; for(i = 0; i < MSG_LEVEL_COUNT; i++) { ptr_vector_init(&handle->channels[i]); } ptr_vector_append(&logger_handles, handle); ptr_vector_qsort(&logger_handles, logger_handle_compare); } else { #if DEBUG_LOG_HANDLER != 0 osformatln(termerr, "logger: '%s' already created", name); flusherr(); #endif } return handle; } static void logger_service_handle_close(const char *name) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_handle_close(%s)", name); flushout(); #endif //logger_handle* handle = (logger_handle*)ptr_vector_search(&logger_handles, name, logger_handle_compare_match); s32 handle_idx = ptr_vector_index_of(&logger_handles, name, logger_handle_compare_match); if(handle_idx >= 0) { logger_handle* handle = (logger_handle*)ptr_vector_get(&logger_handles, handle_idx); ptr_vector_end_swap(&logger_handles, handle_idx); ptr_vector_pop(&logger_handles); if(handle->global_reference != NULL) { *handle->global_reference = NULL; } // decrement references for all channels used for(int lvl = 0; lvl < MSG_LEVEL_COUNT; lvl++) { for(s32 idx = 0; idx < ptr_vector_size(&handle->channels[lvl]); idx++) { logger_channel *channel = (logger_channel*)ptr_vector_get(&handle->channels[lvl], idx); ptr_vector_end_swap(&handle->channels[lvl], idx); ptr_vector_pop(&handle->channels[lvl]); channel->linked_handles--; } ptr_vector_destroy(&handle->channels[lvl]); } if(handle->formatted_name != NULL) { handle->formatted_name_len = 0; free((char*)handle->formatted_name); handle->formatted_name = NULL; } if(handle->name != NULL) { free((char*)handle->name); handle->name = NULL; } } } static inline logger_handle* logger_service_handle_get(const char *name) { logger_handle* handle = (logger_handle*)ptr_vector_search(&logger_handles, name, logger_handle_compare_match); return handle; } /** * INTERNAL: used by the service */ static ya_result logger_service_handle_add_channel(logger_handle *handle, int level, const char *channel_name) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_handle_add_channel(%s@%p, %x, %s)", handle->name, handle, level, channel_name); flushout(); #endif assert(level >= 0 && level <= MSG_ALL_MASK); int lvl; int level_mask; logger_channel *channel = logger_service_channel_get(channel_name); if(channel == NULL) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_handle_add_channel(%s@%p, %x, %s) UNKNOWN CHANNEL", handle->name, handle, level, channel_name); flushout(); #endif return LOGGER_CHANNEL_NOT_REGISTERED; } // add the channel in every level required by the level mask for(lvl = 0, level_mask = 1; level_mask <= MSG_ALL_MASK; lvl++, level_mask <<= 1) { if((level & level_mask) != 0) { if(ptr_vector_linear_search(&handle->channels[lvl], channel, logger_handle_channel_compare_match) == NULL) { ptr_vector_append(&handle->channels[lvl], channel); channel->linked_handles++; } } } return SUCCESS; } static ya_result logger_service_handle_remove_channel(logger_handle *handle, const char *channel_name) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_handle_remove_channel(%s@%p, %s)", handle->name, handle, channel_name); flushout(); #endif logger_channel *channel = logger_service_channel_get(channel_name); if(channel == NULL) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_handle_remove_channel(%s@%p, %s) UNKNOWN CHANNEL", handle->name, handle, channel_name); flushout(); #endif return LOGGER_CHANNEL_NOT_REGISTERED; } for(u8 lvl = 0; lvl <= MSG_ALL; lvl++) { s32 idx = ptr_vector_index_of(&handle->channels[lvl], channel, logger_handle_channel_compare_match); if(idx >= 0) { ptr_vector_end_swap(&handle->channels[lvl], idx); ptr_vector_pop(&handle->channels[lvl]); channel->linked_handles--; } } return SUCCESS; } static void logger_service_handle_remove_all_channel(logger_handle *handle) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_handle_remove_all_channel(%s@%p)", handle->name, handle); flushout(); #endif for(u8 lvl = 0; lvl < MSG_LEVEL_COUNT; lvl++) { for(s32 idx = 0; idx < ptr_vector_size(&handle->channels[lvl]); idx++) { logger_channel *channel = (logger_channel*)ptr_vector_get(&handle->channels[lvl], idx); channel->linked_handles--; } ptr_vector_empties(&handle->channels[lvl]); } } static ya_result logger_service_handle_count_channels(logger_handle *handle) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_handle_count_channels(%s@%p)", handle->name, handle); flushout(); #endif s32 sum = 0; for(u8 lvl = 0; lvl <= MSG_ALL; lvl++) { sum += ptr_vector_size(&handle->channels[lvl]); } return sum; } /** * INTERNAL: used inside the service (2) */ static void logger_service_flush_all_channels() { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_flush_all_channels()"); flushout(); #endif ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&logger_channels, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); logger_channel *channel = (logger_channel*)node->value; logger_channel_flush(channel); } } /** * INTERNAL: used inside the service (1) */ static void logger_service_reopen_all_channels() { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_service_reopen_all_channels()"); flushout(); #endif ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&logger_channels, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); logger_channel *channel = (logger_channel*)node->value; ya_result return_code = logger_channel_reopen(channel); if(FAIL(return_code)) { log_err("could not reopen logger channel '%s': %r", STRNULL((char*)node->key), return_code); } } } /** * * Create the handle tables * * INTERNAL: used at initialisation the service */ void logger_handle_exit_level(u32 level) { if(level <= MSG_CRIT) { osformatln(termerr, "message level too low: %u < %u", level, MSG_CRIT); flusherr(); return; } exit_level = level; } static void* logger_dispatcher_thread(void* context) { (void)context; #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_dispatcher_thread(%p)", context); flushout(); #endif #ifdef HAS_PTHREAD_SETNAME_NP #ifdef DEBUG pthread_setname_np(pthread_self(), "logger"); #endif #endif output_stream baos; bytearray_output_stream_context baos_context; bytearray_output_stream_init_ex_static(&baos, NULL, 1024, BYTEARRAY_DYNAMIC, &baos_context); /* * Since I'll use this virtual call a lot, it's best to cache it. * (Actually it would be even better to use the static method) */ output_stream_write_method *baos_write = baos.vtbl->write; char repeat_text[128]; bool must_run = TRUE; while(must_run) { logger_message* message = (logger_message*)threaded_queue_dequeue(&logger_commit_queue); assert(message != NULL); /* * Reopen is not a message per se. * It has to be done "now" (ie: the disk is full, files have to be moved) * But if it was handled as a message, it would need to clear the queue before having an effect. * So instead a flag is used0 */ if(logger_reopen_requested) { logger_service_reopen_all_channels(); logger_reopen_requested = FALSE; } switch(message->type) { case LOGGER_MESSAGE_TYPE_TEXT: { #if DEBUG_LOG_MESSAGES != 0 { time_t now = time(NULL); if(now - allocated_messages_count_stats_time > 10) { allocated_messages_count_stats_time = now; int val = smp_int_get(&allocated_messages_count); //osformatln(termerr, "messages allocated count = %d", val); //flusherr(); osformat(&baos, "[LOGGER: %i messages allocated]\n", val); } } #endif logger_handle *handle = message->text.handle; u32 level = message->text.level; s32 channel_count = handle->channels[level].offset; if(channel_count < 0) { ZFREE_ARRAY(message->text.text, message->text.text_buffer_length); logger_message_free(message); continue; } u32 date_header_len; if(message->text.flags == 0) { struct tm t; localtime_r(&message->text.tv.tv_sec, &t); osformat(&baos, "%04d-%02d-%02d %02d:%02d:%02d.%06d", t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, message->text.tv.tv_usec); baos_write(&baos, (const u8*)COLUMN_SEPARATOR, COLUMN_SEPARATOR_SIZE); #if defined(DEBUG) || HAS_LOG_PID_ALWAYS_ON osprint_u16(&baos, message->text.pid); baos_write(&baos, (const u8*)COLUMN_SEPARATOR, COLUMN_SEPARATOR_SIZE); #endif #if defined(DEBUG) || HAS_LOG_THREAD_ID_ALWAYS_ON osprint_u32_hex(&baos, (u32)message->text.thread_id); baos_write(&baos, (const u8*)COLUMN_SEPARATOR, COLUMN_SEPARATOR_SIZE); #endif baos_write(&baos, (u8*)handle->formatted_name, handle->formatted_name_len); baos_write(&baos, (const u8*)COLUMN_SEPARATOR, COLUMN_SEPARATOR_SIZE); osprint_char(&baos, acewnid[message->text.level & 15]); baos_write(&baos, (const u8*)COLUMN_SEPARATOR, COLUMN_SEPARATOR_SIZE); date_header_len = 29; } else { /* shortcut : assume both ones on since that's the only used case */ assert( (message->text.flags & (LOGGER_MESSAGE_TIMEMS | LOGGER_MESSAGE_PREFIX)) == (LOGGER_MESSAGE_TIMEMS | LOGGER_MESSAGE_PREFIX)); struct tm t; localtime_r(&message->text.tv.tv_sec, &t); osformat(&baos, "%04d-%02d-%02d %02d:%02d:%02d.%03d", t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, message->text.tv.tv_usec / 1000); baos_write(&baos, message->text.prefix, message->text.prefix_length); date_header_len = 24; } baos_write(&baos, message->text.text, message->text.text_length); output_stream_write_u8(&baos, 0); size_t size = bytearray_output_stream_size(&baos) - 1; char* buffer = (char*)bytearray_output_stream_buffer(&baos); logger_channel** channelp = (logger_channel**)handle->channels[level].data; do { logger_channel* channel = *channelp; ya_result return_code; if((channel->last_message->text.text_length == message->text.text_length) && (memcmp(channel->last_message->text.text, message->text.text, message->text.text_length) == 0)) { /* match, it's a repeat */ channel->last_message_count++; } else { /* no match */ if(channel->last_message_count > 0) { /* log the repeat count */ /* If the same line is outputted twice : filter it to say 'repeated' instead of sending everything */ struct tm t; localtime_r(&message->text.tv.tv_sec, &t); return_code = snformat(repeat_text, sizeof(repeat_text), "%04d-%02d-%02d %02d:%02d:%02d.%06d" COLUMN_SEPARATOR #ifdef DEBUG "%-5d" COLUMN_SEPARATOR "%08x" COLUMN_SEPARATOR #endif "--------" COLUMN_SEPARATOR "N" COLUMN_SEPARATOR "last message repeated %d times", t.tm_year + 1900, t.tm_mon + 1, t.tm_mday, t.tm_hour, t.tm_min, t.tm_sec, message->text.tv.tv_usec, #if defined(DEBUG) || HAS_LOG_PID_ALWAYS_ON channel->last_message->text.pid, #endif #if defined(DEBUG) || HAS_LOG_THREAD_ID_ALWAYS_ON channel->last_message->text.thread_id, #endif channel->last_message_count); if(ISOK(return_code)) { /// @todo 20150713 edf -- verify that generated code is not slower than an 'if' while(FAIL(return_code = logger_channel_msg(channel, level, repeat_text, return_code, 29))) { if(stdstream_is_tty(termerr)) { osformatln(termerr, "message write failed on channel: %r", return_code); flusherr(); } if(dnscore_shuttingdown()) { // message will be lost break; } sleep(1); } } else { if(stdstream_is_tty(termerr)) { osformatln(termerr, "message formatting failed on channel: %r", return_code); flusherr(); } } } /* cleanup */ if(--channel->last_message->text.rc == 0) { /* free the message */ #if DEBUG_LOG_MESSAGES != 0 osformatln(termout, "message rc is 0 (%s)", channel->last_message->text.text); flushout(); #endif ZFREE_ARRAY(channel->last_message->text.text, channel->last_message->text.text_buffer_length); logger_message_free(channel->last_message); } #if DEBUG_LOG_MESSAGES != 0 else { osformatln(termout, "message rc decreased to %d (%s)", channel->last_message->text.rc, channel->last_message->text.text); flushout(); } #endif channel->last_message = message; channel->last_message_count = 0; message->text.rc++; #if DEBUG_LOG_MESSAGES != 0 osformatln(termout, "message rc is %d (%s)", channel->last_message->text.rc, channel->last_message->text.text); flushout(); #endif while(FAIL(return_code = logger_channel_msg(channel, level, buffer, size, date_header_len))) { if(stdstream_is_tty(termerr)) { osformatln(termerr, "message write failed on channel: %r", return_code); flusherr(); } if(dnscore_shuttingdown()) { // message will be lost break; } sleep(1); } } channelp++; } while(--channel_count >= 0); if(message->text.rc == 0) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "message has not been used (full dup): '%s'", message->text.text); flushout(); #endif ZFREE_ARRAY(message->text.text, message->text.text_buffer_length); logger_message_free(message); } bytearray_output_stream_reset(&baos); break; } case LOGGER_MESSAGE_TYPE_CHANNEL_CLOSE_ALL: { async_wait_s *awp = message->channel_flush_all.aw; logger_message_free(message); logger_service_flush_all_channels(); //logger_service_close_all_channels(); logger_service_channel_unregister_all(); async_wait_progress(awp, 1); break; } case LOGGER_MESSAGE_TYPE_STOP: must_run = threaded_queue_size(&logger_commit_queue) > 0; if(must_run) { // repost threaded_queue_enqueue(&logger_commit_queue, message); break; } /// @note falltrough by design case LOGGER_MESSAGE_TYPE_CHANNEL_FLUSH_ALL: { async_wait_s *awp = message->channel_flush_all.aw; logger_message_free(message); logger_service_flush_all_channels(); async_wait_progress(awp, 1); break; } case LOGGER_MESSAGE_TYPE_CHANNEL_REOPEN_ALL: { // reopen is activated by a flag // this structure is just a way to fire the event async_wait_s *awp = message->channel_flush_all.aw; logger_message_free(message); async_wait_progress(awp, 1); break; } case LOGGER_MESSAGE_TYPE_IGNORE: { logger_message_free(message); break; } case LOGGER_MESSAGE_TYPE_CHANNEL_GET_USAGE_COUNT: { async_wait_s *awp = message->get_usage_count.aw; const char *channel_name = message->get_usage_count.channel_name; s32 *countp = message->get_usage_count.countp; assert(countp != NULL); logger_message_free(message); logger_channel *channel = logger_service_channel_get(channel_name); if(channel != NULL) { *countp = channel->linked_handles; } else { *countp = -1; } async_wait_progress(awp, 1); break; } case LOGGER_MESSAGE_TYPE_CHANNEL_REGISTER: { async_wait_s *awp = message->channel_register.aw; const char *channel_name = message->channel_register.channel_name; logger_channel *channel = message->channel_register.channel; logger_message_free(message); logger_service_channel_register(channel_name, channel); async_wait_progress(awp, 1); break; } case LOGGER_MESSAGE_TYPE_CHANNEL_UNREGISTER: { async_wait_s *awp = message->channel_unregister.aw; const char *channel_name = message->channel_unregister.channel_name; logger_message_free(message); logger_service_channel_unregister(channel_name); async_wait_progress(awp, 1); break; } case LOGGER_MESSAGE_TYPE_HANDLE_CREATE: { async_wait_s *awp = message->handle_create.aw; const char *name = message->handle_create.logger_name; logger_handle **handlep = message->handle_create.handle_holder; logger_handle* handle = logger_service_handle_create(name); handle->global_reference = handlep; *handlep = handle; logger_message_free(message); async_wait_progress(awp, 1); break; } case LOGGER_MESSAGE_TYPE_HANDLE_CLOSE: { async_wait_s *awp = message->handle_close.aw; const char *name = message->handle_close.logger_name; //u32 name_len = message->text_length; logger_service_handle_close(name); logger_message_free(message); async_wait_progress(awp, 1); break; } case LOGGER_MESSAGE_TYPE_HANDLE_NAME_ADD_CHANNEL: { logger_handle *handle; async_wait_s *awp = message->handle_add_channel.aw; const char *name = message->handle_add_channel.logger_name; int level = message->handle_add_channel.level; const char *channel_name = message->handle_add_channel.channel_name; handle = logger_service_handle_get(name); if(handle != NULL) { logger_service_handle_add_channel(handle, level, channel_name); } logger_message_free(message); async_wait_progress(awp, 1); break; } case LOGGER_MESSAGE_TYPE_HANDLE_NAME_REMOVE_CHANNEL: { logger_handle *handle; async_wait_s *awp = message->handle_remove_channel.aw; const char *name = message->handle_remove_channel.logger_name; const char *channel_name = message->handle_remove_channel.channel_name; handle = logger_service_handle_get(name); if(handle != NULL) { logger_service_handle_remove_channel(handle, channel_name); } logger_message_free(message); async_wait_progress(awp, 1); break; } case LOGGER_MESSAGE_TYPE_HANDLE_NAME_COUNT_CHANNELS: { logger_handle *handle; async_wait_s *awp = message->handle_count_channels.aw; const char *name = message->handle_count_channels.logger_name; handle = logger_service_handle_get(name); *message->handle_count_channels.countp = 0; if(handle != NULL) { *message->handle_count_channels.countp = logger_service_handle_count_channels(handle); } logger_message_free(message); async_wait_progress(awp, 1); break; } default: { if(stdstream_is_tty(termerr)) { osformatln(termerr, "unexpected message type %u in log queue", message->type); flusherr(); } break; } } } // while must run // flush everything logger_service_flush_all_channels(); // close everything output_stream_close(&baos); #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_dispatcher_thread(%p) END", context); flushout(); #endif return NULL; } s32 logger_channel_get_usage_count(const char* channel_name) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_channel_get_usage_count(%s) ", channel_name); flushout(); #endif s32 count = -2; if(logger_is_running()) { logger_message *message = logger_message_alloc(); ZEROMEMORY(message, sizeof(logger_message)); async_wait_s aw; async_wait_init(&aw, 1); message->type = LOGGER_MESSAGE_TYPE_CHANNEL_GET_USAGE_COUNT; message->get_usage_count.aw = &aw; message->get_usage_count.channel_name = channel_name; message->get_usage_count.countp = &count; threaded_queue_enqueue(&logger_commit_queue, message); async_wait(&aw); async_wait_finalize(&aw); } else { pthread_mutex_lock(&logger_commit_queue.mutex); logger_channel *channel = logger_service_channel_get(channel_name); if(channel != NULL) { count = channel->linked_handles; } else { count = -1; } pthread_mutex_unlock(&logger_commit_queue.mutex); } return count; } void logger_channel_register(const char* channel_name, struct logger_channel *channel) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_channel_register(%s,%p) ", channel_name, channel); flushout(); #endif if(logger_is_running()) { logger_message *message = logger_message_alloc(); ZEROMEMORY(message, sizeof(logger_message)); async_wait_s aw; async_wait_init(&aw, 1); message->type = LOGGER_MESSAGE_TYPE_CHANNEL_REGISTER; message->channel_register.aw = &aw; message->channel_register.channel_name = channel_name; message->channel_register.channel = channel; threaded_queue_enqueue(&logger_commit_queue, message); async_wait(&aw); async_wait_finalize(&aw); } else { pthread_mutex_lock(&logger_commit_queue.mutex); logger_service_channel_register(channel_name, channel); pthread_mutex_unlock(&logger_commit_queue.mutex); } } void logger_channel_unregister(const char* channel_name) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_channel_unregister(%s) ", channel_name); flushout(); #endif logger_message *message = logger_message_alloc(); ZEROMEMORY(message, sizeof(logger_message)); async_wait_s aw; async_wait_init(&aw, 1); message->type = LOGGER_MESSAGE_TYPE_CHANNEL_UNREGISTER; message->channel_unregister.aw = &aw; message->channel_unregister.channel_name = channel_name; threaded_queue_enqueue(&logger_commit_queue, message); async_wait(&aw); async_wait_finalize(&aw); } void logger_handle_create(const char *logger_name, logger_handle **handle_holder) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_handle_create(%s,%p) ", logger_name, handle_holder); flushout(); #endif if(logger_is_running()) { logger_message *message = logger_message_alloc(); ZEROMEMORY(message, sizeof(logger_message)); async_wait_s aw; async_wait_init(&aw, 1); message->type = LOGGER_MESSAGE_TYPE_HANDLE_CREATE; message->handle_create.aw = &aw; message->handle_create.logger_name = logger_name; message->handle_create.handle_holder = handle_holder; threaded_queue_enqueue(&logger_commit_queue, message); async_wait(&aw); async_wait_finalize(&aw); } else { pthread_mutex_lock(&logger_commit_queue.mutex); logger_handle* handle = logger_service_handle_create(logger_name); handle->global_reference = handle_holder; *handle_holder = handle; pthread_mutex_unlock(&logger_commit_queue.mutex); } } void logger_handle_close(const char *logger_name) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_handle_close(%s) ", logger_name); flushout(); #endif logger_message *message = logger_message_alloc(); ZEROMEMORY(message, sizeof(logger_message)); async_wait_s aw; async_wait_init(&aw, 1); message->type = LOGGER_MESSAGE_TYPE_HANDLE_CLOSE; message->handle_close.aw = &aw; message->handle_close.logger_name = logger_name; threaded_queue_enqueue(&logger_commit_queue, message); async_wait(&aw); async_wait_finalize(&aw); } void logger_handle_add_channel(const char *logger_name, int level, const char *channel_name) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_handle_add_channel(%s,%x,%s) ", logger_name, level, channel_name); flushout(); #endif if(logger_is_running()) { logger_message *message = logger_message_alloc(); ZEROMEMORY(message, sizeof(logger_message)); async_wait_s aw; async_wait_init(&aw, 1); message->type = LOGGER_MESSAGE_TYPE_HANDLE_NAME_ADD_CHANNEL; message->handle_add_channel.aw = &aw; message->handle_add_channel.logger_name = logger_name; message->handle_add_channel.level = level; message->handle_add_channel.channel_name = channel_name; threaded_queue_enqueue(&logger_commit_queue, message); async_wait(&aw); async_wait_finalize(&aw); } else { pthread_mutex_lock(&logger_commit_queue.mutex); logger_handle *handle = logger_service_handle_get(logger_name); if(handle != NULL) { logger_service_handle_add_channel(handle, level, channel_name); } pthread_mutex_unlock(&logger_commit_queue.mutex); } } void logger_handle_remove_channel(const char *logger_name, const char *channel_name) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_handle_remove_channel(%s,%s) ", logger_name, channel_name); flushout(); #endif logger_message *message = logger_message_alloc(); ZEROMEMORY(message, sizeof(logger_message)); async_wait_s aw; async_wait_init(&aw, 1); message->type = LOGGER_MESSAGE_TYPE_HANDLE_NAME_REMOVE_CHANNEL; message->handle_remove_channel.aw = &aw; message->handle_remove_channel.logger_name = logger_name; message->handle_remove_channel.channel_name = channel_name; threaded_queue_enqueue(&logger_commit_queue, message); async_wait(&aw); async_wait_finalize(&aw); } s32 logger_handle_count_channels(const char *logger_name) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_handle_remove_channel(%s,%s) ", logger_name, channel_name); flushout(); #endif logger_message *message = logger_message_alloc(); s32 ret = -2; async_wait_s aw; ZEROMEMORY(message, sizeof(logger_message)); async_wait_init(&aw, 1); message->type = LOGGER_MESSAGE_TYPE_HANDLE_NAME_COUNT_CHANNELS; message->handle_count_channels.aw = &aw; message->handle_count_channels.logger_name = logger_name; message->handle_count_channels.countp = &ret; threaded_queue_enqueue(&logger_commit_queue, message); async_wait(&aw); async_wait_finalize(&aw); return ret; } static u32 logger_queue_size = LOG_QUEUE_DEFAULT_SIZE; u32 logger_set_queue_size(u32 n) { if(n < LOG_QUEUE_MIN_SIZE) { n = LOG_QUEUE_MIN_SIZE; } else if(n > LOG_QUEUE_MAX_SIZE) { n = LOG_QUEUE_MAX_SIZE; } if(logger_queue_initialised && (logger_queue_size != n)) { logger_queue_size = n; logger_queue_size = threaded_queue_set_maxsize(&logger_commit_queue, logger_queue_size); } return logger_queue_size; } void logger_init() { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_init() "); flushout(); #endif if(!logger_initialised) { if(!logger_queue_initialised) { threaded_queue_init(&logger_commit_queue, logger_queue_size); logger_queue_initialised = TRUE; } if(!logger_handle_init_done) { logger_handle_init_done = TRUE; ptr_vector_init(&logger_handles); //ptr_vector_init(&logger_channels); pthread_mutex_init(&logger_mutex, NULL); format_class_init(); } logger_set_uid(getuid()); logger_set_gid(getgid()); logger_initialised = TRUE; } else { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_init() : already initialised"); flushout(); #endif } } void logger_start() { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_start() "); flushout(); #endif ya_result return_code; if(!logger_initialised) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_start() : not initialised yet : calling"); flushout(); #endif logger_init(); } if(!logger_started) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_start() : starting"); flushout(); #endif if((return_code = pthread_create(&logger_thread_id, NULL, logger_dispatcher_thread, NULL)) != 0) { osformatln(termerr, "logger_start: pthread_create: %r", return_code); DIE(LOGGER_INITIALISATION_ERROR); } logger_started = TRUE; } else { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_start() : already started"); flushout(); #endif } #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_start() : started"); flushout(); #endif } static void logger_send_message_stop_wait() { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_send_message_stop_wait()"); flushout(); #endif async_wait_s aw; async_wait_init(&aw, 1); logger_message* message = logger_message_alloc(); #ifdef DEBUG ZEROMEMORY(message, sizeof (logger_message)); #endif message->type = LOGGER_MESSAGE_TYPE_STOP; message->stop.aw = &aw; threaded_queue_enqueue(&logger_commit_queue, message); #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_send_message_stop_wait() : waiting"); flushout(); #endif async_wait(&aw); async_wait_finalize(&aw); #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_send_message_stop_wait() : should be stopped"); flushout(); #endif } void logger_stop() { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_stop()"); flushout(); #endif if(logger_initialised) { if(logger_started) { // send the stop order logger_send_message_stop_wait(); #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_stop() : joining"); flushout(); #endif // wait for the end ya_result return_code; if((return_code = pthread_join(logger_thread_id, NULL)) != 0) { flushout(); flusherr(); osformatln(termerr, "logger_stop: pthread_join: %r", return_code); flusherr(); } logger_thread_id = 0; logger_started = FALSE; } } #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_stop() : stopped"); flushout(); #endif } void logger_finalize() { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_finalize()"); flushout(); #endif if(!logger_initialised) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_finalize() : not initialised"); flushout(); #endif return; } if(threaded_queue_size(&logger_commit_queue) > 0) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_finalize() : queue is not empty : starting & flushing"); flushout(); #endif logger_start(); logger_flush(); } if(logger_started) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_finalize() : still running : stopping"); flushout(); #endif logger_stop(); } /* * Ensure there is nothing left at all in the queue */ while(threaded_queue_size(&logger_commit_queue) > 0) { logger_message* message = threaded_queue_dequeue(&logger_commit_queue); #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_finalize() : freeing message of type %u", message->type); flushout(); #endif logger_message_free(message); } if(logger_handle_init_done) { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_finalize() : flushing all channels"); flushout(); #endif logger_service_flush_all_channels(); // closes all handles #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_finalize() : closing all handles"); flushout(); #endif ptr_vector_free_empties(&logger_handles, logger_handle_free); ptr_vector_destroy(&logger_handles); // closes all channels #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_finalize() : closing all channels"); flushout(); #endif logger_service_channel_unregister_all(); logger_handle_init_done = FALSE; } if(logger_queue_initialised) { threaded_queue_finalize(&logger_commit_queue); logger_queue_initialised = FALSE; } logger_initialised = FALSE; #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_finalize() : finalised"); flushout(); #endif } void logger_flush() { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_flush()"); flushout(); #endif if(logger_initialised && logger_started) { if(logger_thread_id != pthread_self()) { async_wait_s aw; async_wait_init(&aw, 1); logger_message* message = logger_message_alloc(); #ifdef DEBUG ZEROMEMORY(message, sizeof (logger_message)); #endif message->type = LOGGER_MESSAGE_TYPE_CHANNEL_FLUSH_ALL; message->channel_flush_all.aw = &aw; threaded_queue_enqueue(&logger_commit_queue, message); // avoid being stuck forever if the service is down while(logger_initialised && logger_started) { if(async_wait_timeout(&aw, 1000000)) { async_wait_finalize(&aw); break; } } } else { logger_service_flush_all_channels(); } } #if DEBUG_LOG_HANDLER != 0 else { osformatln(termout, "logger_flush() : i=%i s=%i", logger_initialised, logger_started); flushout(); } #endif } void logger_channel_close_all() { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_close_all_channels()"); flushout(); #endif if(logger_initialised && logger_started) { async_wait_s aw; async_wait_init(&aw, 1); logger_message* message = logger_message_alloc(); #ifdef DEBUG ZEROMEMORY(message, sizeof (logger_message)); #endif message->type = LOGGER_MESSAGE_TYPE_CHANNEL_CLOSE_ALL; message->channel_flush_all.aw = &aw; threaded_queue_enqueue(&logger_commit_queue, message); // avoid being stuck forever if the service is down while(logger_initialised && logger_started) { if(async_wait_timeout(&aw, 1000000)) { async_wait_finalize(&aw); break; } } } #if DEBUG_LOG_HANDLER != 0 else { osformatln(termout, "logger_close_all_channels() : i=%i s=%i", logger_initialised, logger_started); flushout(); } #endif } void logger_reopen() { #if DEBUG_LOG_HANDLER != 0 osformatln(termout, "logger_reopen()"); flushout(); #endif if(logger_initialised && logger_started) { logger_reopen_requested = TRUE; // even for a lflag, the message NEEDS to be enqueued because // 1) it activates the service // 2) synchronises the memory between the threads (memory wall) async_wait_s aw; async_wait_init(&aw, 1); logger_message* message = logger_message_alloc(); #ifdef DEBUG ZEROMEMORY(message, sizeof (logger_message)); #endif message->type = LOGGER_MESSAGE_TYPE_CHANNEL_REOPEN_ALL; message->channel_reopen_all.aw = &aw; threaded_queue_enqueue(&logger_commit_queue, message); while(logger_initialised && logger_started) { if(async_wait_timeout(&aw, 1000000)) { async_wait_finalize(&aw); break; } } } #if DEBUG_LOG_HANDLER != 0 else { osformatln(termout, "logger_reopen() : i=%i s=%i", logger_initialised, logger_started); flushout(); } #endif } bool logger_is_running() { return logger_started; } void logger_handle_vmsg(logger_handle* handle, u32 level, const char* fmt, va_list args) { /* * check that the handle has got a channel for the level */ #ifdef DEBUG if(level >= MSG_LEVEL_COUNT) { osformatln(termerr, "bad message level %u", level); logger_handle_trigger_shutdown(); return; } if(level <= MSG_ERR) { sleep(0); } #endif if(handle == NULL) { if(level <= exit_level) { logger_handle_trigger_shutdown(); } return; } if(level > logger_level) { return; } s32 channel_count = handle->channels[level].offset; if(channel_count < 0) /* it's count-1 actually */ { return; } /** * @note At this point we KNOW we have to print something. */ output_stream baos; bytezarray_output_stream_context baos_context; /* * DEFAULT_MAX_LINE_SIZE is the base size. * * The output stream has the BYTEARRAY_DYNAMIC flag set in order to allow * bigger sentences. * */ /* Will use the tmp buffer, but alloc a bigger one if required. */ bytezarray_output_stream_init_ex_static(&baos, NULL, DEFAULT_MAX_LINE_SIZE, BYTEARRAY_DYNAMIC, &baos_context); if(FAIL(vosformat(&baos, fmt, args))) { bytezarray_output_stream_reset(&baos); osprint(&baos, "*** ERROR : MESSAGE FORMATTING FAILED ***"); } output_stream_write_u8(&baos, 0); logger_message* message = logger_message_alloc(); message->type = LOGGER_MESSAGE_TYPE_TEXT; message->text.level = level; message->text.flags = 0; message->text.text_length = bytezarray_output_stream_size(&baos) - 1; message->text.text_buffer_length = bytezarray_output_stream_buffer_size(&baos); message->text.handle = handle; message->text.text = bytezarray_output_stream_detach(&baos); gettimeofday(&message->text.tv, NULL); // prefix // prefix_len message->text.rc = 0; #if defined(DEBUG) || HAS_LOG_PID_ALWAYS_ON message->text.pid = getpid(); #endif #if defined(DEBUG) || HAS_LOG_THREAD_ID_ALWAYS_ON message->text.thread_id = pthread_self(); #endif threaded_queue_enqueue(&logger_commit_queue, message); output_stream_close(&baos); /* Frees the memory */ if(level <= exit_level) { logger_handle_trigger_shutdown(); } } void logger_handle_msg(logger_handle* handle, u32 level, const char* fmt, ...) { /* * check that the handle has got a channel for the level */ #ifdef DEBUG if(level >= MSG_LEVEL_COUNT) { osformatln(termerr, "bad message level %u", level); logger_handle_trigger_shutdown(); return; } if(level <= MSG_ERR) { sleep(0); } #endif if(handle == NULL) { if(level <= exit_level) { logger_handle_trigger_shutdown(); } return; } if(level > logger_level) { return; } s32 channel_count = handle->channels[level].offset; if(channel_count < 0) /* it's count-1 actually */ { return; } /** * @note At this point we KNOW we have to print something. */ output_stream baos; bytezarray_output_stream_context baos_context; /* * DEFAULT_MAX_LINE_SIZE is the base size. * * The output stream has the BYTEARRAY_DYNAMIC flag set in order to allow * bigger sentences. * */ va_list args; va_start(args, fmt); /* Will use the tmp buffer, but alloc a bigger one if required. */ bytezarray_output_stream_init_ex_static(&baos, NULL, DEFAULT_MAX_LINE_SIZE, BYTEARRAY_DYNAMIC, &baos_context); if(FAIL(vosformat(&baos, fmt, args))) { bytezarray_output_stream_reset(&baos); osprint(&baos, "*** ERROR : MESSAGE FORMATTING FAILED ***"); } output_stream_write_u8(&baos, 0); logger_message* message = logger_message_alloc(); message->type = LOGGER_MESSAGE_TYPE_TEXT; message->text.level = level; message->text.flags = 0; message->text.text_length = bytezarray_output_stream_size(&baos) - 1; message->text.text_buffer_length = bytezarray_output_stream_buffer_size(&baos); message->text.handle = handle; message->text.text = bytezarray_output_stream_detach(&baos); gettimeofday(&message->text.tv, NULL); // prefix // prefix_len message->text.rc = 0; #if defined(DEBUG) || HAS_LOG_PID_ALWAYS_ON message->text.pid = getpid(); #endif #if defined(DEBUG) || HAS_LOG_THREAD_ID_ALWAYS_ON message->text.thread_id = pthread_self(); #endif threaded_queue_enqueue(&logger_commit_queue, message); va_end(args); output_stream_close(&baos); /* Frees the memory */ if(level <= exit_level) { exit_level = 0; if(!dnscore_shuttingdown()) { logger_handle_trigger_shutdown(); } } } void logger_handle_msg_text(logger_handle* handle, u32 level, const char* text, u32 text_len) { /* * check that the handle has got a channel for the level */ #ifdef DEBUG if(level >= MSG_LEVEL_COUNT) { osformatln(termerr, "bad message level %u", level); logger_handle_trigger_shutdown(); return; } if(level <= MSG_ERR) { sleep(0); } #endif if(handle == NULL) { if(level <= exit_level) { logger_handle_trigger_shutdown(); } return; } if(level > logger_level) { return; } s32 channel_count = handle->channels[level].offset; if(channel_count < 0) /* it's count-1 actually */ { return; } logger_message* message = logger_message_alloc(); message->type = LOGGER_MESSAGE_TYPE_TEXT; message->text.level = level; message->text.flags = 0; message->text.text_length = text_len; message->text.text_buffer_length = text_len; message->text.handle = handle; ZALLOC_ARRAY_OR_DIE(u8*, message->text.text, text_len, LOGRTEXT_TAG); memcpy(message->text.text, text, text_len); gettimeofday(&message->text.tv, NULL); // prefix // prefix_len message->text.rc = 0; #if defined(DEBUG) || HAS_LOG_PID_ALWAYS_ON message->text.pid = getpid(); #endif #if defined(DEBUG) || HAS_LOG_THREAD_ID_ALWAYS_ON message->text.thread_id = pthread_self(); #endif threaded_queue_enqueue(&logger_commit_queue, message); if(level <= exit_level) { logger_handle_trigger_shutdown(); } } void logger_handle_msg_text_ext(logger_handle* handle, u32 level, const char* text, u32 text_len, const char* prefix, u32 prefix_len, u16 flags) { /* * check that the handle has got a channel for the level */ #ifdef DEBUG if(level >= MSG_LEVEL_COUNT) { osformatln(termerr, "bad message level %u", level); logger_handle_trigger_shutdown(); return; } if(level <= MSG_ERR) { sleep(0); } #endif if(handle == NULL) { if(level <= exit_level) { logger_handle_trigger_shutdown(); } return; } if(level > logger_level) { return; } s32 channel_count = handle->channels[level].offset; if(channel_count < 0) /* it's count-1 actually */ { return; } logger_message* message = logger_message_alloc(); message->type = LOGGER_MESSAGE_TYPE_TEXT; message->text.level = level; message->text.flags = flags; message->text.text_length = text_len; message->text.text_buffer_length = text_len; message->text.handle = handle; ZALLOC_ARRAY_OR_DIE(u8*, message->text.text, text_len, LOGRTEXT_TAG); memcpy(message->text.text, text, text_len); gettimeofday(&message->text.tv, NULL); message->text.prefix = (const u8*)prefix; message->text.prefix_length = prefix_len; message->text.rc = 0; #if defined(DEBUG) || HAS_LOG_PID_ALWAYS_ON message->text.pid = getpid(); #endif #if defined(DEBUG) || HAS_LOG_THREAD_ID_ALWAYS_ON message->text.thread_id = pthread_self(); #endif threaded_queue_enqueue(&logger_commit_queue, message); if(level <= exit_level) { logger_handle_trigger_shutdown(); } } static const char LOGGER_PATH_DEFAULT[] = ""; static const char *g_logger_path = LOGGER_PATH_DEFAULT; static uid_t g_logger_uid = 0; static gid_t g_logger_gid = 0; void logger_set_path(const char *path) { if(g_logger_path != LOGGER_PATH_DEFAULT) { free((char*)g_logger_path); } if(path != NULL) { g_logger_path = strdup(path); } else { g_logger_path = LOGGER_PATH_DEFAULT; } } const char* logger_get_path() { return g_logger_path; } void logger_set_uid(uid_t uid) { g_logger_uid = uid; } uid_t logger_get_uid() { return g_logger_uid; } void logger_set_gid(uid_t gid) { g_logger_gid = gid; } gid_t logger_get_gid() { return g_logger_gid; } void logger_set_level(u8 level) { logger_level = MIN(level, MSG_ALL); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/nsid.c0000644000077100007710000000012412650131756020435 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.662344 30 ctime=1454597651.671344534 yadifa-2.1.6-5826/lib/dnscore/src/nsid.c0000664000077100007710000000721112650131756020243 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include //#include //#include //#include "dnscore/dnscore-config.h" #define DNSCORE_NSID_C #include "dnscore/nsid.h" #include "dnscore/rfc.h" static u8 edns0_rdatasize_nsid_option_wire_default[2] = {0,0}; u32 edns0_record_size = EDNS0_RECORD_SIZE; u8 *edns0_rdatasize_nsid_option_wire = edns0_rdatasize_nsid_option_wire_default; u32 edns0_rdatasize_nsid_option_wire_size = 2; void edns0_set_nsid(u8 *bytes, u16 size) { if(bytes != NULL) { if(size > EDNS0_NSID_SIZE_MAX) { return; } u8 *tmp = malloc(2 + 2 + 2 + size); if(tmp == NULL) { return; } tmp[0] = (size + 4) >> 8; tmp[1] = (size + 4) & 255;; tmp[2] = 0; tmp[3] = EDNS0_OPT_3; tmp[4] = size >> 8; tmp[5] = size & 255; memcpy(&tmp[6], bytes, size); if(edns0_rdatasize_nsid_option_wire != edns0_rdatasize_nsid_option_wire_default) { free(edns0_rdatasize_nsid_option_wire); } edns0_rdatasize_nsid_option_wire = tmp; edns0_rdatasize_nsid_option_wire_size = 6 + size; edns0_record_size = EDNS0_RECORD_SIZE - 2 + edns0_rdatasize_nsid_option_wire_size; } else { if(edns0_rdatasize_nsid_option_wire != edns0_rdatasize_nsid_option_wire_default) { free(edns0_rdatasize_nsid_option_wire); edns0_rdatasize_nsid_option_wire = edns0_rdatasize_nsid_option_wire_default; edns0_rdatasize_nsid_option_wire_size = 2; edns0_record_size = EDNS0_RECORD_SIZE; } } } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/ptr_vector.c0000644000077100007710000000012412650131756021667 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.736344 30 ctime=1454597651.566344534 yadifa-2.1.6-5826/lib/dnscore/src/ptr_vector.c0000664000077100007710000002631412650131756021502 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief A dynamic-sized array of pointers * * A dynamic-sized array of pointers * * Used for resource record canonization and such. * * @{ */ #include "dnscore/dnscore-config.h" #include "dnscore/ptr_vector.h" /** * Initialises a vector structure with a size of PTR_VECTOR_DEFAULT_SIZE entries * * @param v a pointer to the ptr_vector structure to initialise */ void ptr_vector_init(ptr_vector* v) { v->size = PTR_VECTOR_DEFAULT_SIZE; MALLOC_OR_DIE(void**, v->data, v->size * sizeof (void*), PTR_VECTOR_TAG); v->offset = -1; } /** * Initialises a vector structure with a size of PTR_VECTOR_DEFAULT_SIZE entries * * @param v a pointer to the ptr_vector structure to initialise * @param initial_capacity the size to allocate to start with */ void ptr_vector_init_ex(ptr_vector* v, s32 initial_capacity) { v->size = initial_capacity; if(initial_capacity > 0) { MALLOC_OR_DIE(void**, v->data, v->size * sizeof (void*), PTR_VECTOR_TAG); } else { v->data = NULL; } v->offset = -1; } /** * Frees the memory used by a vector structure (not the vector structure itself) * * @param v a pointer to the ptr_vector structure */ void ptr_vector_destroy(ptr_vector* v) { v->size = -1; v->offset = -1; free(v->data); v->data = NULL; } /** * Empties the vector (does not release memory) * * @param v a pointer to the ptr_vector structure */ void ptr_vector_empties(ptr_vector* v) { v->offset = -1; } /** * Changes the capacity of a vector to the specified size * The new size MUST be enough to keep the current content * of the vector. Failing to do so will most likely result * into a crash. * * @param v a pointer to the ptr_vector structure * @param newsize */ void ptr_vector_resize(ptr_vector*v, s32 newsize) { void** data; yassert(newsize >= v->offset + 1); if(v->offset >= 0) { /* Only the data up to v->offset (included) is relevant */ MALLOC_OR_DIE(void**, data, newsize * sizeof (void*), PTR_VECTOR_TAG); MEMCOPY(data, v->data, (v->offset + 1) * sizeof (void*)); #ifdef DEBUG if(v->data != NULL) { memset(v->data, 0xff, v->size * sizeof (void*)); } #endif free(v->data); } else { free(v->data); MALLOC_OR_DIE(void**, data, newsize * sizeof (void*), PTR_VECTOR_TAG); } v->data = data; v->size = newsize; } /** * Ensures the vector has enough capacity to accommodate a * specified number of items * * @param v a pointer to the ptr_vector structure * @param reqsize the minimum size of the vector */ void ptr_vector_ensures(ptr_vector*v, s32 reqsize) { if(v->size < reqsize) { ptr_vector_resize(v, reqsize); } } /** * Resizes the capacity so it can at most contain its * current size. * * @param v a pointer to the ptr_vector structure */ void ptr_vector_shrink(ptr_vector*v) { if(v->size != (v->offset + 1)) { ptr_vector_resize(v, v->offset + 1); } } /** * Appends the item (pointer) to the vector * * @param v a pointer to the ptr_vector structure * @param data a pointer to the item */ void ptr_vector_append(ptr_vector* v, void* data) { if(v->offset + 1 >= v->size) { if(v->size == 0) { v->size = PTR_VECTOR_DEFAULT_SIZE; } ptr_vector_resize(v, v->size * 2); } v->data[++v->offset] = data; } void ptr_vector_append_restrict_size(ptr_vector* v, void* data, u32 restrictedlimit) { if(v->offset + 1 >= v->size) { u32 size = v->size; // if the size is not 0 prepare to double it, else set it to a reasonable minimum if(size != 0) { size <<= 1; } else { size = PTR_VECTOR_DEFAULT_SIZE; } // if the size is bigger than the restriction, set it to the maximum between the restriction and what we actually need if(size > restrictedlimit) { size = MAX(restrictedlimit, v->offset + 1); } ptr_vector_resize(v, size); } v->data[++v->offset] = data; } /** * Appends the item (pointer) to the vector * * @param v a pointer to the ptr_vector structure * @param data a pointer to the item */ void* ptr_vector_pop(ptr_vector* v) { if(v->offset >= 0) { return v->data[v->offset--]; } else { return NULL; } } /** * Sort the content of the vector using the compare callback * * @param v a pointer to the ptr_vector structure * @param compare comparison callback */ void ptr_vector_qsort(ptr_vector* v, ptr_vector_qsort_callback compare) { if(v->offset > 0) /* at least 2 items */ { qsort(v->data, v->offset + 1, sizeof (void*), compare); } } /** * Empties the vector releasing the item memory first * * @param v a pointer to the ptr_vector structure * @param free_memory item free callback */ void ptr_vector_free_empties(ptr_vector* v, void_function_voidp free_memory) { int n = v->offset; int i; for(i = 0; i <= n; i++) { free_memory(v->data[i]); #ifdef DEBUG v->data[i] = NULL; #endif } v->offset = -1; } /** * Look sequentially in the vector for an item using a key and a comparison function * * @param v a pointer to the ptr_vector structure * @param what the key * @param compare the comparison function * * @return the first matching item or NULL if none has been found */ void* ptr_vector_linear_search(const ptr_vector* v, const void* what, ptr_vector_search_callback compare) { int last = v->offset; int i; for(i = 0; i <= last; i++) { void* data = v->data[i]; if(compare(what, data) == 0) { return data; } } return NULL; } /** * Look sequentially in the vector for an item using a key and a comparison function, returns the index of the first matching item * * @param v a pointer to the ptr_vector structure * @param what the key * @param compare the comparison function * * @return the first matching item index or -1 if none has been found */ s32 ptr_vector_index_of(const ptr_vector* v, const void* what, ptr_vector_search_callback compare) { s32 last = v->offset; s32 i; for(i = 0; i <= last; i++) { void* data = v->data[i]; if(compare(what, data) == 0) { return i; } } return -1; } /** * Look in the SORTED vector for an item using a key and a comparison function * The callback needs to tell equal (0) smaller (<0) or bigger (>0) * * @param v a pointer to the ptr_vector structure * @param what the key * @param compare the comparison function * * @return the first matching item or NULL if none has been found */ void* ptr_vector_search(const ptr_vector* v, const void* what, ptr_vector_search_callback compare) { int first = 0; int last = v->offset; /* * NOTE: for small intervals, a linear search may be faster * */ while(first < last) { int pivot = (last + first) >> 1; void *item = v->data[pivot]; int cmp = compare(what, item); if(cmp == 0) { return item; } if(cmp < 0) { last = pivot - 1; } else { first = pivot + 1; } } if(first == last) { void *item = v->data[first]; if(compare(what, item) == 0) { return item; } } return NULL; } /** * Inserts a value at position, pushing items from this position up * Potentially very slow. * * @param pv * @param idx */ void ptr_vector_insert_at(ptr_vector *pv, s32 idx, void *val) { if(idx <= pv->offset) { ptr_vector_ensures(pv, pv->offset + 1); memmove(&pv->data[idx + 1], &pv->data[idx], (pv->offset - idx) * sizeof(void*)); pv->data[idx] = val; } else { ptr_vector_ensures(pv, idx + 1); memset(&pv->data[pv->offset + 1], 0, &pv->data[idx] - &pv->data[pv->offset + 1]); pv->data[idx] = val; pv->offset = idx; } } /** * Inserts multiple values at position, pushing items from this position up * Potentially very slow. * * @param pv * @param idx * @param valp an array of pointers that will be inserted * @param n the size of the array of pointers */ void ptr_vector_insert_array_at(ptr_vector *pv, s32 idx, void **valp, u32 n) { if(idx <= pv->offset) { ptr_vector_ensures(pv, pv->offset + n); memmove(&pv->data[idx + n], &pv->data[idx], (pv->offset - idx + n) * sizeof(void*)); memcpy(&pv->data[idx], valp, n); } else { ptr_vector_ensures(pv, idx + n); memset(&pv->data[pv->offset + n], 0, &pv->data[idx] - &pv->data[pv->offset + n]); memcpy(&pv->data[idx], valp, n); pv->offset = idx + n - 1; } } /** * * Removes a value at position, pulling items above this position down * Potentially very slow * * @param pv * @param idx * @return the removed value */ void* ptr_vector_remove_at(ptr_vector *pv, s32 idx) { void *data = pv->data[idx]; if(idx <= pv->offset) { memmove(&pv->data[idx], &pv->data[idx + 1], (pv->offset - idx) * sizeof(void*)); --pv->offset; } return data; } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/dnscore.c0000644000077100007710000000012412650131756021135 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.665344 30 ctime=1454597651.412344534 yadifa-2.1.6-5826/lib/dnscore/src/dnscore.c0000664000077100007710000004027612650131756020753 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscore System core functions * @brief System core functions * * @{ */ #define __DNSCORE_C__ #include "dnscore/dnscore-config.h" #if HAS_PTHREAD_SETNAME_NP #ifdef DEBUG #define _GNU_SOURCE 1 #endif #endif #include #include #include #include #include #include "dnscore/zalloc.h" #include "dnscore/message.h" #include "dnscore/file_output_stream.h" #include "dnscore/buffer_output_stream.h" #include "dnscore/mt_output_stream.h" #include "dnscore/format.h" #include "dnscore/dnsformat.h" #include "dnscore/logger.h" #include "dnscore/random.h" #include "dnscore/sys_error.h" #include "dnscore/thread_pool.h" #include "dnscore/tsig.h" #include "dnscore/mutex.h" #include "dnscore/alarm.h" #include "dnscore/tcp_io_stream.h" #include "dnscore/config_settings.h" #include "dnscore/async.h" #include #if DNSCORE_HAS_TSIG_SUPPORT #include #include #endif #define TERM_BUFFER_SIZE 4096 #define DNSCORE_TIDY_UP_MEMORY 1 #define MODULE_MSG_HANDLE g_system_logger /*****************************************************************************/ #if DNSCORE_HAS_TSIG_SUPPORT #if !DNSCORE_HAS_ACL_SUPPORT #error "TSIG support is irrelevant without ACL support" #endif #endif #ifndef __DATE__ #define __DATE__ "date?" #endif #ifndef __TIME__ #define __TIME__ "time?" #endif #ifdef DEBUG const char *dnscore_lib = "dnscore " __DATE__ " " __TIME__ " debug"; #else const char *dnscore_lib = "dnscore " __DATE__ " " __TIME__ " release"; #endif static const char* ARCH_RECOMPILE_WARNING = "Please recompile with the correct settings."; static const char* ARCH_CHECK_SIZE_WARNING = "PANIC: %s does not match the size requirements (%i instead of %i).\n"; static const char* ARCH_CHECK_SIGN_WARNING = "PANIC: %s does not match the sign requirements.\n"; #define ARCH_CHECK_SIZE(a,b) if(a!=b) { printf(ARCH_CHECK_SIZE_WARNING,#a,a,b);puts(ARCH_RECOMPILE_WARNING);DIE(ERROR); } #define ARCH_CHECK_SIGNED(a) {a val=~0;if(val>0) { printf(ARCH_CHECK_SIGN_WARNING,#a);puts(ARCH_RECOMPILE_WARNING);DIE(ERROR); }} #define ARCH_CHECK_UNSIGNED(a) {a val=~0;if(val<0) { printf(ARCH_CHECK_SIGN_WARNING,#a);puts(ARCH_RECOMPILE_WARNING);DIE(ERROR); }} logger_handle *g_system_logger = NULL; static smp_int g_shutdown = SMP_INT_INITIALIZER; static void dnscore_arch_checkup() { /* Test the archi=tecture */ #pragma message("Don't worry about the possible warnings below") ARCH_CHECK_SIZE(__SIZEOF_POINTER__, sizeof (void*)); ARCH_CHECK_SIZE(sizeof (u8), 1); ARCH_CHECK_SIZE(sizeof (s8), 1); ARCH_CHECK_SIZE(sizeof (u16), 2); ARCH_CHECK_SIZE(sizeof (s16), 2); ARCH_CHECK_SIZE(sizeof (u32), 4); ARCH_CHECK_SIZE(sizeof (s32), 4); ARCH_CHECK_SIZE(sizeof (u64), 8); ARCH_CHECK_SIZE(sizeof (s64), 8); ARCH_CHECK_SIZE(sizeof (intptr), sizeof (void*)); ARCH_CHECK_SIGNED(s8); ARCH_CHECK_SIGNED(s16); ARCH_CHECK_SIGNED(s32); ARCH_CHECK_SIGNED(s64); ARCH_CHECK_UNSIGNED(u8); ARCH_CHECK_UNSIGNED(u16); ARCH_CHECK_UNSIGNED(u32); ARCH_CHECK_UNSIGNED(u64); ARCH_CHECK_UNSIGNED(intptr); message_data* msg = NULL; intptr msg_diffs = (intptr)(msg->buffer - msg->buffer_tcp_len); // cppcheck : false positive: of course it's a null pointer if((msg->buffer - msg->buffer_tcp_len) != 2) { printf("Structure aligment is wrong. Expected 2 but got %i. (see message_data)\n", (int)msg_diffs); DIE(ERROR); } #pragma message("You can resume worrying about warnings ...") #if WORDS_BIGENDIAN==1 u8 endian[4] = {1, 2, 3, 4}; /* BIG */ char* endian_name = "BIG"; #else u8 endian[4] = {4, 3, 2, 1}; /* LITTLE */ char* endian_name = "LITTLE"; #endif u32 endian_match = GET_U32_AT(endian[0]); if(endian_match != 0x01020304) { fprintf(stderr, "Endianness is wrong. Compiled for %s\n", endian_name); puts(ARCH_RECOMPILE_WARNING); fflush(NULL); DIE(ERROR); } } /*****************************************************************************/ dnslib_fingerprint dnscore_getfingerprint() { dnslib_fingerprint ret = (dnslib_fingerprint)(0 #if DNSCORE_HAS_TSIG_SUPPORT | DNSLIB_TSIG #endif ) ; return ret; } u32 dnscore_fingerprint_mask() { return DNSLIB_TSIG; } /*****************************************************************************/ output_stream __termout__ = {NULL, NULL}; output_stream __termerr__ = {NULL, NULL}; static void stdstream_init() { output_stream tmp; output_stream tmp2; fd_output_stream_attach(&tmp, 1); buffer_output_stream_init(&tmp, &tmp2, TERM_BUFFER_SIZE); mt_output_stream_init(&tmp2, &__termout__); fd_output_stream_attach(&tmp, 2); buffer_output_stream_init(&tmp, &tmp2, TERM_BUFFER_SIZE); mt_output_stream_init(&tmp2, &__termerr__); } static void stdtream_detach_fd(output_stream *os) { /* * Ensure that the stream that will be detached is one of the valid ones */ output_stream_flush(os); if(!is_fd_output_stream(os)) { if(!is_mt_output_stream(os)) { log_err("unexpected stream in term"); exit(EXIT_FAILURE); } os = mt_output_stream_get_filtered(os); if(!is_buffer_output_stream(os)) { log_err("unexpected stream in term"); exit(EXIT_FAILURE); } os = buffer_output_stream_get_filtered(os); if(!is_fd_output_stream(os)) { log_err("unexpected stream in term"); exit(EXIT_FAILURE); } output_stream_flush(os); } fd_output_stream_detach(os); } static void stdstream_flush_both_terms() { output_stream_flush(&__termout__); output_stream_flush(&__termerr__); } /** * Detaches the fd at the bottom of the mt(buffer(file(fd))) stream ... if it can. * Closes the stream. * * @param os * @return 1 if an seemingly valid fd has been found and detached. 0 otherwise. */ ya_result stdtream_detach_fd_and_close_output_stream(output_stream *os) { output_stream *wos = os; ya_result ret = 0; output_stream_flush(wos); if(is_mt_output_stream(wos)) { wos = mt_output_stream_get_filtered(wos); } if(is_buffer_output_stream(wos)) { wos = buffer_output_stream_get_filtered(wos); } if(is_fd_output_stream(wos)) { stdtream_detach_fd(wos); ret = 1; } output_stream_close(os); return ret; } void stdtream_detach_fd_and_close() { stdtream_detach_fd_and_close_output_stream(&__termout__); stdtream_detach_fd_and_close_output_stream(&__termerr__); } bool stdstream_is_tty(output_stream *os) { if(is_mt_output_stream(os)) { os = mt_output_stream_get_filtered(os); } if(is_buffer_output_stream(os)) { os = buffer_output_stream_get_filtered(os); } bool ret = is_fd_output_stream(os); return ret; } void rfc_init(); void rfc_finalize(); void format_class_finalize(); static bool dnscore_init_done = FALSE; //static smp_int dnscore_time_thread_must_run = SMP_INT_INITIALIZER; static async_wait_s timer_thread_sync; static pthread_t dnscore_timer_thread_id = 0; static volatile int dnscore_timer_creator_pid = 0; static int dnscore_timer_period = 5; static volatile u32 dnscore_timer_tick = 0; static void* dnscore_timer_thread(void * unused0) { thread_pool_setup_random_ctx(); dnscore_timer_tick = time(NULL); #ifdef HAS_PTHREAD_SETNAME_NP #ifdef DEBUG pthread_setname_np(pthread_self(), "timer"); #endif #endif log_debug5("dnscore_timer_thread started"); // if the counter reaches 0 then we have to stop u64 loop_period = dnscore_timer_period; loop_period *= 1000000LL; u64 loop_next_timeout_epoch = timeus(); while(!async_wait_timeout_absolute(&timer_thread_sync, loop_next_timeout_epoch)) { /* log & term output flush handling */ stdstream_flush_both_terms(); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT mutex_locked_set_monitor(); group_mutex_locked_set_monitor(); shared_group_mutex_locked_set_monitor(); #endif logger_flush(); dnscore_timer_tick = time(NULL); alarm_run_tick(dnscore_timer_tick); loop_next_timeout_epoch += loop_period; } log_debug5("dnscore_timer_thread stopping"); thread_pool_destroy_random_ctx(); log_debug5("dnscore_timer_thread stopped"); pthread_exit(NULL); /* not from the pool, so it's the way */ return NULL; } void dnscore_reset_timer() { int mypid = getpid(); if(mypid != dnscore_timer_creator_pid) { dnscore_timer_tick = 0; dnscore_timer_creator_pid = mypid; async_wait_init(&timer_thread_sync, 1); log_debug("starting timer"); if(pthread_create(&dnscore_timer_thread_id, NULL, dnscore_timer_thread, NULL) != 0) { dnscore_timer_thread_id = 0; dnscore_timer_creator_pid = 0; log_err("failed to create timer thread: %r", ERRNO_ERROR); exit(EXIT_CODE_THREADCREATE_ERROR); } } } u32 dnscore_timer_get_tick() { return dnscore_timer_tick; } void dnscore_init() { if(dnscore_init_done) { return; } #if DNSCORE_HAS_ZALLOC_SUPPORT zalloc_init(); #endif output_stream_set_void(&__termout__); output_stream_set_void(&__termerr__); stdstream_init(); dnscore_init_done = TRUE; dnscore_arch_checkup(); thread_pool_setup_random_ctx(); random_ctx rnd = thread_pool_get_random_ctx(); // random NEEDS to work. { u32 r0 = random_next(rnd); u32 r1 = random_next(rnd); u32 r2 = random_next(rnd); u32 r3 = random_next(rnd); if( ((r0 == 0) && (r1 == 0) && (r2 == 0) && (r3 == 0)) || ((r0 == r1) && (r1 == r2) && (r2 == r3)) ) { // this IS possible, but has one chance in the order of 2^128 to happen printf("panic: random generation fails. (%08x,%08x,%08x,%08x)\n", r0, r1, r2, r3); exit(-1); } } rfc_init(); format_class_init(); dnsformat_class_init(); logger_init(); dnscore_register_errors(); #if DNSCORE_HAS_TSIG_SUPPORT ENGINE_load_openssl(); ENGINE_load_builtin_engines(); SSL_library_init(); SSL_load_error_strings(); tsig_register_algorithms(); #endif atexit(dnscore_finalize); alarm_init(); dnscore_reset_timer(); tcp_init_with_env(); } void dnscore_stop_timer() { /* * Timer thread stop */ int mypid = getpid(); if(mypid == dnscore_timer_creator_pid) { dnscore_timer_creator_pid = 0; if(dnscore_timer_thread_id != 0) { log_debug("stopping timer"); async_wait_progress(&timer_thread_sync, 1); // pthread_kill(dnscore_timer_thread_id, SIGUSR1); pthread_join(dnscore_timer_thread_id, NULL); dnscore_timer_thread_id = 0; async_wait_finalize(&timer_thread_sync); } } else { #ifdef DEBUG if(dnscore_timer_creator_pid != 0) { log_debug("timer owned by %d, not touching it (I'm %d)", dnscore_timer_creator_pid, mypid); } else { log_debug("timer stopped already (I'm %d)", mypid); } #endif } logger_flush(); } void dnscore_wait_timer_stopped() { pthread_t id = dnscore_timer_thread_id; if(id != 0) { pthread_join(id, NULL); } } void dnscore_shutdown() { smp_int_set(&g_shutdown, 1); } bool dnscore_shuttingdown() { return smp_int_get(&g_shutdown) != 0; } static volatile bool dnscore_finalizing = FALSE; void log_assert__(bool b, const char *txt, const char *file, int line) { if(!b) { if(logger_is_running() && (g_system_logger != NULL)) { //logger_handle_exit_level(MAX_U32); log_crit("assert: at %s:%d: %s", file, line, txt); /* this is in zassert */ logger_flush(); } else { osformatln(&__termerr__,"assert: at %s:%d: %s", file, line, txt); } stdstream_flush_both_terms(); abort(); } } void dnscore_finalize() { /* * No need to "finalize" format, dnsformat and rfc */ if(dnscore_finalizing) { /* OOPS : ALREADY BUSY SHUTTING DOWN */ /* DO NOT USE LOGGER HERE ! */ return; } dnscore_finalizing = TRUE; dnscore_shutdown(); #ifdef DEBUG debug_bench_logdump_all(); #endif #ifdef DEBUG log_debug("exit: destroying the thread pool"); #endif logger_flush(); #ifdef DEBUG log_debug("exit: bye (pid=%hd)", getpid()); logger_flush(); #endif logger_flush(); dnscore_stop_timer(); // timer uses logger dnscore_wait_timer_stopped(); alarm_finalise(); config_finalise(); async_message_pool_finalize(); stdstream_flush_both_terms(); logger_finalize(); /** @note does a logger_stop */ #if defined(DEBUG) || defined(DNSCORE_TIDY_UP_MEMORY) /* * It may not be required right now, but in case the stdstream are filtered/buffered * this will flush them. */ thread_pool_destroy_random_ctx(); stdstream_flush_both_terms(); #if DNSCORE_HAS_TSIG_SUPPORT tsig_finalize(); #endif error_unregister_all(); rfc_finalize(); format_class_finalize(); #if DNSCORE_HAS_MALLOC_DEBUG_SUPPORT debug_stat(TRUE); zalloc_print_stats(&__termout__); #endif stdstream_flush_both_terms(); #endif // DNSCORE_TIDY_UP_MEMORY output_stream_close(&__termerr__); output_stream_close(&__termout__); debug_stacktrace_clear(); } static void dnscore_signature_check_one(const char* name, int should, int is) { if(is != should) { printf("critical: dnscore: '%s' should be of size %i but is of size %i\n", name, is, should); fflush(stdout); abort(); } } void dnscore_signature_check(int so_mutex_t, int so_group_mutex_t) { dnscore_signature_check_one("mutex_t", sizeof(mutex_t), so_mutex_t); dnscore_signature_check_one("group_mutex_t", sizeof(group_mutex_t), so_group_mutex_t); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/async.c0000644000077100007710000000012412650131756020615 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.638344 30 ctime=1454597651.300344534 yadifa-2.1.6-5826/lib/dnscore/src/async.c0000664000077100007710000002672212650131756020433 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore.h" #include "dnscore/zalloc.h" #include "dnscore/async.h" #include "dnscore/pool.h" #include "dnscore/format.h" extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger #define ASYNCMSG_TAG 0x47534d434e595341 struct async_message_wait_args { pthread_mutex_t mutex; pthread_cond_t cond_wait; s32 wait_count; }; static pool_s async_message_pool; static bool async_message_pool_initialized = FALSE; void async_message_call(async_queue_s *queue, async_message_s *msg) { msg->start_time = timeus(); #if ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_DLL threaded_dll_cw_enqueue(&queue->queue, msg); #elif ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_RINGBUFFER threaded_ringbuffer_cw_enqueue(&queue->queue, msg); #else threaded_queue_enqueue(&queue->queue, msg); #endif } async_message_s* async_message_next(async_queue_s *queue) { #if ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_DLL async_message_s* async = (async_message_s*)threaded_dll_cw_try_dequeue(&queue->queue); #elif ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_RINGBUFFER async_message_s* async = (async_message_s*)threaded_ringbuffer_cw_try_dequeue(&queue->queue); #else async_message_s* async = (async_message_s*)threaded_queue_try_dequeue(&queue->queue); #endif if(async == NULL) { pace_wait(&queue->pace); } else { pace_work(&queue->pace); } return async; } async_message_s* async_message_try_next(async_queue_s *queue) { #if ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_DLL async_message_s* async = (async_message_s*)threaded_dll_cw_try_dequeue(&queue->queue); #elif ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_RINGBUFFER async_message_s* async = (async_message_s*)threaded_ringbuffer_cw_try_dequeue(&queue->queue); #else async_message_s* async = (async_message_s*)threaded_queue_try_dequeue(&queue->queue); #endif return async; } /** * * Initialises a synchronisation point * count is the number of releases to do before the async_wait call returns * * @param aw * @param count * @return */ void async_wait_init(async_wait_s *aw, s32 count) { pthread_mutex_init(&aw->mutex, NULL); pthread_cond_init(&aw->cond_wait, NULL); aw->wait_count = count; aw->error_code = SUCCESS; } /** * Waits until the count has be reduced to 0 (or below if something bad is going on) * * @param aw * @return */ void async_wait(async_wait_s *aw) { pthread_mutex_lock(&aw->mutex); while(aw->wait_count > 0) { pthread_cond_wait(&aw->cond_wait, &aw->mutex); } pthread_mutex_unlock(&aw->mutex); } bool async_wait_timeout_absolute(async_wait_s *aw, u64 epoch_usec) { struct timespec ts; ts.tv_sec = epoch_usec / 1000000L; ts.tv_nsec = (epoch_usec % 1000000L) * 1000L; pthread_mutex_lock(&aw->mutex); while(aw->wait_count > 0) { int err; err = pthread_cond_timedwait(&aw->cond_wait, &aw->mutex, &ts); if(err == ETIMEDOUT) { break; } if(err != 0) { log_err("async_wait_timeout: %r", MAKE_ERRNO_ERROR(err)); } } pthread_mutex_unlock(&aw->mutex); return aw->wait_count == 0; } bool async_wait_timeout(async_wait_s *aw, u64 usec) { usec += timeus(); return async_wait_timeout_absolute(aw, usec); } s32 async_wait_get_counter(async_wait_s *aw) { s32 counter; pthread_mutex_lock(&aw->mutex); counter = aw->wait_count; pthread_mutex_unlock(&aw->mutex); return counter; } /** * * Decreases the count of that amount * * @param aw * @param count * @return */ void async_wait_progress(async_wait_s *aw, s32 count) { pthread_mutex_lock(&aw->mutex); if(aw->wait_count - count >= 0) { aw->wait_count -= count; pthread_cond_broadcast(&aw->cond_wait); pthread_mutex_unlock(&aw->mutex); } else { log_err("async_wait_progress: count=%i, trying to add %i", aw->wait_count, count); aw->wait_count = 0; pthread_cond_broadcast(&aw->cond_wait); pthread_mutex_unlock(&aw->mutex); } } void async_wait_set_first_error(async_wait_s *aw, s32 error) { pthread_mutex_lock(&aw->mutex); if(ISOK(aw->error_code)) { aw->error_code = error; } pthread_mutex_unlock(&aw->mutex); } s32 async_wait_get_error(async_wait_s *aw) { s32 err; pthread_mutex_lock(&aw->mutex); err = aw->error_code; pthread_mutex_unlock(&aw->mutex); return err; } /** * * Destroys the synchronisation point * * @param aw * @return */ void async_wait_finalize(async_wait_s *aw) { pthread_mutex_lock(&aw->mutex); s32 wait_count = aw->wait_count; pthread_mutex_unlock(&aw->mutex); if(wait_count > 0) { osformat(termerr, "async_wait_finalize: wait_count = %i > 0: finalisation before logical end of life", wait_count); flusherr(); } pthread_cond_destroy(&aw->cond_wait); pthread_mutex_destroy(&aw->mutex); } void async_queue_init(async_queue_s *q, u32 size, u64 min_us, u64 max_us, const char* name) { #if ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_DLL threaded_dll_cw_init(&q->queue, size); #elif ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_RINGBUFFER threaded_ringbuffer_cw_init(&q->queue, size); #else threaded_queue_init(&q->queue, size); #endif pace_init(&q->pace, min_us, max_us, name); } void async_queue_finalize(async_queue_s *q) { u32 n; #if ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_DLL if((n = threaded_dll_cw_size(&q->queue)) > 0) { log_warn("async_dll_cw_finalize: queue still contains %u items"); } threaded_dll_cw_finalize(&q->queue); #elif ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_RINGBUFFER if((n = threaded_ringbuffer_cw_size(&q->queue)) > 0) { log_warn("async_ringbuffer_cw_finalize: queue still contains %u items"); } threaded_ringbuffer_cw_finalize(&q->queue); #else if((n = threaded_queue_size(&q->queue)) > 0) { log_warn("async_queue_finalize: queue still contains %u items"); } threaded_queue_finalize(&q->queue); #endif } bool async_queue_emtpy(async_queue_s *q) { #if ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_DLL return threaded_dll_cw_size(&q->queue) == 0; #elif ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_RINGBUFFER return threaded_ringbuffer_cw_size(&q->queue) == 0; #else return threaded_queue_size(&q->queue) == 0; #endif } u32 async_queue_size(async_queue_s *q) { #if ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_DLL return threaded_dll_cw_size(&q->queue); #elif ASYNC_QUEUE_TYPE == ASYNC_QUEUE_TYPE_RINGBUFFER return threaded_ringbuffer_cw_size(&q->queue); #else return threaded_queue_size(&q->queue); #endif } static void async_message_wait_handler(struct async_message_s *msg) { struct async_wait_s *args = (struct async_wait_s *)msg->handler_args; async_wait_progress(args, 1); } static void async_message_nop_handler(struct async_message_s *msg) { } static void async_message_release_handler(struct async_message_s *msg) { async_message_release(msg); } int async_message_call_and_wait(async_queue_s *queue, async_message_s *msg) { async_done_callback *old_handler = msg->handler; void *old_handler_args = msg->handler_args; struct async_wait_s message_wait_args; async_wait_init(&message_wait_args, 1); msg->error_code = SUCCESS; msg->handler = async_message_wait_handler; msg->handler_args = &message_wait_args; async_message_call(queue, msg); async_wait(&message_wait_args); msg->handler = old_handler; msg->handler_args = old_handler_args; u64 wait_time = timeus() - msg->start_time; async_wait_finalize(&message_wait_args); log_debug5("async waited %lluus on '%i@%s'", wait_time, msg->id, queue->pace.name); return msg->error_code; } void async_message_call_and_forget(async_queue_s *queue, async_message_s *msg) { msg->handler = async_message_nop_handler; msg->handler_args = NULL; async_message_call(queue, msg); } void async_message_call_and_release(async_queue_s *queue, async_message_s *msg) { msg->handler = async_message_release_handler; msg->handler_args = NULL; async_message_call(queue, msg); } static void * async_message_pool_alloc(void *_ignored_) { async_message_s *msg; (void)_ignored_; ZALLOC_OR_DIE(async_message_s*, msg, async_message_s, ASYNCMSG_TAG); // POOL ZEROMEMORY(msg, sizeof(async_message_s)); // false positive: msg cannot be NULL return msg; } static void async_message_pool_free(void *msg, void *_ignored_) { (void)_ignored_; memset(msg, 0xe2, sizeof(async_message_s)); ZFREE(msg, async_message_s); // POOL } void async_message_pool_init() { if(!async_message_pool_initialized) { pool_init(&async_message_pool, async_message_pool_alloc, async_message_pool_free, NULL, "async message"); pool_set_size(&async_message_pool, 0x80000); // for valgrind #ifdef VALGRIND_FRIENDLY pool_set_size(&async_message_pool, 0); #endif async_message_pool_initialized = TRUE; } } void async_message_pool_finalize() { if(async_message_pool_initialized) { pool_finalize(&async_message_pool); async_message_pool_initialized = FALSE; } } async_message_s* async_message_alloc() { async_message_s *msg = (async_message_s *)pool_alloc(&async_message_pool); ZEROMEMORY(msg, sizeof(async_message_s)); return msg; } void async_message_release(async_message_s *msg) { memset(msg, 0xe3, sizeof(async_message_s)); pool_release(&async_message_pool, msg); } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/sys_error.c0000644000077100007710000000012412650131756021527 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.737344 30 ctime=1454597651.596344534 yadifa-2.1.6-5826/lib/dnscore/src/sys_error.c0000664000077100007710000004047612650131756021347 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscoreerror Error * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include "dnscore/sys_types.h" #include "dnscore/sys_error.h" #include "dnscore/rfc.h" #include "dnscore/u32_set.h" #include "dnscore/output_stream.h" #include "dnscore/format.h" #include "dnscore/dnssec_errors.h" #include "dnscore/parser.h" #include "dnscore/config_settings.h" #include "dnscore/cmdline.h" #define ERRORTBL_TAG 0x4c4254524f525245 /*----------------------------------------------------------------------------*/ void dief(ya_result error_code, const char* format, ...) { /** * @note Cannot use format here. The output call HAS to be from the standard library/system. */ fflush(NULL); fprintf(stderr, "critical error : %i %x '%s'\n", error_code, error_code, error_gettext(error_code)); fflush(NULL); va_list args; va_start(args, format); vfprintf(stderr, format, args); /* Keep native */ va_end(args); fflush(NULL); abort(); } static u32_node *error_set = NULL; void error_unregister_all() { u32_set_avl_iterator iter; u32_set_avl_iterator_init(&error_set, &iter); while(u32_set_avl_iterator_hasnext(&iter)) { u32_node *error_node = u32_set_avl_iterator_next_node(&iter); free(error_node->value); error_node->value = NULL; } u32_set_avl_destroy(&error_set); } void error_register(ya_result code, const char* text) { if(text == NULL) { text = "NULL"; } if((code & 0xffff0000) == ERRNO_ERROR_BASE) { fprintf(stderr, "error_register(%08x,%s) : the errno space is reserved (0x8000xxxx)", code, text); fflush(stderr); exit(EXIT_FAILURE); } u32_node *error_node = u32_set_avl_insert(&error_set, code); if(error_node->value == 0) { error_node->value = strdup(text); } } static char error_gettext_tmp[64]; /** * * DEPRECATED * * @param code * @return */ const char* error_gettext(ya_result code) { /* errno handling */ if(code > 0) { snprintf(error_gettext_tmp, sizeof (error_gettext_tmp), "success (%08x)", code); return error_gettext_tmp; } if((code & 0xffff0000) == ERRNO_ERROR_BASE) { return strerror(code & 0xffff); } /**/ u32_node *error_node; error_node = u32_set_avl_find(&error_set, code); if(error_node != NULL) { return (const char*)error_node->value; } u32 error_base = code & 0xffff0000; error_node = u32_set_avl_find(&error_set, error_base); if(error_node != NULL) { return (const char*)error_node->value; } snprintf(error_gettext_tmp, sizeof (error_gettext_tmp), "undefined error code %08x", code); return error_gettext_tmp; } /** * * Text representation of the error code * * @param os * @param code */ void error_writetext(output_stream *os, ya_result code) { /* errno handling */ if(code > 0) { osformat(os, "success (%08x)", code); return; } if((code & 0xffff0000) == ERRNO_ERROR_BASE) { code &= 0xffff; #if DEBUG if(code == EINTR) { osprint(os, " "); // whoopsie } #endif osprint(os, strerror(code)); return; } /**/ u32_node *error_node; error_node = u32_set_avl_find(&error_set, code); if(error_node != NULL) { osprint(os, (const char*)error_node->value); return; } u32 error_base = code & 0xffff0000; error_node = u32_set_avl_find(&error_set, error_base); if(error_node != NULL) { osformatln(os, "%s(%08x)", (const char*)error_node->value, code); return; } osformat(os, "undefined error code %08x", code); } static bool dnscore_register_errors_done = FALSE; void dnscore_register_errors() { if(dnscore_register_errors_done) { return; } dnscore_register_errors_done = TRUE; error_register(SUCCESS, "SUCCESS"); error_register(SERVER_ERROR_BASE, "SERVER_ERROR_BASE"); error_register(PARSEB16_ERROR, "PARSEB16_ERROR"); error_register(PARSEB32_ERROR, "PARSEB32_ERROR"); error_register(PARSEB32H_ERROR, "PARSEB32H_ERROR"); error_register(PARSEB64_ERROR, "PARSEB64_ERROR"); error_register(PARSEINT_ERROR, "PARSEINT_ERROR"); error_register(PARSEDATE_ERROR, "PARSEDATE_ERROR"); error_register(PARSEIP_ERROR, "PARSEIP_ERROR"); error_register(TCP_RATE_TOO_SLOW, "TCP_RATE_TOO_SLOW"); error_register(PARSEWORD_NOMATCH_ERROR, "PARSEWORD_NOMATCH_ERROR"); error_register(PARSESTRING_ERROR, "PARSESTRING_ERROR"); error_register(PARSE_BUFFER_TOO_SMALL_ERROR, "PARSE_BUFFER_TOO_SMALL_ERROR"); error_register(PARSE_INVALID_CHARACTER, "PARSE_INVALID_CHARACTER"); error_register(PARSE_INVALID_ARGUMENT, "PARSE_INVALID_ARGUMENT"); error_register(CONFIG_SECTION_CALLBACK_ALREADY_SET, "CONFIG_SECTION_CALLBACK_ALREADY_SET"); error_register(CONFIG_SECTION_CALLBACK_NOT_SET, "CONFIG_SECTION_CALLBACK_NOT_SET"); error_register(CONFIG_SECTION_CALLBACK_NOT_FOUND, "CONFIG_SECTION_CALLBACK_NOT_FOUND"); error_register(CONFIG_NOT_A_REGULAR_FILE, "CONFIG_NOT_A_REGULAR_FILE"); error_register(CONFIG_TOO_MANY_HOSTS, "CONFIG_TOO_MANY_HOSTS"); error_register(CONFIG_FQDN_NOT_ALLOWED, "CONFIG_FQDN_NOT_ALLOWED"); error_register(CONFIG_PORT_NOT_ALLOWED, "CONFIG_PORT_NOT_ALLOWED"); error_register(CONFIG_EXPECTED_VALID_PORT_VALUE, "CONFIG_EXPECTED_VALID_PORT_VALUE"); error_register(CONFIG_TSIG_NOT_ALLOWED, "CONFIG_TSIG_NOT_ALLOWED"); error_register(CONFIG_INTERNAL_ERROR, "CONFIG_INTERNAL_ERROR"); error_register(CONFIG_IPV4_NOT_ALLOWED, "CONFIG_IPV4_NOT_ALLOWED"); error_register(CONFIG_IPV6_NOT_ALLOWED, "CONFIG_IPV6_NOT_ALLOWED"); error_register(CONFIG_KEY_UNKNOWN, "CONFIG_KEY_UNKNOWN"); error_register(CONFIG_KEY_PARSE_ERROR, "CONFIG_KEY_PARSE_ERROR"); error_register(LOGGER_INITIALISATION_ERROR, "LOGGER_INITIALISATION_ERROR"); error_register(COMMAND_ARGUMENT_EXPECTED, "COMMAND_ARGUMENT_EXPECTED"); error_register(OBJECT_NOT_INITIALIZED, "OBJECT_NOT_INITIALIZED"); error_register(FORMAT_ALREADY_REGISTERED, "FORMAT_ALREADY_REGISTERED"); error_register(STOPPED_BY_APPLICATION_SHUTDOWN, "STOPPED_BY_APPLICATION_SHUTDOWN"); error_register(INVALID_STATE_ERROR, "INVALID_STATE_ERROR"); error_register(FEATURE_NOT_IMPLEMENTED_ERROR, "FEATURE_NOT_IMPLEMENTED_ERROR"); error_register(UNEXPECTED_NULL_ARGUMENT_ERROR, "UNEXPECTED_NULL_ARGUMENT_ERROR"); error_register(INVALID_ARGUMENT_ERROR, "INVALID_ARGUMENT_ERROR"); error_register(INVALID_PATH, "INVALID_PATH"); error_register(PID_LOCKED, "PID_LOCKED"); error_register(UNABLE_TO_COMPLETE_FULL_READ, "UNABLE_TO_COMPLETE_FULL_READ"); error_register(UNEXPECTED_EOF, "UNEXPECTED_EOF"); error_register(UNSUPPORTED_TYPE, "UNSUPPORTED_TYPE"); error_register(UNKNOWN_NAME, "UNKNOWN_NAME"); error_register(BIGGER_THAN_MAX_PATH, "BIGGER_THAN_MAX_PATH"); error_register(UNABLE_TO_COMPLETE_FULL_WRITE, "UNABLE_TO_COMPLETE_FULL_WRITE"); error_register(BUFFER_WOULD_OVERFLOW, "BUFFER_WOULD_OVERFLOW"); error_register(CHROOT_NOT_A_DIRECTORY, "CHROOT_NOT_A_DIRECTORY"); error_register(CHROOT_ALREADY_JAILED, "CHROOT_ALREADY_JAILED"); error_register(IP_VERSION_NOT_SUPPORTED, "IP_VERSION_NOT_SUPPORTED"); error_register(THREAD_CREATION_ERROR, "THREAD_CREATION_ERROR"); error_register(THREAD_DOUBLEDESTRUCTION_ERROR, "THREAD_DOUBLEDESTRUCTION_ERROR"); error_register(SERVICE_ID_ERROR, "SERVICE_ID_ERROR"); error_register(SERVICE_WITHOUT_ENTRY_POINT, "SERVICE_WITHOUT_ENTRY_POINT"); error_register(SERVICE_ALREADY_INITIALISED, "SERVICE_ALREADY_INITIALISED"); error_register(SERVICE_ALREADY_RUNNING, "SERVICE_ALREADY_RUNNING"); error_register(SERVICE_NOT_RUNNING, "SERVICE_NOT_RUNNING"); error_register(SERVICE_NOT_INITIALISED, "SERVICE_NOT_INITIALISED"); error_register(SERVICE_HAS_RUNNING_THREADS, "SERVICE_HAS_RUNNING_THREADS"); error_register(TSIG_DUPLICATE_REGISTRATION, "TSIG_DUPLICATE_REGISTRATION"); error_register(TSIG_UNABLE_TO_SIGN, "TSIG_UNABLE_TO_SIGN"); error_register(NET_UNABLE_TO_RESOLVE_HOST, "NET_UNABLE_TO_RESOLVE_HOST"); error_register(CHARON_ERROR_FILE_LOCKED, "CHARON_ERROR_FILE_LOCKED"); error_register(CHARON_ERROR_NOT_AUTHORISED, "CHARON_ERROR_NOT_AUTHORISED"); error_register(CHARON_ERROR_UNKNOWN_ID, "CHARON_ERROR_UNKNOWN_ID"); error_register(CHARON_ERROR_EXPECTED_MAGIC_HEAD, "CHARON_ERROR_EXPECTED_MAGIC_HEAD"); error_register(CHARON_ERROR_INVALID_HEAD, "CHARON_ERROR_INVALID_HEAD"); error_register(CHARON_ERROR_INVALID_COMMAND, "CHARON_ERROR_INVALID_COMMAND"); error_register(CHARON_ERROR_COMMAND_SEQ_MISMATCHED, "CHARON_ERROR_COMMAND_SEQ_MISMATCHED"); error_register(LOGGER_CHANNEL_ALREADY_REGISTERED, "LOGGER_CHANNEL_ALREADY_REGISTERED"); error_register(LOGGER_CHANNEL_NOT_REGISTERED, "LOGGER_CHANNEL_NOT_REGISTERED"); error_register(LOGGER_CHANNEL_HAS_LINKS, "LOGGER_CHANNEL_HAS_LINKS"); error_register(ALARM_REARM, "ALARM_REARM"); error_register(DNS_ERROR_BASE, "DNS_ERROR_BASE"); error_register(DOMAIN_TOO_LONG, "DOMAIN_TOO_LONG"); error_register(INCORRECT_IPADDRESS, "INCORRECT_IPADDRESS"); error_register(INCORRECT_RDATA, "INCORRECT_RDATA"); error_register(ZONEFILE_UNSUPPORTED_TYPE, "ZONEFILE_UNSUPPORTED_TYPE"); error_register(LABEL_TOO_LONG, "LABEL_TOO_LONG"); error_register(INVALID_CHARSET, "INVALID_CHARSET"); error_register(ZONEFILE_INVALID_TYPE, "ZONEFILE_INVALID_TYPE"); error_register(DOMAINNAME_INVALID, "DOMAINNAME_INVALID"); error_register(TSIG_BADKEY, "TSIG_BADKEY"); error_register(TSIG_BADTIME, "TSIG_BADTIME"); error_register(TSIG_BADSIG, "TSIG_BADSIG"); error_register(TSIG_FORMERR, "TSIG_FORMERR"); error_register(TSIG_SIZE_LIMIT_ERROR, "TSIG_SIZE_LIMIT_ERROR"); error_register(UNPROCESSABLE_MESSAGE, "UNPROCESSABLE_MESSAGE"); error_register(INVALID_PROTOCOL, "INVALID_PROTOCOL"); error_register(INVALID_RECORD, "INVALID_RECORD"); error_register(UNSUPPORTED_RECORD, "UNSUPPORTED_RECORD"); error_register(ZONE_ALREADY_UP_TO_DATE, "ZONE_ALREADY_UP_TO_DATE"); error_register(UNKNOWN_DNS_TYPE, "UNKNOWN_DNS_TYPE"); error_register(UNKNOWN_DNS_CLASS, "UNKNOWN_DNS_CLASS"); error_register(INVALID_MESSAGE, "INVALID_MESSAGE"); error_register(MESSAGE_HAS_WRONG_ID, "MESSAGE_HAS_WRONG_ID"); error_register(MESSAGE_IS_NOT_AN_ANSWER, "MESSAGE_IS_NOT_AN_ANSWER"); error_register(MESSAGE_UNEXPECTED_ANSWER_DOMAIN, "MESSAGE_UNEXPECTED_ANSWER_DOMAIN"); error_register(MESSAGE_UNEXPECTED_ANSWER_TYPE_CLASS, "MESSAGE_UNEXPECTED_ANSWER_TYPE_CLASS"); error_register(MESSAGE_CONTENT_OVERFLOW, "MESSAGE_CONTENT_OVERFLOW"); error_register(RRSIG_COVERED_TYPE_DIFFERS, "RRSIG_COVERED_TYPE_DIFFERS"); error_register(RRSIG_OUTPUT_DIGEST_SIZE_TOO_BIG, "RRSIG_OUTPUT_DIGEST_SIZE_TOO_BIG"); error_register(RRSIG_UNSUPPORTED_COVERED_TYPE, "RRSIG_UNSUPPORTED_COVERED_TYPE"); error_register(RRSIG_VERIFICATION_FAILED, "RRSIG_VERIFICATION_FAILED"); /* DNS */ error_register(MAKE_DNSMSG_ERROR(RCODE_NOERROR), "NOERROR"); error_register(MAKE_DNSMSG_ERROR(RCODE_FORMERR), "FORMERR"); error_register(MAKE_DNSMSG_ERROR(RCODE_SERVFAIL), "SERVFAIL"); error_register(MAKE_DNSMSG_ERROR(RCODE_NXDOMAIN), "NXDOMAIN"); error_register(MAKE_DNSMSG_ERROR(RCODE_NOTIMP), "NOTIMP"); error_register(MAKE_DNSMSG_ERROR(RCODE_REFUSED), "REFUSED"); error_register(MAKE_DNSMSG_ERROR(RCODE_YXDOMAIN), "YXDOMAIN"); error_register(MAKE_DNSMSG_ERROR(RCODE_YXRRSET), "YXRRSET"); error_register(MAKE_DNSMSG_ERROR(RCODE_NXRRSET), "NXRRSET"); error_register(MAKE_DNSMSG_ERROR(RCODE_NOTAUTH), "NOTAUTH"); error_register(MAKE_DNSMSG_ERROR(RCODE_NOTZONE), "NOTZONE"); error_register(DNSSEC_ERROR_BASE, "DNSSEC_ERROR_BASE"); error_register(DNSSEC_ERROR_NOENGINE, "DNSSEC_ERROR_NOENGINE"); error_register(DNSSEC_ERROR_INVALIDENGINE, "DNSSEC_ERROR_INVALIDENGINE"); error_register(DNSSEC_ERROR_CANTPOOLTHREAD, "DNSSEC_ERROR_CANTPOOLTHREAD"); error_register(DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM, "DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM"); error_register(DNSSEC_ERROR_UNSUPPORTEDDIGESTALGORITHM, "DNSSEC_ERROR_UNSUPPORTEDDIGESTALGORITHM"); error_register(DNSSEC_ERROR_DUPLICATEKEY, "DNSSEC_ERROR_DUPLICATEKEY"); error_register(DNSSEC_ERROR_INCOMPLETEKEY, "DNSSEC_ERROR_INCOMPLETEKEY"); error_register(DNSSEC_ERROR_KEYSTOREPATHISTOOLONG, "DNSSEC_ERROR_KEYSTOREPATHISTOOLONG"); error_register(DNSSEC_ERROR_UNABLETOCREATEKEYFILES, "DNSSEC_ERROR_UNABLETOCREATEKEYFILES"); error_register(DNSSEC_ERROR_KEYWRITEERROR, "DNSSEC_ERROR_KEYWRITEERROR"); error_register(DNSSEC_ERROR_BNISNULL, "DNSSEC_ERROR_BNISNULL"); error_register(DNSSEC_ERROR_BNISBIGGERTHANBUFFER, "DNSSEC_ERROR_BNISBIGGERTHANBUFFER"); error_register(DNSSEC_ERROR_UNEXPECTEDKEYSIZE, "DNSSEC_ERROR_UNEXPECTEDKEYSIZE"); error_register(DNSSEC_ERROR_KEYISTOOBIG, "DNSSEC_ERROR_KEYISTOOBIG"); error_register(DNSSEC_ERROR_KEYRING_ALGOTAG_COLLISION, "DNSSEC_ERROR_KEYRING_ALGOTAG_COLLISION"); error_register(DNSSEC_ERROR_RSASIGNATUREFAILED, "DNSSEC_ERROR_RSASIGNATUREFAILED"); error_register(DNSSEC_ERROR_DSASIGNATUREFAILED, "DNSSEC_ERROR_DSASIGNATUREFAILED"); error_register(DNSSEC_ERROR_NSEC3_INVALIDZONESTATE, "DNSSEC_ERROR_NSEC3_INVALIDZONESTATE"); error_register(DNSSEC_ERROR_NSEC3_LABELTODIGESTFAILED, "DNSSEC_ERROR_NSEC3_LABELTODIGESTFAILED"); error_register(DNSSEC_ERROR_NSEC3_DIGESTORIGINOVERFLOW, "DNSSEC_ERROR_NSEC3_DIGESTORIGINOVERFLOW"); error_register(DNSSEC_ERROR_NSEC_INVALIDZONESTATE, "DNSSEC_ERROR_NSEC_INVALIDZONESTATE"); error_register(DNSSEC_ERROR_RRSIG_NOENGINE, "DNSSEC_ERROR_RRSIG_NOENGINE"); error_register(DNSSEC_ERROR_RRSIG_NOZONEKEYS, "DNSSEC_ERROR_RRSIG_NOZONEKEYS"); error_register(DNSSEC_ERROR_RRSIG_NOUSABLEKEYS, "DNSSEC_ERROR_RRSIG_NOUSABLEKEYS"); error_register(DNSSEC_ERROR_RRSIG_NOSOA, "DNSSEC_ERROR_RRSIG_NOSOA"); error_register(DNSSEC_ERROR_RRSIG_NOSIGNINGKEY, "DNSSEC_ERROR_RRSIG_NOSIGNINGKEY"); error_register(DNSSEC_ERROR_RRSIG_UNSUPPORTEDRECORD, "DNSSEC_ERROR_RRSIG_UNSUPPORTEDRECORD"); error_register(ZALLOC_ERROR_MMAPFAILED, "ZALLOC_ERROR_MMAPFAILED"); error_register(ZALLOC_ERROR_OUTOFMEMORY, "ZALLOC_ERROR_OUTOFMEMORY"); parser_init_error_codes(); config_init_error_codes(); cmdline_init_error_codes(); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/dnskey_rsa.c0000644000077100007710000000012412650131756021642 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.720344 30 ctime=1454597651.430344534 yadifa-2.1.6-5826/lib/dnscore/src/dnskey_rsa.c0000664000077100007710000005133412650131756021455 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnskey DNSSEC keys functions * @ingroup dnsdbdnssec * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnscore/dnscore-config.h" #include #include #include #include #include #include #include #include #include #include "dnscore/sys_types.h" #include "dnscore/base64.h" #include "dnscore/logger.h" #include "dnscore/dnskey_rsa.h" #include "dnscore/dnssec_errors.h" #include "dnscore/parser.h" #define MODULE_MSG_HANDLE g_system_logger /// @note 20151118 edf -- names MUST end with ':' static const struct structdescriptor struct_RSA[] ={ {"Modulus", offsetof(RSA, n), STRUCTDESCRIPTOR_BN}, {"PublicExponent", offsetof(RSA, e), STRUCTDESCRIPTOR_BN}, {"PrivateExponent", offsetof(RSA, d), STRUCTDESCRIPTOR_BN}, {"Prime1", offsetof(RSA, p), STRUCTDESCRIPTOR_BN}, {"Prime2", offsetof(RSA, q), STRUCTDESCRIPTOR_BN}, {"Exponent1", offsetof(RSA, dmp1), STRUCTDESCRIPTOR_BN}, {"Exponent2", offsetof(RSA, dmq1), STRUCTDESCRIPTOR_BN}, {"Coefficient", offsetof(RSA, iqmp), STRUCTDESCRIPTOR_BN}, {NULL, 0, 0} }; static int rsa_getnid(u8 algorithm) { switch(algorithm) { case DNSKEY_ALGORITHM_RSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA1: { return NID_sha1; } case DNSKEY_ALGORITHM_RSASHA256_NSEC3: { return NID_sha256; } case DNSKEY_ALGORITHM_RSASHA512_NSEC3: { return NID_sha512; } default: { return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; } } } static RSA* rsa_dnskey_key_scan(FILE *f) { char tmp_label[1024]; /*char tmp_in[BASE64_ENCODED_SIZE(DNSSEC_MAXIMUM_KEY_SIZE_BYTES)];*/ u8 tmp_out[DNSSEC_MAXIMUM_KEY_SIZE_BYTES]; RSA* rsa = RSA_new(); while(!feof(f)) { tmp_label[0] = '\0'; if(fgets(tmp_label, sizeof (tmp_label), f) == (char*)EOF) /* comparison ptr/int ? man fgets */ { break; } char *tmp_in = strchr(tmp_label, ':'); if(tmp_in == NULL) { /* error */ break; } *tmp_in = '\0'; while(isblank(*++tmp_in)); size_t tmp_in_len = strcspn(tmp_in, " \t\r\n"); tmp_in[tmp_in_len] = '\0'; if(strcmp(tmp_label, "Private-key-format") == 0) { if(memcmp(tmp_in, "v1.", 3) != 0) /* Assume that all 1.x formatted keys will be recognisable */ { break; } } else if(strcmp(tmp_label, "Algorithm") == 0) /* only accept algorithms NSEC3-RSA-SHA1 and NSEC-RSA-SHA1 */ { int alg = atoi(tmp_in); if(FAIL(rsa_getnid(alg))) { log_err("unsupported RSA algorithm '%s'", tmp_in); break; } } else { for(const struct structdescriptor *sd = struct_RSA; sd->name != NULL; sd++) { if(strcmp(tmp_label, sd->name) == 0) { BIGNUM **valuep = (BIGNUM**)&(((u8*)rsa)[sd->address]); if(*valuep != NULL) { log_err("field %s has already been initialized", tmp_label); fseek(f, 0, SEEK_END); break; } ya_result n = base64_decode(tmp_in, tmp_in_len, tmp_out); if(FAIL(n)) { log_err("unable to decode field %s (%s)", tmp_label, tmp_in); fseek(f, 0, SEEK_END); break; } *valuep = BN_bin2bn(tmp_out, n, NULL); break; } } /* for each possible field */ } } if((rsa->n == NULL) || (rsa->e == NULL) || (rsa->p == NULL) || (rsa->q == NULL) || (rsa->dmp1 == NULL) || (rsa->dmq1 == NULL) || (rsa->iqmp == NULL)) { RSA_free(rsa); rsa = NULL; } return rsa; } static RSA* rsa_genkey(u32 size) { yassert(size >= DNSSEC_MINIMUM_KEY_SIZE && size <= DNSSEC_MAXIMUM_KEY_SIZE); int err; BN_CTX *ctx; BIGNUM *e; RSA* rsa; ctx = BN_CTX_new(); yassert(ctx != NULL); e = BN_new(); BN_set_word(e, 0x10001); // exponent, 65537 yassert(e != NULL); rsa = RSA_new(); yassert(rsa != NULL); err = RSA_generate_key_ex(rsa, size, e, NULL); /* no callback */ if(err == 0) { RSA_free(rsa); rsa = NULL; } BN_free(e); BN_CTX_free(ctx); return rsa; } static ya_result rsa_signdigest(dnssec_key *key, u8 *digest, u32 digest_len, u8 *output) { u32 output_size = MAX_U32; int err = RSA_sign(key->nid, digest, digest_len, output, &output_size, key->key.rsa); #ifdef DEBUG if(err == 0) { ERR_print_errors_fp(stderr); return DNSSEC_ERROR_RSASIGNATUREFAILED; } #endif return (err != 0) ? output_size : DNSSEC_ERROR_RSASIGNATUREFAILED; } static bool rsa_verifydigest(dnssec_key* key, u8* digest, u32 digest_len, u8* signature, u32 signature_len) { yassert(signature_len <= DNSSEC_MAXIMUM_KEY_SIZE_BYTES); #ifdef DEBUG log_debug6("rsa_verifydigest(K%{dnsname}-%03d-%05d, @%p, @%p)", key->owner_name, key->algorithm, key->tag, digest, signature); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG6, digest, digest_len, 32); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG6, signature, signature_len, 32); #endif int err = RSA_verify(key->nid, digest, digest_len, signature, signature_len, key->key.rsa); if(err != 1) { unsigned long ssl_err; while((ssl_err = ERR_get_error()) != 0) { char buffer[256]; ERR_error_string_n(ssl_err, buffer, sizeof (buffer)); log_err("digest verification returned an ssl error %08x %s", ssl_err, buffer); } ERR_clear_error(); return FALSE; } return TRUE; } static RSA* rsa_public_load(const u8* rdata, u16 rdata_size) { // rdata_size < 4 is harsher than needed but anyway such a small key would // and this avoid another test later be worthless if(rdata == NULL || rdata_size < 4) { return NULL; } const u8 *inptr = rdata; u32 n; n = *inptr++; rdata_size--; // rdata_size is at least 1, so it is OK if(n == 0) { n = *inptr++; n <<= 8; n |= *inptr++; rdata_size-=2; } if(rdata_size < n + 1) { return NULL; } BIGNUM* exponent; BIGNUM* modulus; exponent = BN_bin2bn(inptr, n, NULL); if(exponent == NULL) { log_err("rsa_public_load: NULL exponent"); return NULL; } inptr += n; n = rdata_size - n; modulus = BN_bin2bn(inptr, n, NULL); if(modulus == NULL) { log_err("rsa_public_load: NULL modulus"); BN_free(exponent); return NULL; } BN_CTX *ctx; RSA* rsa; ctx = BN_CTX_new(); yassert(ctx != NULL); rsa = RSA_new(); yassert(rsa != NULL); rsa->e = exponent; rsa->n = modulus; BN_CTX_free(ctx); return rsa; } static u32 rsa_public_store(RSA* rsa, u8* output_buffer) { unsigned char* outptr = output_buffer; u32 n; BIGNUM* exponent = rsa->e; BIGNUM* modulus = rsa->n; n = BN_num_bytes(exponent); if(n > 1 && n < 256) { *outptr++ = n; } else { *outptr++ = 0; *outptr++ = n >> 8; *outptr++ = n; } n = BN_bn2bin(exponent, outptr); outptr += n; n = BN_bn2bin(modulus, outptr); outptr += n; return outptr - output_buffer; } static u32 rsa_dnskey_public_store(dnssec_key *key, u8 *rdata) { u32 len; SET_U16_AT(rdata[0], key->flags); rdata[2] = DNSKEY_PROTOCOL_FIELD; rdata[3] = key->algorithm; len = rsa_public_store(key->key.rsa, &rdata[4]) + 4; return len; } static u32 rsa_public_getsize(RSA* rsa) { u32 e_size = BN_num_bytes(rsa->e); u32 m_size = BN_num_bytes(rsa->n); return m_size + e_size + ((e_size < 256) ? 1 : 3); } static u32 rsa_dnskey_public_getsize(dnssec_key* key) { return rsa_public_getsize(key->key.rsa) + 4; } static void rsa_free(dnssec_key* key) { RSA* rsa = key->key.rsa; RSA_free(rsa); key->key.rsa = NULL; } static bool rsa_equals(dnssec_key* key_a,dnssec_key* key_b) { /* RSA, compare modulus and exponent, exponent first (it's the smallest) */ if(key_a == key_b) { return TRUE; } if(dnssec_key_tag_field_set(key_a) && dnssec_key_tag_field_set(key_b)) { if(key_a->tag != key_b->tag) { return FALSE; } } if((key_a->flags == key_b->flags) && (key_a->algorithm == key_b->algorithm)) { if(strcmp(key_a->origin, key_b->origin) == 0) { RSA* a_rsa = key_a->key.rsa; RSA* b_rsa = key_b->key.rsa; if(BN_cmp(a_rsa->e, b_rsa->e) == 0) { if(BN_cmp(a_rsa->n, b_rsa->n) == 0) { return TRUE; } } } } return FALSE; } const struct structdescriptor * rsa_get_fields_descriptor(dnssec_key* key) { return struct_RSA; } static const dnssec_key_vtbl rsa_vtbl = { rsa_signdigest, rsa_verifydigest, rsa_dnskey_public_getsize, rsa_dnskey_public_store, rsa_free, rsa_equals, rsa_get_fields_descriptor, "RSA" }; ya_result rsa_initinstance(RSA* rsa, u8 algorithm, u16 flags, const char* origin, dnssec_key** out_key) { int nid; u8 rdata[DNSSEC_MAXIMUM_KEY_SIZE_BYTES]; /* 4096 bits -> 1KB */ *out_key = NULL; if(FAIL(nid = rsa_getnid(algorithm))) { return nid; } #ifdef DEBUG memset(rdata, 0xff, sizeof (rdata)); #endif u32 rdata_size = rsa_public_getsize(rsa); if(rdata_size > DNSSEC_MAXIMUM_KEY_SIZE_BYTES) { return DNSSEC_ERROR_KEYISTOOBIG; } SET_U16_AT(rdata[0], flags); // NATIVEFLAGS rdata[2] = DNSKEY_PROTOCOL_FIELD; rdata[3] = algorithm; if(rsa_public_store(rsa, &rdata[4]) != rdata_size) { return DNSSEC_ERROR_UNEXPECTEDKEYSIZE; /* Computed size != real size */ } /* Note : + 4 because of the flags,protocol & algorithm bytes * are not taken in account */ u16 tag = dnskey_get_key_tag_from_rdata(rdata, rdata_size + 4); dnssec_key* key = dnskey_newemptyinstance(algorithm, flags, origin); key->key.rsa = rsa; key->vtbl = &rsa_vtbl; key->tag = tag; key->nid = nid; if((rsa->q != NULL) && (rsa->p != NULL)) { key->status |= DNSKEY_KEY_IS_PRIVATE; } *out_key = key; return SUCCESS; } ya_result rsa_loadprivate(FILE* private, u8 algorithm, u16 flags, const char* origin, dnssec_key **out_key) { *out_key = NULL; if(private == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } switch(algorithm) { case DNSKEY_ALGORITHM_RSASHA1: case DNSKEY_ALGORITHM_RSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA256_NSEC3: case DNSKEY_ALGORITHM_RSASHA512_NSEC3: break; default: return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; break; } ya_result return_value = ERROR; RSA *rsa = rsa_dnskey_key_scan(private); if(rsa != NULL) { dnssec_key *key; if(ISOK(return_value = rsa_initinstance(rsa, algorithm, flags, origin, &key))) { *out_key = key; return return_value; } RSA_free(rsa); } return return_value; } ya_result rsa_private_parse_field(dnssec_key *key, parser_s *p) { if(key == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } if(key->nid != 0) { // already set return INVALID_STATE_ERROR; } switch(key->algorithm) { case DNSKEY_ALGORITHM_RSASHA1: case DNSKEY_ALGORITHM_RSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA256_NSEC3: case DNSKEY_ALGORITHM_RSASHA512_NSEC3: break; default: return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; break; } ya_result ret = ERROR; if(key->key.rsa == NULL) { key->key.rsa = RSA_new(); key->vtbl = &rsa_vtbl; } RSA *rsa = key->key.rsa; u32 label_len = parser_text_length(p); const char *label = parser_text(p); bool parsed_it = FALSE; u8 tmp_out[DNSSEC_MAXIMUM_KEY_SIZE_BYTES]; for(const struct structdescriptor *sd = struct_RSA; sd->name != NULL; sd++) { if(memcmp(label, sd->name, label_len) == 0) { BIGNUM **valuep = (BIGNUM**)&(((u8*)rsa)[sd->address]); ret = parser_next_word(p); if((*valuep != NULL) || FAIL(ret)) { return ret; } u32 word_len = parser_text_length(p); const char *word = parser_text(p); ya_result n = base64_decode(word, word_len, tmp_out); if(FAIL(n)) { log_err("unable to decode field %s", sd->name); return n; } *valuep = BN_bin2bn(tmp_out, n, NULL); if(*valuep == NULL) { log_err("unable to get big number from field %s", sd->name); return DNSSEC_ERROR_BNISNULL; } parsed_it = TRUE; break; } } /* for each possible field */ if(!parsed_it) { log_warn("cannot parse: '%s'", label); return SUCCESS; // unknown keyword (currently : ignore) } if((rsa->n != NULL) && (rsa->e != NULL) && /*(rsa->p != NULL) && (rsa->q != NULL) &&*/ (rsa->dmp1 != NULL) && (rsa->dmq1 != NULL) && (rsa->iqmp != NULL)) { yassert(key->nid == 0); int nid; if(FAIL(nid = rsa_getnid(key->algorithm))) { return nid; } u32 rdata_size = rsa_public_getsize(rsa); u8 *rdata = tmp_out; if(rdata_size > DNSSEC_MAXIMUM_KEY_SIZE_BYTES) { return DNSSEC_ERROR_KEYISTOOBIG; } SET_U16_AT(rdata[0], key->flags); rdata[2] = DNSKEY_PROTOCOL_FIELD; rdata[3] = key->algorithm; if(rsa_public_store(rsa, &rdata[4]) != rdata_size) { return DNSSEC_ERROR_UNEXPECTEDKEYSIZE; /* Computed size != real size */ } /* Note : + 4 because of the flags,protocol & algorithm bytes * are not taken in account */ u16 tag = dnskey_get_key_tag_from_rdata(rdata, rdata_size + 4); key->tag = tag; key->nid = nid; key->status |= DNSKEY_KEY_IS_VALID; } if(((key->status & DNSKEY_KEY_IS_VALID) != 0) && (rsa->q != NULL) && (rsa->p != NULL)) { key->status |= DNSKEY_KEY_IS_PRIVATE; } return ret; } ya_result rsa_loadpublic(const u8 *rdata, u16 rdata_size, const char *origin, dnssec_key **out_key) { *out_key = NULL; if(rdata == NULL || rdata_size <= 6 || origin == NULL) { /* bad */ return UNEXPECTED_NULL_ARGUMENT_ERROR; } u16 flags = GET_U16_AT(rdata[0]); u8 algorithm = rdata[3]; switch(algorithm) { case DNSKEY_ALGORITHM_RSASHA1: case DNSKEY_ALGORITHM_RSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA256_NSEC3: case DNSKEY_ALGORITHM_RSASHA512_NSEC3: break; default: return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; break; } rdata += 4; rdata_size -= 4; ya_result return_value = DNSSEC_ERROR_KEYRING_KEY_IS_INVALID; RSA *rsa = rsa_public_load(rdata, rdata_size); if(rsa != NULL) { dnssec_key *key; if(ISOK(return_value = rsa_initinstance(rsa, algorithm, flags, origin, &key))) { *out_key = key; return return_value; } RSA_free(rsa); } return return_value; } ya_result rsa_newinstance(u32 size, u8 algorithm, u16 flags, const char* origin, dnssec_key** out_key) { *out_key = NULL; if(size > DNSSEC_MAXIMUM_KEY_SIZE) { return DNSSEC_ERROR_KEYISTOOBIG; } switch(algorithm) { case DNSKEY_ALGORITHM_RSASHA1: case DNSKEY_ALGORITHM_RSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA256_NSEC3: case DNSKEY_ALGORITHM_RSASHA512_NSEC3: break; default: return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; break; } ya_result return_value = ERROR; RSA *rsa = rsa_genkey(size); if(rsa != NULL) { dnssec_key *key; if(ISOK(return_value = rsa_initinstance(rsa, algorithm, flags, origin, &key))) { *out_key = key; return return_value; } RSA_free(rsa); } return return_value; } ya_result rsa_storeprivate(FILE* private, dnssec_key* key) { if(private == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } switch(key->algorithm) { case DNSKEY_ALGORITHM_RSASHA1: case DNSKEY_ALGORITHM_RSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA256_NSEC3: case DNSKEY_ALGORITHM_RSASHA512_NSEC3: break; default: return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; break; } u8 tmp_in[DNSSEC_MAXIMUM_KEY_SIZE_BYTES]; char tmp_out[BASE64_ENCODED_SIZE(DNSSEC_MAXIMUM_KEY_SIZE_BYTES)]; RSA* rsa = key->key.rsa; /* Modulus */ fprintf(private, "Private-key-format: v1.2\nAlgorithm: %i (?)", key->algorithm); /// @todo 20140523 edf -- handle v1.3 ya_result return_code; // static analyser false positive: the loop will run at least once for(const struct structdescriptor *sd = struct_RSA; sd->name != NULL; sd++) { fprintf(private, "%s: ", sd->name); BIGNUM **valuep = (BIGNUM**)&(((u8*)rsa)[sd->address]); // WRITE_BIGNUM_AS_BASE64(private, *valuep, tmp_in, tmp_out); if(FAIL(return_code = dnskey_write_bignum_as_base64(private, *valuep, tmp_in, sizeof(tmp_in), tmp_out, sizeof(tmp_out)))) { break; } fputs("\n", private); } return return_code; // scan-build false positive (see above) } /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/server-setup.c0000644000077100007710000000012412650131756022144 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.670344 30 ctime=1454597651.588344534 yadifa-2.1.6-5826/lib/dnscore/src/server-setup.c0000664000077100007710000002260312650131756021754 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include "dnscore/logger.h" #include "dnscore/service.h" #include "dnscore/config_settings.h" #include "dnscore/fdtools.h" #include "dnscore/thread_pool.h" #include "dnscore/logger-output-stream.h" #include "dnscore/chroot.h" #include "dnscore/pid.h" #include "dnscore/identity.h" #include "dnscore/server-setup.h" #include #include #include #include #include #include void stdtream_detach_fd_and_close(); /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger /*------------------------------------------------------------------------------ * FUNCTIONS */ static inline void ttylog_err(const char *format, ...) { va_list args; if(logger_is_running()) { va_start(args, format); logger_handle_vmsg(MODULE_MSG_HANDLE, MSG_ERR, format, args); va_end(args); logger_flush(); } // else { flushout(); osprint(termerr, "error: "); va_start(args, format); vosformat(termerr, format, args); va_end(args); osprintln(termerr, ""); flusherr(); } } /** \brief Damonize the program and set the correct system limitations * * @param[in] config is a config_data structure needed for \b "pid file" * * @return OK * @return Otherwise log_quit will stop the program */ void server_setup_daemon_go() { mode_t mask = 0; pid_t pid; struct sigaction sa; /* ------------------------------------------------------------ */ log_info("daemonizing"); if(!config_logger_isconfigured()) { osformatln(termerr, "warning: daemonize enabled with default logging on tty output, no output will be available."); flusherr(); } log_debug("daemonize: stop timer"); logger_flush(); dnscore_stop_timer(); log_debug("daemonize: stop services"); logger_flush(); service_stop_all(); log_debug("daemonize: stop thread pools"); logger_flush(); ya_result error_code; if(FAIL(error_code = thread_pool_stop_all())) { osformatln(termerr, "daemonize: unable to stop all thread pools: %r", error_code); flusherr(); exit(EXIT_FAILURE); } logger_flush(); logger_stop(); /* Clear file creation mask */ umask(mask); /* Become a session leader to lose controlling TTYs */ if((pid = fork()) < 0) { osformatln(termerr, "cannot fork: %r", ERRNO_ERROR); flusherr(); exit(EXIT_FAILURE); } if(pid != 0) /* parent */ { #ifdef DEBUG formatln("first level parent done"); flushout(); #endif exit(EXIT_SUCCESS); } /* Set program in new session */ setsid(); /* Ensure future opens won't allocate controlling TTYs */ sa.sa_handler = SIG_IGN; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; if(sigaction(SIGHUP, &sa, NULL) < 0) { osformatln(termerr, "sigaction error: %r", ERRNO_ERROR); flusherr(); exit(EXIT_FAILURE); } /* Stevens way of detaching the program from the parent process, * forking twice */ if((pid = fork()) < 0) { osformatln(termerr, "cannot fork (2nd level): %r", ERRNO_ERROR); flusherr(); exit(EXIT_FAILURE); } if(pid != 0) /* parent */ { #ifdef DEBUG println("second level parent done"); flushout(); #endif exit(EXIT_SUCCESS); } #ifdef DEBUG println("detaching from console"); flushout(); #endif logger_start(); log_debug("daemonize: start timer"); dnscore_reset_timer(); log_debug("daemonize: start thread pools"); thread_pool_start_all(); log_debug("daemonize: start services"); service_start_all(); /* Change the current working directory to the root so * we won't prevent file systems from being unmounted. */ #ifdef DEBUG // It has been asked to fix the "tmpfile vulnerability" on DEBUG builds. // Although this mode is meant for us (Gery & I), we can imagine that // someone else could have some interest in it too. // So the output file name now includes high-precision time and PID and // will break if the file exists already. // Later, the "server" part will also be modifiable by the caller. char output_file[PATH_MAX]; snformat(output_file, sizeof(output_file), "/tmp/server-%013x-%05x.std", timeus(), getpid()); formatln("redirecting all to '%s'\n", output_file); int file_flags = O_RDWR|O_CREAT|O_EXCL; // ensure no overwrite #else const char *output_file = "/dev/null"; int file_flags = O_RDWR; #endif /* Attach file descriptors 0, 1, and 2 to /dev/null */ flushout(); flusherr(); int tmpfd; if((tmpfd = open_create_ex(output_file, file_flags, 0660)) < 0) { log_err("stdin: %s '%s'", strerror(errno), output_file); exit(EXIT_FAILURE); } for(int i = 0; i <= 2; i++) { int fd; if((fd = dup2(tmpfd, i)) < 0) { log_err("dup2 failed from %i to %i: %s", tmpfd, i, strerror(errno)); exit(EXIT_FAILURE); } if(fd != i) { log_err("expected fd %d instead of %d", i, fd); exit(EXIT_FAILURE); } } stdtream_detach_fd_and_close(); logger_output_stream_open(&__termout__, g_system_logger, LOG_INFO, 512); logger_output_stream_open(&__termerr__, g_system_logger, LOG_ERR, 512); log_info("daemonized"); logger_flush(); } ya_result server_setup_env(pid_t *pid, char **pid_file_pathp, uid_t uid, gid_t gid, u32 setup_flags) { ya_result return_code; if(setup_flags & SETUP_CORE_LIMITS) { struct rlimit core_limits = {RLIM_INFINITY, RLIM_INFINITY}; if(setrlimit(RLIMIT_CORE, &core_limits) < 0) { ttylog_err("unable to set core dump limit: %r", ERRNO_ERROR); } #ifdef DEBUG else { log_debug("core no-limit set"); } #endif } if(setup_flags & SETUP_ROOT_CHANGE) { log_info("going to jail"); if(FAIL(return_code = chroot_jail())) /* Chroot to new path */ { log_err("failed to jail: %r"); return return_code; } } if(setup_flags & SETUP_ID_CHANGE) { /* Change uid and gid */ if(FAIL(return_code = identity_change(uid, gid))) { ttylog_err("unable to change identity: %r", return_code); return return_code; } } if(setup_flags & SETUP_CREATE_PID_FILE) { /* Setup environment */ if(FAIL(return_code = pid_file_create(pid, *pid_file_pathp, uid, gid))) { ttylog_err("unable to create pid file '%s': %r", *pid_file_pathp, return_code); return return_code; } } return SUCCESS; } /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/digest_sha1.c0000644000077100007710000000012412650131756021673 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.658344 30 ctime=1454597651.389344534 yadifa-2.1.6-5826/lib/dnscore/src/digest_sha1.c0000664000077100007710000000501512650131756021501 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include "dnscore/digest.h" #ifndef OPENSSL_NO_SHA1 s32 digest_sha1_update(digest_s* ctx, const void* buffer, u32 size) { return SHA1_Update(&ctx->ctx.sha1, buffer, size) - 1; } s32 digest_sha1_final(digest_s* ctx, void *outbuffer, u32 outsize) { if(outsize >= SHA_DIGEST_LENGTH) { return SHA1_Final(outbuffer, &ctx->ctx.sha1) - 1; } return -2; } s32 digest_sha1_get_size(digest_s* ctx) { return SHA_DIGEST_LENGTH; } static const struct digest_vtbl sha1_vtbl = { digest_sha1_update, digest_sha1_final, digest_sha1_get_size, "SHA1" }; void digest_sha1_init(digest_s *ctx) { ctx->vtbl = &sha1_vtbl; SHA1_Init(&ctx->ctx.sha1); } #endif yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/u32_set.c0000644000077100007710000000012412650131756020764 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.697344 30 ctime=1454597651.645344534 yadifa-2.1.6-5826/lib/dnscore/src/u32_set.c0000664000077100007710000001145412650131756020576 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief * * A collection of strings based on the AVL * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #define _U32_SET_C #define DEBUG_LEVEL 0 #include "dnscore/u32_set.h" #include "dnscore/zalloc.h" #define U32SET_TAG 0x544553323355 /* * The following macros are defining relevant fields in the node */ /* * Access to the field that points to the left child */ #define AVL_LEFT_CHILD(node) ((node)->children.lr.left) /* * Access to the field that points to the right child */ #define AVL_RIGHT_CHILD(node) ((node)->children.lr.right) /* * Access to the field that points to one of the children (0: left, 1: right) */ #define AVL_CHILD(node,id) ((node)->children.child[(id)]) /* * Access to the field that keeps the balance (a signed byte) */ #define AVL_BALANCE(node) ((node)->balance) /* * Self explanatory */ #define AVL_REFERENCE_IS_POINTER FALSE /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE u32 /* * */ #define AVL_REFERENCE_FORMAT_STRING '%08x' #define AVL_REFERENCE_FORMAT(reference) reference /* * A macro to initialize a node and setting the reference */ #define AVL_INIT_NODE(node,reference) node->key = reference;node->value=NULL #if 0 /* fix */ #else /* * A macro to allocate a new node */ #define AVL_ALLOC_NODE(node,reference) ZALLOC_OR_DIE(AVL_NODE_TYPE*,node,AVL_NODE_TYPE, U32SET_TAG); /* * A macro to free a node allocated by ALLOC_NODE */ #define AVL_FREE_NODE(node) ZFREE(node,AVL_NODE_TYPE) #endif /* * A macro to print the node */ #define AVL_DUMP_NODE(node) format("node@%p",(node)); /* * A macro that returns the reference field of the node. * It must be of type REFERENCE_TYPE */ #define AVL_REFERENCE(node) (node)->key /* * A macro to compare two references * Returns TRUE if and only if the references are equal. */ #define AVL_ISEQUAL(reference_a,reference_b) ((u32)(reference_a) == (u32)(reference_b)) /* * A macro to compare two references * Returns TRUE if and only if the first one is bigger than the second one. */ #define AVL_ISBIGGER(reference_a,reference_b) ((u32)(reference_a) > (u32)(reference_b)) /* * Copies the payload of a node * It MUST NOT copy the "proprietary" node fields : children, parent, balance */ #define AVL_COPY_PAYLOAD(node_trg,node_src) (node_trg)->key=(node_src)->key;(node_trg)->value=(node_src)->value; /* * A macro to preprocess a node before it is preprocessed for a delete (detach) * If there was anything to do BEFORE deleting a node, we would do it here * After this macro is exectuted, the node * _ is detached, then deleted with FREE_NODE * _ has got its content overwritten by the one of another node, then the other * node is deleted with FREE_NODE */ #define AVL_NODE_DELETE_CALLBACK(node) #include "dnscore/avl.c.inc" /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/list-dl.c0000644000077100007710000000012412650131756021050 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.683344 30 ctime=1454597651.475344534 yadifa-2.1.6-5826/lib/dnscore/src/list-dl.c0000664000077100007710000001715712650131756020670 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup collections Generic collections functions * @ingroup dnscore * @brief A node-based single linked list * * A node-based single linked list * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnscore/dnscore-config.h" #include "dnscore/list-dl.h" /*------------------------------------------------------------------------------ * FUNCTIONS */ /** * Remove the first item that points to data; * * @param list * @param data * @return TRUE if an item has been deleted */ bool list_dl_remove(list_dl_s *list, const void *data) { list_dl_node_s *node = list->head_sentinel.next; while(node->next != NULL) { if(data == node->data) { node->prev->next = node->next; node->next->prev = node->prev; list->size--; ZFREE(node, list_dl_node_s); return TRUE; } node = node->next; } return NULL; } bool list_dl_remove_matching(list_dl_s *list, result_callback_function *match, void *args) { list_dl_node_s *node = list->head_sentinel.next; while(node->next != NULL) { ya_result ret = match(node->data, args); if(ret != 0) { node->prev->next = node->next; node->next->prev = node->prev; list->size--; ZFREE(node, list_dl_node_s); return TRUE; } node = node->next; } return NULL; } bool list_dl_remove_all_matching(list_dl_s *list, result_callback_function *match, void *args) { list_dl_node_s *node = list->head_sentinel.next; list_dl_node_s *node_next; while((node_next = node->next) != NULL) { ya_result ret = match(node->data, args); if(ret != 0) { node->prev->next = node->next; node->next->prev = node->prev; list->size--; ZFREE(node, list_dl_node_s); } node = node_next; } return NULL; } /** * Remove all items from the list. * Deletes the nodes but not the data. * * @param list */ void list_dl_clear(list_dl_s *list) { list_dl_node_s *node = list->head_sentinel.next; while(node->next != NULL) { list_dl_node_s *tmp = node; node = node->next; ZFREE(tmp, list_dl_node_s); } list->head_sentinel.next = (list_dl_node_s*)&list->tail_sentinel; list->size = 0; } /** * Iterates through the nodes of the function, calling the comparator. * * The comparator must return: * * COLLECTION_ITEM_SKIP : go to next item * COLLECTION_ITEM_STOP : stop processing, return NULL * COLLECTION_ITEM_PROCESS_THEN_STOP : stop processing, return node data * * @param list * @param comparator * * @return a matching node or NULL */ void *list_dl_search(list_dl_s *list, result_callback_function *comparator, void *parm) { list_dl_node_s *node = list->head_sentinel.next; while(node->next != NULL) { void *data = node->data; node = node->next; ya_result ret = comparator(data, parm); if((ret & COLLECTION_ITEM_STOP) != 0) { if((ret & COLLECTION_ITEM_PROCESS) != 0) { return data; } else { return NULL; } } } return NULL; } /** * * Returns the index of that specific pointer into the list * Linear search (slow) * * @param list * @param comparator * @return */ ya_result list_dl_indexof(list_dl_s *list, void *data) { list_dl_node_s *node = list->head_sentinel.next; ya_result index = -1; while(node->next != NULL) { index++; if(node->data == data) { break; } node = node->next; } return index; } void * list_dl_get(list_dl_s *list, s32 index) { list_dl_node_s *node = list->head_sentinel.next; if((u32)index < list->size) { while(index != 0) { node = node->next; index--; } return node->data; } else { return NULL; } } ya_result list_dl_foreach(list_dl_s *list, result_callback_function *callback, void *caller_data) { list_dl_node_s *node = list->head_sentinel.next; while(node->next != NULL) { void *data = node->data; node = node->next; ya_result ret = callback(data, caller_data); if(FAIL(ret)) { return ret; } if(ret == COLLECTION_ITEM_STOP) { break; } } return SUCCESS; } /** * Iterates through the nodes of the function, calling the comparator. * * The comparator must return: * * < 0 : stop processing, return NULL * = 0 : no match * > 0 : stop processing, return node data * * @param list * @param comparator * * @return a matching node or NULL */ bool list_dl_remove_match(list_dl_s *list, result_callback_function *comparator, void *parm) { list_dl_node_s *node = list->head_sentinel.next; list_dl_node_s *node_next; bool matched = FALSE; while((node_next = node->next) != NULL) { ya_result ret = comparator(node->data, parm); if((ret & COLLECTION_ITEM_PROCESS) != 0) { node->prev->next = node->next; node->next->prev = node->prev; list->size--; ZFREE(node, list_dl_node_s); matched = true; } if((ret & COLLECTION_ITEM_STOP) != 0) { break; } node = node_next; } return matched; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/rc.c0000644000077100007710000000012412650131756020104 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.669344 30 ctime=1454597651.573344534 yadifa-2.1.6-5826/lib/dnscore/src/rc.c0000664000077100007710000000605112650131756017713 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading mutexes, ... * @ingroup dnscore * @brief * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/rc.h" #define MODULE_MSG_HANDLE g_system_logger extern logger_handle *g_system_logger; void rc_init_vtbl(rc_vtbl *vtbl, rc_free_method *free_callback, mutex_t *mtx) { vtbl->free_callback = free_callback; vtbl->mtx = mtx; } void rc_finalise_vtbl(rc_vtbl *vtbl) { vtbl->free_callback = NULL; vtbl->mtx = NULL; } void rc_set_internal(rc_s *rc, rc_vtbl *vtbl) { rc->vtbl = vtbl; rc->count = 0; } void rc_aquire_internal(rc_s *rc) { mutex_lock(rc->vtbl->mtx); ++rc->count; mutex_unlock(rc->vtbl->mtx); } void rc_release_internal(rc_s *rc, void *data) { mutex_lock(rc->vtbl->mtx); if(--rc->count > 0) { mutex_unlock(rc->vtbl->mtx); } else { if(rc->count < 0) { // oopsie log_err("negative RC count: %i rc=%p data=%p", rc->count, rc, data); logger_flush(); // then abort() abort(); } mutex_unlock(rc->vtbl->mtx); rc->vtbl->free_callback(data); } } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/digest_sha256.c0000644000077100007710000000012412650131756022047 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.764344 30 ctime=1454597651.393344534 yadifa-2.1.6-5826/lib/dnscore/src/digest_sha256.c0000664000077100007710000000506512650131756021662 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include "dnscore/digest.h" #ifndef OPENSSL_NO_SHA256 s32 digest_sha256_update(digest_s* ctx, const void* buffer, u32 size) { return SHA256_Update(&ctx->ctx.sha256, buffer, size) - 1; } s32 digest_sha256_final(digest_s* ctx, void *outbuffer, u32 outsize) { if(outsize >= SHA256_DIGEST_LENGTH) { return SHA256_Final(outbuffer, &ctx->ctx.sha256) - 1; } return -2; } s32 digest_sha256_get_size(digest_s* ctx) { return SHA256_DIGEST_LENGTH; } static const struct digest_vtbl sha256_vtbl = { digest_sha256_update, digest_sha256_final, digest_sha256_get_size, "SHA256" }; void digest_sha256_init(digest_s *ctx) { ctx->vtbl = &sha256_vtbl; SHA256_Init(&ctx->ctx.sha256); } #endif yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/config_logger.c0000644000077100007710000000012412650131756022304 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.669344 30 ctime=1454597651.367344534 yadifa-2.1.6-5826/lib/dnscore/src/config_logger.c0000664000077100007710000003735112650131756022122 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/logger.h" #include "dnscore/file_output_stream.h" #include "dnscore/logger_channel_stream.h" #include "dnscore/logger_channel_syslog.h" #include "dnscore/logger_channel_file.h" #include "dnscore/parsing.h" #include "dnscore/chroot.h" #include "dnscore/config_settings.h" /** * Syslog levels */ #define SYSLOG_LEVEL_TOKEN_DELIMITER ",;:+" /** * Syslog channels */ #define SYSLOG_CHANNEL_TOKEN_DELIMITER "\t ,;:+" enum channel_type { CT_STDOUT, CT_STDERR, CT_SYSLOG, CT_FILE }; typedef enum channel_type channel_type; /* * CHANNELS is a dynamic section so there is no config_table */ #define FILE_CHANNEL_DEFAULT_ACCESS_RIGHTS 0644 static const value_name_table syslog_channel_arguments_options[] = { #ifdef LOG_CONS {LOG_CONS, "cons"}, #endif #ifdef LOG_NDELAY {LOG_NDELAY, "ndelay"}, #endif #ifdef LOG_NOWAIT {LOG_NOWAIT, "nowait"}, #endif #ifdef LOG_ODELAY {LOG_ODELAY, "odelay"}, #endif #ifdef LOG_PERROR {LOG_PERROR, "perror"}, #endif #ifdef LOG_PID {LOG_PID, "pid"}, #endif {0, NULL} }; static const value_name_table syslog_channel_arguments_facility[] = { #ifdef LOG_AUTH {LOG_AUTH, "auth"}, #endif #ifdef LOG_AUTHPRIV {LOG_AUTHPRIV, "authpriv"}, #endif #ifdef LOG_CRON {LOG_CRON, "cron"}, #endif #ifdef LOG_DAEMON {LOG_DAEMON, "daemon"}, #endif #ifdef LOG_FTP {LOG_FTP, "ftp"}, #endif /* This is forbidden for anybody but the kernel. #ifdef LOG_KERN {LOG_KERN, "kern"}, #endif */ #ifdef LOG_LOCAL0 {LOG_LOCAL0, "local0"}, #endif #ifdef LOG_LOCAL1 {LOG_LOCAL1, "local1"}, #endif #ifdef LOG_LOCAL2 {LOG_LOCAL2, "local2"}, #endif #ifdef LOG_LOCAL3 {LOG_LOCAL3, "local3"}, #endif #ifdef LOG_LOCAL4 {LOG_LOCAL4, "local4"}, #endif #ifdef LOG_LOCAL5 {LOG_LOCAL5, "local5"}, #endif #ifdef LOG_LOCAL6 {LOG_LOCAL6, "local6"}, #endif #ifdef LOG_LOCAL7 {LOG_LOCAL7, "local7"}, #endif #ifdef LOG_LPR {LOG_LPR, "lpr"}, #endif #ifdef LOG_MAIL {LOG_MAIL, "mail"}, #endif #ifdef LOG_NEWS {LOG_NEWS, "news"}, #endif #ifdef LOG_SYSLOG {LOG_SYSLOG, "syslog"}, #endif #ifdef LOG_USER {LOG_USER, "user"}, #endif #ifdef LOG_UUCP {LOG_UUCP, "uucp"}, #endif {0, NULL} }; static const value_name_table logger_debuglevels[] = { {1 << MSG_EMERG, "emerg"}, {1 << MSG_ALERT, "alert"}, {1 << MSG_CRIT, "crit"}, {1 << MSG_ERR, "err"}, {1 << MSG_WARNING, "warning"}, {1 << MSG_NOTICE, "notice"}, {1 << MSG_INFO, "info"}, {1 << MSG_DEBUG, "debug"}, {1 << MSG_DEBUG1, "debug1"}, {1 << MSG_DEBUG2, "debug2"}, {1 << MSG_DEBUG3, "debug3"}, {1 << MSG_DEBUG4, "debug4"}, {1 << MSG_DEBUG5, "debug5"}, {1 << MSG_DEBUG6, "debug6"}, {1 << MSG_DEBUG7, "debug7"}, {(1 << (MSG_ALL + 1)) - 1, "all"}, {(1 << (MSG_ALL + 1)) - 1, "*"}, {(1 << MSG_EMERG)|(1 << MSG_ALERT)|(1 << MSG_CRIT)|(1 << MSG_ERR)|(1 << MSG_WARNING)|(1 << MSG_NOTICE)|(1 << MSG_INFO), "prod"}, {0, NULL} }; static const char DEFAULT_PATH[] = ""; static const char *log_path = DEFAULT_PATH; static bool logger_section_found = FALSE; void config_set_log_base_path(const char *path) { if(path != NULL) { if(strcmp(path, log_path) == 0) { return; } log_path = strdup(path); } else { if(log_path != DEFAULT_PATH) { free((char*)log_path); } log_path = DEFAULT_PATH; } } static ya_result config_section_handles_init(struct config_section_descriptor_s *csd) { // NOP (void)csd; return SUCCESS; } static ya_result config_section_handles_start(struct config_section_descriptor_s *csd) { // NOP (void)csd; logger_section_found = TRUE; //logger_channel_close_all(); return SUCCESS; } static ya_result config_section_handles_stop(struct config_section_descriptor_s *csd) { // NOP (void)csd; return SUCCESS; } static ya_result config_section_handles_postprocess(struct config_section_descriptor_s *csd) { // NOP (void)csd; return SUCCESS; } static ya_result config_section_handles_finalise(struct config_section_descriptor_s *csd) { // NOP (void)csd; return SUCCESS; } static ya_result config_section_handles_set_wild(struct config_section_descriptor_s *csd, const char *key, const char *value) { if(logger_channel_get_usage_count(key) >= 0) { return CONFIG_LOGGER_HANDLE_ALREADY_DEFINED; // already defined } char value_target[PATH_MAX]; parse_copy_word(value_target, sizeof(value_target), value); if(strcasecmp("stdout", value_target) == 0) { output_stream stdout_os; fd_output_stream_attach(&stdout_os, dup(1)); logger_channel *stdout_channel = logger_channel_alloc(); logger_channel_stream_open(&stdout_os, FALSE, stdout_channel); logger_channel_register(key, stdout_channel); } else if(strcasecmp("stderr", value_target) == 0) { output_stream stderr_os; fd_output_stream_attach(&stderr_os, dup(2)); logger_channel *stderr_channel = logger_channel_alloc(); logger_channel_stream_open(&stderr_os, FALSE, stderr_channel); logger_channel_register(key, stderr_channel); } else if(strcasecmp("syslog", value_target) == 0) { char* token; /* * Tokenize */ u32 options = 0; u32 facility = 0; /* WARNING: NEVER EVER USE A CONST STRING AS ARGUMENT OR strtok WILL SIGSEGV */ char *tmp_value = strdup(value); // value, not value_target for(token = strtok(tmp_value, SYSLOG_CHANNEL_TOKEN_DELIMITER); token != NULL; token = strtok(NULL, SYSLOG_CHANNEL_TOKEN_DELIMITER)) { u32 token_value; if(ISOK(get_value_from_casename(syslog_channel_arguments_options, token, &token_value))) { options |= token_value; } else if(ISOK(get_value_from_casename(syslog_channel_arguments_facility, token, &token_value))) { facility = token_value; // Facility is NOT a bit mask } else { /* Note: empty statement is taken care of here */ osformatln(termerr, "wrong syslog argument '%s' : ", csd->vtbl->name); free(tmp_value); return PARSE_INVALID_ARGUMENT; } } free(tmp_value); logger_channel *syslog_channel = logger_channel_alloc(); logger_channel_syslog_open(key, options, facility, syslog_channel); logger_channel_register(key, syslog_channel); } else { const char *chroot_base = chroot_get_path(); uid_t uid = logger_get_uid(); gid_t gid = logger_get_gid(); ya_result return_code; unsigned int access_rights; char fullpath[PATH_MAX]; // find the end of the word // cut it const char *path_limit = parse_next_blank(value); size_t path_len = path_limit - value; size_t pathbase_len; if(value[0] != '/') { pathbase_len = snformat(fullpath, sizeof(fullpath), "%s%s", chroot_base, log_path); } else { pathbase_len = snformat(fullpath, sizeof(fullpath), "%s", chroot_base); } if(pathbase_len + path_len + 1 >= sizeof(fullpath)) { return CONFIG_FILE_PATH_TOO_BIG; } memcpy(&fullpath[pathbase_len], value, path_len); path_len += pathbase_len; fullpath[path_len] = '\0'; // parse the next word, it is supposed to be an octal number if(sscanf(path_limit, "%o", &access_rights) != 1) { access_rights = FILE_CHANNEL_DEFAULT_ACCESS_RIGHTS; } // if the path starts with a slash, it's absolute, else it's relative // to the log directory logger_channel* file_channel = logger_channel_alloc(); if(FAIL(return_code = logger_channel_file_open(fullpath, uid, gid, access_rights, FALSE, file_channel))) { osformatln(termerr, "config: unable to open file channel '%s' (%d:%d %o) : %r", fullpath, uid, gid, access_rights, return_code); flusherr(); return return_code; } logger_channel_register(key, file_channel); } return SUCCESS; } static ya_result config_section_handles_print_wild(struct config_section_descriptor_s *csd, output_stream *os, const char *key) { return FEATURE_NOT_IMPLEMENTED_ERROR; } static ya_result config_section_loggers_init(struct config_section_descriptor_s *csd) { // NOP return SUCCESS; } static ya_result config_section_loggers_start(struct config_section_descriptor_s *csd) { // NOP logger_section_found = TRUE; // clear all loggers return SUCCESS; } static ya_result config_section_loggers_stop(struct config_section_descriptor_s *csd) { // NOP (void)csd; return SUCCESS; } static ya_result config_section_loggers_postprocess(struct config_section_descriptor_s *csd) { // NOP (void)csd; return SUCCESS; } static ya_result config_section_loggers_finalise(struct config_section_descriptor_s *csd) { // NOP (void)csd; return SUCCESS; } static ya_result config_section_loggers_set_wild(struct config_section_descriptor_s *csd, const char *key, const char *value) { u32 debuglevel = 0; ya_result return_code; // next word(base,delimiter) // bool end_of_level = FALSE; do { char level[16]; value = parse_skip_spaces(value); if(*value == '\0') { break; } if(FAIL(return_code = parse_next_token(level, sizeof(level), value, SYSLOG_LEVEL_TOKEN_DELIMITER))) { return return_code; } // if the token has spaces between two chars, then we need to cut char *end_of_first_word = (char*)parse_next_blank(level); // level is not const if(*end_of_first_word != '\0') { char *start_of_next_word = (char*)parse_skip_spaces(end_of_first_word); // end_of_first_word is not const if(start_of_next_word != end_of_first_word) { // last loop iteration end_of_level = TRUE; } *end_of_first_word = '\0'; // adjust next word search start value += end_of_first_word - level + 1; } else { value += return_code + 1; // note: false positive from cppcheck } // u32 debuglevel_value; if(FAIL(get_value_from_casename(logger_debuglevels, level, &debuglevel_value))) { return CONFIG_LOGGER_INVALID_DEBUGLEVEL; } debuglevel |= debuglevel_value; } while(!end_of_level); for(;;) { char channel_name[64]; value = parse_skip_spaces(value); if(*value == '\0') { break; } if(FAIL(return_code = parse_next_token(channel_name, sizeof(channel_name), value, SYSLOG_CHANNEL_TOKEN_DELIMITER))) { return return_code; } if(*channel_name == '\0') { continue; } logger_handle_add_channel(key, (int)debuglevel, channel_name); value += return_code; if(*value == '\0') { break; } value++; } return SUCCESS; } static ya_result config_section_loggers_print_wild(struct config_section_descriptor_s *csd, output_stream *os, const char *key) { return FEATURE_NOT_IMPLEMENTED_ERROR; } static const config_section_descriptor_vtbl_s config_section_handles_descriptor_vtbl = { "channels", // no table NULL, config_section_handles_set_wild, config_section_handles_print_wild, config_section_handles_init, config_section_handles_start, config_section_handles_stop, config_section_handles_postprocess, config_section_handles_finalise }; static const config_section_descriptor_s config_section_handles_descriptor = { NULL, &config_section_handles_descriptor_vtbl }; static const config_section_descriptor_vtbl_s config_section_loggers_descriptor_vtbl = { "loggers", NULL, // no table config_section_loggers_set_wild, config_section_loggers_print_wild, config_section_loggers_init, config_section_loggers_start, config_section_loggers_stop, config_section_loggers_postprocess, config_section_loggers_finalise }; static const config_section_descriptor_s config_section_loggers_descriptor = { NULL, &config_section_loggers_descriptor_vtbl }; /// register the logging configuration /// note that for this to work, logger_handle_create("handle-name",logger_handle_for_handle_name_ptr_ptr) /// must be called before the config_read is done ya_result config_register_logger(const char *null_or_channels_name, const char *null_or_loggers_name, s32 priority) { //null_or_channels_name = "channels"; //null_or_loggers_name = "loggers"; (void)null_or_channels_name; (void)null_or_loggers_name; if(priority < 0) { priority = 0; } ya_result return_code; if(ISOK(return_code = config_register(&config_section_handles_descriptor, priority + 0))) { return_code = config_register(&config_section_loggers_descriptor, priority + 1); } return return_code; } bool config_logger_isconfigured() { return logger_section_found; } void config_logger_clearconfigured() { logger_section_found = FALSE; } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/threaded_nb_mm.c0000644000077100007710000000012412650131756022430 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.708344 30 ctime=1454597651.611344534 yadifa-2.1.6-5826/lib/dnscore/src/threaded_nb_mm.c0000664000077100007710000000750012650131756022237 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief "no-wait" stack allocator * meant to be used with the "no-wait" queue * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/threaded_nb_mm.h" #define THRDNBMM_TAG 0x4d4d424e44524854 void threaded_nb_mm_init(threaded_nb_mm *mm, u32 count, u32 size) { assert(count > 1); size = (size + sizeof(void*) - 1) & ~(sizeof(void*)-1); u32 n = count * size; MALLOC_OR_DIE(u8*,mm->items, n, THRDNBMM_TAG); mm->item_count = count; mm->item_size = size; if(n == 0) { mm->item_head = NULL; return; } const u8 * const limit = &mm->items[n]; u8** pp; for(u8* p = &mm->items[0]; p < limit; p += size) { pp = (u8**)p; *pp = &p[size]; } *pp = NULL; // false "maybe-uninitialized" positive : the loop always runs AT LEAST once (n > 0 => and limit > p) mm->item_head = (volatile void**)&mm->items[0]; } void* threaded_nb_mm_alloc(threaded_nb_mm *mm) { void *first; for(;;) { first = __sync_fetch_and_add(&mm->item_head, 0); if(first != NULL) { void **firstp = (void**)first; void *next = *firstp; if(__sync_bool_compare_and_swap(&mm->item_head, first, next)) { break; } usleep(5); } else { return NULL; } } return first; } void threaded_nb_mm_free(threaded_nb_mm *mm, void *p) { void **pp = (void**)p; for(;;) { void *first = __sync_fetch_and_add(&mm->item_head, 0); *pp = first; if(__sync_bool_compare_and_swap(&mm->item_head, first, p)) { break; } usleep(5); } } void threaded_nb_mm_finalize(threaded_nb_mm *mm) { free(mm->item_head); mm->item_head = NULL; } yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/threaded_nbrb.c0000644000077100007710000000012412650131756022263 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.777344 30 ctime=1454597651.615344534 yadifa-2.1.6-5826/lib/dnscore/src/threaded_nbrb.c0000664000077100007710000002231012650131756022066 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup threading Threading, pools, queues, ... * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include //#include #include "dnscore/threaded_nbrb.h" #define HAS_ATOMIC_FEATURES 0 #if HAS_ATOMIC_FEATURES != 0 #define THREADED_QUEUE_TAG 0x455545555154 /* TQUEUE */ #define BASE_WAIT 5 // us #define BASE_WAIT_MAX 500000 // so about 0.5 secs max /* * The maximum number of nodes I should ever require is the queue size + 1 * * A good way to handle this is : * * Node allocator, node destroyer * * But the node allocator only allocates a node if none are free * And the node destroyer does not release a node but queue it instead. * * If I enforce the requirement that the allocation/destruction is done * by a single thread I could gain some cpu cycles. * * This reasoning is also valid for the thread_pool_task * */ /* * Note: * * If a pthread_mutex_init fails, it's because of a resource, memory or rights issue. * So the application will fail soon enough. * I still should check this and exit. * * pthread_mutex_lock will fail only if the current thread aleady owns the mutex * * pthread_mutex_unlock will fail only if the current thread does not owns the mutex * */ #define SENTINEL ((void*)~0) #define DO_YIELD 0 #define LOOP_WAIT(t) \ if(t == BASE_WAIT) \ { \ sched_yield(); \ t += BASE_WAIT; \ continue; \ } \ \ usleep(t); \ \ t += BASE_WAIT; \ if(t > BASE_WAIT_MAX) \ { \ t = BASE_WAIT_MAX; \ } void threaded_nbrb_init(threaded_nbrb *queue, int max_size) { u32 real_size = 1; while(real_size <= max_size) { real_size <<= 1; } real_size >>= 1; if(real_size < 4) { real_size = 4; } else if(real_size > 0x1000000) { real_size = 0x1000000; } MALLOC_OR_DIE(void**, queue->buffer, sizeof (void*)* real_size, THREADED_QUEUE_TAG); queue->empty_slots = real_size; queue->filled_slots = 0; queue->write_offset = 0; queue->read_offset = 0; queue->size_mask = real_size - 1; for(u32 i = 0; i < real_size; i++) { queue->buffer[i] = SENTINEL; } } void threaded_nbrb_finalize(threaded_nbrb *queue) { /** * If the queue is not empty : too bad ! * * It's the responsibility of the caller to ensure the queue and set of listeners is empty. */ free(queue->buffer); queue->buffer = NULL; } void threaded_nbrb_enqueue(threaded_nbrb* queue, void* constant_pointer) { const u32 one = 1; int t = BASE_WAIT; s32 e; for(;;) { e = __sync_fetch_and_sub(&queue->empty_slots, one); if(e > 0) { break; } __sync_fetch_and_add(&queue->empty_slots, one); LOOP_WAIT(t) } s32 wo = __sync_fetch_and_add(&queue->write_offset, one); #if 0 /* fix */ #elif 1 //__sync_synchronize(); queue->buffer[wo & queue->size_mask] = constant_pointer; //__sync_synchronize(); #else //while(!__sync_bool_compare_and_swap(&queue->buffer[wo & queue->size_mask],queue->buffer[wo & queue->size_mask],constant_pointer)); while(!__sync_bool_compare_and_swap(&queue->buffer[wo & queue->size_mask], SENTINEL, constant_pointer)); #endif __sync_fetch_and_add(&queue->filled_slots, one); } bool threaded_nbrb_try_enqueue(threaded_nbrb* queue, void* constant_pointer) { const u32 one = 1; s32 e = __sync_fetch_and_sub(&queue->empty_slots, one); if(e <= 0) { __sync_fetch_and_add(&queue->empty_slots, one); return FALSE; } s32 wo = __sync_fetch_and_add(&queue->write_offset, one); //queue->buffer[wo & queue->size_mask] = constant_pointer; queue->buffer[wo & queue->size_mask] = constant_pointer; __sync_fetch_and_add(&queue->filled_slots, one); return TRUE; } void* threaded_nbrb_try_peek(threaded_nbrb *queue) { const s32 zero = 0; const s32 one = 1; s32 e = __sync_fetch_and_sub(&queue->filled_slots, one); if(e <= 0) { __sync_fetch_and_add(&queue->filled_slots, one); return NULL; } s32 ro = __sync_fetch_and_add(&queue->read_offset, zero); void* p = queue->buffer[ro & queue->size_mask]; __sync_fetch_and_add(&queue->filled_slots, one); return p; } void* threaded_nbrb_peek(threaded_nbrb *queue) { const s32 zero = 0; const s32 one = 1; int t = BASE_WAIT; s32 e; for(;;) { e = __sync_fetch_and_sub(&queue->filled_slots, one); if(e > 0) { break; } __sync_fetch_and_add(&queue->filled_slots, one); LOOP_WAIT(t) } s32 ro = __sync_fetch_and_add(&queue->read_offset, zero); void* p = queue->buffer[ro & queue->size_mask]; __sync_fetch_and_add(&queue->filled_slots, one); return p; } void* threaded_nbrb_dequeue(threaded_nbrb *queue) { const s32 one = 1; int t = BASE_WAIT; s32 e; for(;;) { e = __sync_fetch_and_sub(&queue->filled_slots, one); if(e > 0) { break; } __sync_fetch_and_add(&queue->filled_slots, one); LOOP_WAIT(t) } s32 ro = __sync_fetch_and_add(&queue->read_offset, one); #if 0 /* fix */ #elif 1 void * volatile *pp = (void* volatile *)&queue->buffer[ro & queue->size_mask]; void* p; for(;;) { //__sync_synchronize(); p = *pp; if(p != SENTINEL) { queue->buffer[ro & queue->size_mask] = SENTINEL; break; } //sched_yield(); __sync_synchronize(); } //__sync_synchronize(); #else //while(!__sync_val_compare_and_swap(&queue->buffer[ro & queue->size_mask], SENTINEL, #endif __sync_fetch_and_add(&queue->empty_slots, one); return p; } void* threaded_nbrb_try_dequeue(threaded_nbrb *queue) { const u32 one = 1; s32 e = __sync_fetch_and_sub(&queue->filled_slots, one); if(e <= 0) { __sync_fetch_and_add(&queue->filled_slots, one); return NULL; } s32 ro = __sync_fetch_and_add(&queue->read_offset, one); void* p = queue->buffer[ro & queue->size_mask]; __sync_fetch_and_add(&queue->empty_slots, one); return p; } u32 threaded_nbrb_dequeue_set(threaded_nbrb* queue, void** array, u32 array_size) { u32 loops = 0; return loops; /* Return the amount we got from the queue */ } void threaded_nbrb_wait_empty(threaded_nbrb *queue) { const u32 zero = 0; //u32 m = queue->size_mask; int t = BASE_WAIT; for(;;) { s32 f = __sync_fetch_and_add(&queue->filled_slots, zero); if(f == 0) { break; } LOOP_WAIT(t) } } int threaded_nbrb_size(threaded_nbrb *queue) { const u32 zero = 0; s32 f = __sync_fetch_and_add(&queue->filled_slots, zero); return f; } ya_result threaded_nbrb_set_maxsize(threaded_nbrb *queue, int max_size) { ya_result ret = ERROR; return ret; } #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/serial.c0000644000077100007710000000012412650131756020757 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.728344 30 ctime=1454597651.581344534 yadifa-2.1.6-5826/lib/dnscore/src/serial.c0000664000077100007710000000617612650131756020576 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscore * @ingroup dnscore * @brief serial arithmetic * * @{ * *----------------------------------------------------------------------------*/ //#include "dnscore/dnscore-config.h" #include "dnscore/dnscore-config.h" #include "dnscore/serial.h" /* * SERIAL */ /** * * Returns TRUE iff a > b in serial arithmetic, else FALSE * * @param a * @param b * @return a > b */ bool serial_gt(u32 a, u32 b) { return ( (a < b) && ((b - a) > 0x7fffffff)) || ((a > b) && ((a - b) < 0x7fffffff)); } /** * * Returns TRUE iff a < b in serial arithmetic, else FALSE * * @param a * @param b * @return a < b */ bool serial_lt(u32 a, u32 b) { return ( (a < b) && ((b - a) < 0x7fffffff)) || ((a > b) && ((a - b) > 0x7fffffff)); } /** * * Returns TRUE iff a >= b in serial arithmetic, else FALSE * * @param a * @param b * @return a >= b */ bool serial_ge(u32 a, u32 b) { return (a == b) || ((a < b) && ((b - a) > 0x7fffffff)) || ((a > b) && ((a - b) < 0x7fffffff)); } /** * * Returns TRUE iff a <= b in serial arithmetic, else FALSE * * @param a * @param b * @return a <= b */ bool serial_le(u32 a, u32 b) { return (a == b) || ((a < b) && ((b - a) < 0x7fffffff)) || ((a > b) && ((a - b) > 0x7fffffff)); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/digest_sha384.c0000644000077100007710000000012412650131756022051 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.627344 30 ctime=1454597651.397344534 yadifa-2.1.6-5826/lib/dnscore/src/digest_sha384.c0000664000077100007710000000506512650131756021664 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnscore/dnscore-config.h" #include "dnscore/digest.h" #ifndef OPENSSL_NO_SHA512 s32 digest_sha384_update(digest_s* ctx, const void* buffer, u32 size) { return SHA384_Update(&ctx->ctx.sha384, buffer, size) - 1; } s32 digest_sha384_final(digest_s* ctx, void *outbuffer, u32 outsize) { if(outsize >= SHA384_DIGEST_LENGTH) { return SHA384_Final(outbuffer, &ctx->ctx.sha384) - 1; } return -2; } s32 digest_sha384_get_size(digest_s* ctx) { return SHA384_DIGEST_LENGTH; } static const struct digest_vtbl sha384_vtbl = { digest_sha384_update, digest_sha384_final, digest_sha384_get_size, "SHA384" }; void digest_sha384_init(digest_s *ctx) { ctx->vtbl = &sha384_vtbl; SHA384_Init(&ctx->ctx.sha384); } #endif yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/config_settings.c0000644000077100007710000000012412650131756022665 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.705344 30 ctime=1454597651.371344534 yadifa-2.1.6-5826/lib/dnscore/src/config_settings.c0000664000077100007710000020050312650131756022472 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * @{ */ #include "dnscore/dnscore-config.h" #include #include #include #include #include #include "dnscore/logger.h" #include "dnscore/base64.h" #include "dnscore/u32_set.h" #include "dnscore/parsing.h" #include "dnscore/tsig.h" #include "dnscore/file_input_stream.h" #include "dnscore/bytearray_input_stream.h" #include "dnscore/config_settings.h" #include "dnscore/config_file_reader.h" #include "dnscore/chroot.h" #include "dnscore/ptr_set.h" #include "dnscore/host_address.h" extern logger_handle *g_system_logger; #define MODULE_MSG_HANDLE g_system_logger /** * This collection links configuration parsing functions to printing functions. * Used for extensions (ie: ACL) */ static ptr_set config_section_struct_type_handler_set = PTR_SET_PTR_EMPTY; static ptr_set on_section_read_callback_set = PTR_SET_ASCIIZ_EMPTY; /** * These two union are used to store functions ptrs as void* in the collections * The pointer sizes are supposed to be equal (else dnscore will fail at init) * * In the event the code has to be compiled on an architecture where void* and void (*f)() are * of different size, it will still be time to make a structure that has function pointers for key and value. */ union config_set_field_function_as_voidp { config_set_field_function *setter; void *ptr; }; typedef union config_set_field_function_as_voidp config_set_field_function_as_voidp; union config_section_struct_type_handler_as_voidp { config_section_struct_type_handler *handler; void *ptr; }; typedef union config_section_struct_type_handler_as_voidp config_section_struct_type_handler_as_voidp; static const char *config_error_prefix = "config: "; static const value_name_table true_false_enum[]= { {1, "yes"}, {1, "1"}, {1, "enable"}, {1, "enabled"}, {1, "on"}, {1, "true"}, {0, "no"}, {0, "0"}, {0, "disable"}, {0, "disabled"}, {0, "off"}, {0, "false"}, {0, NULL} }; static u32_set section_descriptor_set = U32_SET_EMPTY; static u8 config_current_source = CONFIG_SOURCE_NONE; static u8 config_autodefault_after_source = CONFIG_SOURCE_FILE; static u8 config_default_source = CONFIG_SOURCE_DEFAULT; static bool config_init_error_codes_done = FALSE; union code_data_ptr { config_callback_function *function; void *data; intptr value; }; typedef union code_data_ptr code_data_ptr; ya_result config_add_on_section_read_callback(const char *section_name, config_callback_function *on_section_read) { ptr_node *node = ptr_set_avl_insert(&on_section_read_callback_set, (char*)section_name); if(node->value != NULL) { return CONFIG_SECTION_CALLBACK_ALREADY_SET; // already exists } node->key = strdup(section_name); code_data_ptr ptr = {.function = on_section_read}; node->value = ptr.data; return SUCCESS; } ya_result config_remove_on_section_read_callback(const char *section_name, config_callback_function *on_section_read) { if(section_name == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } ptr_node *node = ptr_set_avl_find(&on_section_read_callback_set, section_name); if(node != NULL) { code_data_ptr ptr = {.function = on_section_read}; if(node->value != ptr.data) { return CONFIG_SECTION_CALLBACK_NOT_FOUND; // not the right one } free(node->key); ptr_set_avl_delete(&on_section_read_callback_set, section_name); return SUCCESS; } else { return CONFIG_SECTION_CALLBACK_NOT_SET; } } static ya_result config_fire_on_section_read_callback(const char *section_name, int index) { ya_result return_code = SUCCESS; ptr_node *node = ptr_set_avl_find(&on_section_read_callback_set, section_name); if(node != NULL) { code_data_ptr ptr = {.data = node->value}; config_callback_function *on_section_read = ptr.function; if(on_section_read != NULL) { return_code = on_section_read(section_name, index); } else { return_code = ERROR; } } return return_code; } /** @brief Yes or No option value parser * * @param[in] value in asciiz * @param[out] dest to the value * * @retval OK * @retval NOK */ ya_result config_set_bool(const char *value, bool *dest, anytype notused) { ya_result return_code; u32 integer_value; bool yes_or_no; if(ISOK(return_code = get_value_from_casename(true_false_enum, value, &integer_value))) { yes_or_no = (integer_value != 0); *dest = yes_or_no; } return return_code; } /** @brief flag option value parser * * @param[in] value in asciiz * @param[out] dest to the value * * @retval OK * @retval NOK */ ya_result config_set_flag8(const char *value, u8 *dest, anytype mask8) { ya_result return_code; bool b; if(ISOK(return_code = config_set_bool(value, &b, mask8))) { if(b) { *dest |= mask8._u8; } else { *dest &= ~mask8._u8; } } return return_code; } /** @brief flag option value parser * * @param[in] value in asciiz * @param[out] dest to the value * * @retval OK * @retval NOK */ ya_result config_set_flag16(const char *value, u16 *dest, anytype mask16) { ya_result return_code; bool b; if(ISOK(return_code = config_set_bool(value, &b, mask16))) { if(b) { *dest |= mask16._u16; } else { *dest &= ~mask16._u16; } } return return_code; } /** @brief flag option value parser * * @param[in] value in asciiz * @param[out] dest to the value * * @retval OK * @retval NOK */ ya_result config_set_flag32(const char *value, u32 *dest, anytype mask32) { ya_result return_code; bool b; if(ISOK(return_code = config_set_bool(value, &b, mask32))) { if(b) { *dest |= mask32._u32; } else { *dest &= ~mask32._u32; } } return return_code; } /** @brief flag option value parser * * @param[in] value in asciiz * @param[out] dest to the value * * @retval OK * @retval NOK */ ya_result config_set_flag64(const char *value, u64 *dest, anytype mask64) { ya_result return_code; bool b; if(ISOK(return_code = config_set_bool(value, &b, mask64))) { if(b) { *dest |= mask64._u64; } else { *dest &= ~mask64._u64; } } return return_code; } /** @brief Integer option value parser * * @param[in] value in asciiz * @param[out] dest to the value * * @retval OK * @retval NOK */ ya_result config_set_u64(const char *value,u64 *dest, anytype notused) { *dest = atoll(value); return OK; } /** @brief Integer option value parser * * @param[in] value in asciiz * @param[out] dest to the value * * @retval OK * @retval NOK */ ya_result config_set_u32(const char *value,u32 *dest, anytype notused) { *dest = atoi(value); return OK; } /** @brief Integer option value parser * * @param[in] value in asciiz * @param[out] dest to the value * * @retval OK * @retval NOK */ ya_result config_set_u32_range(const char *value,u32 *dest, anytype range) { u32 tmp = atoi(value); if(tmp >= range._2u32[0] && tmp <= range._2u32[1]) { *dest = tmp; return OK; } else { return CONFIG_VALUE_OUT_OF_RANGE; } } /** @brief Integer option value parser * * @param[in] value in asciiz * @param[out] dest to the value * * @retval OK * @retval NOK */ ya_result config_set_u32_clamp(const char *value,u32 *dest, anytype range) { u32 tmp = atoi(value); if(tmp < range._2u32[0]) { tmp = range._2u32[0]; } else if(tmp > range._2u32[1]) { tmp = range._2u32[1]; } *dest = tmp; return OK; } /** @brief Integer option value parser * * @param[in] value in asciiz * @param[out] dest to the value * * @retval OK * @retval NOK */ ya_result config_set_u16(const char *value,u16 *dest, anytype notused) { *dest = atoi(value); return OK; } ya_result config_set_u8(const char *value,u8 *dest, anytype notused) { *dest = atoi(value); return OK; } ya_result config_inc_u8(const char *value_notused,u8 *dest, anytype notused) { (void)value_notused; (*dest)++; return OK; } /** @brief String parser * * @param[in] value * @param[in] config_command * @param[out] config * * @retval OK * @retval NOK */ ya_result config_set_string(const char *value, char **dest, anytype notused) { if(*dest != NULL) { if(strcmp(*dest, value) != 0) { free(*dest); *dest = strdup(value); } } else { *dest = strdup(value); } return OK; } /** @brief String parser * * @param[in] value * @param[in] config_command * @param[out] config * * @retval OK * @retval NOK */ ya_result config_set_string_copy(const char *value, char *dest, anytype maxlen) { size_t len = strlen(value); if(len > maxlen._u32 - 1) { return CONFIG_TEXT_LENGHT_TOO_BIG; } memcpy(dest, value, len); dest[len] = '\0'; return len + 1; } /** @brief String parser * * @param[in] value * @param[in] config_command * @param[out] config * * @retval OK * @retval NOK */ ya_result config_append_string_array_item(const char *value, ptr_vector *dest, anytype maxsize) { if(ptr_vector_size(dest) >= maxsize._u32) { return CONFIG_ARRAY_SIZE_TOO_BIG; } ptr_vector_append(dest, strdup(value)); return ptr_vector_size(dest); } /** @brief Password parser * * @param[in] value * @param[in] config_command * @param[out] config * * @retval OK * @retval NOK */ ya_result config_set_password(const char *value, char **dest, anytype notused) { if(*dest != NULL) { if(strcmp(*dest, value) != 0) { size_t n = strlen(*dest); for(int i = 0; i < n; i++) { *dest[i] = rand(); } free(*dest); *dest = strdup(value); } } else { *dest = strdup(value); } return SUCCESS; } /** @brief String parser * * @param[in] value * @param[in] config_command * @param[out] config * * @retval OK * @retval NOK */ ya_result config_set_fqdn(const char *value, u8 **dest, anytype notused) { ya_result return_value; u8 tmp[MAX_DOMAIN_LENGTH]; if(ISOK(return_value = cstr_to_dnsname(tmp, value))) { if(*dest != NULL) { if(!dnsname_equals(*dest, tmp)) { free(*dest); *dest = dnsname_dup(tmp); } } else { *dest = dnsname_dup(tmp); } } return return_value; } /** @brief Path parser * * Ensures that the stored value ends with '/' * * @param[in] value * @param[in] config_command * @param[out] config * * @retval OK * @retval NOK */ ya_result config_set_path(const char *value, char **dest, anytype notused) { size_t len = strlen(value); if(*dest != NULL) { int dest_len = strlen(*dest); if(value[len - 1] != '/') { if(dest_len == len + 1) // implies last char of *dest is '/' { if(memcmp(*dest, value, len) == 0) { return SUCCESS; } } } else { if(strcmp(*dest, value) == 0) { return SUCCESS; } } free(*dest); *dest = NULL; } if(value[len - 1] != '/') { char *tmp = (char*)malloc(len + 2); memcpy(tmp, value, len); tmp[len] = '/'; tmp[len + 1 ] = '\0'; *dest = tmp; } else { *dest = strdup(value); } return OK; } ya_result config_set_logpath(const char *value, char **dest, anytype notused) { ya_result return_code; if(ISOK(return_code = config_set_path(value, dest, notused))) { config_set_log_base_path(*dest); } return return_code; } ya_result config_set_chroot(const char *value, char **dest, anytype notused) { ya_result return_code; if(ISOK(return_code = config_set_path(value, dest, notused))) { return_code = chroot_set_path(*dest); //chdir(*dest); } return return_code; } ya_result config_set_file(const char *value, char **dest, anytype notused) { struct stat fileinfo; if(stat(value, &fileinfo) < 0) { return ERRNO_ERROR; } /* Is it a regular file */ if(!S_ISREG(fileinfo.st_mode)) { return CONFIG_NOT_A_REGULAR_FILE; } if(*dest != NULL) { if(strcmp(*dest, value) != 0) { free(*dest); *dest = strdup(value); } } else { *dest = strdup(value); } return SUCCESS; } /** @brief UID parser * * @param[in] value * @param[in] config_command * @param[out] config * * @retval OK * @retval CONFIG_BAD_UID */ ya_result config_set_uid_t(const char *value, uid_t *dest, anytype notused) { if((value == '\0') || (strcmp(value, "-") == 0)) { *dest = getuid(); } else { struct passwd pwd; struct passwd *result; char *buffer; int buffer_size = sysconf(_SC_GETPW_R_SIZE_MAX); /* * This fix has been made for FreeBSD that returns -1 for the above call */ if(buffer_size < 0) { buffer_size = 1024; } MALLOC_OR_DIE(char*, buffer, buffer_size, GENERIC_TAG); getpwnam_r(value,&pwd,buffer,buffer_size,&result); *dest = pwd.pw_uid; free(buffer); if(result == NULL) { u32 val; if(FAIL(parse_u32_check_range(value, &val, 0, MAX_U32, 10))) { return CONFIG_BAD_UID; } *dest = val; } } return SUCCESS; } /** @brief GID parser * * @param[in] value * @param[in] config_command * @param[out] config * * @retval OK * @retval CONFIG_BAD_GID */ ya_result config_set_gid_t(const char *value, gid_t *dest, anytype notused) { if((value == '\0') || (strcmp(value, "-") == 0)) { *dest = getgid(); } else { struct group grp; struct group *result; char *buffer; int buffer_size = sysconf(_SC_GETGR_R_SIZE_MAX); /* * This fix has been made for FreeBSD that returns -1 for the above call */ if(buffer_size < 0) { buffer_size = 1024; } MALLOC_OR_DIE(char*, buffer, buffer_size, GENERIC_TAG); getgrnam_r(value, &grp, buffer, buffer_size, &result); *dest = grp.gr_gid; free(buffer); if(result == NULL) { u32 val; if(FAIL(parse_u32_check_range(value, &val, 0, MAX_U32, 10))) { return CONFIG_BAD_GID; } *dest = val; } } return SUCCESS; } ya_result config_set_dnsclass(const char *value, u16 *dest, anytype notused) { u16 qclass; if(FAIL(get_class_from_case_name(value, &qclass))) { return NOK; } *dest = ntohs(qclass); return OK; } ya_result config_set_dnstype(const char *value, u16 *dest, anytype notused) { u16 qtype; if(FAIL(get_type_from_case_name(value, &qtype))) { return NOK; } *dest = ntohs(qtype); return OK; } ya_result config_set_enum_value(const char *value, u32 *dest, anytype enum_value_name_table) { ya_result return_code; u32 integer_value; value_name_table *table = (value_name_table*)enum_value_name_table._voidp; if(ISOK(return_code = get_value_from_casename(table, value, &integer_value))) { *dest = integer_value; } return return_code; } ya_result config_set_enum8_value(const char *value, u8 *dest, anytype enum_value_name_table) { ya_result return_code; u32 integer_value; value_name_table *table = (value_name_table*)enum_value_name_table._voidp; if(ISOK(return_code = get_value_from_casename(table, value, &integer_value))) { *dest = integer_value; } return return_code; } /* * IP port n, */ ya_result config_set_host_list(const char *value, host_address **dest, anytype settings) { if(value == NULL) /* nothing to do */ { return UNEXPECTED_NULL_ARGUMENT_ERROR; } ya_result return_code; const char *from = value; u16 ip_port = 0; #if DNSCORE_HAS_TSIG_SUPPORT tsig_item *tsig = NULL; #endif u8 ip_size; u8 host_type = HOST_ADDRESS_NONE; bool eol = (*from == '\0'); u8 flags = settings._8u8[0]; u8 ip_buffer[MAX_DOMAIN_LENGTH]; if (! (flags & CONFIG_HOST_LIST_FLAGS_APPEND)) { /* delete the content of the list */ if(*dest != NULL) { host_address_delete_list(*dest); *dest = NULL; } } else { /* find the last node of the list so the new ones will be append */ u32 counter = 0; while(*dest != NULL) { counter++; dest = &(*dest)->next; } if (counter > settings._8u8[1]) { return CONFIG_TOO_MANY_HOSTS; } } while(!eol) { /* skip the white spaces */ from = (char*)parse_skip_spaces(from); const char *to = from; /* get the end of statement */ to = (char*)parse_skip_until_chars(to, ",;", 2); if(to == from) { /* No new statement */ break; } eol = (*to == '\0'); /* now skip from until space */ const char *port_or_key = from; port_or_key = (char*)parse_next_space(port_or_key); const char *next_word = port_or_key; next_word = parse_skip_spaces(next_word); bool ip_only = (next_word >= to); port_or_key = MIN(port_or_key, to); if(FAIL(return_code = parse_ip_address(from, port_or_key - from, ip_buffer, sizeof(ip_buffer)))) { if(! (flags & CONFIG_HOST_LIST_FLAGS_FQDN)) { return CONFIG_FQDN_NOT_ALLOWED; } if(FAIL(return_code = cstr_to_dnsname_with_check_len(ip_buffer, from, port_or_key - from))) { return return_code; } host_type = HOST_ADDRESS_DNAME; } ip_size = (u8)return_code; if (ip_size == 4) { if(! (flags & CONFIG_HOST_LIST_FLAGS_IPV4)) { return CONFIG_IPV4_NOT_ALLOWED; } host_type = HOST_ADDRESS_IPV4; } if (ip_size == 16) { if(! (flags & CONFIG_HOST_LIST_FLAGS_IPV6)) { return CONFIG_IPV6_NOT_ALLOWED; } host_type = HOST_ADDRESS_IPV6; } ip_port = 0; #if DNSCORE_HAS_TSIG_SUPPORT tsig = NULL; #endif if(!ip_only) { /* parse & skip 'port */ bool got_one = FALSE; u8 key_dnsname[MAX_DOMAIN_LENGTH + 1]; #if DNSCORE_HAS_TSIG_SUPPORT char key_name[MAX_DOMAIN_TEXT_LENGTH + 1]; #endif static const char *port_word="port"; static const char *key_word="key"; /// get PORT if(ISOK(return_code = parse_skip_word_specific(port_or_key, to-port_or_key, &port_word, 1, NULL))) { if(!(flags & CONFIG_HOST_LIST_FLAGS_PORT)) { return CONFIG_PORT_NOT_ALLOWED; } next_word = parse_skip_spaces(&port_or_key[return_code]); u32 port_value; if(FAIL(return_code = parse_u32_check_range(next_word, &port_value, 1, MAX_U16, 10))) { /* parse error, expected something */ log_err("%sport parse error around '%s'", config_error_prefix, next_word); return CONFIG_EXPECTED_VALID_PORT_VALUE; } next_word = parse_next_space(next_word); next_word = MIN(next_word, to); port_or_key = next_word; ip_port = (u16)port_value; got_one = TRUE; } /// get KEY if(ISOK(return_code = parse_skip_word_specific(port_or_key, to-port_or_key, &key_word, 1, NULL))) { #if DNSCORE_HAS_TSIG_SUPPORT if(!(flags & CONFIG_HOST_LIST_FLAGS_TSIG)) { return CONFIG_TSIG_NOT_ALLOWED; } const char *key_name_start = parse_skip_spaces(&port_or_key[return_code]); key_name_start = (char*)parse_skip_spaces(key_name_start); next_word = key_name_start; next_word = (char*)parse_next_space(next_word); next_word = MIN(next_word, to); //port_or_key = next_word; size_t key_name_len = next_word - key_name_start; if(key_name_len < MAX_DOMAIN_TEXT_LENGTH) { memcpy(key_name, key_name_start, key_name_len); key_name[key_name_len] = '\0'; //*next_word++ = '\0'; port_or_key = next_word; if(ISOK(return_code = cstr_to_dnsname_with_check(key_dnsname, key_name))) { tsig = tsig_get(key_dnsname); if(tsig == NULL) { log_err("%skey '%s' has not been defined",config_error_prefix ,key_name); return CONFIG_KEY_UNKNOWN; } got_one = TRUE; } else { log_err("%skey name parse error around '%s': %r",config_error_prefix , key_name, return_code); return CONFIG_KEY_PARSE_ERROR; } } else { log_err("%skey name is too big",config_error_prefix ); return CONFIG_KEY_PARSE_ERROR; } #else #endif } if(!got_one) { log_err("%sgarbage around '%s'",config_error_prefix , port_or_key); /* parse error, expected something */ return CONFIG_KEY_PARSE_ERROR; } } /* * Now we can add a host structure node */ host_address *address; //MALLOC_OR_DIE(host_address*, address, sizeof(host_address), HOSTADDR_TAG); //address->next = NULL; address = host_address_alloc(); // sets version=0, next = NULL, tsig = NULL #if DNSCORE_HAS_TSIG_SUPPORT address->tsig = tsig; #endif switch(host_type) { case HOST_ADDRESS_IPV4: { host_address_set_ipv4(address, ip_buffer, htons(ip_port)); break; } case HOST_ADDRESS_IPV6: { host_address_set_ipv6(address, ip_buffer, htons(ip_port)); break; } case HOST_ADDRESS_DNAME: { host_address_set_dname(address, ip_buffer, htons(ip_port)); break; } } *dest = address; dest = &address->next; from = to + 1; } return SUCCESS; } /* * obfuscated format: something used by the server to store information * that it needs as is. (ie: dynamic provisioning related fields) * * 01 83 [flags] [serial] [checksum] */ ya_result config_set_bytes(const char *value, void *dest, anytype sizeoftarget) { ya_result return_value; return_value = base64_decode(value, /*sizeoftarget._u32*/strlen(value), (u8*)dest); return return_value; } void config_init_error_codes() { if(config_init_error_codes_done) { return; } config_init_error_codes_done = TRUE; error_register(CONFIG_SECTION_ALREADY_REGISTERED, "CONFIG_SECTION_ALREADY_REGISTERED"); error_register(CONFIG_ALIAS_CHAIN_TOO_BIG, "CONFIG_ALIAS_CHAIN_TOO_BIG"); error_register(CONFIG_PARSE_SECTION_TAG_NOT_CLOSED,"CONFIG_PARSE_SECTION_TAG_NOT_CLOSED"); error_register(CONFIG_PARSE_UNEXPECTED_SECTION_OPEN,"CONFIG_PARSE_UNEXPECTED_SECTION_OPEN"); error_register(CONFIG_PARSE_UNEXPECTED_SECTION_CLOSE,"CONFIG_PARSE_UNEXPECTED_SECTION_CLOSE"); error_register(CONFIG_PARSE_CLOSED_WRONG_SECTION,"CONFIG_PARSE_CLOSED_WRONG_SECTION"); error_register(CONFIG_PARSE_SECTION_TAG_TOO_SMALL,"CONFIG_PARSE_SECTION_TAG_TOO_SMALL"); error_register(CONFIG_PARSE_INCLUDE_EXPECTED_FILE_PATH,"CONFIG_PARSE_INCLUDE_EXPECTED_FILE_PATH"); error_register(CONFIG_PARSE_UNKNOWN_KEYWORD,"CONFIG_PARSE_UNKNOWN_KEYWORD"); error_register(CONFIG_PARSE_EXPECTED_VALUE,"CONFIG_PARSE_EXPECTED_VALUE"); error_register(CONFIG_UNKNOWN_SETTING, "CONFIG_UNKNOWN_SETTING"); error_register(CONFIG_VALUE_OUT_OF_RANGE, "CONFIG_VALUE_OUT_OF_RANGE"); error_register(CONFIG_FILE_PATH_TOO_BIG, "CONFIG_FILE_PATH_TOO_BIG"); error_register(CONFIG_BAD_UID, "CONFIG_BAD_UID"); error_register(CONFIG_BAD_GID, "CONFIG_BAD_GID"); error_register(CONFIG_TEXT_LENGHT_TOO_BIG, "CONFIG_TEXT_LENGHT_TOO_BIG"); error_register(CONFIG_ARRAY_SIZE_TOO_BIG, "CONFIG_ARRAY_SIZE_TOO_BIG"); error_register(CONFIG_LOGGER_HANDLE_ALREADY_DEFINED, "CONFIG_LOGGER_HANDLE_ALREADY_DEFINED"); error_register(CONFIG_LOGGER_INVALID_DEBUGLEVEL, "CONFIG_LOGGER_INVALID_DEBUGLEVEL"); error_register(CONFIG_KEY_INCOMPLETE_KEY, "CONFIG_KEY_INCOMPLETE_KEY"); error_register(CONFIG_KEY_UNSUPPORTED_ALGORITHM, "CONFIG_KEY_UNSUPPORTED_ALGORITHM"); } u8 config_get_source() { return config_current_source; } void config_set_source(u8 l) { config_current_source = l; } /** * If the source level has been parsed, automatically fill the default values * for fields that are not set yet. * * @param l after what level do we automatically set the default values in the container ? */ void config_set_autodefault_after_source(u8 l) { config_autodefault_after_source = l; } /** * If the source level has been parsed, automatically fill the default values * for fields that are not set yet. * * @return after what level do we automatically set the default values in the container */ u8 config_get_autodefault_after_source() { return config_autodefault_after_source; } u8 config_get_default_source() { return config_default_source; } void config_set_default_source(u8 l) { config_default_source = l; } ya_result config_init() { return SUCCESS; } /** * * Will store the pointer to the descriptor into a global collection. * Returns an error if the node exists already and is not identical. * Which should lead to free the redundant descriptor by the caller. * * @param section_descriptor * @param priority * @return */ ya_result config_register(const config_section_descriptor_s *section_descriptor, s32 priority) { if(priority < 0) { priority = 0x1000; } u32_node *node = u32_set_avl_find(§ion_descriptor_set, (u32)priority); if(node == NULL) { node = u32_set_avl_insert(§ion_descriptor_set, (u32)priority); node->value = (void*)section_descriptor; return SUCCESS; } else { if(node->value == section_descriptor) { return SUCCESS; } else { return CONFIG_SECTION_ALREADY_REGISTERED; } } } ya_result config_set_section_default(config_section_descriptor_s *section_descriptor, config_error_s *cfgerr) { s32 err = SUCCESS; if((section_descriptor->vtbl->table != NULL) && (section_descriptor->base != NULL)) { section_descriptor->vtbl->init(section_descriptor); for(const config_table_descriptor_item_s *item = section_descriptor->vtbl->table; item->name != NULL; item++) { if((item->default_value_string != NULL) && (item->setter != NULL)) { if(FAIL(err = config_value_set(section_descriptor, item->name, item->default_value_string))) { if(cfgerr != NULL) { strncpy(cfgerr->file, "default values", sizeof(cfgerr->file)); strncpy(cfgerr->line, item->name, sizeof(cfgerr->line)); cfgerr->line_number = 0; } break; } } } } return err; } ya_result config_read_section(const char *the_configuration_file_path, config_error_s *cfgerr, const char *section_name) { ya_result err = SUCCESS; char configuration_file_path[PATH_MAX]; // if the passed value is a pointer into a configuration structure, // there is a risk that the value is freed and replaced by a different one // => bad // so a copy is done first strncpy(configuration_file_path, the_configuration_file_path, sizeof(configuration_file_path)); u32_set_avl_iterator iter; u32_set_avl_iterator_init(§ion_descriptor_set, &iter); while(u32_set_avl_iterator_hasnext(&iter)) { u32_node *node = u32_set_avl_iterator_next_node(&iter); config_section_descriptor_s *section_descriptor = (config_section_descriptor_s*)node->value; if((section_name != NULL) && (strcmp(section_descriptor->vtbl->name, section_name) != 0)) { // skip continue; } #if CONFIG_SETTINGS_DEBUG formatln("config file: section '%s' start", section_descriptor->vtbl->name); #endif section_descriptor->vtbl->init(section_descriptor); input_stream ins; if(ISOK(err = file_input_stream_open(configuration_file_path, &ins))) { // parse stream will parse ALL sections if(ISOK(err = config_file_reader_parse_stream(configuration_file_path, &ins, section_descriptor, cfgerr))) { // whatever #if CONFIG_SETTINGS_DEBUG formatln("config file: section '%s' done", section_descriptor->vtbl->name); #endif if((config_autodefault_after_source != 0) && (config_autodefault_after_source == config_current_source)) { #if CONFIG_SETTINGS_DEBUG formatln("config file: section '%s' applying default", section_descriptor->vtbl->name); #endif // apply default config_current_source = config_default_source; err = config_set_section_default(section_descriptor, cfgerr); config_current_source = config_autodefault_after_source; if(FAIL(err)) { break; } } if((err = config_fire_on_section_read_callback(section_descriptor->vtbl->name, -1)) != 0) { break; } } else { break; } } else { #ifdef DEBUG formatln("config file: cannot open: '%s': %r", configuration_file_path, err); #endif break; } } return err; } ya_result config_read(const char *configuration_file_path, config_error_s *cfgerr) { ya_result return_code = config_read_section(configuration_file_path, cfgerr, NULL); return return_code; } /** * * @param buffer source buffer * @param buffer_len source buffer size * @param buffer_name name of the buffer for error reporting ie: "command-line" * @param cfgerr error handling structure * * @return an error code */ ya_result config_read_from_buffer(const char *buffer, u32 buffer_len, const char *buffer_name, config_error_s *cfgerr) { ya_result err = SUCCESS; u32_set_avl_iterator iter; u32_set_avl_iterator_init(§ion_descriptor_set, &iter); while(u32_set_avl_iterator_hasnext(&iter)) { u32_node *node = u32_set_avl_iterator_next_node(&iter); config_section_descriptor_s *section_descriptor = (config_section_descriptor_s*)node->value; #if CONFIG_SETTINGS_DEBUG formatln("config buffer: section '%s' start", section_descriptor->vtbl->name); #endif section_descriptor->vtbl->init(section_descriptor); input_stream ins; bytearray_input_stream_init_const(&ins, (const u8*)buffer, buffer_len); err = config_file_reader_parse_stream(buffer_name, &ins, section_descriptor, cfgerr); /// @note config_file_reader_parse_stream closes the stream // DO NOT: input_stream_close(&ins); if(ISOK(err)) { // whatever #if CONFIG_SETTINGS_DEBUG formatln("config buffer: section '%s' done", section_descriptor->vtbl->name); #endif } else { break; } } return err; } static ya_result config_source_get_from_buffer(struct config_source_s *source, input_stream *out_stream, config_error_s *cfgerr) { (void)cfgerr; bytearray_input_stream_init_const(out_stream, (const u8*)source->source.buffer.text, source->source.buffer.size); return SUCCESS; } void config_source_set_buffer(struct config_source_s *source, const char *name, u8 level, const char *buffer, u32 buffer_len) { source->get_source = config_source_get_from_buffer; source->name = name; source->__class__ = "buffer_source"; source->source.buffer.text = buffer; source->source.buffer.size = buffer_len; source->level = level; } static ya_result config_source_get_from_file(struct config_source_s *source, input_stream *out_stream, config_error_s *cfgerr) { ya_result return_code; return_code = file_input_stream_open(source->source.file_name.name, out_stream); if(FAIL(return_code)) { if(cfgerr != NULL) { strncpy(cfgerr->file, source->source.file_name.name, sizeof(cfgerr->file)); strncpy(cfgerr->line, "unable to open file", sizeof(cfgerr->line)); cfgerr->line_number = 0; } } return return_code; } void config_source_set_file(struct config_source_s *source, const char *name, u8 level) { source->get_source = config_source_get_from_file; source->name = name; source->__class__ = "file_source"; source->source.file_name.name = name; source->level = level; } ya_result config_read_from_sources(struct config_source_s *sources, u32 sources_count, config_error_s *cfgerr) { ya_result err = SUCCESS; // test that the sources are setup properly u8 last_source = MAX_U8; for(u32 i = 0; i < sources_count; i++) { if(sources[i].get_source == NULL) { return CONFIG_INTERNAL_ERROR; // NULL callback } if(sources[i].level > last_source) { return CONFIG_INTERNAL_ERROR; // sources are not sorted } last_source = sources[i].level; } if(last_source <= 1) { return CONFIG_INTERNAL_ERROR; // do not put "default" nor "none" in a source level } u32_set_avl_iterator iter; u32_set_avl_iterator_init(§ion_descriptor_set, &iter); while(u32_set_avl_iterator_hasnext(&iter)) { u32_node *node = u32_set_avl_iterator_next_node(&iter); config_section_descriptor_s *section_descriptor = (config_section_descriptor_s*)node->value; #if CONFIG_SETTINGS_DEBUG formatln("config buffer: section '%s' start", section_descriptor->vtbl->name); #endif section_descriptor->vtbl->init(section_descriptor); // command line input_stream ins; for(u32 source_index = 0; source_index < sources_count; source_index++) { struct config_source_s *source = &sources[source_index]; #if CONFIG_SETTINGS_DEBUG formatln("config buffer: section '%s' getting source '%s'", section_descriptor->vtbl->name, source->name); #endif config_set_source(source->level); // retrieve the stream if(FAIL(err = sources[source_index].get_source(source, &ins, cfgerr))) { break; } #if CONFIG_SETTINGS_DEBUG formatln("config buffer: section '%s' parsing stream", section_descriptor->vtbl->name); #endif if(FAIL(err = config_file_reader_parse_stream(source->name, &ins, section_descriptor, cfgerr))) { break; } #if CONFIG_SETTINGS_DEBUG formatln("config buffer: section '%s' parsing stream done", section_descriptor->vtbl->name); #endif // note: ins must be closed } // default if(ISOK(err)) { config_set_source(CONFIG_SOURCE_DEFAULT); if(FAIL(err = config_set_section_default(section_descriptor, cfgerr))) { break; } if(section_descriptor->vtbl->postprocess != NULL) { if(FAIL(err = section_descriptor->vtbl->postprocess(section_descriptor))) { break; } } // callback if((err = config_fire_on_section_read_callback(section_descriptor->vtbl->name, -1)) != 0) { if(FAIL(err)) { if(cfgerr != NULL) { cfgerr->file[0] = '\0'; cfgerr->line[0] = '\0'; cfgerr->line_number = 0; } } break; } } else { break; } } config_set_source(CONFIG_SOURCE_NONE); return err; } ya_result config_set_default(config_error_s *cfgerr) { ya_result err = SUCCESS; u32_set_avl_iterator iter; u32_set_avl_iterator_init(§ion_descriptor_set, &iter); while(u32_set_avl_iterator_hasnext(&iter)) { u32_node *node = u32_set_avl_iterator_next_node(&iter); config_section_descriptor_s *section_descriptor = (config_section_descriptor_s*)node->value; #if CONFIG_SETTINGS_DEBUG formatln("config default: section '%s' start", section_descriptor->vtbl->name); #endif err = config_set_section_default(section_descriptor, cfgerr); #if CONFIG_SETTINGS_DEBUG formatln("config default: section '%s' done", section_descriptor->vtbl->name); #endif if(ISOK(err)) { // whatever log_debug("config default: section '%s'", section_descriptor->vtbl->name); } else { break; } } return err; } ya_result config_value_set_to_default(const char *section_name, const char *name, config_error_s *cfgerr) { config_section_descriptor_s *section_descriptor = NULL; ya_result err = ERROR; u32_set_avl_iterator iter; u32_set_avl_iterator_init(§ion_descriptor_set, &iter); while(u32_set_avl_iterator_hasnext(&iter)) { u32_node *node = u32_set_avl_iterator_next_node(&iter); config_section_descriptor_s *section_desc = (config_section_descriptor_s*)node->value; if(strcmp(section_desc->vtbl->name, section_name) == 0) { section_descriptor = section_desc; break; } } if(section_descriptor != NULL) { if(section_descriptor->vtbl->table != NULL) { section_descriptor->vtbl->init(section_descriptor); if(ISOK(err = config_item_index_get(section_descriptor->vtbl->table, name))) { const config_table_descriptor_item_s *item = §ion_descriptor->vtbl->table[err]; if(item->default_value_string != NULL) { if(FAIL(err = config_value_set(section_descriptor, item->name, item->default_value_string))) { if(cfgerr != NULL) { strncpy(cfgerr->file, STRNULL(item->default_value_string), sizeof(cfgerr->file)); strncpy(cfgerr->line, item->name, sizeof(cfgerr->line)); cfgerr->line_number = 0; } } } } } } return err; } static inline void config_item_name_canonize(const char *name, char *filtered_name) { size_t name_len = strlen(name); for(size_t i = 0; i < name_len; i++) { char c = name[i]; if((c == '-') || (c == '.')) { c = '_'; } filtered_name[i] = c; } filtered_name[name_len] = '\0'; } bool config_section_struct_register_type_handler(config_set_field_function *setter, config_section_struct_type_handler *handler) { // workaround config_set_field_function_as_voidp key; key.setter = setter; ptr_node *node = ptr_set_avl_insert(&config_section_struct_type_handler_set, key.ptr); if(node->value == NULL) { config_section_struct_type_handler_as_voidp value; value.handler = handler; node->value = value.ptr; return TRUE; } else { return FALSE; } } void config_section_struct_print(const config_section_descriptor_s *section_descriptor, const void* configbase, output_stream *os) { const char *value; config_table_descriptor_item_s *table = section_descriptor->vtbl->table; char tmp[1024]; if(configbase == NULL) { return; } while(table->name != NULL) { bool already = FALSE; char filtered_name[128]; config_item_name_canonize(table->name, filtered_name); /* table->setter is NULL for aliases */ if(table->setter != NULL) { intptr base = (intptr)configbase; intptr offs = (intptr)table->field_offset; void *ptr = (void*)(base + offs); if(table->setter == (config_set_field_function*)config_set_bool) { bool b = *(bool*)ptr; value=(b)?"yes":"no"; } else if(table->setter == (config_set_field_function*)config_set_flag8) { u8 *f = (u8*)ptr; bool b = *f & table->function_specific._u8; value=(b)?"yes":"no"; } else if(table->setter == (config_set_field_function*)config_set_flag16) { u16 *f = (u16*)ptr; bool b = *f & table->function_specific._u16; value=(b)?"yes":"no"; } else if(table->setter == (config_set_field_function*)config_set_flag32) { u32 *f = (u32*)ptr; bool b = *f & table->function_specific._u32; value=(b)?"yes":"no"; } else if(table->setter == (config_set_field_function*)config_set_flag64) { u64 *f = (u64*)ptr; bool b = *f & table->function_specific._u64; value=(b)?"yes":"no"; } else if(table->setter == (config_set_field_function*)config_set_u64) { u64 *v = (u64*)ptr; snformat(tmp, sizeof(tmp),"%lld", *v); value = tmp; } else if( (table->setter == (config_set_field_function*)config_set_u32) || (table->setter == (config_set_field_function*)config_set_u32_range) || (table->setter == (config_set_field_function*)config_set_u32_clamp)) { u32 *v = (u32*)ptr; snformat(tmp, sizeof(tmp),"%d", *v); value = tmp; } else if(table->setter == (config_set_field_function*)config_set_u16) { u16 *v = (u16*)ptr; snformat(tmp, sizeof(tmp),"%d", *v); value = tmp; } else if((table->setter == (config_set_field_function*)config_set_u8) || (table->setter == (config_set_field_function*)config_inc_u8)) { u8 *v = (u8*)ptr; snformat(tmp, sizeof(tmp),"%d", *v); value = tmp; } else if(table->setter == (config_set_field_function*)config_set_uid_t) { uid_t *v = (uid_t*)ptr; snformat(tmp, sizeof(tmp),"%d", *v); value = tmp; } else if(table->setter == (config_set_field_function*)config_set_gid_t) { gid_t *v = (gid_t*)ptr; snformat(tmp, sizeof(tmp),"%d", *v); value = tmp; } else if((table->setter == (config_set_field_function*)config_set_string) || (table->setter == (config_set_field_function*)config_set_path) || (table->setter == (config_set_field_function*)config_set_logpath) || (table->setter == (config_set_field_function*)config_set_file)) { value = *((char**)ptr); if((value == NULL) || (strlen(value) == 0)) { value = "\"\""; } } else if(table->setter == (config_set_field_function*)config_set_password) { value = "????????"; } else if(table->setter == (config_set_field_function*)config_set_chroot) { value = chroot_get_path(); } else if(table->setter == (config_set_field_function*)config_set_dnstype) { u16 *v = (u16*)ptr; value = get_name_from_type(*v); } else if(table->setter == (config_set_field_function*)config_set_dnsclass) { u16 *v = (u16*)ptr; value = get_name_from_class(*v); } else if(table->setter == (config_set_field_function*)config_set_string_copy) { value = (char*)ptr; if((value == NULL) || (strlen(value) == 0)) { value = "\"\""; } } else if(table->setter == (config_set_field_function*)config_set_fqdn) { snformat(tmp, sizeof(tmp), "%{dnsname}", *((u8**)ptr)); value = tmp; }/* else if(table->setter == (config_set_field_function*)config_set_acl_item) { address_match_set* ams = (address_match_set*)ptr; if(ams != NULL) { osformat(os, "%24s", filtered_name); acl_address_match_set_to_stream(os, ams); osprintln(os,""); } already = TRUE; value = NULL; }*/ else if(table->setter == (config_set_field_function*)config_set_host_list) { host_address *v = *(host_address**)ptr; if(v != NULL) { osformat(os, "%24s", filtered_name); char sep = ' '; do { socketaddress sa; host_address2sockaddr(&sa, v); osformat(os, "%c%{sockaddrip}", sep, &sa); if(v->port != DNS_DEFAULT_PORT) { osformat(os, " port %hd", ntohs(v->port)); } #if DNSCORE_HAS_TSIG_SUPPORT if(v->tsig != NULL) { osformat(os, " key %{dnsname}", v->tsig->name); } #endif sep = ','; v = v->next; } while(v != NULL); osprintln(os,""); } already = TRUE; value = NULL; } else if(table->setter == (config_set_field_function*)config_set_enum_value) { u32 *v = (u32*)ptr; value_name_table* tbl = table->function_specific._voidp; value = "?"; while(tbl->data != NULL) { if(tbl->id == *v) { value = tbl->data; break; } tbl++; } } else if(table->setter == (config_set_field_function*)config_set_enum8_value) { u8 *v = (u8*)ptr; value_name_table* tbl = table->function_specific._voidp; value = "?"; while(tbl->data != NULL) { if(tbl->id == *v) { value = tbl->data; break; } tbl++; } } else if(table->setter == (config_set_field_function*)config_set_bytes) { u8 *v = (u8*)ptr; if(v != NULL) { u32 v_size = table->function_specific._u32; assert(v_size < (sizeof(tmp) * 3 + 3) / 4); u32 e_size = base64_encode(v, v_size, tmp); tmp[e_size] = '\0'; value = tmp; } else { value = NULL; } } else { config_set_field_function_as_voidp key; key.setter = table->setter; ptr_node *node = ptr_set_avl_find(&config_section_struct_type_handler_set, key.ptr); if(node != NULL) { config_section_struct_type_handler_as_voidp alias_value; alias_value.ptr = node->value; config_section_struct_type_handler *type_handler = alias_value.handler; already = type_handler(os, table->name, ptr); value = NULL; } else { osformatln(os, "# unable to dump parameter '%s'", filtered_name); value = NULL; already = TRUE; } } if(!already) { if(value != NULL) { osformatln(os, "%24s %s", filtered_name, value); } #if DEBUG else { osformatln(os, "# %24s is not set", filtered_name); } #endif } } table++; } } void config_section_struct_free(const config_section_descriptor_s *section_descriptor, const void* configbase) { config_table_descriptor_item_s *table = section_descriptor->vtbl->table; if(configbase == NULL) { return; } while(table->name != NULL) { char filtered_name[128]; config_item_name_canonize(table->name, filtered_name); /* table->setter is NULL for aliases */ if(table->setter != NULL) { intptr base = (intptr)configbase; intptr offs = (intptr)table->field_offset; void *ptr = (void*)(base + offs); if(table->setter == (config_set_field_function*)config_set_bool) { } else if(table->setter == (config_set_field_function*)config_set_flag8) { } else if(table->setter == (config_set_field_function*)config_set_flag16) { } else if(table->setter == (config_set_field_function*)config_set_flag32) { } else if(table->setter == (config_set_field_function*)config_set_flag64) { } else if(table->setter == (config_set_field_function*)config_set_u64) { } else if( (table->setter == (config_set_field_function*)config_set_u32) || (table->setter == (config_set_field_function*)config_set_u32_range) || (table->setter == (config_set_field_function*)config_set_u32_clamp)) { } else if(table->setter == (config_set_field_function*)config_set_u16) { } else if((table->setter == (config_set_field_function*)config_set_u8) || (table->setter == (config_set_field_function*)config_inc_u8)) { } else if(table->setter == (config_set_field_function*)config_set_uid_t) { } else if(table->setter == (config_set_field_function*)config_set_gid_t) { } else if((table->setter == (config_set_field_function*)config_set_string) || (table->setter == (config_set_field_function*)config_set_path) || (table->setter == (config_set_field_function*)config_set_logpath) || (table->setter == (config_set_field_function*)config_set_file)) { char *text = *((char**)ptr); if((text != NULL)) { free(text); *((char**)ptr) = NULL; } } else if(table->setter == (config_set_field_function*)config_set_password) { } else if(table->setter == (config_set_field_function*)config_set_chroot) { chroot_set_path(NULL); } else if(table->setter == (config_set_field_function*)config_set_dnstype) { } else if(table->setter == (config_set_field_function*)config_set_dnsclass) { } else if(table->setter == (config_set_field_function*)config_set_string_copy) { } else if(table->setter == (config_set_field_function*)config_set_fqdn) { u8 *fqdn = *((u8**)ptr); if(fqdn != NULL) { free(fqdn); *((u8**)ptr) = NULL; } } else if(table->setter == (config_set_field_function*)config_set_host_list) { host_address *v = *(host_address**)ptr; if(v != NULL) { host_address_delete_list(v); *(host_address**)ptr = NULL; } } else if(table->setter == (config_set_field_function*)config_set_enum_value) { } else if(table->setter == (config_set_field_function*)config_set_enum8_value) { } else if(table->setter == (config_set_field_function*)config_set_bytes) { } else { config_set_field_function_as_voidp key; key.setter = table->setter; ptr_node *node = ptr_set_avl_find(&config_section_struct_type_handler_set, key.ptr); if(node != NULL) { //config_section_struct_type_handler_as_voidp alias_value; //alias_value.ptr = node->value; //config_section_struct_type_handler *type_handler = alias_value.handler; //value = NULL; } else { } } } table++; } } void config_section_print(const config_section_descriptor_s *section_descriptor, output_stream *os) { config_section_struct_print(section_descriptor, section_descriptor->base, os); } void config_print(output_stream *os) { u32_set_avl_iterator iter; u32_set_avl_iterator_init(§ion_descriptor_set, &iter); while(u32_set_avl_iterator_hasnext(&iter)) { u32_node *node = u32_set_avl_iterator_next_node(&iter); config_section_descriptor_s *section_descriptor = (config_section_descriptor_s*)node->value; osformatln(os, "<%s>", section_descriptor->vtbl->name); if((section_descriptor->vtbl->table != NULL) && (section_descriptor->base != NULL)) { config_section_print(section_descriptor, os); } else { section_descriptor->vtbl->print_wild(section_descriptor, os, NULL); } osformatln(os, "\n", section_descriptor->vtbl->name); } } ya_result config_item_index_get(const config_table_descriptor_item_s *table, const char *name) { if(table != NULL) { // replaces all '-' and '.' by '_' char filtered_name[128]; config_item_name_canonize(name, filtered_name); int count = 0; while(table[count].name != NULL) { if(strchr(table[count].name, '.') == NULL) { if(strcasecmp(table[count].name, filtered_name) == 0) { return count; } } else { char table_filtered_name[128]; config_item_name_canonize(table[count].name, table_filtered_name); if(strcasecmp(table_filtered_name, filtered_name) == 0) { return count; } } count++; } } return CONFIG_UNKNOWN_SETTING; /* not found */ } config_section_descriptor_s * config_section_get_descriptor(const char *name) { u32_set_avl_iterator iter; u32_set_avl_iterator_init(§ion_descriptor_set, &iter); while(u32_set_avl_iterator_hasnext(&iter)) { u32_node *node = u32_set_avl_iterator_next_node(&iter); config_section_descriptor_s *section_descriptor = (config_section_descriptor_s*)node->value; if(strcmp(section_descriptor->vtbl->name, name) == 0) { return section_descriptor; } } return NULL; } ya_result config_value_set(config_section_descriptor_s *section_descriptor, const char *key, const char *value) { ya_result err; s8 maxalias = 16; // seek the entry, going through aliases if needs to be for(;;) { if(FAIL(err = config_item_index_get(section_descriptor->vtbl->table, key))) { if(section_descriptor->vtbl->set_wild != NULL) { err = section_descriptor->vtbl->set_wild(section_descriptor, key, value); } return err; } if(section_descriptor->vtbl->table[err].setter != NULL) { break; } if(--maxalias <= 0) { return CONFIG_ALIAS_CHAIN_TOO_BIG; // alias chain to obig } // point to the aliased key = section_descriptor->vtbl->table[err].default_value_string; } config_table_descriptor_item_s *item = §ion_descriptor->vtbl->table[err]; // only set it if the field has not been set by a source beyond the current one if(item->source <= config_current_source) { u8 *base = (u8*)section_descriptor->base; log_debug1("config: '%s' setting '%s' to '%s'", STRNULL(section_descriptor->vtbl->name), STRNULL(key), STRNULL(value)); if(ISOK(err = item->setter(value, &base[item->field_offset], item->function_specific))) { item->source = config_current_source; } } else { log_debug1("config: '%s' has already been set by source %u (current is %u)", item->name, item->source, config_current_source); } return err; } ya_result config_postprocess() { ya_result return_code = SUCCESS; u32_set_avl_iterator iter; u32_set_avl_iterator_init(§ion_descriptor_set, &iter); while(u32_set_avl_iterator_hasnext(&iter)) { u32_node *node = u32_set_avl_iterator_next_node(&iter); config_section_descriptor_s *section_descriptor = (config_section_descriptor_s*)node->value; if(section_descriptor->vtbl->postprocess != NULL) { if(FAIL(return_code = section_descriptor->vtbl->postprocess(section_descriptor))) { return return_code; } } } return SUCCESS; } ya_result config_finalise() { ya_result return_code = SUCCESS; u32_set_avl_iterator iter; u32_set_avl_iterator_init(§ion_descriptor_set, &iter); while(u32_set_avl_iterator_hasnext(&iter)) { u32_node *node = u32_set_avl_iterator_next_node(&iter); config_section_descriptor_s *section_descriptor = (config_section_descriptor_s*)node->value; if(section_descriptor->vtbl->finalise != NULL) { if(FAIL(return_code = section_descriptor->vtbl->finalise(section_descriptor))) { return return_code; } } } u32_set_avl_destroy(§ion_descriptor_set); ptr_set_avl_iterator iter2; ptr_set_avl_iterator_init(&on_section_read_callback_set, &iter2); while(ptr_set_avl_iterator_hasnext(&iter2)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter2); free(node->key); } ptr_set_avl_destroy(&on_section_read_callback_set); return SUCCESS; } /** @} */ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/limited_input_stream.c0000644000077100007710000000012412650131756023721 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.774344 30 ctime=1454597651.471344534 yadifa-2.1.6-5826/lib/dnscore/src/limited_input_stream.c0000664000077100007710000001031012650131756023521 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup streaming Streams * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/limited_input_stream.h" #include "dnscore/zalloc.h" #define LIMITED_INPUT_STREAM_TAG 0x53494454494d494c /* LIMITDIS */ #define MODULE_MSG_HANDLE g_database_logger typedef struct limited_input_stream_data limited_input_stream_data; struct limited_input_stream_data { input_stream filtered; u64 remaining; }; static ya_result limited_read(input_stream* stream, u8* buffer, u32 len) { limited_input_stream_data* data = (limited_input_stream_data*)stream->data; if(data->remaining > 0) { len = MIN(len, data->remaining); ya_result return_value = input_stream_read(&data->filtered, buffer, len); if(ISOK(return_value)) { data->remaining -= len; } return return_value; } else { return -1; /* EOF */ } } static void limited_close(input_stream* stream) { limited_input_stream_data* data = (limited_input_stream_data*)stream->data; input_stream_close(&data->filtered); ZFREE(data, limited_input_stream_data); input_stream_set_void(stream); } static ya_result limited_skip(input_stream* stream, u32 len) { limited_input_stream_data* data = (limited_input_stream_data*)stream->data; len = MIN(len, data->remaining); ya_result return_value = input_stream_skip(&data->filtered, len); if(ISOK(return_value)) { data->remaining -= len; } return return_value; } static const input_stream_vtbl limited_input_stream_vtbl = { limited_read, limited_skip, limited_close, "limited_input_stream" }; void limited_input_stream_init(input_stream* filtered, input_stream *stream, u64 stream_size) { limited_input_stream_data* data; yassert(filtered->vtbl != NULL); ZALLOC_OR_DIE(limited_input_stream_data*, data, limited_input_stream_data, LIMITED_INPUT_STREAM_TAG); data->filtered.data = filtered->data; data->filtered.vtbl = filtered->vtbl; filtered->data = NULL; filtered->vtbl = NULL; data->remaining = stream_size; stream->data = data; stream->vtbl = &limited_input_stream_vtbl; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/src/PaxHeaders.8028/random.c0000644000077100007710000000012412650131756020760 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.772344 30 ctime=1454597651.570344534 yadifa-2.1.6-5826/lib/dnscore/src/random.c0000664000077100007710000001606212650131756020572 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnscoretools Generic Tools * @ingroup dnscore * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnscore/dnscore-config.h" #include #include #include "dnscore/random.h" // #define restrict #define RNDCTX_TAG 0x585443444e52 /* * I've written two optimizations over the algorithm (both are avoiding modulos) * */ #define IFJUMP_OVER_MODULO 2 /* 6M -> 7M */ #define SPLITTEDLOOP_OVER_MODULO 2 /* 7M -> 10M : The v2 is slightly faster than the v1 */ /** * * Mersene Twister random generator. * */ /* Create a length 624 array to store the state of the generator */ #define MERSERNE_TWISTER_STATE_SIZE 624 /* used by the auto init to randomise the seed further */ static volatile u32 random_serial = 0x7565edf1; typedef struct random_context random_context; struct random_context { u32 MT[MERSERNE_TWISTER_STATE_SIZE]; #if IFJUMP_OVER_MODULO < 2 u32 MT_index /*= 0*/; #else u32* MT_offset /*= MT*/; #endif }; random_ctx random_init(u32 seed) { random_context *ctx; u32 i; MALLOC_OR_DIE(random_context*, ctx, sizeof(random_context), RNDCTX_TAG); u32 *MT = &ctx->MT[0]; MT[0] = seed; for(i = 1; i < MERSERNE_TWISTER_STATE_SIZE; i++) { u32 MT_im1 = MT[i - 1]; MT[i] = (0x6c078965L * (MT_im1 ^ ((MT_im1) >> 30))) + i; } #if IFJUMP_OVER_MODULO < 2 ctx->MT_index = 0; #else ctx->MT_offset = &ctx->MT[0]; #endif return (random_ctx)ctx; } random_ctx random_init_auto() { u64 now = timeus(); now ^= (now >> 32); now ^= (u32)pthread_self(); now ^= random_serial; random_serial += 0xc18e2a1d; return random_init((u32)now); } void random_finalize(random_ctx ctx) { free(ctx); } // Generate an array of 624 untempered numbers static void random_generate(random_context *ctx) { #if SPLITTEDLOOP_OVER_MODULO == 2 u32 *MT = &ctx->MT[0]; u32 * restrict MT_i = &MT[0]; u32 * restrict MT_limit_1 = &MT[MERSERNE_TWISTER_STATE_SIZE - 397]; u32 * restrict MT_limit_2 = &MT[MERSERNE_TWISTER_STATE_SIZE - 1 ]; do { u32 y = (MT_i[0] & 0x80000000L) | (MT_i[1] & 0x7fffffffL); MT_i[0] = MT_i[397] ^ (y >> 1); if((y & 1) == 1) { MT_i[0] ^= 0x9908b0dfL; } } while(++MT_i < MT_limit_1); /* i = MERSERNE_TWISTER_STATE_SIZE - 397 */ do { u32 y = (MT_i[0] & 0x80000000L) | (MT_i[1] & 0x7fffffffL); MT_i[0] = MT_i[-(MERSERNE_TWISTER_STATE_SIZE - 397)] ^ (y >> 1); if((y & 1) == 1) { MT_i[0] ^= 0x9908b0dfL; } } while(++MT_i < MT_limit_2); /* i = MERSERNE_TWISTER_STATE_SIZE - 1 */ { u32 y = (MT[MERSERNE_TWISTER_STATE_SIZE - 1]&0x80000000L) | (MT[ 0 ] & 0x7fffffffL); MT[MERSERNE_TWISTER_STATE_SIZE - 1] = MT[ 396 ] ^ (y >> 1); if((y & 1) == 1) { MT[MERSERNE_TWISTER_STATE_SIZE - 1] ^= 0x9908b0dfL; } } #elif SPLITTEDLOOP_OVER_MODULO == 1 u32 *MT = &ctx->MT[0]; u32 i; for(i = 0; i < MERSERNE_TWISTER_STATE_SIZE - 397; i++) { u32 y = (MT[i]&0x80000000L) | (MT[ i + 1 ] & 0x7fffffffL); MT[i] = MT[ i + 397 ] ^ (y >> 1); if((y & 1) == 1) { MT[i] ^= 0x9908b0dfL; } } /* i = MERSERNE_TWISTER_STATE_SIZE - 397 */ for(; i < MERSERNE_TWISTER_STATE_SIZE - 1; i++) { u32 y = (MT[i]&0x80000000L) | (MT[ i + 1 ] & 0x7fffffffL); MT[i] = MT[i - (MERSERNE_TWISTER_STATE_SIZE - 397) ] ^ (y >> 1); if((y & 1) == 1) { MT[i] ^= 0x9908b0dfL; } } /* i = MERSERNE_TWISTER_STATE_SIZE - 1 */ { u32 y = (MT[MERSERNE_TWISTER_STATE_SIZE - 1]&0x80000000L) | (MT[ 0 ] & 0x7fffffffL); MT[MERSERNE_TWISTER_STATE_SIZE - 1] = MT[ 396 ] ^ (y >> 1); if((y & 1) == 1) { MT[MERSERNE_TWISTER_STATE_SIZE - 1] ^= 0x9908b0dfL; } } #else u32 *MT = &ctx->MT[0]; u32 i; for(i = 0; i < MERSERNE_TWISTER_STATE_SIZE; i++) { u32 y = (MT[i]&0x80000000L) | (MT[(i + 1) % MERSERNE_TWISTER_STATE_SIZE] & 0x7fffffffL); MT[i] = MT[(i + 397) % MERSERNE_TWISTER_STATE_SIZE] ^ (y >> 1); if((y & 1) == 1) { MT[i] ^= 0x9908b0dfL; } } #endif } u32 random_next(random_ctx ctx_) { random_context *ctx = (random_context*)ctx_; #if IFJUMP_OVER_MODULO < 2 if(ctx->MT_index == 0) { random_generate(ctx); } #else if(ctx->MT_offset == ctx->MT) { random_generate(ctx); } #endif #if IFJUMP_OVER_MODULO == 0 u32 y = ctx->MT[ctx->MT_index++]; ctx->MT_index %= MERSERNE_TWISTER_STATE_SIZE; #elif IFJUMP_OVER_MODULO == 1 u32 y = ctx->MT[ctx->MT_index++]; if(ctx->MT_index == MERSERNE_TWISTER_STATE_SIZE) { ctx->MT_index = 0; } #elif IFJUMP_OVER_MODULO == 2 u32 y = *ctx->MT_offset++; if(ctx->MT_offset == &ctx->MT[MERSERNE_TWISTER_STATE_SIZE]) { ctx->MT_offset = ctx->MT; } #endif y ^= (y >> 11); y ^= (y << 7) & 0x9d2c5680L; y ^= (y << 15) & 0xefc60000L; y ^= (y >> 18); return y; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/config.guess0000644000077100007710000000013212473710127021057 xustar000000000000000030 mtime=1424986199.147058409 30 atime=1424986199.146058409 30 ctime=1454597651.270344534 yadifa-2.1.6-5826/lib/dnscore/config.guess0000755000077100007710000012367212473710127020701 0ustar00yadifayadifa00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-11-04' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/lib/dnscore/PaxHeaders.8028/depcomp0000644000077100007710000000013212473710127020114 xustar000000000000000030 mtime=1424986199.161058409 30 atime=1424986199.161058409 30 ctime=1454597651.277344534 yadifa-2.1.6-5826/lib/dnscore/depcomp0000755000077100007710000005601612473710127017733 0ustar00yadifayadifa00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # 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, 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, see . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/PaxHeaders.8028/dnszone0000644000077100007710000000013212654663024016514 xustar000000000000000030 mtime=1454597652.855344534 30 atime=1454597652.567344534 30 ctime=1454597652.855344534 yadifa-2.1.6-5826/lib/dnszone/0000775000077100007710000000000012654663024016377 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/Makefile.am0000644000077100007710000000012412650131756020624 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.129344 30 ctime=1454597652.743344534 yadifa-2.1.6-5826/lib/dnszone/Makefile.am0000664000077100007710000001017312650131756020433 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # YADIFA dnszone Makefile.am script # ############################################################################## srcdir = @srcdir@ libdir = @libdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ ACLOCAL_AMFLAGS = -I m4 dist_noinst_DATA = VERSION I=include/dnszone FEATURESFILE=dnszone-config-features.h FEATURES=$(I)/$(FEATURESFILE) lib_LTLIBRARIES= libdnszone.la libdnszone_la_SOURCES = src/dnszone.c src/zone_axfr_reader.c src/zone_file_reader.c src/hints_file_reader.c pkginclude_HEADERS = $(FEATURES) $(I)/dnszone.h $(I)/dnszone-config.h $(I)/zone_axfr_reader.h $(I)/zone_file_reader.h $(I)/hints_file_reader.h libdnszone_la_LDFLAGS = -version-info 2:0:0 include ../../mk/common-settings.mk include ../../mk/common-labels.mk all: REVISION REVISION: (svn info 2>/dev/null;if [ $$? -ne 0 ];then echo "Revision: 0";fi)|grep Revision:|sed 's/^Revision: *//' > REVISION src/dnszone.c: $(FEATURES) $(FEATURES): config.log REVISION VERSION echo "#pragma once" > $(FEATURES) VP=DNSZONE which printf > /dev/null 2>&1 if [ $$? -eq 0 ];then \ printf '// version %i.%i.%i.%i-%i\n' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ printf '#define $(VP)_VERSION 0x%02x%02x%02x%02x%04xLL' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ else \ echo "#define $(VP)_VERSION_(vmain_,vsub_,vminor_,vpatch_,vrevision_) ((vmain_)<<40)|((vsub_)<<32)|((vminor_)<<24)|((vpatch_)<<16)|(vrevision_)" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMAIN_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VSUB_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMINOR_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VPATCH_ 0 >> $(FEATURES)" ; \ echo "#define $(VP)_VERSION_VREVISION_ $$(cat REVISION)" >> $(FEATURES) ; \ echo '#define $(VP)_VERSION $(VP)_VERSION_($(VP)_VERSION_VMAIN_,$(VP)_VERSION_VSUB_,$(VP)_VERSION_VMINOR_,$(VP)_VERSION_VPATCH_,$(VP)_VERSION_VREVISION_)' >> $(FEATURES) ; \ fi echo "// $(FEATURES)" >> $(FEATURES) echo >> $(FEATURES) yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/ar-lib0000644000077100007710000000013212473710127017656 xustar000000000000000030 mtime=1424986199.162058409 30 atime=1424986199.162058409 30 ctime=1454597652.830344534 yadifa-2.1.6-5826/lib/dnszone/ar-lib0000755000077100007710000001330212473710127017464 0ustar00yadifayadifa00000000000000#! /bin/sh # Wrapper for Microsoft lib.exe me=ar-lib scriptversion=2012-03-01.08; # UTC # Copyright (C) 2010-2014 Free Software Foundation, Inc. # Written by Peter Rosin . # # 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, 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . # func_error message func_error () { echo "$me: $1" 1>&2 exit 1 } file_conv= # func_file_conv build_file # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv in mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin) file=`cygpath -m "$file" || echo "$file"` ;; wine) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_at_file at_file operation archive # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE # for each of them. # When interpreting the content of the @FILE, do NOT use func_file_conv, # since the user would need to supply preconverted file names to # binutils ar, at least for MinGW. func_at_file () { operation=$2 archive=$3 at_file_contents=`cat "$1"` eval set x "$at_file_contents" shift for member do $AR -NOLOGO $operation:"$member" "$archive" || exit $? done } case $1 in '') func_error "no command. Try '$0 --help' for more information." ;; -h | --h*) cat < Eric Diaz Fernandez yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/Makefile.in0000644000077100007710000000013212654662614020642 xustar000000000000000030 mtime=1454597516.514344534 30 atime=1454597516.514344534 30 ctime=1454597652.802344534 yadifa-2.1.6-5826/lib/dnszone/Makefile.in0000664000077100007710000013153612654662614020461 0ustar00yadifayadifa00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # YADIFA dnszone Makefile.am script # ############################################################################## ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # ALL # ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@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@ @USES_SUNC_TRUE@am__append_1 = @USES_SUNC_FALSE@am__append_2 = -O0 @HAS_CC_NO_IDENT_TRUE@am__append_3 = -fno-ident @HAS_CC_ANSI_TRUE@am__append_4 = -ansi @HAS_CC_PEDANTIC_TRUE@am__append_5 = -pedantic @HAS_CC_WALL_TRUE@am__append_6 = -Wall -Wno-unknown-pragmas @HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE@am__append_7 = -Werror=missing-field-initializers @HAS_CC_STD_GNU99_TRUE@am__append_8 = -std=gnu99 @HAS_CC_STD_C99_TRUE@@HAS_CC_STD_GNU99_FALSE@am__append_9 = -std=c99 @HAS_CC_STD_GNU99_FALSE@@HAS_CC_XC99_TRUE@am__append_10 = -xc99 @HAS_CC_TUNE_NATIVE_TRUE@am__append_11 = -mtune=native @FORCE64BITS_TRUE@@HAS_CC_M64_TRUE@am__append_12 = -m64 @FORCE64BITS_TRUE@@HAS_CC_M64_TRUE@am__append_13 = -m64 @FORCE32BITS_TRUE@@FORCE64BITS_FALSE@@HAS_CC_M32_TRUE@am__append_14 = -m32 @FORCE32BITS_TRUE@@FORCE64BITS_FALSE@@HAS_CC_M32_TRUE@am__append_15 = -m32 # # DEBUG # @HAS_CC_G3_TRUE@am__append_16 = -g3 @HAS_CC_G3_FALSE@@HAS_CC_G_TRUE@am__append_17 = -g @HAS_CC_DWARF4_TRUE@am__append_18 = -gdwarf-4 @HAS_CC_DWARF3_TRUE@@HAS_CC_DWARF4_FALSE@am__append_19 = -gdwarf-3 # # Intel C Compiler # ############################################################################### #ICC #IPO= -ipo (need to use the intel xiar instead of ar) @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@am__append_20 = -DLTO -ipo @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@am__append_21 = -ipo @USES_ICC_TRUE@am__append_22 = -DUSES_ICC @HAS_CC_ANSI_ALIAS_TRUE@@USES_ICC_TRUE@am__append_23 = -ansi-alias -U__STRICT_ANSI__ @USES_ICC_TRUE@am__append_24 = -DMODE_DEBUG_ICC # # LLVM Clang # ############################################################################### # CLANG @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@am__append_25 = -DLTO -flto @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@am__append_26 = -flto @USES_CLANG_TRUE@am__append_27 = -DUSES_LLVM @USES_CLANG_TRUE@am__append_28 = -DMODE_DEBUG_CLANG # Note: add a _d suffix for debug builds ? # # Gnu C # ############################################################################### #GCC @HAS_CPU_NIAGARA_TRUE@@USES_GCC_TRUE@am__append_29 = -mcpu=niagara @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@am__append_30 = -DLTO -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@am__append_31 = -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin @USES_GCC_TRUE@am__append_32 = -DUSES_GCC @USES_GCC_TRUE@am__append_33 = -DMODE_DEBUG_GCC @USES_SUNC_TRUE@am__append_34 = -DUSES_SUNC @USES_SUNC_TRUE@am__append_35 = -DMODE_DEBUG_SUNC # Note: add a _d suffix for debug builds ? # # Unknown compiler # ############################################################################### # if an unknown compiler is used, it should have its own section @USES_UNKNOWN_TRUE@am__append_36 = -DUSES_UNKNOWN_COMPILER @USES_UNKNOWN_TRUE@am__append_37 = -DMODE_DEBUG_UNKNOWN # # Some BSD-based OSes need this # @IS_BSD_FAMILY_TRUE@am__append_38 = -I./include @IS_SOLARIS_FAMILY_TRUE@am__append_39 = -D_POSIX_PTHREAD_SEMANTICS @HAS_CC_RDYNAMIC_TRUE@am__append_40 = -rdynamic @HAS_CC_RDYNAMIC_TRUE@am__append_41 = -rdynamic # workaround a bug where clang does not handle properly profiling and optimizations @USES_CLANG_TRUE@am__append_42 = -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/../../m4/eurid.m4 \ $(top_srcdir)/../../m4/yadifa.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(dist_noinst_DATA) \ $(pkginclude_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/dnszone/dnszone-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libdnszone_la_LIBADD = am__dirstamp = $(am__leading_dot)dirstamp am_libdnszone_la_OBJECTS = src/dnszone.lo src/zone_axfr_reader.lo \ src/zone_file_reader.lo src/hints_file_reader.lo libdnszone_la_OBJECTS = $(am_libdnszone_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdnszone_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libdnszone_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/dnszone depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdnszone_la_SOURCES) DIST_SOURCES = $(libdnszone_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dist_noinst_DATA) HEADERS = $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope am__DIST_COMMON = $(srcdir)/../../mk/common-labels.mk \ $(srcdir)/../../mk/common-settings.mk $(srcdir)/Makefile.in \ $(top_srcdir)/include/dnszone/dnszone-config.h.in AUTHORS \ COPYING ChangeLog INSTALL NEWS README ar-lib compile \ config.guess config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print VPATH = @srcdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCOPTIMISATIONFLAGS = @CCOPTIMISATIONFLAGS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DNSCORE = @DNSCORE@ DNSDB = @DNSDB@ DNSLG = @DNSLG@ DNSZONE = @DNSZONE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAS_ACL_SUPPORT = @HAS_ACL_SUPPORT@ HAS_BFD_DEBUG_SUPPORT = @HAS_BFD_DEBUG_SUPPORT@ HAS_BIG_ENDIAN = @HAS_BIG_ENDIAN@ HAS_CC_ADDRESS_SANITIZER_CHECK = @HAS_CC_ADDRESS_SANITIZER_CHECK@ HAS_CC_ANSI = @HAS_CC_ANSI@ HAS_CC_ANSI_ALIAS = @HAS_CC_ANSI_ALIAS@ HAS_CC_CATCH_UNDEFINED_BEHAVIOR = @HAS_CC_CATCH_UNDEFINED_BEHAVIOR@ HAS_CC_DWARF2 = @HAS_CC_DWARF2@ HAS_CC_DWARF3 = @HAS_CC_DWARF3@ HAS_CC_DWARF4 = @HAS_CC_DWARF4@ HAS_CC_EXCEPTIONS = @HAS_CC_EXCEPTIONS@ HAS_CC_G = @HAS_CC_G@ HAS_CC_G3 = @HAS_CC_G3@ HAS_CC_M32 = @HAS_CC_M32@ HAS_CC_M64 = @HAS_CC_M64@ HAS_CC_MISSING_FIELD_INITIALIZERS = @HAS_CC_MISSING_FIELD_INITIALIZERS@ HAS_CC_NO_IDENT = @HAS_CC_NO_IDENT@ HAS_CC_NO_OMIT_FRAME_POINTER = @HAS_CC_NO_OMIT_FRAME_POINTER@ HAS_CC_PEDANTIC = @HAS_CC_PEDANTIC@ HAS_CC_RDYNAMIC = @HAS_CC_RDYNAMIC@ HAS_CC_SANITIZE_ADDRESS = @HAS_CC_SANITIZE_ADDRESS@ HAS_CC_STACK_PROTECTOR = @HAS_CC_STACK_PROTECTOR@ HAS_CC_STD_C99 = @HAS_CC_STD_C99@ HAS_CC_STD_GNU99 = @HAS_CC_STD_GNU99@ HAS_CC_TUNE_NATIVE = @HAS_CC_TUNE_NATIVE@ HAS_CC_WALL = @HAS_CC_WALL@ HAS_CC_XC99 = @HAS_CC_XC99@ HAS_CTRL = @HAS_CTRL@ HAS_CTRL_DYNAMIC_PROVISIONING = @HAS_CTRL_DYNAMIC_PROVISIONING@ HAS_DYNUPDATE_SUPPORT = @HAS_DYNUPDATE_SUPPORT@ HAS_FULL_ASCII7 = @HAS_FULL_ASCII7@ HAS_LITTLE_ENDIAN = @HAS_LITTLE_ENDIAN@ HAS_LOGDIR = @HAS_LOGDIR@ HAS_LOG_PID_ALWAYS_ON = @HAS_LOG_PID_ALWAYS_ON@ HAS_LOG_THREAD_ID_ALWAYS_ON = @HAS_LOG_THREAD_ID_ALWAYS_ON@ HAS_MALLOC_DEBUG_SUPPORT = @HAS_MALLOC_DEBUG_SUPPORT@ HAS_MASTER_SUPPORT = @HAS_MASTER_SUPPORT@ HAS_MESSAGES_SUPPORT = @HAS_MESSAGES_SUPPORT@ HAS_MUTEX_DEBUG_SUPPORT = @HAS_MUTEX_DEBUG_SUPPORT@ HAS_NON_AA_AXFR_SUPPORT = @HAS_NON_AA_AXFR_SUPPORT@ HAS_NSID_SUPPORT = @HAS_NSID_SUPPORT@ HAS_RRL_SUPPORT = @HAS_RRL_SUPPORT@ HAS_RRSIG_MANAGEMENT_SUPPORT = @HAS_RRSIG_MANAGEMENT_SUPPORT@ HAS_TSIG_SUPPORT = @HAS_TSIG_SUPPORT@ HAS_ZALLOC_DEBUG_SUPPORT = @HAS_ZALLOC_DEBUG_SUPPORT@ HAS_ZALLOC_STATISTICS_SUPPORT = @HAS_ZALLOC_STATISTICS_SUPPORT@ HAS_ZALLOC_SUPPORT = @HAS_ZALLOC_SUPPORT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IS_BSD_FAMILY = @IS_BSD_FAMILY@ IS_DARWIN_OS = @IS_DARWIN_OS@ IS_LINUX_FAMILY = @IS_LINUX_FAMILY@ IS_SOLARIS_FAMILY = @IS_SOLARIS_FAMILY@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL = @OPENSSL@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ 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@ logdir = @logdir@ 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_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 dist_noinst_DATA = VERSION I = include/dnszone FEATURESFILE = dnszone-config-features.h FEATURES = $(I)/$(FEATURESFILE) lib_LTLIBRARIES = libdnszone.la libdnszone_la_SOURCES = src/dnszone.c src/zone_axfr_reader.c src/zone_file_reader.c src/hints_file_reader.c pkginclude_HEADERS = $(FEATURES) $(I)/dnszone.h $(I)/dnszone-config.h $(I)/zone_axfr_reader.h $(I)/zone_file_reader.h $(I)/hints_file_reader.h libdnszone_la_LDFLAGS = -version-info 2:0:0 # # # AM_CFLAGS = -D_THREAD_SAFE -D_REENTRANT -D_FILE_OFFSET_BITS=64 \ -I$(abs_builddir) -I$(abs_srcdir)/include $(am__append_3) \ $(am__append_4) $(am__append_5) $(am__append_6) \ $(am__append_7) $(am__append_8) $(am__append_9) \ $(am__append_10) $(am__append_11) $(am__append_12) \ $(am__append_14) $(am__append_20) $(am__append_22) \ $(am__append_23) $(am__append_25) $(am__append_27) \ $(am__append_29) $(am__append_30) $(am__append_32) \ $(am__append_34) $(am__append_36) $(am__append_38) \ $(am__append_39) $(LOCALFLAGS) $(YCFLAGS) AM_LDFLAGS = $(am__append_13) $(am__append_15) $(am__append_21) \ $(am__append_26) $(am__append_31) $(YLDFLAGS) DEBUGFLAGS = $(am__append_1) $(am__append_2) $(am__append_16) \ $(am__append_17) $(am__append_18) $(am__append_19) \ $(am__append_24) $(am__append_28) $(am__append_33) \ $(am__append_35) $(am__append_37) LOCALFLAGS = -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)"' -DLOCALSTATEDIR='"$(localstatedir)"' -DDATAROOTDIR='"$(datarootdir)"' -DDATADIR='"$(datadir)"' -DLOCALEDIR='"$(localedir)"' -DLOGDIR='"$(logdir)"' @HAS_LTO_SUPPORT_FALSE@@USES_CLANG_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_FALSE@@USES_GCC_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@AM_AR = llvm-ar @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@AM_AR = gcc-ar @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@AM_AR = xiar # # Sun C # ############################################################################### # SUNC @USES_SUNC_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_FALSE@@USES_CLANG_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_FALSE@@USES_GCC_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@AM_LD = ld.gold @USES_ICC_TRUE@AM_LD = ld @USES_SUNC_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@AM_RANLIB = gcc-ranlib YRCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -DCMR YPCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -pg -DCMP $(am__append_42) YDCFLAGS = -DDEBUG $(DEBUGFLAGS) -DCMD YSCFLAGS = $(YRCFLAGS) YRLDFLAGS = YPLDFLAGS = -pg $(am__append_40) YDLDFLAGS = -g $(am__append_41) YSLDFLAGS = $(YRLDFLAGS) AM_MAKEFLAGS = MODE_CFLAGS="$(AM_CFLAGS)" CC=$(CC) AR=$(AM_AR) LD=$(AM_LD) YCFLAGS = $(YSCFLAGS) YLDFLAGS = $(YNLDFLAGS) VP = DNSZONE all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../mk/common-settings.mk $(srcdir)/../../mk/common-labels.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu 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; $(srcdir)/../../mk/common-settings.mk $(srcdir)/../../mk/common-labels.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): include/dnszone/dnszone-config.h: include/dnszone/stamp-h1 @test -f $@ || rm -f include/dnszone/stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/dnszone/stamp-h1 include/dnszone/stamp-h1: $(top_srcdir)/include/dnszone/dnszone-config.h.in $(top_builddir)/config.status @rm -f include/dnszone/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/dnszone/dnszone-config.h $(top_srcdir)/include/dnszone/dnszone-config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f include/dnszone/stamp-h1 touch $@ distclean-hdr: -rm -f include/dnszone/dnszone-config.h include/dnszone/stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/$(DEPDIR) @: > src/$(DEPDIR)/$(am__dirstamp) src/dnszone.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zone_axfr_reader.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zone_file_reader.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/hints_file_reader.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) libdnszone.la: $(libdnszone_la_OBJECTS) $(libdnszone_la_DEPENDENCIES) $(EXTRA_libdnszone_la_DEPENDENCIES) $(AM_V_CCLD)$(libdnszone_la_LINK) -rpath $(libdir) $(libdnszone_la_OBJECTS) $(libdnszone_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f src/*.$(OBJEXT) -rm -f src/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dnszone.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/hints_file_reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zone_axfr_reader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zone_file_reader.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf src/.libs src/_libs distclean-libtool: -rm -f libtool config.lt install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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 "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -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__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(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 \ && cd "$$am__cwd" \ || exit 1 $(am__post_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: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { 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-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f src/$(DEPDIR)/$(am__dirstamp) -rm -f src/$(am__dirstamp) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf src/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf src/$(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-libLTLIBRARIES uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-compile 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-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS 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 tags-am uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS .PRECIOUS: Makefile release: echo YCFLAGS=$(YRCFLAGS) echo YLDFLAGS=$(YRLDFLAGS) $(MAKE) all "YCFLAGS=$(YRCFLAGS)" "YLDFLAGS=$(YRLDFLAGS)" profile: echo YCFLAGS=$(YPCFLAGS) echo YLDFLAGS=$(YPLDFLAGS) $(MAKE) all "YCFLAGS=$(YPCFLAGS)" "YLDFLAGS=$(YPLDFLAGS)" debug: echo YCFLAGS=$(YDCFLAGS) echo YLDFLAGS=$(YDLDFLAGS) $(MAKE) all "YCFLAGS=$(YDCFLAGS)" "YLDFLAGS=$(YDLDFLAGS)" rebuild: clean release release-install: release install profile-install: profile install debug-install: debug install buildinfo.h: config.log echo \#pragma once > buildinfo.h 2> /dev/null echo // generated file, do not modify >> buildinfo.h 2> /dev/null echo \#define BUILD_OPTIONS \"$$(grep "./configure" config.log | head -1 | sed 's/.*\.\/configure *//')\" >> buildinfo.h 2> /dev/null all: REVISION REVISION: (svn info 2>/dev/null;if [ $$? -ne 0 ];then echo "Revision: 0";fi)|grep Revision:|sed 's/^Revision: *//' > REVISION src/dnszone.c: $(FEATURES) $(FEATURES): config.log REVISION VERSION echo "#pragma once" > $(FEATURES) which printf > /dev/null 2>&1 if [ $$? -eq 0 ];then \ printf '// version %i.%i.%i.%i-%i\n' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ printf '#define $(VP)_VERSION 0x%02x%02x%02x%02x%04xLL' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ else \ echo "#define $(VP)_VERSION_(vmain_,vsub_,vminor_,vpatch_,vrevision_) ((vmain_)<<40)|((vsub_)<<32)|((vminor_)<<24)|((vpatch_)<<16)|(vrevision_)" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMAIN_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VSUB_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMINOR_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VPATCH_ 0 >> $(FEATURES)" ; \ echo "#define $(VP)_VERSION_VREVISION_ $$(cat REVISION)" >> $(FEATURES) ; \ echo '#define $(VP)_VERSION $(VP)_VERSION_($(VP)_VERSION_VMAIN_,$(VP)_VERSION_VSUB_,$(VP)_VERSION_VMINOR_,$(VP)_VERSION_VPATCH_,$(VP)_VERSION_VREVISION_)' >> $(FEATURES) ; \ fi echo "// $(FEATURES)" >> $(FEATURES) echo >> $(FEATURES) # 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: yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/INSTALL0000644000077100007710000000012411734354534017624 xustar000000000000000027 mtime=1332861276.075564 27 atime=1454597464.118344 30 ctime=1454597652.819344534 yadifa-2.1.6-5826/lib/dnszone/INSTALL0000664000077100007710000003736011734354534017442 0ustar00yadifayadifa00000000000000Quick installation ****************** You will need the most up-to-date aclocal, autoheader, libtoolize, automaken autoconf, make and gcc installed dnscore needs to be installed dnsdb needs to be installed rm -f config.sub config.guess ltmain.sh aclocal autoheader libtoolize automake --add-missing autoconf ./configure make sudo make install Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `--with-dnscore=DIR' Use the dnscore from directory DIR (where DIR is the PREFIX for dnscore) `--with-dnsdb=DIR' Use the dnsdb from directory DIR (where DIR is the PREFIX for dnsdb) `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/compile0000644000077100007710000000013212473710127020140 xustar000000000000000030 mtime=1424986199.162058409 30 atime=1424986199.162058409 30 ctime=1454597652.833344534 yadifa-2.1.6-5826/lib/dnszone/compile0000755000077100007710000001624512473710127017757 0ustar00yadifayadifa00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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, 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/configure0000644000077100007710000000013212654662615020502 xustar000000000000000030 mtime=1454597517.501344535 30 atime=1454597516.986344535 30 ctime=1454597652.748344534 yadifa-2.1.6-5826/lib/dnszone/configure0000775000077100007710000240677312654662615020336 0ustar00yadifayadifa00000000000000#! /bin/sh # From configure.ac Revision: 5826 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for dnszone 2.1.6-5826. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: bugreport@yadifa.eu about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dnszone' PACKAGE_TARNAME='dnszone' PACKAGE_VERSION='2.1.6-5826' PACKAGE_STRING='dnszone 2.1.6-5826' PACKAGE_BUGREPORT='bugreport@yadifa.eu' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS HAS_LTO_SUPPORT_FALSE HAS_LTO_SUPPORT_TRUE DNSLG DNSZONE DNSDB DNSCORE OPENSSL HAS_RRCACHE_ENABLED_FALSE HAS_RRCACHE_ENABLED_TRUE HAS_RDTSC_FALSE HAS_RDTSC_TRUE HAS_TCL_FALSE HAS_TCL_TRUE HAS_DROPALL_SUPPORT_FALSE HAS_DROPALL_SUPPORT_TRUE HAS_MIRROR_SUPPORT_FALSE HAS_MIRROR_SUPPORT_TRUE HAS_NSEC_SUPPORT_FALSE HAS_NSEC_SUPPORT_TRUE HAS_NSEC3_SUPPORT_FALSE HAS_NSEC3_SUPPORT_TRUE HAS_DNSSEC_SUPPORT_FALSE HAS_DNSSEC_SUPPORT_TRUE HAS_SOCKADDR_IN6_SIN6_LEN_FALSE HAS_SOCKADDR_IN6_SIN6_LEN_TRUE HAS_SOCKADDR_IN_SIN_LEN_FALSE HAS_SOCKADDR_IN_SIN_LEN_TRUE HAS_SOCKADDR_SA_LEN_FALSE HAS_SOCKADDR_SA_LEN_TRUE logdir HAS_LOGDIR HAS_LOGDIR_FALSE HAS_LOGDIR_TRUE HAS_NON_AA_AXFR_SUPPORT HAS_NON_AA_AXFR_SUPPORT_FALSE HAS_NON_AA_AXFR_SUPPORT_TRUE HAS_FULL_ASCII7 HAS_FULL_ASCII7_FALSE HAS_FULL_ASCII7_TRUE HAS_LOG_PID_ALWAYS_ON HAS_LOG_PID_ALWAYS_ON_FALSE HAS_LOG_PID_ALWAYS_ON_TRUE HAS_LOG_THREAD_ID_ALWAYS_ON HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE HAS_MUTEX_DEBUG_SUPPORT HAS_MUTEX_DEBUG_SUPPORT_FALSE HAS_MUTEX_DEBUG_SUPPORT_TRUE HAS_BFD_DEBUG_SUPPORT HAS_BFD_DEBUG_SUPPORT_FALSE HAS_BFD_DEBUG_SUPPORT_TRUE HAS_MALLOC_DEBUG_SUPPORT HAS_MALLOC_DEBUG_SUPPORT_FALSE HAS_MALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_DEBUG_SUPPORT HAS_ZALLOC_DEBUG_SUPPORT_FALSE HAS_ZALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_STATISTICS_SUPPORT HAS_ZALLOC_STATISTICS_SUPPORT_FALSE HAS_ZALLOC_STATISTICS_SUPPORT_TRUE HAS_ZALLOC_SUPPORT HAS_ZALLOC_SUPPORT_FALSE HAS_ZALLOC_SUPPORT_TRUE HAS_RRSIG_MANAGEMENT_SUPPORT HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE HAS_DYNUPDATE_SUPPORT HAS_DYNUPDATE_SUPPORT_FALSE HAS_DYNUPDATE_SUPPORT_TRUE HAS_TSIG_SUPPORT HAS_TSIG_SUPPORT_FALSE HAS_TSIG_SUPPORT_TRUE HAS_ACL_SUPPORT HAS_ACL_SUPPORT_FALSE HAS_ACL_SUPPORT_TRUE HAS_NSID_SUPPORT HAS_NSID_SUPPORT_FALSE HAS_NSID_SUPPORT_TRUE HAS_CTRL HAS_MASTER_SUPPORT HAS_MASTER_SUPPORT_FALSE HAS_MASTER_SUPPORT_TRUE HAS_MESSAGES_SUPPORT HAS_MESSAGES_SUPPORT_FALSE HAS_MESSAGES_SUPPORT_TRUE HAS_RRL_SUPPORT HAS_RRL_SUPPORT_FALSE HAS_RRL_SUPPORT_TRUE HAS_CTRL_DYNAMIC_PROVISIONING HAS_CTRL_DYNAMIC_PROVISIONING_FALSE HAS_CTRL_DYNAMIC_PROVISIONING_TRUE HAS_CTRL_FALSE HAS_CTRL_TRUE HAS_BIG_ENDIAN HAS_LITTLE_ENDIAN HAS_BIG_ENDIAN_FALSE HAS_BIG_ENDIAN_TRUE HAS_LITTLE_ENDIAN_FALSE HAS_LITTLE_ENDIAN_TRUE HAS_MEMALIGN_ISSUES_FALSE HAS_MEMALIGN_ISSUES_TRUE HAS_CC_RDYNAMIC HAS_CC_RDYNAMIC_FALSE HAS_CC_RDYNAMIC_TRUE HAS_CC_CATCH_UNDEFINED_BEHAVIOR HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE HAS_CC_ADDRESS_SANITIZER_CHECK HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE HAS_CC_NO_OMIT_FRAME_POINTER HAS_CC_NO_OMIT_FRAME_POINTER_FALSE HAS_CC_NO_OMIT_FRAME_POINTER_TRUE HAS_CC_SANITIZE_ADDRESS HAS_CC_SANITIZE_ADDRESS_FALSE HAS_CC_SANITIZE_ADDRESS_TRUE HAS_CC_MISSING_FIELD_INITIALIZERS HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE HAS_CC_EXCEPTIONS HAS_CC_EXCEPTIONS_FALSE HAS_CC_EXCEPTIONS_TRUE HAS_CC_STACK_PROTECTOR HAS_CC_STACK_PROTECTOR_FALSE HAS_CC_STACK_PROTECTOR_TRUE HAS_CC_DWARF4 HAS_CC_DWARF4_FALSE HAS_CC_DWARF4_TRUE HAS_CC_DWARF3 HAS_CC_DWARF3_FALSE HAS_CC_DWARF3_TRUE HAS_CC_DWARF2 HAS_CC_DWARF2_FALSE HAS_CC_DWARF2_TRUE HAS_CC_G3 HAS_CC_G3_FALSE HAS_CC_G3_TRUE HAS_CC_G HAS_CC_G_FALSE HAS_CC_G_TRUE HAS_CC_WALL HAS_CC_WALL_FALSE HAS_CC_WALL_TRUE HAS_CC_M64 HAS_CC_M64_FALSE HAS_CC_M64_TRUE HAS_CC_M32 HAS_CC_M32_FALSE HAS_CC_M32_TRUE HAS_CC_XC99 HAS_CC_XC99_FALSE HAS_CC_XC99_TRUE HAS_CC_STD_C99 HAS_CC_STD_C99_FALSE HAS_CC_STD_C99_TRUE HAS_CC_STD_GNU99 HAS_CC_STD_GNU99_FALSE HAS_CC_STD_GNU99_TRUE HAS_CC_PEDANTIC HAS_CC_PEDANTIC_FALSE HAS_CC_PEDANTIC_TRUE HAS_CC_ANSI_ALIAS HAS_CC_ANSI_ALIAS_FALSE HAS_CC_ANSI_ALIAS_TRUE HAS_CC_ANSI HAS_CC_ANSI_FALSE HAS_CC_ANSI_TRUE HAS_CC_NO_IDENT HAS_CC_NO_IDENT_FALSE HAS_CC_NO_IDENT_TRUE HAS_CC_TUNE_NATIVE HAS_CC_TUNE_NATIVE_FALSE HAS_CC_TUNE_NATIVE_TRUE CCOPTIMISATIONFLAGS USES_UNKNOWN_FALSE USES_UNKNOWN_TRUE USES_SUNC_FALSE USES_SUNC_TRUE USES_CLANG_FALSE USES_CLANG_TRUE USES_GCC_FALSE USES_GCC_TRUE USES_ICC_FALSE USES_ICC_TRUE FORCE64BITS_FALSE FORCE64BITS_TRUE FORCE32BITS_FALSE FORCE32BITS_TRUE HAS_CPU_AMDINTEL_FALSE HAS_CPU_AMDINTEL_TRUE HAS_CPU_NIAGARA_FALSE HAS_CPU_NIAGARA_TRUE IS_SOLARIS_FAMILY IS_SOLARIS_FAMILY_FALSE IS_SOLARIS_FAMILY_TRUE IS_LINUX_FAMILY IS_LINUX_FAMILY_FALSE IS_LINUX_FAMILY_TRUE IS_BSD_FAMILY IS_BSD_FAMILY_FALSE IS_BSD_FAMILY_TRUE IS_DARWIN_OS IS_DARWIN_OS_FALSE IS_DARWIN_OS_TRUE CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC ac_ct_AR AR build_os build_vendor build_cpu build AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_largefile enable_force32bits enable_force64bits enable_ctrl_dynamic_provisioning enable_rrl enable_messages enable_master enable_ctrl enable_nsid enable_acl enable_tsig enable_dynupdate enable_rrsig_management enable_zalloc enable_zalloc_statistics enable_zalloc_debug enable_malloc_debug enable_bfd_debug enable_mutex_debug enable_log_thread_id enable_log_pid enable_full_ascii7 enable_non_aa_axfr_support with_logdir with_openssl_lib with_openssl_include with_openssl with_dnscore with_dnsdb with_dnszone with_dnslg enable_lto ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures dnszone 2.1.6-5826 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/dnszone] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of dnszone 2.1.6-5826:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=no] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --enable-force32bits Forces a 32 bits binary compilation --enable-force64bits Forces a 64 bits binary compilation --enable-ctrl-dynamic-provisioning Enable dynamic provisioning --disable-rrl Disable DNS Response Rate Limiter --enable-messages Enable use messages instead of send (needed if you use more than one IP aliased on the same network interface) --disable-master Disable DNS master --enable-ctrl Enable remote control --disable-nsid Disable NSID support --disable-acl Disable ACL support --disable-tsig Disable TSIG support --disable-dynupdate Disable dynamic update support --disable-rrsig-management Disable RRSIG verification and generation for zones --disable-zalloc Disable zalloc memory system --enable-zalloc-statistics Enable zalloc statistics support --enable-zalloc-debug Enable zalloc debug support --enable-malloc-debug Enable malloc debug support --enable-bfd-debug Enable bfd debug support --enable-mutex-debug Enable mutex debug support --enable-log-thread-id Enable write the thread id in each line of log --enable-log-pid Enable write the pid in each line of log --enable-full-ascii7 Enable YADIFA will now accept ASCII7 characters in DNS names (not recommended) --enable-non-aa-axfr-support Enable Allows AXFR answer from master without AA bit set (Microsoft DNS) --enable-lto Enable LTO support, requires gold linker Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-logdir build sets the directory where to put the log files --with-openssl-lib=DIR Use the openssl library from directory DIR --with-openssl-include=DIR Use the openssl headers from directory DIR --with-openssl=DIR Use the openssl from directory DIR --with-dnscore=DIR Use the dnscore from directory DIR/lib (devs only) --with-dnsdb=DIR Use the dnsdb from directory DIR/lib (devs only) --with-dnszone=DIR Use the dnszone from directory DIR/lib (devs only) --with-dnslg=DIR Use the dnslg from directory DIR/lib (devs only) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF dnszone configure 2.1.6-5826 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------------- ## ## Report this to bugreport@yadifa.eu ## ## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by dnszone $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo echo echo "DNSZONE START" echo "-------------" echo echo cpu_intel_compatible=1 icc_enabled=0 ac_os_workaround_done=0 # requires_tcl=0 requires_ssl=0 requires_dnscore=0 requires_dnsdb=0 requires_dnszone=0 requires_dnslg=0 requires_dnstcl=0 ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='dnszone' VERSION='2.1.6-5826' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 $as_echo_n "checking how to create a pax tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_pax-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' am__tar_="$_am_tar --format=posix -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x pax -w "$$tardir"' am__tar_='pax -L -x pax -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H pax -L' am__tar_='find "$tardir" -print | cpio -o -H pax -L' am__untar='cpio -i -H pax -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_pax}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_pax+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_pax=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 $as_echo "$am_cv_prog_tar_pax" >&6; } # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers include/dnszone/dnszone-config.h" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -n "$ac_tool_prefix"; then for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 $as_echo_n "checking the archiver ($AR) interface... " >&6; } if ${am_cv_ar_interface+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 $as_echo "$am_cv_ar_interface" >&6; } case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) as_fn_error $? "could not determine $AR interface" "$LINENO" 5 ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=no fi enable_dlopen=no enable_win32_dll=no # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: case "$(uname -s)" in Darwin) alias libtoolize="glibtoolize" which libtool > /dev/null 2>&1 if [ $? -ne 0 ] then which glibtool > /dev/null 2>&1 if [ $? -eq 0 ] then alias libtool="glibtool" fi fi echo 'brol' | sed 's/brol/truc/' > /dev/null 2>&1 if [ $? -ne 0 ] then alias sed="gsed" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin workaround" >&5 $as_echo "Darwin workaround" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: nothing to do" >&5 $as_echo "nothing to do" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf in -lc" >&5 $as_echo_n "checking for printf in -lc... " >&6; } if ${ac_cv_lib_c_printf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char printf (); int main () { return printf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_printf=yes else ac_cv_lib_c_printf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_printf" >&5 $as_echo "$ac_cv_lib_c_printf" >&6; } if test "x$ac_cv_lib_c_printf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBC 1 _ACEOF LIBS="-lc $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/types.h i386/types.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default" if test "x$ac_cv_type_uint64_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UINT64_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default" if test "x$ac_cv_type_int64_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INT64_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" if test "x$ac_cv_type_long_long" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LONG_LONG 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "$ac_includes_default" if test "x$ac_cv_type_u_char" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_U_CHAR 1 _ACEOF fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi if [ $ac_os_workaround_done -eq 0 ] then ac_os_workaround_done=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of OS this is" >&5 $as_echo_n "checking what kind of OS this is... " >&6; } is_darwin_os=0 is_bsd_family=0 is_solaris_family=0 is_linux_family=0 case "$(uname -s)" in Darwin) is_darwin_os=1 is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OSX" >&5 $as_echo "OSX" >&6; } ;; FreeBSD) is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: BSD" >&5 $as_echo "BSD" >&6; } ;; Linux) is_linux_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 $as_echo "Linux" >&6; } ;; SunOS) is_solaris_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SunOS" >&5 $as_echo "SunOS" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: not specifically supported" >&5 $as_echo "not specifically supported" >&6; } ;; esac if [ "$is_darwin_os" = "" ] then echo "OS detection failed to give relevant results" exit 1; fi if [ $is_darwin_os -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 1 _ACEOF if true; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 0 _ACEOF if false; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi fi if [ $is_bsd_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 1 _ACEOF if true; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 0 _ACEOF if false; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi fi if [ $is_linux_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 1 _ACEOF if true; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 0 _ACEOF if false; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi fi if [ $is_solaris_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 1 _ACEOF if true; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 0 _ACEOF if false; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi fi fi cat >>confdefs.h <<_ACEOF #define DEFAULT_ASSUMED_CPU_COUNT 2 _ACEOF cpu_intel_compatible=1 if false; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi if false; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for the CPU options" >&5 $as_echo_n "checking checking for the CPU options... " >&6; } CPU_UNKNOWN=1 CFLAGS3264= case "$(uname -i 2>/dev/null)" in SUNW,SPARC-Enterprise-T1000) cat >>confdefs.h <<_ACEOF #define HAS_CPU_NIAGARA 1 _ACEOF if true; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: UtrasparcT1" >&5 $as_echo "UtrasparcT1" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=0 ;; *) ;; esac case "$(uname -m)" in x86_64) cat >>confdefs.h <<_ACEOF #define HAS_CPU_AMDINTEL 1 _ACEOF if true; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: AMD/Intel" >&5 $as_echo "AMD/Intel" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=1 ;; *) ;; esac case "${CPU_UNKNOWN}" in 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: generic" >&5 $as_echo "generic" >&6; } ;; 0) ;; esac if [ "$is_solaris_family" = "" ] then echo "OS must be detected first" exit 1 fi if [ $is_solaris_family -eq 1 ] then echo "Solaris ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if either force 32 or 64 bits is enabled" >&5 $as_echo_n "checking if either force 32 or 64 bits is enabled... " >&6; } if [ ! "$enable_force32bits" = "yes" ] then if [ ! "$enable_force64bits" = "yes" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forcing 64 bits" >&5 $as_echo "no, forcing 64 bits" >&6; } enable_force64bits="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else echo "Not Solaris ..." fi echo "Force ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 32 bits is enabled" >&5 $as_echo_n "checking if force 32 bits is enabled... " >&6; } if false; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi # Check whether --enable-force32bits was given. if test "${enable_force32bits+set}" = set; then : enableval=$enable_force32bits; enable_force32bits=yes else enable_force32bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force32bits" >&5 $as_echo "$enable_force32bits" >&6; } case "$enable_force32bits" in yes) CFLAGS3264=-m32 if test $enable_force32bits = yes; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 64 bits is enabled" >&5 $as_echo_n "checking if force 64 bits is enabled... " >&6; } if false; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi # Check whether --enable-force64bits was given. if test "${enable_force64bits+set}" = set; then : enableval=$enable_force64bits; enable_force64bits=yes else enable_force64bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force64bits" >&5 $as_echo "$enable_force64bits" >&6; } case "$enable_force64bits" in yes) CFLAGS3264=-m64 if test $enable_force64bits = yes; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi if [ "$enable_force32" = "yes" ] then echo "cannot do both --enable-force32bits and --enable-force64bits at the same time" exit 1 fi ;; *) ;; esac cat /etc/redhat-version > /dev/null 2>&1 if [ $? -eq 0 ] then is_redhat_family=1 else is_redhat_family=0 fi CFLAGS= VERSION_OPT=--version $CC --version > /dev/null 2>&1 if [ $? -ne 0 ] then $CC -V > /dev/null 2>&1 if [ $? -ne 0 ] then CCVER='0.0' CCNAME='unknown' VERSION_OPT='' else VERSION_OPT='-V' fi fi if [ ! "$VERSION_OPT" = "" ] then CCVER=$($CC $VERSION_OPT 2>&1|head -1|sed 's/[^0-9.]*\([0-9.]*\).*/\1/') if [ "$CCVER" = "" ] then CCVER='0.0' fi CCNAME=$($CC $VERSION_OPT 2>&1|head -1|sed -e 's/.*clang.*/clang/' -e 's/.*gcc.*/gcc/' -e 's/.*icc.*/icc/' -e 's/.*Sun C.*/Sun C/'|tr A-Z a-z) if [ "$CCNAME" = "" ] then CCNAME='unknown' fi else CCVER='0.0' CCNAME='unknown' fi # version opt CCMAJOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $1}') CCMINOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $2}') if [ "$CCMAJOR" = "" ] then CCMAJOR=0 fi if [ "$CCMINOR" = "" ] then CCMINOR=0 fi if [ "$CCNAME" = "gcc" ] then CCOPTIMISATIONFLAGS=-O3 if [ $CCMAJOR -lt 4 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC < 4.0 has optimisations issues with YADIFA." sleep 1 elif [ $CCMAJOR -eq 4 ] then if [ $CCMINOR -lt 6 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC before 4.6 have optimisation issues with YADIFA." sleep 1 elif [ $CCMINOR -eq 6 ] then CCOPTIMISATIONFLAGS=-O2 else # hopefully after 4.6 the issue is fixed ... CCOPTIMISATIONFLAGS=-O3 fi fi if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if true; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "icc" ] then echo "ICC" CCOPTIMISATIONFLAGS=-O3 if true; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi AR=xiar elif [ "$CCNAME" = "clang" ] then echo "CLANG" CCOPTIMISATIONFLAGS=-O3 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if true; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "Sun C" ] then echo "Sun C" CCOPTIMISATIONFLAGS=-xO5 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if true; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi else echo "unsupported compiler" CCNAME=$CC CCOPTIMISATIONFLAGS=-O2 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if true; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi fi # # We've been told RedHat does not like -O3 at all, so ... # if [ $is_redhat_family -ne 0 ] then if [ "$CCOPTIMISATIONFLAGS " eq "-O3" ] then CCOPTIMISATIONFLAGS=-O2 fi fi echo "detected compiler is $CCNAME $CCMAJOR $CCMINOR" CCOPTIMISATIONFLAGS=$CCOPTIMISATIONFLAGS if [ $cpu_intel_compatible -eq 0 ] then if [ $icc_enabled -ne 0 ] then echo "ERROR: cannot enable ICC with CPU other than x86 or amd64" exit 1 fi fi # # AC_COMPILER_SUPPORTS -mtune=native # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mtune=native" >&5 $as_echo_n "checking if compiler supports -mtune=native... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-TUNE_NATIVE.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -mtune=native test-gcc-TUNE_NATIVE.c -o test-gcc-TUNE_NATIVE > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-TUNE_NATIVE* # # AC_COMPILER_SUPPORTS -fno-ident # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-ident" >&5 $as_echo_n "checking if compiler supports -fno-ident... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_IDENT.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-ident test-gcc-NO_IDENT.c -o test-gcc-NO_IDENT > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_IDENT* # # AC_COMPILER_SUPPORTS -ansi # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi" >&5 $as_echo_n "checking if compiler supports -ansi... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi test-gcc-ANSI.c -o test-gcc-ANSI > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI* # # AC_COMPILER_SUPPORTS -ansi-alias # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi-alias" >&5 $as_echo_n "checking if compiler supports -ansi-alias... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI_ALIAS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi-alias test-gcc-ANSI_ALIAS.c -o test-gcc-ANSI_ALIAS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI_ALIAS* # # AC_COMPILER_SUPPORTS -pedantic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -pedantic" >&5 $as_echo_n "checking if compiler supports -pedantic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-PEDANTIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -pedantic test-gcc-PEDANTIC.c -o test-gcc-PEDANTIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-PEDANTIC* # # AC_COMPILER_SUPPORTS -std=gnu99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=gnu99" >&5 $as_echo_n "checking if compiler supports -std=gnu99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_GNU99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=gnu99 test-gcc-STD_GNU99.c -o test-gcc-STD_GNU99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_GNU99* # # AC_COMPILER_SUPPORTS -std=c99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=c99" >&5 $as_echo_n "checking if compiler supports -std=c99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_C99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=c99 test-gcc-STD_C99.c -o test-gcc-STD_C99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_C99* # # AC_COMPILER_SUPPORTS -xc99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -xc99" >&5 $as_echo_n "checking if compiler supports -xc99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-XC99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -xc99 test-gcc-XC99.c -o test-gcc-XC99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-XC99* # # AC_COMPILER_SUPPORTS -m32 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m32" >&5 $as_echo_n "checking if compiler supports -m32... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M32.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m32 test-gcc-M32.c -o test-gcc-M32 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M32* # # AC_COMPILER_SUPPORTS -m64 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m64" >&5 $as_echo_n "checking if compiler supports -m64... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M64.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m64 test-gcc-M64.c -o test-gcc-M64 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M64* # # AC_COMPILER_SUPPORTS -Wall # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Wall" >&5 $as_echo_n "checking if compiler supports -Wall... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-WALL.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Wall test-gcc-WALL.c -o test-gcc-WALL > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-WALL* # # AC_COMPILER_SUPPORTS -g # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g" >&5 $as_echo_n "checking if compiler supports -g... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g test-gcc-G.c -o test-gcc-G > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G* # # AC_COMPILER_SUPPORTS -g3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g3" >&5 $as_echo_n "checking if compiler supports -g3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g3 test-gcc-G3.c -o test-gcc-G3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G3* # # AC_COMPILER_SUPPORTS -gdwarf-2 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-2" >&5 $as_echo_n "checking if compiler supports -gdwarf-2... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF2.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-2 test-gcc-DWARF2.c -o test-gcc-DWARF2 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF2* # # AC_COMPILER_SUPPORTS -gdwarf-3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-3" >&5 $as_echo_n "checking if compiler supports -gdwarf-3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-3 test-gcc-DWARF3.c -o test-gcc-DWARF3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF3* # # AC_COMPILER_SUPPORTS -gdwarf-4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-4" >&5 $as_echo_n "checking if compiler supports -gdwarf-4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF4.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-4 test-gcc-DWARF4.c -o test-gcc-DWARF4 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF4* # # AC_COMPILER_SUPPORTS -fstack-protector --param=ssp-buffer-size=4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fstack-protector --param=ssp-buffer-size=4" >&5 $as_echo_n "checking if compiler supports -fstack-protector --param=ssp-buffer-size=4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STACK_PROTECTOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fstack-protector --param=ssp-buffer-size=4 test-gcc-STACK_PROTECTOR.c -o test-gcc-STACK_PROTECTOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STACK_PROTECTOR* # # AC_COMPILER_SUPPORTS -fexceptions # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fexceptions" >&5 $as_echo_n "checking if compiler supports -fexceptions... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-EXCEPTIONS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fexceptions test-gcc-EXCEPTIONS.c -o test-gcc-EXCEPTIONS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-EXCEPTIONS* # # AC_COMPILER_SUPPORTS -Werror=missing-field-initializers # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=missing-field-initializers" >&5 $as_echo_n "checking if compiler supports -Werror=missing-field-initializers... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-MISSING_FIELD_INITIALIZERS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Werror=missing-field-initializers test-gcc-MISSING_FIELD_INITIALIZERS.c -o test-gcc-MISSING_FIELD_INITIALIZERS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-MISSING_FIELD_INITIALIZERS* # # AC_COMPILER_SUPPORTS -fsanitize=address # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fsanitize=address" >&5 $as_echo_n "checking if compiler supports -fsanitize=address... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-SANITIZE_ADDRESS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fsanitize=address test-gcc-SANITIZE_ADDRESS.c -o test-gcc-SANITIZE_ADDRESS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-SANITIZE_ADDRESS* # # AC_COMPILER_SUPPORTS -fno-omit-frame-pointer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-omit-frame-pointer" >&5 $as_echo_n "checking if compiler supports -fno-omit-frame-pointer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_OMIT_FRAME_POINTER.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-omit-frame-pointer test-gcc-NO_OMIT_FRAME_POINTER.c -o test-gcc-NO_OMIT_FRAME_POINTER > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_OMIT_FRAME_POINTER* # # AC_COMPILER_SUPPORTS -faddress-sanitizer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -faddress-sanitizer" >&5 $as_echo_n "checking if compiler supports -faddress-sanitizer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ADDRESS_SANITIZER_CHECK.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -faddress-sanitizer test-gcc-ADDRESS_SANITIZER_CHECK.c -o test-gcc-ADDRESS_SANITIZER_CHECK > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ADDRESS_SANITIZER_CHECK* # # AC_COMPILER_SUPPORTS -fcatch_undefined_behavior # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fcatch_undefined_behavior" >&5 $as_echo_n "checking if compiler supports -fcatch_undefined_behavior... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-CATCH_UNDEFINED_BEHAVIOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fcatch_undefined_behavior test-gcc-CATCH_UNDEFINED_BEHAVIOR.c -o test-gcc-CATCH_UNDEFINED_BEHAVIOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-CATCH_UNDEFINED_BEHAVIOR* # # AC_COMPILER_SUPPORTS -rdynamic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -rdynamic" >&5 $as_echo_n "checking if compiler supports -rdynamic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-RDYNAMIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -rdynamic test-gcc-RDYNAMIC.c -o test-gcc-RDYNAMIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-RDYNAMIC* { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking if memory accesses must be size-aligned" >&5 $as_echo_n "checking checking if memory accesses must be size-aligned... " >&6; } if false; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat > memalign_issues_test.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc, char** argv) { char* p = (char*)malloc(8); p++; int* intp= (int*)p; *intp=1; return 0; } _ACEOF ${CC} ${CFLAGS} memalign_issues_test.c -o memalign_issues_test > /dev/null 2>&1 has_memalign_issues=0 ./memalign_issues_test > /dev/null 2>&1 if [ $? -ne 0 ]; then has_memalign_issues=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f memalign_issues_test memalign_issues_test.c if test $has_memalign_issues; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MEMALIGN_ISSUES $has_memalign_issues _ACEOF # # AC_ENDIANNESS # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking endianness: " >&5 $as_echo_n "checking endianness: ... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-endian.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_STDIO_H #include #endif #if defined __FreeBSD__ #if HAVE_SYS_ENDIAN_H #include #endif #elif defined __APPLE__ #if HAVE_MACHINE_ENDIAN_H #include #endif #elif defined __sun #if HAVE_SYS_BYTEORDER_H #include #endif #else #if HAVE_ENDIAN_H #include #endif #if HAVE_BYTESWAP_H #include #endif #endif static int magic = 0x00525545; int main(int argc,char** argv) { (void)argc; (void)argv; int pp = -1; int c = -1; #if defined _BIG_ENDIAN pp = 2; #elif defined _LITTLE_ENDIAN pp = 1; #endif #ifdef __BYTE_ORDER #if __BYTE_ORDER == __LITTLE_ENDIAN pp = 1; #elif __BYTE_ORDER == __BIG_ENDIAN pp = 2; #endif // printf("__BYTE_ORDER=%x\n", __BYTE_ORDER); #endif #ifdef _BYTE_ORDER #if _BYTE_ORDER == _LITTLE_ENDIAN pp = 1; #elif _BYTE_ORDER == _BIG_ENDIAN pp = 2; #endif printf("_BYTE_ORDER=%x\n", _BYTE_ORDER); #endif #ifdef BYTE_ORDER #if BYTE_ORDER == LITTLE_ENDIAN pp = 1; #elif BYTE_ORDER == BIG_ENDIAN pp = 2; #endif // printf("BYTE_ORDER=%x\n", BYTE_ORDER); #endif # #ifdef WORDS_BIGENDIAN // printf("WORDS_BIGENDIAN=%x\n", WORDS_BIGENDIAN); if(pp == 1) // could be -1 or 2 { pp = -2; } else { pp = 2; } #endif char *p = (char*)&magic; if(*p == '\0') { c = 2; } else if(*p == 'E') { c = 1; } if((pp < 0) || (c < 0)) { printf("*** WARNING *** preprocessor says %i, real test says %i *** WARNING ***\n", pp, c); } if(c == pp) { return c; } else { return -1; } } _ACEOF $CC test-gcc-endian.c -o test-gcc-endian > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"failed to compile test\"" >&5 $as_echo "\"failed to compile test\"" >&6; } exit 1 fi ./test-gcc-endian if [ $? -eq 1 ] then if true; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if false; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: little" >&5 $as_echo "little" >&6; } else if false; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if true; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: big" >&5 $as_echo "big" >&6; } fi rm -f test-gcc-endian.c* test-gcc-endian for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done for ac_header in stdio.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDIO_H 1 _ACEOF fi done for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRING_H 1 _ACEOF fi done for ac_header in endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default" if test "x$ac_cv_header_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ENDIAN_H 1 _ACEOF fi done for ac_header in syslog.h do : ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYSLOG_H 1 _ACEOF fi done for ac_header in fcntl.h do : ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FCNTL_H 1 _ACEOF fi done for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF fi done for ac_header in linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in byteswap.h do : ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" if test "x$ac_cv_header_byteswap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BYTESWAP_H 1 _ACEOF fi done for ac_header in machine/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "machine/endian.h" "ac_cv_header_machine_endian_h" "$ac_includes_default" if test "x$ac_cv_header_machine_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACHINE_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/time.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIME_H 1 _ACEOF fi done for ac_header in sys/stat.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_stat_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_STAT_H 1 _ACEOF fi done for ac_header in sys/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" if test "x$ac_cv_header_sys_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/byteorder.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/byteorder.h" "ac_cv_header_sys_byteorder_h" "$ac_includes_default" if test "x$ac_cv_header_sys_byteorder_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_BYTEORDER_H 1 _ACEOF fi done for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done for ac_header in netinet/in.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET_IN_H 1 _ACEOF fi done for ac_header in netinet6/in6.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet6/in6.h" "ac_cv_header_netinet6_in6_h" "$ac_includes_default" if test "x$ac_cv_header_netinet6_in6_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET6_IN6_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_spin_init" >&5 $as_echo_n "checking checking for pthread_spin_init... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_spinlock_t lock; pthread_spin_init(&lock, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SPINLOCK 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_setname_np" >&5 $as_echo_n "checking checking for pthread_setname_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __USE_GNU #include int main () { pthread_setname_np(pthread_self(), "myname"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SETNAME_NP 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # # AC_HAS_ENABLE ctrl_dynamic_provisioning # if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL_DYNAMIC_PROVISIONING has been enabled" >&5 $as_echo_n "checking if CTRL_DYNAMIC_PROVISIONING has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl_dynamic_provisioning was given. if test "${enable_ctrl_dynamic_provisioning+set}" = set; then : enableval=$enable_ctrl_dynamic_provisioning; fi # CASE case "y$enable_ctrl_dynamic_provisioning" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl_dynamic_provisioning DONE # # AC_HAS_DISABLE rrl # if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRL_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrl was given. if test "${enable_rrl+set}" = set; then : enableval=$enable_rrl; fi # MSG RESULT # CASE case "y$enable_rrl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrl DONE # # AC_HAS_ENABLE messages # if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MESSAGES_SUPPORT has been enabled" >&5 $as_echo_n "checking if MESSAGES_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-messages was given. if test "${enable_messages+set}" = set; then : enableval=$enable_messages; fi # CASE case "y$enable_messages" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE messages DONE # # AC_HAS_DISABLE master # if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MASTER_SUPPORT has been disabled" >&5 $as_echo_n "checking if MASTER_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-master was given. if test "${enable_master+set}" = set; then : enableval=$enable_master; fi # MSG RESULT # CASE case "y$enable_master" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_dynupdate='no' enable_rrsig_management='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE master DONE # # AC_HAS_ENABLE ctrl # if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL has been enabled" >&5 $as_echo_n "checking if CTRL has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl was given. if test "${enable_ctrl+set}" = set; then : enableval=$enable_ctrl; fi # CASE case "y$enable_ctrl" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl DONE # # AC_HAS_DISABLE nsid # if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NSID_SUPPORT has been disabled" >&5 $as_echo_n "checking if NSID_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-nsid was given. if test "${enable_nsid+set}" = set; then : enableval=$enable_nsid; fi # MSG RESULT # CASE case "y$enable_nsid" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE nsid DONE # # AC_HAS_DISABLE acl # if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ACL_SUPPORT has been disabled" >&5 $as_echo_n "checking if ACL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-acl was given. if test "${enable_acl+set}" = set; then : enableval=$enable_acl; fi # MSG RESULT # CASE case "y$enable_acl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_tsig='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE acl DONE # # AC_HAS_DISABLE tsig # if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if TSIG_SUPPORT has been disabled" >&5 $as_echo_n "checking if TSIG_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-tsig was given. if test "${enable_tsig+set}" = set; then : enableval=$enable_tsig; fi # MSG RESULT # CASE case "y$enable_tsig" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE tsig DONE # # AC_HAS_DISABLE dynupdate # if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if DYNUPDATE_SUPPORT has been disabled" >&5 $as_echo_n "checking if DYNUPDATE_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-dynupdate was given. if test "${enable_dynupdate+set}" = set; then : enableval=$enable_dynupdate; fi # MSG RESULT # CASE case "y$enable_dynupdate" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE dynupdate DONE # # AC_HAS_DISABLE rrsig_management # if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRSIG_MANAGEMENT_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRSIG_MANAGEMENT_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrsig_management was given. if test "${enable_rrsig_management+set}" = set; then : enableval=$enable_rrsig_management; fi # MSG RESULT # CASE case "y$enable_rrsig_management" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrsig_management DONE # # AC_HAS_DISABLE zalloc # if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_SUPPORT has been disabled" >&5 $as_echo_n "checking if ZALLOC_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc was given. if test "${enable_zalloc+set}" = set; then : enableval=$enable_zalloc; fi # MSG RESULT # CASE case "y$enable_zalloc" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE zalloc DONE # # AC_HAS_ENABLE zalloc_statistics # if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_STATISTICS_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_STATISTICS_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_statistics was given. if test "${enable_zalloc_statistics+set}" = set; then : enableval=$enable_zalloc_statistics; fi # CASE case "y$enable_zalloc_statistics" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_statistics DONE # # AC_HAS_ENABLE zalloc_debug # if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_debug was given. if test "${enable_zalloc_debug+set}" = set; then : enableval=$enable_zalloc_debug; fi # CASE case "y$enable_zalloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_debug DONE # # AC_HAS_ENABLE malloc_debug # if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-malloc_debug was given. if test "${enable_malloc_debug+set}" = set; then : enableval=$enable_malloc_debug; fi # CASE case "y$enable_malloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE malloc_debug DONE # # AC_HAS_ENABLE bfd_debug # if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if BFD_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if BFD_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-bfd_debug was given. if test "${enable_bfd_debug+set}" = set; then : enableval=$enable_bfd_debug; fi # CASE case "y$enable_bfd_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE bfd_debug DONE case "$enable_bfd_debug" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlinfo" >&5 $as_echo_n "checking for library containing dlinfo... " >&6; } if ${ac_cv_search_dlinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlinfo (); int main () { return dlinfo (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlinfo+:} false; then : break fi done if ${ac_cv_search_dlinfo+:} false; then : else ac_cv_search_dlinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlinfo" >&5 $as_echo "$ac_cv_search_dlinfo" >&6; } ac_res=$ac_cv_search_dlinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no dl fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sha1_init_ctx" >&5 $as_echo_n "checking for library containing sha1_init_ctx... " >&6; } if ${ac_cv_search_sha1_init_ctx+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sha1_init_ctx (); int main () { return sha1_init_ctx (); ; return 0; } _ACEOF for ac_lib in '' iberty; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sha1_init_ctx=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sha1_init_ctx+:} false; then : break fi done if ${ac_cv_search_sha1_init_ctx+:} false; then : else ac_cv_search_sha1_init_ctx=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sha1_init_ctx" >&5 $as_echo "$ac_cv_search_sha1_init_ctx" >&6; } ac_res=$ac_cv_search_sha1_init_ctx if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo iberty fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bfd_init" >&5 $as_echo_n "checking for library containing bfd_init... " >&6; } if ${ac_cv_search_bfd_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bfd_init (); int main () { return bfd_init (); ; return 0; } _ACEOF for ac_lib in '' bfd; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bfd_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bfd_init+:} false; then : break fi done if ${ac_cv_search_bfd_init+:} false; then : else ac_cv_search_bfd_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bfd_init" >&5 $as_echo "$ac_cv_search_bfd_init" >&6; } ac_res=$ac_cv_search_bfd_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no bfd;exit 1 fi ;; no|*) ;; esac # # AC_HAS_ENABLE mutex_debug # if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MUTEX_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MUTEX_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-mutex_debug was given. if test "${enable_mutex_debug+set}" = set; then : enableval=$enable_mutex_debug; fi # CASE case "y$enable_mutex_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE mutex_debug DONE # # AC_HAS_ENABLE log_thread_id # if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_THREAD_ID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_THREAD_ID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_thread_id was given. if test "${enable_log_thread_id+set}" = set; then : enableval=$enable_log_thread_id; fi # CASE case "y$enable_log_thread_id" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_thread_id DONE # # AC_HAS_ENABLE log_pid # if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_PID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_PID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_pid was given. if test "${enable_log_pid+set}" = set; then : enableval=$enable_log_pid; fi # CASE case "y$enable_log_pid" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_pid DONE # # AC_HAS_ENABLE full_ascii7 # if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if FULL_ASCII7 has been enabled" >&5 $as_echo_n "checking if FULL_ASCII7 has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-full_ascii7 was given. if test "${enable_full_ascii7+set}" = set; then : enableval=$enable_full_ascii7; fi # CASE case "y$enable_full_ascii7" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 1 _ACEOF # CONDITIONAL Y if true; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 0 _ACEOF # CONDITIONAL N if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE full_ascii7 DONE # # AC_HAS_ENABLE non_aa_axfr_support # if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NON_AA_AXFR_SUPPORT has been enabled" >&5 $as_echo_n "checking if NON_AA_AXFR_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-non_aa_axfr_support was given. if test "${enable_non_aa_axfr_support+set}" = set; then : enableval=$enable_non_aa_axfr_support; fi # CASE case "y$enable_non_aa_axfr_support" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE non_aa_axfr_support DONE # # AC_HAS_WITH logdir # if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if logdir has been given" >&5 $as_echo_n "checking if logdir has been given... " >&6; } # ARG WITH # Check whether --with-logdir was given. if test "${with_logdir+set}" = set; then : withval=$with_logdir; # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_WITH_LOGDIR "$with_logdir" // $withval _ACEOF with_logdir="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES logdir="$withval" # ENDIF else # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 0 _ACEOF # CONDITIONAL N if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi with_logdir="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO logdir=${localstatedir}/log/yadifa # ENDIF fi # SUBST # AC_HAS_WITH logdir DONE { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has a sa_len field" >&5 $as_echo_n "checking if sockaddr has a sa_len field... " >&6; } cat > sockaddr_sa_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr sa; sa.sa_len = 4; } _ACEOF has_sockaddr_sa_len=0 ${CC} ${CFLAGS} sockaddr_sa_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_sa_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_sa_len.c sockaddr_sa_len if test $has_sockaddr_sa_len = yes; then HAS_SOCKADDR_SA_LEN_TRUE= HAS_SOCKADDR_SA_LEN_FALSE='#' else HAS_SOCKADDR_SA_LEN_TRUE='#' HAS_SOCKADDR_SA_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_SA_LEN $has_sockaddr_sa_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in has a sin_len field" >&5 $as_echo_n "checking if sockaddr_in has a sin_len field... " >&6; } cat > sockaddr_in_sin_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in sa; sa.sin_len = sizeof(struct sockaddr_in); } _ACEOF has_sockaddr_in_sin_len=0 ${CC} ${CFLAGS} sockaddr_in_sin_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in_sin_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in_sin_len.c sockaddr_in_sin_len if test $has_sockaddr_in_sin_len = yes; then HAS_SOCKADDR_IN_SIN_LEN_TRUE= HAS_SOCKADDR_IN_SIN_LEN_FALSE='#' else HAS_SOCKADDR_IN_SIN_LEN_TRUE='#' HAS_SOCKADDR_IN_SIN_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN_SIN_LEN $has_sockaddr_in_sin_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in6 has a sin6_len field" >&5 $as_echo_n "checking if sockaddr_in6 has a sin6_len field... " >&6; } cat > sockaddr_in6_sin6_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in6 sa; sa.sin6_len = sizeof(struct sockaddr_in6); } _ACEOF has_sockaddr_in6_sin6_len=0 ${CC} ${CFLAGS} sockaddr_in6_sin6_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in6_sin6_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in6_sin6_len.c sockaddr_in6_sin6_len if test $has_sockaddr_in6_sin6_len = yes; then HAS_SOCKADDR_IN6_SIN6_LEN_TRUE= HAS_SOCKADDR_IN6_SIN6_LEN_FALSE='#' else HAS_SOCKADDR_IN6_SIN6_LEN_TRUE='#' HAS_SOCKADDR_IN6_SIN6_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN6_SIN6_LEN $has_sockaddr_in6_sin6_len _ACEOF if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF if true; then HAS_DNSSEC_SUPPORT_TRUE= HAS_DNSSEC_SUPPORT_FALSE='#' else HAS_DNSSEC_SUPPORT_TRUE='#' HAS_DNSSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DNSSEC_SUPPORT 1 _ACEOF if true; then HAS_NSEC3_SUPPORT_TRUE= HAS_NSEC3_SUPPORT_FALSE='#' else HAS_NSEC3_SUPPORT_TRUE='#' HAS_NSEC3_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC3_SUPPORT 1 _ACEOF if true; then HAS_NSEC_SUPPORT_TRUE= HAS_NSEC_SUPPORT_FALSE='#' else HAS_NSEC_SUPPORT_TRUE='#' HAS_NSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC_SUPPORT 1 _ACEOF if false; then HAS_MIRROR_SUPPORT_TRUE= HAS_MIRROR_SUPPORT_FALSE='#' else HAS_MIRROR_SUPPORT_TRUE='#' HAS_MIRROR_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MIRROR_SUPPORT 0 _ACEOF if false; then HAS_DROPALL_SUPPORT_TRUE= HAS_DROPALL_SUPPORT_FALSE='#' else HAS_DROPALL_SUPPORT_TRUE='#' HAS_DROPALL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DROPALL_SUPPORT 0 _ACEOF if false; then HAS_TCL_TRUE= HAS_TCL_FALSE='#' else HAS_TCL_TRUE='#' HAS_TCL_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TCL 0 _ACEOF if false; then HAS_RDTSC_TRUE= HAS_RDTSC_FALSE='#' else HAS_RDTSC_TRUE='#' HAS_RDTSC_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RDTSC 0 _ACEOF if false; then HAS_RRCACHE_ENABLED_TRUE= HAS_RRCACHE_ENABLED_FALSE='#' else HAS_RRCACHE_ENABLED_TRUE='#' HAS_RRCACHE_ENABLED_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RRCACHE_ENABLED 0 _ACEOF requires_dnscore=1 requires_dnsdb=1 requires_dnscore=1 LDDYN="-Wl,-Bdynamic" LDSTAT="-Wl,-Bstatic" echo -n "checking if -Bstatic & -Bdynamic are supported ... " $CC -Wl,-Bstatic 2>&1|grep Bstatic > /dev/null if [ $? -eq 0 ] then echo "not supported"; LDDYN="" LDSTAT="" else echo "supported"; fi LIBS="$LDDYN $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_gethostbyname=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_gethostbyname+:} false; then : break fi done if ${ac_cv_search_gethostbyname+:} false; then : else ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 $as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_socket+:} false; then : break fi done if ${ac_cv_search_socket+:} false; then : else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi if [ $requires_tcl -eq 1 ] then echo "TCL is required by this setup ..." CFLAGS="$CFLAGS -DWITHTCLINCLUDED -I${tcl_includedir}" LDFLAGS="-L${tcl_libdir} $LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing Tcl_Main" >&5 $as_echo_n "checking for library containing Tcl_Main... " >&6; } if ${ac_cv_search_Tcl_Main+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char Tcl_Main (); int main () { return Tcl_Main (); ; return 0; } _ACEOF for ac_lib in '' ${tcl_version}; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_Tcl_Main=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_Tcl_Main+:} false; then : break fi done if ${ac_cv_search_Tcl_Main+:} false; then : else ac_cv_search_Tcl_Main=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_Tcl_Main" >&5 $as_echo "$ac_cv_search_Tcl_Main" >&6; } ac_res=$ac_cv_search_Tcl_Main if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo "could not find ${tcl_version} :: tcl_includedir=${tcl_includedir} :: tcl_libdir=${tcl_libdir}"; exit 1 fi fi if [ $requires_ssl -eq 1 ] then echo "SSL is required by this setup ..." SSLDEPS="" echo "Finding the SSL dependencies" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing deflate" >&5 $as_echo_n "checking for library containing deflate... " >&6; } if ${ac_cv_search_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflate (); int main () { return deflate (); ; return 0; } _ACEOF for ac_lib in '' z; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_deflate=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_deflate+:} false; then : break fi done if ${ac_cv_search_deflate+:} false; then : else ac_cv_search_deflate=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_deflate" >&5 $as_echo "$ac_cv_search_deflate" >&6; } ac_res=$ac_cv_search_deflate if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi echo "SSLDEPS=${SSLDEPS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SSL is available" >&5 $as_echo_n "checking if SSL is available... " >&6; } ac_check_lib_ssl=0 # Check whether --with-openssl_lib was given. if test "${with_openssl_lib+set}" = set; then : withval=$with_openssl_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LDFLAGS="-L$with_openssl_lib $SSLDEPS $LDFLAGS" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi # Check whether --with-openssl_include was given. if test "${with_openssl_include+set}" = set; then : withval=$with_openssl_include; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CFLAGS="-I$with_openssl_include $CFLAGS $CFLAGS3264" echo "CFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi # Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; echo "yes" OPENSSL="${withval}" CFLAGS="-I$with_openssl/include $CFLAGS $CFLAGS3264" LDFLAGS="-L$with_openssl/lib $SSLDEPS $LDFLAGS" echo "CFLAGS=$CFLAGS" echo "LDFLAGS=$LDFLAGS" ac_check_lib_ssl=1 else echo "no" CFLAGS="$CFLAGS $CFLAGS3264" LDFLAGS="$SSLDEPS $LDFLAGS" echo "CFLAGS=${CFLAGS}" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi if [ $ac_check_lib_ssl -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RSA_new" >&5 $as_echo_n "checking for library containing RSA_new... " >&6; } if ${ac_cv_search_RSA_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char RSA_new (); int main () { return RSA_new (); ; return 0; } _ACEOF for ac_lib in '' crypto; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_RSA_new=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_RSA_new+:} false; then : break fi done if ${ac_cv_search_RSA_new+:} false; then : else ac_cv_search_RSA_new=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RSA_new" >&5 $as_echo "$ac_cv_search_RSA_new" >&6; } ac_res=$ac_cv_search_RSA_new if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5 $as_echo_n "checking for library containing SSL_library_init... " >&6; } if ${ac_cv_search_SSL_library_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char SSL_library_init (); int main () { return SSL_library_init (); ; return 0; } _ACEOF for ac_lib in '' ssl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_SSL_library_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_SSL_library_init+:} false; then : break fi done if ${ac_cv_search_SSL_library_init+:} false; then : else ac_cv_search_SSL_library_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5 $as_echo "$ac_cv_search_SSL_library_init" >&6; } ac_res=$ac_cv_search_SSL_library_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi fi else echo "SSL is not required by this setup" fi if [ $requires_dnscore -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Core library" >&5 $as_echo_n "checking for the DNS Core library... " >&6; } # Check whether --with-dnscore was given. if test "${with_dnscore+set}" = set; then : withval=$with_dnscore; CFLAGS="-I$with_dnscore/include $CFLAGS" LDFLAGS="-L$with_dnscore/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnscore_init in -ldnscore" >&5 $as_echo_n "checking for dnscore_init in -ldnscore... " >&6; } if ${ac_cv_lib_dnscore_dnscore_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnscore $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnscore_init (); int main () { return dnscore_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnscore_dnscore_init=yes else ac_cv_lib_dnscore_dnscore_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnscore_dnscore_init" >&5 $as_echo "$ac_cv_lib_dnscore_dnscore_init" >&6; } if test "x$ac_cv_lib_dnscore_dnscore_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSCORE 1 _ACEOF LIBS="-ldnscore $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnscore ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnscore_init in -ldnscore" >&5 $as_echo_n "checking for dnscore_init in -ldnscore... " >&6; } if ${ac_cv_lib_dnscore_dnscore_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnscore $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnscore_init (); int main () { return dnscore_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnscore_dnscore_init=yes else ac_cv_lib_dnscore_dnscore_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnscore_dnscore_init" >&5 $as_echo "$ac_cv_lib_dnscore_dnscore_init" >&6; } if test "x$ac_cv_lib_dnscore_dnscore_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSCORE 1 _ACEOF LIBS="-ldnscore $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnscore/include $CFLAGS" LDFLAGS="-L../../lib/dnscore/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnscore $LDDYN" fi fi fi if [ $requires_dnsdb -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Database library" >&5 $as_echo_n "checking for the DNS Database library... " >&6; } # Check whether --with-dnsdb was given. if test "${with_dnsdb+set}" = set; then : withval=$with_dnsdb; CFLAGS="-I$with_dnsdb/include $CFLAGS" LDFLAGS="-L$with_dnsdb/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zdb_init in -ldnsdb" >&5 $as_echo_n "checking for zdb_init in -ldnsdb... " >&6; } if ${ac_cv_lib_dnsdb_zdb_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnsdb $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zdb_init (); int main () { return zdb_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnsdb_zdb_init=yes else ac_cv_lib_dnsdb_zdb_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnsdb_zdb_init" >&5 $as_echo "$ac_cv_lib_dnsdb_zdb_init" >&6; } if test "x$ac_cv_lib_dnsdb_zdb_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSDB 1 _ACEOF LIBS="-ldnsdb $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnsdb ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zdb_init in -ldnsdb" >&5 $as_echo_n "checking for zdb_init in -ldnsdb... " >&6; } if ${ac_cv_lib_dnsdb_zdb_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnsdb $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zdb_init (); int main () { return zdb_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnsdb_zdb_init=yes else ac_cv_lib_dnsdb_zdb_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnsdb_zdb_init" >&5 $as_echo "$ac_cv_lib_dnsdb_zdb_init" >&6; } if test "x$ac_cv_lib_dnsdb_zdb_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSDB 1 _ACEOF LIBS="-ldnsdb $LIBS" else exit fi else echo "embedded" CFLAGS="-I${srcdir}/../../lib/dnsdb/include $CFLAGS" LDFLAGS="-L../../lib/dnsdb/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnsdb $LDDYN" fi fi fi if [ $requires_dnszone -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Zone library" >&5 $as_echo_n "checking for the DNS Zone library... " >&6; } # Check whether --with-dnszone was given. if test "${with_dnszone+set}" = set; then : withval=$with_dnszone; CFLAGS="-I$with_dnszone/include $CFLAGS" LDFLAGS="-L$with_dnszone/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnszone_init in -ldnszone" >&5 $as_echo_n "checking for dnszone_init in -ldnszone... " >&6; } if ${ac_cv_lib_dnszone_dnszone_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnszone $LDSTAT -ldnsdb -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnszone_init (); int main () { return dnszone_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnszone_dnszone_init=yes else ac_cv_lib_dnszone_dnszone_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnszone_dnszone_init" >&5 $as_echo "$ac_cv_lib_dnszone_dnszone_init" >&6; } if test "x$ac_cv_lib_dnszone_dnszone_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSZONE 1 _ACEOF LIBS="-ldnszone $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnszone ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnszone_init in -ldnszone" >&5 $as_echo_n "checking for dnszone_init in -ldnszone... " >&6; } if ${ac_cv_lib_dnszone_dnszone_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnszone $LDSTAT -ldnsdb -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnszone_init (); int main () { return dnszone_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnszone_dnszone_init=yes else ac_cv_lib_dnszone_dnszone_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnszone_dnszone_init" >&5 $as_echo "$ac_cv_lib_dnszone_dnszone_init" >&6; } if test "x$ac_cv_lib_dnszone_dnszone_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSZONE 1 _ACEOF LIBS="-ldnszone $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnszone/include $CFLAGS" LDFLAGS="-L../../lib/dnszone/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnszone $LDDYN" fi fi fi if [ $requires_dnslg -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Looking Glass library" >&5 $as_echo_n "checking for the DNS Looking Glass library... " >&6; } # Check whether --with-dnslg was given. if test "${with_dnslg+set}" = set; then : withval=$with_dnslg; CFLAGS="-I$with_dnslg/include $CFLAGS" LDFLAGS="-L$with_dnslg/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnslg_init in -ldnslg" >&5 $as_echo_n "checking for dnslg_init in -ldnslg... " >&6; } if ${ac_cv_lib_dnslg_dnslg_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnslg $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnslg_init (); int main () { return dnslg_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnslg_dnslg_init=yes else ac_cv_lib_dnslg_dnslg_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnslg_dnslg_init" >&5 $as_echo "$ac_cv_lib_dnslg_dnslg_init" >&6; } if test "x$ac_cv_lib_dnslg_dnslg_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSLG 1 _ACEOF LIBS="-ldnslg $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnslg ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnslg_init in -ldnslg" >&5 $as_echo_n "checking for dnslg_init in -ldnslg... " >&6; } if ${ac_cv_lib_dnslg_dnslg_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnslg $LDSTAT -ldnscore $LDDYN $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnslg_init (); int main () { return dnslg_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnslg_dnslg_init=yes else ac_cv_lib_dnslg_dnslg_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnslg_dnslg_init" >&5 $as_echo "$ac_cv_lib_dnslg_dnslg_init" >&6; } if test "x$ac_cv_lib_dnslg_dnslg_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSLG 1 _ACEOF LIBS="-ldnslg $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnslg/include $CFLAGS" LDFLAGS="-L../../lib/dnslg/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnslg $LDDYN" fi fi fi LDFLAGS="$LDFLAGS $LDDYN" LIBS="$LDDYN $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LTO has been enabled" >&5 $as_echo_n "checking if LTO has been enabled... " >&6; } # Check whether --enable-lto was given. if test "${enable_lto+set}" = set; then : enableval=$enable_lto; enable_lto=yes else enable_lto=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lto" >&5 $as_echo "$enable_lto" >&6; } case "$enable_lto" in yes) type -p gold if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: 'gold' not found" >&5 $as_echo "WARNING: 'gold' not found" >&6; } sleep 1 fi if [ ! "$LD" = "" ] then $LD -v |grep -i gold > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: LTO enabled but LD ($LD) is not gold" >&5 $as_echo "WARNING: LTO enabled but LD ($LD) is not gold" >&6; } sleep 1 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: LD not defined" >&5 $as_echo "LD not defined" >&6; } fi if true; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; no|*) if false; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; esac CPPFLAGS="$CPPFLAGS -DDNSZONE_BUILD" for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done done # Provide a safe default value. : "${ac_cv_func_select_args=int,int *,struct timeval *}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG1 $1 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in bzero memset select socket do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_SA_LEN_TRUE}" && test -z "${HAS_SOCKADDR_SA_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_SA_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN_SIN_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN_SIN_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN_SIN_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN6_SIN6_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DNSSEC_SUPPORT_TRUE}" && test -z "${HAS_DNSSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DNSSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC3_SUPPORT_TRUE}" && test -z "${HAS_NSEC3_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC3_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC_SUPPORT_TRUE}" && test -z "${HAS_NSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MIRROR_SUPPORT_TRUE}" && test -z "${HAS_MIRROR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MIRROR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DROPALL_SUPPORT_TRUE}" && test -z "${HAS_DROPALL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DROPALL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TCL_TRUE}" && test -z "${HAS_TCL_FALSE}"; then as_fn_error $? "conditional \"HAS_TCL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RDTSC_TRUE}" && test -z "${HAS_RDTSC_FALSE}"; then as_fn_error $? "conditional \"HAS_RDTSC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRCACHE_ENABLED_TRUE}" && test -z "${HAS_RRCACHE_ENABLED_FALSE}"; then as_fn_error $? "conditional \"HAS_RRCACHE_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by dnszone $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ dnszone config.status 2.1.6-5826 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "include/dnszone/dnszone-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/dnszone/dnszone-config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi make buildinfo.h echo echo "SUMMARY for DNSZONE:" echo "--------------------" echo echo "CC .................................. : $CC" echo "LD .................................. : $LD" echo "AR .................................. : $AR" echo "CFLAGS .............................. : $CFLAGS" echo "CPPFLAGS ............................ : $CPPFLAGS" echo "LDFLAGS ............................. : $LDFLAGS" echo "LIBS ................................ : $LIBS" if [ ! "${OPENSSL}" = "" ] then echo "Using OpenSLL from .................. : ${OPENSSL}" fi echo echo "Install prefix ...................... : $prefix" echo "Install sysconf ..................... : $sysconfdir" echo echo echo "DNSZONE DONE" echo "------------" echo yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/missing0000644000077100007710000000013212473710127020161 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597652.855344534 yadifa-2.1.6-5826/lib/dnszone/missing0000755000077100007710000001533012473710127017772 0ustar00yadifayadifa00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 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, 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/COPYING0000644000077100007710000000012412650131756017623 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.128344 30 ctime=1454597652.812344534 yadifa-2.1.6-5826/lib/dnszone/COPYING0000664000077100007710000000312012650131756017424 0ustar00yadifayadifa00000000000000 Copyright (c) 2011-2016, EURid. All rights reserved. The YADIFA TM software product is provided under the BSD 3-clause license: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of EURid nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/README0000644000077100007710000000012412654656702017457 xustar000000000000000027 mtime=1454595522.700671 27 atime=1454597464.134344 30 ctime=1454597652.826344534 yadifa-2.1.6-5826/lib/dnszone/README0000664000077100007710000005773012654656702017300 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ 20160126: YADIFA 2.1.6 Fixes: - fixed an issue where the referral would not be measured for UDP on a optimised build. 20160108: YADIFA 2.1.5 Dynamic updates do not use temporary files anymore which improves their general performance. The statistics now shows the referrals. Fixes: - fixed an issue where getting a huge incremental transfer would prevent the server from answering queries while applying the changes. - fixed an issue serving IXFR that would occur when a incremental change step was bigger than 64KB - fixed an issue for Solaris with the memory alignment fix not active everywhere - fixed an issue on the Solaris build settings - fixed an issue where sometimes yadifad would not find a configuration file given as a parameter with a relative path - fixed an issue where a wild-card would not be properly returned with an AXFR - fixed an issue where dynamically updating a zone at a speed such that the zone file would need to be written multiple times on disk before finishing the previous write could lead to a deadlock 20151026: YADIFA 2.1.4 The zone reader error reporting has been improved. Stacktrace support added for Solaris. Known issue: - Adding and or removing NSEC3PARAM dynamically is not properly handled. Fixes: - fixed an issue where an NSEC3 answer proving a * query would lead to a crash - fixed an issue where a private key may be not recognised as such - fixed an issue where dynamic update prerequisite check would fail a valid match - fixed an issue where zone signature maintenance would only start if all private keys were available. 20150821: YADIFA 2.1.3 Fixes: - fixed an issue that could lead to a crash at startup - fixed an issue where parsing a TYPE#### record would stop the parser prematurely 20150814: YADIFA 2.1.2 The ./configure script has a new option: --enable-full-ascii7 This changes the behaviour of DNS name validation to accept all the ASCII7 characters instead of only the DNS-space ones. Enabling this option is not recommended. Fixes: - fixes an issue where the hmac-shaX identification string sent with a TSIG had the suffix ".sig-alg.reg.int". 20150714: YADIFA 2.1.1 The yadifa command line has a new option: --config|-c file : read the specific configuration file instead of ~/.yadifa.rc Issues detected on the NSEC3 database have now been upgraded from debug to info/warning Fixes: - fixed an issue where, on some cases; the garbage collector for the zones was not triggering for a long time. - fixed an issue in the Makefile (courtesy of DENIC) - fixed an issue where a few bytes could be leaked in some rare cases when failing to unload a zone - fixed an issue in RRL where some values of IPv6 prefix - fixed an issue accepting some answers on IXFR transfers 20150424: YADIFA 2.1.0 New journal file format: This new format addresses a few issues like having maximum journal file and a relatively constant random access time even for very big sizes. The internal messaging queue has been changed to address huge amount of zones. New CHaos queries supported: hostname id.server Known issues: _ building successfully with LTO may require to append both AR=gcc-ar and RANLIB=gcc-ranlib to the ./configure command 20150403: YADIFA 2.0.6 This release is a public release. This minor update's sole purpose is to fix YADIFA builds on OpenBSD. Fixes: - fixed a crash that could occur while sending a massive amount of notifications - OpenBSD builds are fixed. Tested on: OpenBSD 5.6 amd64, standard installation. Configure: ./configure Tested on: OpenBSD 5.6 amd64, with gcc 4.9 installed. Configure: ./configure CC=egcc 20150226: YADIFA 2.0.5 This release is a public release. Fixes: - fixed an issue with huge IXFR transfers as a master - fixed an issue with notifications on slave-slave-master setup - fixed an issue with a potential infinite loop loading an AXFR from a master - fixed missing hmac-sha* from configuration - fixed an issue with TLSA records parsing - fixed an issue with base 16 encoding - fixed an issue parsing * domains - fixed an issue with some RRL motivated answers - increased the maximum number of network interfaces from 5 to 16 - fixed an error in the configuration examples where "statistics" was used instead of "stats" - minor fixes and improvements 20141216: YADIFA 2.0.4 This release is a public release. By popular demand, the default log file directory is now PREFIX/var/log/yadifa. It can be set using --with-logdir=/my/dir Improved build mechanism. It has been tested to work automatically on Linux, FreeBSD, OSX, SunOS. RedHat family builds will use -O2 as maximum optimisations. Note that some optional features are now enabled by default but can be disabled. Fixes: - fixed an issue with the AXFR transfer where the serial number would not be properly taken into account - fixed an issue with the notify mechanism that could occur if the server was only listening to 127.0.0.1 - fixed an issue with bogus DNSKEY records that may potentially lead to a crash in openssl - fixed a reported potential "tmpfile" vulnerability on DEBUG builds (generated with make debug) - fixed an issue with IPv6 connections on some architectures - typos fixes - minor fixes and improvements 20141104: Architecture portability enhancements. On Solaris, if no --enable-force32bits nor --enable-force64bits is set, then 64 bits will be forced (fixes an issue at link-time) ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC3 Extensions Required, dynamically linked, not stripped, no debugging information available PATH=/opt/csw/bin:/usr/ccs/bin:$PATH ./configure --enable-force32bits PATH=/opt/csw/bin:/usr/ccs/bin:$PATH make 20141030: Architecture portability enhancements. FreeBSD 9 FreeBSD dnode3 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 gcc (GCC) 4.2.1 20070831 patched [FreeBSD] ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900044), not stripped Ubuntu Linux dnode10 3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xe3b8601b9b5e59f8c9ce519cacbe9b8ff544ff1d, not stripped OSX Darwin RD-Mac-Mini.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Mach-O 64-bit executable x86_64 20141029: Architecture portability enhancements. uname -a gcc --version file yadifad YellowDog Linux Linux 2.6.29-3.ydl61.4 #1 SMP Mon Sep 7 14:50:27 PDT 2009 ppc64 ppc64 ppc64 GNU/Linux gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available Debian PPC64 Linux 3.2.0-3-powerpc64 #1 SMP Mon Jul 23 08:03:56 UTC 2012 ppc64 GNU/Linux gcc (Debian 4.6.3-8) 4.6.3 ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xedc47c984a4af7eb9a7ecbc0f135e4d064ba08f0, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available 20141016: YADIFA 2.0.2 TCP fallback support on truncation 20140905: YADIFA 2.0.0 This release is a public release Fixes: - fixed a log incorrectly reporting an error when the client didn't close the TCP connection fast enough - fixed an issue with the statistics on TCP queries Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140829: YADIFA 2.0.0-beta3-public This release is a public release - --disable-master feature at configure now builds a slave-only server Fixes: - fixed an issue with TSIG signed queries - fixed an issue with thread pool live resizing - fixed an issue where reading an undeleted obsolete journal ending at the start of a newly transferred zone from the master would incorrectly trigger an error Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140630: YADIFA 2.0.0-beta2-public This release is a public release - basepath disabled - pidpath removed, only pidfile remains - log reopen notification is now timestamped - slave zones no longer complain about missing NSEC/NSEC3 private keys - the error code ZRE_FILE_NOT_FOUND has been replaced by the more accurate code ZRE_NO_VALID_FILE_FOUND - default logging settings no longer output debug Fixes: - fixed issue in flag computation (AD,CD) - fixed an issue with journal truncation sometimes leading to a crash - zone parsing now correctly accepts '#' as a comment marker - zone parsing now rejects wrong fqdn as soon as it reads them, leading to a more accurate error message - removing the last dnskey of a zone no longer crashes the server Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. yadifa remote client commands prototype is now available with the following supported commands: -shutdown shuts down yadifa e.g. ./yadifa -s "192.0.2.1 port 53" -t shutdown -cfgreload reloads the and sections of the yadifad configuration e.g. ./yadifa -s "192.0.2.1 port 53" -t cfgreload -logreopen closes and reopen the log files e.g. ./yadifa -s "192.0.2.1 port 53" -t logreopen -freezeall prevents all zones from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freezeall -freeze prevents a zone from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freeze -q somedomain.eu -unfreezeall enables updates of all zones again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreezeall -unfreeze enables updates of a zone again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreeze -q somedomain.eu In order to work, the allow-control ACL must be defined either in
for the global commands and may also be defined in for the ones targeting a specific zone. e.g. allow-control 127.0.0.1 Note that tsig is not supported in the client yet. 20140528: YADIFA 2.0.0-beta1-public This release is a public release - NSID implemented (enabled at ./configure time with --enable-nsid - generic parser for: - getops - zone file - resolv.conf - configuration - '@' can now be used in a zone file - new binary for controlling 'yadifad' (yadifa) - framework is rewritten for multi core systems - single core server has been removed Fixes: - fixed several minor issues Know issues: - removing all dnskeys from a zone file crashes the server - yadifa has some issues with nodelay, nocork 20130424: YADIFA 1.1.0 _ added DSA signature _ added SHA-256 SHA-384 SHA-512 digest algorithms _ now supports additional DNSSEC algorithms: DSASHA1 DSASHA1_NSEC3 RSASHA256_NSEC3 RSASHA512_NSEC3 _ Respone Rate Limitation implemented (enabled at ./configure time with --enable-rrl) _ --enable-tiny-footprint now reduces the memory usage further by reducing the standard log queue from 2^20 to 2^12 entries _ the general speed has been slightly improved _ dynamic updates pending for more than 3 seconds are now dropped with an error _ dynamic provisioning Fixes: _ fixed a memory leak that could occur at NSEC3 generation when loading the zone failed in a particular way _ fixed a memory leak at ixfr send _ fixed handling of '_' character that was improperly stored in the database _ fixed bandwidth limit settings (tcp stream in and out) not always being taken from the configuration _ fixed TSIG answer verification for notifies _ fixed error codes not being registered and thus logged as unknown hexadecimal error code. _ other minor fixes 20130612: YADIFA 1.0.3 Fixes only (backports from 1.1.0) Fixes: _ fixed an issue preventing YADIFA from being build from another directory _ fixed an issue with OSX systems where gsed has to be used instead of sed _ fixed an issue with the '_' character not being properly handled _ fixed an issue where reading MX record from a zone file would incorrecly be rejected as invalid _ fixed an issue where the OPT record would not be properly written _ fixed an issue where an undefined ACL reference would be silently ignored _ fixed missing code tags for several error codes. From now on unregistered codes are dumped in hexadicimal. _ fixed portability issues with BSD and OSX _ fixed several minor issues 20120921: YADIFA 1.0.2 Fixes only Fixes: _ fixed an issue where the journal file was sometimes not properly closed at the end of a task _ fixed an issue where the TCP usage slots would sometimes wrongly return that they were all being used _ fixed an issue on IXFR processing (slave side) where the type of answer from the master would not be properly detected _ fixed an issue with TSIG on secrets not exactly 16 bytes long (binary form) _ fixed an issue on 32 bits architectures where the sig-validity-* fields would not be properly handled if not set on each zone section. _ slightly improved the replay time of big journal files _ fixed several minor issues Known issues: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120709: YADIFA 1.0.1 _ logging repeat compression is now by channel instead of global Fixes: _ fixed an issue where glibc whould assert if libgcc_s.so (libgcc_s.so.1) and libc.so (libc.so.6) where not available inside the chrooted directory of YADIFA _ fixed an issue in the syslog module Known issues: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120625: YADIFA 1.0.0 _ LTO support can be enabled with --enable-lto but this is not working with clang. LTO does not increase the performance significally _ parallel processing of listening addresses can now be enabled. It can be set using thread-count-by-address in the
section. By default YADIFA will not use parallel processing as this feature has not been as thoroughly tested as the single-thread processing model _ default parameters tuning _ fixes Known issue: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 20120530: YADIFA 1.0.0RC3 _ the configuration parser now ignores undefined logger names and report them with a warning _ syslog messages are now put in the name of "yadifad" instead of the name used for the "syslog" channel _ syslog messages do not print the time from YADIFA anymore _ improved the steps involved in loading a locally cached slave zone _ zones are now loaded in background _ man page yadifad-conf.man5 renamed into yadifad.conf.man5 Fixes: _ AXFR/IXFR answers with the RA bit set are nolonger rejected as invalid _ YADIFA now answers to SIGINT again (shutdown) _ fixed an issue where obsolete AXFR files were not always being deleted _ fixed an issue occurring when both IPv4 and IPv6 were available to handle a notify _ fixed journal replay issue where some RRSIGs records were not properly removed _ fixed an issue occurring with IPv6 queries _ fixed an issue in the generation of a specific NSEC3 error answer _ fixed named query style layout Known issue: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120328: YADIFA 1.0.0RC2 _ fixed logging issue on work file creation error _ fixed an issue where IXFR queries could be rejected as being wrongly formatted _ fixed an issue in the query logging text _ enabled command line options ( -u uid -g gid -d ) 20120319: YADIFA 1.0.0RC1 Is a full functional authoritative name server: - works as primary or secondary name server - AXFR - IXFR - NOTIFY - NSUPDATE - TSIG - CLASSES: - IN - CH (just for version) - TYPES: - AAAA - CNAME - DNSKEY - DS - HINFO - MX - NAPTR - NS - NSEC3 - NSEC3PARAM - NSEC - PTR - RRSIG - SOA - SRV - SSHFP - TXT - Automatic resigning - DNSSEC algorithms: - 5 (RSASHA1) - 7 (RSASHA1-NSEC3 - ACL's KNOWN ISSUES: NSEC3: _ cannot work with multiple NSEC3PARAM chains with mixed OPT-IN/OUT settings _ adding a new NSEC3 chain expects that the master sends the NSEC3PARAM first (it does not seems to be always the case) We have a case where a master starts with 2 thousands NSEC3 opt-out records then adds 6 millions NSEC3 opt-in records but does not give the NSEC3PARAM record first. The slave server rejects them all because it's unable to link them to a chain. (This one has high priority) DNSSEC: _ it is not allowed to change the zone security mode (unsecure, NSEC, or NSEC3). Once the zone is loaded it keeps its security mode. _ dynamic updates of NSEC as well as NSEC3 records are refused QUIT: the server will shutdown on the following conditions: _ detection of an impossible situation or an internal integrity issue (ie: for any reason the SOA has vanished from a zone) _ memory limit reached which prevents any more work _ ipc issue which prevent internal services communication ACL: _ since the access control is set by zone and CHAOS class is not implemented as a configurable zone, it is not possible (yet) to specifically block CHAOS queries. 20111121: YADIFA 0.5.5 - many fixes KNOWN ISSUE: NSEC3 slave zone replay fails. 20110706: YADIFA 0.5.0 - slave mode, AXFR/IXFR (no TSIG yet for the slave-side transfer) - answers to a notify from the master - polls the (first) master on the masters list - maintains the .axfr & .ix files (deletes the obsoletes ones) - TSIG queries are checked - Replays the zone journal on startup after the zone load (journaling) - Answers IXFR queries (journaling) 20110601: YADIFA 0.4.0 Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries with TSIG - nsupdate functionality (journaling) - TSIG on client server side will be transmitted, but not checked - ACL works - The zone has SOA, NS A resource records. 20110524: YADIFA 0.3.0 First release internally of yadifad 20110524115500 GMT+1. Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries - The zone has SOA, NS A resource records. 20091224: YADIFA 0.2.0 _ Answers AXFR queries _ ACL based on IP and TSIG (not all query types are ACL'ed yet) 20091104: YADIFA 0.1.0 YADIFA is a work in progress. The main goal is to have an alternative for BIND or NSD. Version 0.1.0 is an authoritative server only. It has no: - AXFR/IXFR functionality - dynupdate - support for NSEC - support for NSEC3 - caching mechanism - additional tools (eg.dig, dnssectools, drill,...) It has: - a very fast way to give authoritative answer - a very fast method for loading the database and checking the zone files This first release is to have a feeling how it works in an operational environment. TODO Everything what is not implemented, has to be implemented. Most of the code is there, but is not activated. No comformity tests has been done. (This of course is on the todo list) Bug Reports and Mailing Lists Bugs reports should be sent to bugreport@yadifa.eu yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/include0000644000077100007710000000013212654663024020137 xustar000000000000000030 mtime=1454597652.739344534 30 atime=1454597652.738344534 30 ctime=1454597652.739344534 yadifa-2.1.6-5826/lib/dnszone/include/0000775000077100007710000000000012654663024020022 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnszone/include/PaxHeaders.8028/dnszone0000644000077100007710000000013212654663024021617 xustar000000000000000030 mtime=1454597652.805344534 30 atime=1454597652.739344534 30 ctime=1454597652.805344534 yadifa-2.1.6-5826/lib/dnszone/include/dnszone/0000775000077100007710000000000012654663024021502 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnszone/include/dnszone/PaxHeaders.8028/dnszone.h0000644000077100007710000000012412650131756023524 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.111344 30 ctime=1454597652.784344534 yadifa-2.1.6-5826/lib/dnszone/include/dnszone/dnszone.h0000664000077100007710000000600512650131756023332 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnszone Zone loader modules * * @brief Zone loader modules * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef __DNSZONE_H__ #define __DNSZONE_H__ #include #include #include #ifdef __cplusplus extern "C" { #endif /** * This is supposed to help with huge amounts of file read only once ... except it does not really work (not always). * */ #define DNSDB_USE_POSIX_ADVISE 1 #define ZONEREAD_ERROR_BASE 0x800a0000 #define ZONEREAD_ERROR_CODE(code_) ((s32)(ZONEREAD_ERROR_BASE+(code_))) #define ZRE_AXFR_FILE_NOT_FOUND ZONEREAD_ERROR_CODE( 1) #define ZRE_NO_VALID_FILE_FOUND ZONEREAD_ERROR_CODE( 2) /* * This fingerprint feature has been added so libraries could check they are compatible */ dnslib_fingerprint dnszone_getfingerprint(); u32 dnszone_fingerprint_mask(); ya_result dnszone_init(); #ifdef __cplusplus } #endif #endif /* __DNSZONE_H__ */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnszone/include/dnszone/PaxHeaders.8028/dnszone-config-features.h0000644000077100007710000000013212654663024026604 xustar000000000000000030 mtime=1454597652.701344534 30 atime=1454597652.667344534 30 ctime=1454597652.780344534 yadifa-2.1.6-5826/lib/dnszone/include/dnszone/dnszone-config-features.h0000664000077100007710000000017012654663024026410 0ustar00yadifayadifa00000000000000#pragma once // version 2.1.6.0-0 #define DNSZONE_VERSION 0x020106000000LL// include/dnszone/dnszone-config-features.h yadifa-2.1.6-5826/lib/dnszone/include/dnszone/PaxHeaders.8028/dnszone-config.h0000644000077100007710000000013212654662740024774 xustar000000000000000030 mtime=1454597600.244344535 30 atime=1454597600.239344535 30 ctime=1454597652.787344534 yadifa-2.1.6-5826/lib/dnszone/include/dnszone/dnszone-config.h0000664000077100007710000002361012654662740024604 0ustar00yadifayadifa00000000000000/* include/dnszone/dnszone-config.h. Generated from dnszone-config.h.in by configure. */ /* include/dnszone/dnszone-config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ /* number of harware core if the auto-detect fails */ #define DEFAULT_ASSUMED_CPU_COUNT 2 /* always on */ #define HAS_ACL_SUPPORT 1 /* bfd debug support disabled. */ #define HAS_BFD_DEBUG_SUPPORT 0 /* i386, Athlon, Opteron, Core2, i3, i5, i7, ... */ #define HAS_CPU_AMDINTEL 1 /* T1000 has a Niagara cpu */ /* #undef HAS_CPU_NIAGARA */ /* remote control disabled. */ #define HAS_CTRL 0 /* dynamic provisioning disabled. */ #define HAS_CTRL_DYNAMIC_PROVISIONING 0 /* always on */ #define HAS_DNSSEC_SUPPORT 1 /* always off */ #define HAS_DROPALL_SUPPORT 0 /* dynamic update support disabled. */ #define HAS_DYNUPDATE_SUPPORT 1 /* YADIFA will now accept ASCII7 characters in DNS names (not recommended) disabled. */ #define HAS_FULL_ASCII7 0 /* where to put the log files */ #define HAS_LOGDIR 0 /* write the pid in each line of log disabled. */ #define HAS_LOG_PID_ALWAYS_ON 0 /* write the thread id in each line of log disabled. */ #define HAS_LOG_THREAD_ID_ALWAYS_ON 0 /* malloc debug support disabled. */ #define HAS_MALLOC_DEBUG_SUPPORT 0 /* DNS master disabled. */ #define HAS_MASTER_SUPPORT 1 /* Define this to enable slow but safe unaligned memory accesses */ #define HAS_MEMALIGN_ISSUES 0 /* use messages instead of send (needed if you use more than one IP aliased on the same network interface) disabled. */ #define HAS_MESSAGES_SUPPORT 0 /* always off */ #define HAS_MIRROR_SUPPORT 0 /* mutex debug support disabled. */ #define HAS_MUTEX_DEBUG_SUPPORT 0 /* Allows AXFR answer from master without AA bit set (Microsoft DNS) disabled. */ #define HAS_NON_AA_AXFR_SUPPORT 0 /* always on */ #define HAS_NSEC3_SUPPORT 1 /* always on */ #define HAS_NSEC_SUPPORT 1 /* NSID support disabled. */ #define HAS_NSID_SUPPORT 1 /* The system supports thread names */ #define HAS_PTHREAD_SETNAME_NP 1 /* The system supports spinlocks */ #define HAS_PTHREAD_SPINLOCK 1 /* always off */ #define HAS_RDTSC 0 /* always off */ #define HAS_RRCACHE_ENABLED 0 /* DNS Response Rate Limiter disabled. */ #define HAS_RRL_SUPPORT 1 /* RRSIG verification and generation for zones disabled. */ #define HAS_RRSIG_MANAGEMENT_SUPPORT 1 /* The sockaddr_in6 struct has an sin6_len field */ #define HAS_SOCKADDR_IN6_SIN6_LEN 0 /* The sockaddr_in struct has an sin_len field */ #define HAS_SOCKADDR_IN_SIN_LEN 0 /* The sockaddr struct has an sa_len field */ #define HAS_SOCKADDR_SA_LEN 0 /* always off */ #define HAS_TCL 0 /* always on */ #define HAS_TSIG_SUPPORT 1 /* where to put the log files */ /* #undef HAS_WITH_LOGDIR */ /* zalloc debug support disabled. */ #define HAS_ZALLOC_DEBUG_SUPPORT 0 /* zalloc statistics support disabled. */ #define HAS_ZALLOC_STATISTICS_SUPPORT 0 /* zalloc memory system disabled. */ #define HAS_ZALLOC_SUPPORT 1 /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 /* Define to 1 if you have the header file. */ #define HAVE_BYTESWAP_H 1 /* Define to 1 if you have the `bzero' function. */ /* #undef HAVE_BZERO */ /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_ENDIAN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the `fork' function. */ /* #undef HAVE_FORK */ /* Define to 1 if you have the header file. */ /* #undef HAVE_I386_LIMITS_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_I386_TYPES_H */ /* Define to 1 if the system has the type `int64_t'. */ #define HAVE_INT64_T 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `c' library (-lc). */ #define HAVE_LIBC 1 /* Define to 1 if you have the `dnscore' library (-ldnscore). */ /* #undef HAVE_LIBDNSCORE */ /* Define to 1 if you have the `dnsdb' library (-ldnsdb). */ /* #undef HAVE_LIBDNSDB */ /* Define to 1 if you have the `dnslg' library (-ldnslg). */ /* #undef HAVE_LIBDNSLG */ /* Define to 1 if you have the `dnszone' library (-ldnszone). */ /* #undef HAVE_LIBDNSZONE */ /* Define to 1 if you have the `pthread' library (-lpthread). */ #define HAVE_LIBPTHREAD 1 /* Define to 1 if you have the header file. */ #define HAVE_LINUX_LIMITS_H 1 /* Define to 1 if the system has the type `long long'. */ #define HAVE_LONG_LONG 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_ENDIAN_H */ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ /* #undef HAVE_MEMSET */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NETINET6_IN6_H */ /* Define to 1 if you have the header file. */ #define HAVE_NETINET_IN_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_PPC_LIMITS_H */ /* Define to 1 if you have the header file. */ #define HAVE_PTHREAD_H 1 /* Define to 1 if you have the `select' function. */ /* #undef HAVE_SELECT */ /* Define to 1 if you have the `socket' function. */ /* #undef HAVE_SOCKET */ /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #define HAVE_STAT_EMPTY_STRING_BUG 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDIO_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYSLOG_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_BYTEORDER_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_ENDIAN_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_SELECT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SYSLIMITS_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if the system has the type `uint64_t'. */ #define HAVE_UINT64_T 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if the system has the type `u_char'. */ #define HAVE_U_CHAR 1 /* Define to 1 if you have the `vfork' function. */ /* #undef HAVE_VFORK */ /* Define to 1 if you have the header file. */ /* #undef HAVE_VFORK_H */ /* Define to 1 if `fork' works. */ /* #undef HAVE_WORKING_FORK */ /* Define to 1 if `vfork' works. */ /* #undef HAVE_WORKING_VFORK */ /* BSD */ #define IS_BSD_FAMILY 0 /* OSX */ #define IS_DARWIN_OS 0 /* LINUX */ #define IS_LINUX_FAMILY 1 /* SOLARIS */ #define IS_SOLARIS_FAMILY 0 /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ /* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Name of package */ #define PACKAGE "dnszone" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "bugreport@yadifa.eu" /* Define to the full name of this package. */ #define PACKAGE_NAME "dnszone" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "dnszone 2.1.6-5826" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "dnszone" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ #define PACKAGE_VERSION "2.1.6-5826" /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* Define to the type of arg 1 for `select'. */ #define SELECT_TYPE_ARG1 int /* Define to the type of args 2, 3 and 4 for `select'. */ #define SELECT_TYPE_ARG234 (fd_set *) /* Define to the type of arg 5 for `select'. */ #define SELECT_TYPE_ARG5 (struct timeval *) /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ #define VERSION "2.1.6-5826" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN /* # undef WORDS_BIGENDIAN */ # endif #endif /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `int' if does not define. */ /* #undef mode_t */ /* Define to `int' if does not define. */ /* #undef pid_t */ /* Define to `unsigned int' if does not define. */ /* #undef size_t */ /* Define as `fork' if `vfork' does not work. */ #define vfork fork #ifdef DEBUG #define DPRINTF(p) printf p #else #define DPRINTF(p) /* nothing */ #endif /* DEBUG */ yadifa-2.1.6-5826/lib/dnszone/include/dnszone/PaxHeaders.8028/hints_file_reader.h0000644000077100007710000000012412650131756025512 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.111344 30 ctime=1454597652.798344534 yadifa-2.1.6-5826/lib/dnszone/include/dnszone/hints_file_reader.h0000664000077100007710000000550712650131756025326 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup hintsfile Zone file loader module * @ingroup dnshints * @brief Zone file loader module * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef HINTS_FILE_READER_H_ #define HINTS_FILE_READER_H_ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include /* ------------------------------------------------------------ * * PROTOTYPES */ /** @brief Opens a hints file * * Opens a hints file * * @param[in] fullpath the path and name of the file to open * @param[out] hints a pointer to a structure that will be used by the function * to hold the hints-file information * * @return A result code * @retval OK : the file has been opened successfully * @retval else : an error occurred */ ya_result hints_file_reader_open(const char* fullpath, zone_reader *dst); #endif /* ------------------------------------------------------------ */ /** * @} */ yadifa-2.1.6-5826/lib/dnszone/include/dnszone/PaxHeaders.8028/dnszone-config.h.in0000644000077100007710000000013212654662612025377 xustar000000000000000030 mtime=1454597514.539344534 30 atime=1454597514.538344534 30 ctime=1454597652.805344534 yadifa-2.1.6-5826/lib/dnszone/include/dnszone/dnszone-config.h.in0000664000077100007710000002235112654662612025210 0ustar00yadifayadifa00000000000000/* include/dnszone/dnszone-config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* number of harware core if the auto-detect fails */ #undef DEFAULT_ASSUMED_CPU_COUNT /* always on */ #undef HAS_ACL_SUPPORT /* bfd debug support disabled. */ #undef HAS_BFD_DEBUG_SUPPORT /* i386, Athlon, Opteron, Core2, i3, i5, i7, ... */ #undef HAS_CPU_AMDINTEL /* T1000 has a Niagara cpu */ #undef HAS_CPU_NIAGARA /* remote control disabled. */ #undef HAS_CTRL /* dynamic provisioning disabled. */ #undef HAS_CTRL_DYNAMIC_PROVISIONING /* always on */ #undef HAS_DNSSEC_SUPPORT /* always off */ #undef HAS_DROPALL_SUPPORT /* dynamic update support disabled. */ #undef HAS_DYNUPDATE_SUPPORT /* YADIFA will now accept ASCII7 characters in DNS names (not recommended) disabled. */ #undef HAS_FULL_ASCII7 /* where to put the log files */ #undef HAS_LOGDIR /* write the pid in each line of log disabled. */ #undef HAS_LOG_PID_ALWAYS_ON /* write the thread id in each line of log disabled. */ #undef HAS_LOG_THREAD_ID_ALWAYS_ON /* malloc debug support disabled. */ #undef HAS_MALLOC_DEBUG_SUPPORT /* DNS master disabled. */ #undef HAS_MASTER_SUPPORT /* Define this to enable slow but safe unaligned memory accesses */ #undef HAS_MEMALIGN_ISSUES /* use messages instead of send (needed if you use more than one IP aliased on the same network interface) disabled. */ #undef HAS_MESSAGES_SUPPORT /* always off */ #undef HAS_MIRROR_SUPPORT /* mutex debug support disabled. */ #undef HAS_MUTEX_DEBUG_SUPPORT /* Allows AXFR answer from master without AA bit set (Microsoft DNS) disabled. */ #undef HAS_NON_AA_AXFR_SUPPORT /* always on */ #undef HAS_NSEC3_SUPPORT /* always on */ #undef HAS_NSEC_SUPPORT /* NSID support disabled. */ #undef HAS_NSID_SUPPORT /* The system supports thread names */ #undef HAS_PTHREAD_SETNAME_NP /* The system supports spinlocks */ #undef HAS_PTHREAD_SPINLOCK /* always off */ #undef HAS_RDTSC /* always off */ #undef HAS_RRCACHE_ENABLED /* DNS Response Rate Limiter disabled. */ #undef HAS_RRL_SUPPORT /* RRSIG verification and generation for zones disabled. */ #undef HAS_RRSIG_MANAGEMENT_SUPPORT /* The sockaddr_in6 struct has an sin6_len field */ #undef HAS_SOCKADDR_IN6_SIN6_LEN /* The sockaddr_in struct has an sin_len field */ #undef HAS_SOCKADDR_IN_SIN_LEN /* The sockaddr struct has an sa_len field */ #undef HAS_SOCKADDR_SA_LEN /* always off */ #undef HAS_TCL /* always on */ #undef HAS_TSIG_SUPPORT /* where to put the log files */ #undef HAS_WITH_LOGDIR /* zalloc debug support disabled. */ #undef HAS_ZALLOC_DEBUG_SUPPORT /* zalloc statistics support disabled. */ #undef HAS_ZALLOC_STATISTICS_SUPPORT /* zalloc memory system disabled. */ #undef HAS_ZALLOC_SUPPORT /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_BYTESWAP_H /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the header file. */ #undef HAVE_I386_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_I386_TYPES_H /* Define to 1 if the system has the type `int64_t'. */ #undef HAVE_INT64_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `c' library (-lc). */ #undef HAVE_LIBC /* Define to 1 if you have the `dnscore' library (-ldnscore). */ #undef HAVE_LIBDNSCORE /* Define to 1 if you have the `dnsdb' library (-ldnsdb). */ #undef HAVE_LIBDNSDB /* Define to 1 if you have the `dnslg' library (-ldnslg). */ #undef HAVE_LIBDNSLG /* Define to 1 if you have the `dnszone' library (-ldnszone). */ #undef HAVE_LIBDNSZONE /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_LIMITS_H /* Define to 1 if the system has the type `long long'. */ #undef HAVE_LONG_LONG /* Define to 1 if you have the header file. */ #undef HAVE_MACHINE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_NETINET6_IN6_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_PPC_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BYTEORDER_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSLIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if the system has the type `uint64_t'. */ #undef HAVE_UINT64_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `u_char'. */ #undef HAVE_U_CHAR /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* BSD */ #undef IS_BSD_FAMILY /* OSX */ #undef IS_DARWIN_OS /* LINUX */ #undef IS_LINUX_FAMILY /* SOLARIS */ #undef IS_SOLARIS_FAMILY /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef mode_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ #undef vfork #ifdef DEBUG #define DPRINTF(p) printf p #else #define DPRINTF(p) /* nothing */ #endif /* DEBUG */ yadifa-2.1.6-5826/lib/dnszone/include/dnszone/PaxHeaders.8028/zone_file_reader.h0000644000077100007710000000012412650131756025340 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.110344 30 ctime=1454597652.794344534 yadifa-2.1.6-5826/lib/dnszone/include/dnszone/zone_file_reader.h0000664000077100007710000000642112650131756025150 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once #include #define ZONEFILE_ERROR_BASE 0x800A0000 #define ZONEFILE_ERROR_CODE(code_) ((s32)(ZONEFILE_ERROR_BASE+(code_))) #define ZONEFILE_FEATURE_NOT_SUPPORTED ZONEFILE_ERROR_CODE(0x0001) #define ZONEFILE_EXPECTED_FILE_PATH ZONEFILE_ERROR_CODE(0x0002) #define ZONEFILE_SOA_WITHOUT_CLASS ZONEFILE_ERROR_CODE(0x0003) #define ZONEFILE_SALT_TOO_BIG ZONEFILE_ERROR_CODE(0x0011) #define ZONEFILE_TEXT_TOO_BIG ZONEFILE_ERROR_CODE(0x0012) #define ZONEFILE_FLAGS_TOO_BIG ZONEFILE_ERROR_CODE(0x0013) #define ZONEFILE_SERVICE_TOO_BIG ZONEFILE_ERROR_CODE(0x0014) #define ZONEFILE_REGEX_TOO_BIG ZONEFILE_ERROR_CODE(0x0015) #define ZONEFILE_RDATA_PARSE_ERROR ZONEFILE_ERROR_CODE(0x0016) #define ZONEFILE_RDATA_BUFFER_TOO_SMALL ZONEFILE_ERROR_CODE(0x0017) #define ZONEFILE_RDATA_SIZE_MISMATCH ZONEFILE_ERROR_CODE(0x0018) void zone_file_reader_init_error_codes(); ya_result zone_file_reader_parse_stream(input_stream *ins, zone_reader *zr); ya_result zone_file_reader_open(const char *fullpath, zone_reader *zr); ya_result zone_file_reader_set_origin(zone_reader *zr, const u8* origin); void zone_file_reader_ignore_missing_soa(zone_reader *zr); ya_result zone_file_reader_copy_rdata(const char *text, u16 rtype, u8 *rdata, u32 rdata_size, const u8 *origin); yadifa-2.1.6-5826/lib/dnszone/include/dnszone/PaxHeaders.8028/zone_axfr_reader.h0000644000077100007710000000012412650131756025361 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.110344 30 ctime=1454597652.791344534 yadifa-2.1.6-5826/lib/dnszone/include/dnszone/zone_axfr_reader.h0000664000077100007710000000610112650131756025164 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup zoneaxfr AXFR file loader module * @ingroup dnszone * @brief * * @{ */ /*----------------------------------------------------------------------------*/ /* * File: zone_axfr_reader.h * Author: ericdf * * Created on June 16, 2011, 12:03 PM */ #ifndef ZONE_AXFR_READER_H #define ZONE_AXFR_READER_H #include /** @brief Opens an axfr file * * Opens an axfr file * * @param[in] fullpath the path and name of the file to open * @param[out] zone a pointer to a structure that will be used by the function * to hold the zone-file information * * @return A result code * @retval OK : the file has been opened successfully * @retval else : an error occurred */ ya_result zone_axfr_reader_open(zone_reader *dst, const char *file_path); /** * Opens the axfr with the highest serial */ ya_result zone_axfr_reader_open_with_fqdn(zone_reader *dst, const u8 *fqdn); #if OBSOLETE ya_result zone_axfr_reader_open_last(const char* axfrpath, u8 *origin, zone_reader *dst); ya_result zone_axfr_reader_open_with_serial(const char* data_path, u8 *origin, u32 loaded_serial, zone_reader *dst); #endif #endif /* ZONE_AXFR_READER_H */ /* ------------------------------------------------------------ */ /** @} */ yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/aclocal.m40000644000077100007710000000013212654662611020432 xustar000000000000000030 mtime=1454597513.235344535 30 atime=1454597513.234344535 30 ctime=1454597652.773344534 yadifa-2.1.6-5826/lib/dnszone/aclocal.m40000664000077100007710000012636712654662611020257 0ustar00yadifayadifa00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_AR([ACT-IF-FAIL]) # ------------------------- # Try to determine the archiver interface, and trigger the ar-lib wrapper # if it is needed. If the detection of archiver interface fails, run # ACT-IF-FAIL (default is to abort configure with a proper error message). AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], [AC_LANG_PUSH([C]) am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a ]) AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) m4_default([$1], [AC_MSG_ERROR([could not determine $AR interface])]) ;; esac AC_SUBST([AR])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file 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. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/ltmain.sh0000644000077100007710000000013012473714653020413 xustar000000000000000029 mtime=1424988587.71705841 29 atime=1424988587.71705841 30 ctime=1454597652.851344534 yadifa-2.1.6-5826/lib/dnszone/ltmain.sh0000644000077100007710000117077112473714653020237 0ustar00yadifayadifa00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.6 package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # 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 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # 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 "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # 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 3 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --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 --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message 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. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # 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= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE 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. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # 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 () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` 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 "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # 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. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # 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 func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # 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= pie_flag= 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) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append 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,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append 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. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; 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 no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock 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 yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; 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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [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: $progname [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 -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler 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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [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 -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -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 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -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 -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -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] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) 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: $progname [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." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" 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 -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # 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 else 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 else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" 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" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; 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. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append 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 -e "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. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_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 test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append 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 func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_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 func_basename "$file" destfile=$func_basename_result 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 func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "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) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # 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/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) 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*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; 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 "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # 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. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd 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 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac 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_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= 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 func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result 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 func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_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've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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. sed_quote_subst='$sed_quote_subst' # Be 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 variables: generated_by_libtool_version='$macro_version' 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 file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ 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 "\ # 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 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # 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 \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} 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 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #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 # define FOPEN_WB "wb" # 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 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ 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]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); 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 = (size_t) (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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } 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 (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" 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 func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" 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 # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir 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 func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework 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*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # 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-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext 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 ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" 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. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'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\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. 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 $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; 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 $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append 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 notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; 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 .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # 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 yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else 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 use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # 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 func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" 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. func_append dlprefiles " $lib $dependency_libs" else func_append 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 func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && 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 func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || 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 *"$absdir:"*) ;; *) func_append 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && 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 built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; 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 lib = "$linkmode" && test yes = "$hardcode_into_libs"; 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 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* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' 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 prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; 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 (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; 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 elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; 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 yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; 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 [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; 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 prog = "$linkmode"; 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 unsupported != "$hardcode_direct"; 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 yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; 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 cannot 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 yes = "$module"; 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 no = "$build_old_libs"; 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 lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # 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 "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=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 "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # 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 func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; 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 test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # 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=$1 number_minor=$2 number_revision=$3 # # 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 # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; esac ;; no) current=$1 revision=$2 age=$3 ;; 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]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" 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 func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result 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 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; 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 no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; 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 | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "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 func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; 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 "*) ;; *) func_append 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 "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-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 yes = "$build_libtool_need_lc"; then func_append 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. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi 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 "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append 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 func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; 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 ;; esac ;; 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 with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; 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 no = "$build_old_libs"; 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 no = "$allow_undefined"; 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 no = "$build_old_libs"; 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 # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append 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 yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append 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 "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append 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 relink = "$opt_mode" || 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 shift realname=$1 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 func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "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" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && 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 : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # 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 func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result 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~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "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 $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } 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\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && 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 fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( 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 relink = "$opt_mode"; then $opt_dry_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 func_show_eval '${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 func_show_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 yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_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= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${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" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append 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 "*) ;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append 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 yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } 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 func_append 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 func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result 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 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # 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 func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$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 eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$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= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; 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 "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; 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) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_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 no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false 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) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; 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 $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where 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 build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/VERSION0000644000077100007710000000012412652141712017633 xustar000000000000000027 mtime=1453900746.981001 27 atime=1454597464.113344 30 ctime=1454597652.777344534 yadifa-2.1.6-5826/lib/dnszone/VERSION0000664000077100007710000000000612652141712017434 0ustar00yadifayadifa000000000000002.1.6 yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/configure.ac0000644000077100007710000000013212654662532021062 xustar000000000000000030 mtime=1454597466.818344534 30 atime=1454597466.816344534 30 ctime=1454597652.770344534 yadifa-2.1.6-5826/lib/dnszone/configure.ac0000664000077100007710000001223712654662532020675 0ustar00yadifayadifa00000000000000dnl ############################################################################ dnl dnl Copyright (c) 2011-2016, EURid. All rights reserved. dnl The YADIFA TM software product is provided under the BSD 3-clause license: dnl dnl Redistribution and use in source and binary forms, with or without dnl modification, are permitted provided that the following conditions dnl are met: dnl dnl * Redistributions of source code must retain the above copyright dnl notice, this list of conditions and the following disclaimer. dnl * Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in dnl the documentation and/or other materials provided with the dnl distribution. dnl * Neither the name of EURid nor the names of its contributors may be dnl used to endorse or promote products derived from this software dnl without specific prior written permission. dnl dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN dnl CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE dnl POSSIBILITY OF SUCH DAMAGE. dnl dnl ############################################################################## AC_PREREQ(2.61) AC_REVISION([$Revision: 5826 $]) AC_INIT([dnszone],m4_esyscmd([svn info 2> /dev/null | grep 'Last Changed Rev: ' | sed -re 's/.*: (.*)/Revision: \1 $/' -e 's/^/$/' >> revision.txt;echo $(cat VERSION)-$(grep \$Revision: * | sed -e 's/^.*\$Revision: *//' -e 's/\$.*//' -e 's/ *//' | sort -n | /usr/bin/tail -1 | tr -d '\n') | tr -d '\n']),[bugreport@yadifa.eu]) echo echo echo "DNSZONE START" echo "-------------" echo echo m4_include([../../m4/eurid.m4]) m4_include([../../m4/yadifa.m4]) AC_CONFIG_AUX_DIR([.]) AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror tar-pax]) AC_CONFIG_HEADER([include/dnszone/dnszone-config.h]) AC_CONFIG_MACRO_DIR([m4]) AC_DEFUN([SYSCONF], [/$prefix/PACKAGE/PACKAGE.conf]) AC_CANONICAL_BUILD dnl Checks for programs. dnl m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AM_PROG_AR AC_PROG_CC AM_PROG_CC_C_O LT_INIT([disable-shared]) AC_DARWIN_LIBTOOL AC_PROG_LIBTOOL dnl Checks for libraries. AC_CHECK_LIB([c], [printf]) AC_CHECK_LIB([pthread], [pthread_mutex_init]) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h]) dnl Check for Darwin or Linux AC_CHECK_HEADERS([linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h]) dnl Check for Darwin or Linux AC_CHECK_HEADERS([sys/types.h i386/types.h]) dnl AC_CHECK_HEADERS([sys/socket.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_BIGENDIAN AC_TYPE_MODE_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_STRUCT_TM dnl AC_PROG_RANLIB AC_CHECK_TYPES(uint64_t) AC_CHECK_TYPES(int64_t) AC_CHECK_TYPES(long long) AC_CHECK_TYPES(u_char) dnl Add some macros AH_BOTTOM([ #ifdef DEBUG #define DPRINTF(p) printf p #else #define DPRINTF(p) /* nothing */ #endif /* DEBUG */ ]) AC_SYS_LARGEFILE AC_COMPILER_CHECK AC_PTHREAD_SPINLOCK_CHECK AC_PTHREAD_SETNAME_NP_CHECK AC_YADIFA_FEATURES AC_YADIFA_ENABLE_DNSCORE AC_YADIFA_ENABLE_DNSDB AC_YADIFA_ADD_LIBS AC_CHECK_LTO CPPFLAGS="$CPPFLAGS -DDNSZONE_BUILD" dnl option: DEFAULT_ASSUMED_CPU_COUNT 2 dnl Checks for library functions. AC_FUNC_FORK dnl AC_FUNC_MALLOC does weird things: dnl http://sources.redhat.com/ml/automake/2003-05/msg00023.html dnl http://www.mail-archive.com/autoconf@gnu.org/msg08935.html dnl AC_FUNC_MALLOC goals: dnl malloc(0) will not return NULL dnl realloc(NULL,x) will not crash (occurs on rare systems) dnl dnl AC_FUNC_MALLOC AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_FUNC_STAT AC_CHECK_FUNCS([bzero memset select socket]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT dnl ---------------------------------------------------------------------------- AC_MAKE_BUILDINFO echo echo "SUMMARY for DNSZONE:" echo "--------------------" echo echo "CC .................................. : $CC" echo "LD .................................. : $LD" echo "AR .................................. : $AR" echo "CFLAGS .............................. : $CFLAGS" echo "CPPFLAGS ............................ : $CPPFLAGS" echo "LDFLAGS ............................. : $LDFLAGS" echo "LIBS ................................ : $LIBS" if [[ ! "${OPENSSL}" = "" ]] then echo "Using OpenSLL from .................. : ${OPENSSL}" fi echo echo "Install prefix ...................... : $prefix" echo "Install sysconf ..................... : $sysconfdir" echo echo echo "DNSZONE DONE" echo "------------" echo yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/config.sub0000644000077100007710000000013212473710127020545 xustar000000000000000030 mtime=1424986199.159058409 30 atime=1424986199.159058409 30 ctime=1454597652.840344534 yadifa-2.1.6-5826/lib/dnszone/config.sub0000755000077100007710000010622312473710127020360 0ustar00yadifayadifa00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-12-03' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/m40000644000077100007710000000013212654663024017034 xustar000000000000000030 mtime=1454597652.766344534 30 atime=1454597652.739344534 30 ctime=1454597652.766344534 yadifa-2.1.6-5826/lib/dnszone/m4/0000775000077100007710000000000012654663024016717 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnszone/m4/PaxHeaders.8028/ltsugar.m40000644000077100007710000000013012473714653021036 xustar000000000000000029 mtime=1424988587.49005841 29 atime=1424988587.49005841 30 ctime=1454597652.759344534 yadifa-2.1.6-5826/lib/dnszone/m4/ltsugar.m40000644000077100007710000001044012473714653020643 0ustar00yadifayadifa00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) yadifa-2.1.6-5826/lib/dnszone/m4/PaxHeaders.8028/ltversion.m40000644000077100007710000000013012473714653021402 xustar000000000000000029 mtime=1424988587.51105841 29 atime=1424988587.51105841 30 ctime=1454597652.763344534 yadifa-2.1.6-5826/lib/dnszone/m4/ltversion.m40000644000077100007710000000127312473714653021213 0ustar00yadifayadifa00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file 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. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) yadifa-2.1.6-5826/lib/dnszone/m4/PaxHeaders.8028/libtool.m40000644000077100007710000000013012473714653021021 xustar000000000000000029 mtime=1424988587.40405841 29 atime=1424988587.40305841 30 ctime=1454597652.752344534 yadifa-2.1.6-5826/lib/dnszone/m4/libtool.m40000644000077100007710000112507312473714653020640 0ustar00yadifayadifa00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS yadifa-2.1.6-5826/lib/dnszone/m4/PaxHeaders.8028/ltoptions.m40000644000077100007710000000013012473714653021410 xustar000000000000000029 mtime=1424988587.46805841 29 atime=1424988587.46805841 30 ctime=1454597652.756344534 yadifa-2.1.6-5826/lib/dnszone/m4/ltoptions.m40000644000077100007710000003426212473714653021225 0ustar00yadifayadifa00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) yadifa-2.1.6-5826/lib/dnszone/m4/PaxHeaders.8028/lt~obsolete.m40000644000077100007710000000013012473714653021727 xustar000000000000000029 mtime=1424988587.53205841 29 atime=1424988587.53205841 30 ctime=1454597652.766344534 yadifa-2.1.6-5826/lib/dnszone/m4/lt~obsolete.m40000644000077100007710000001377412473714653021551 0ustar00yadifayadifa00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/install-sh0000644000077100007710000000013212473710127020566 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597652.847344534 yadifa-2.1.6-5826/lib/dnszone/install-sh0000755000077100007710000003452312473710127020404 0ustar00yadifayadifa00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # 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. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # 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_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 is_target_a_directory=possibly 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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi 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 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac 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 if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 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 problematic for 'test' and other utilities. 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 # 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 "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` 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-writable 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 oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && 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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/NEWS0000644000077100007710000000012412610121331017247 xustar000000000000000027 mtime=1444979417.160777 27 atime=1454597464.129344 30 ctime=1454597652.823344534 yadifa-2.1.6-5826/lib/dnszone/NEWS0000664000077100007710000000001312610121331017046 0ustar00yadifayadifa00000000000000see README yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/src0000644000077100007710000000013212654663024017303 xustar000000000000000030 mtime=1454597652.869344534 30 atime=1454597652.739344534 30 ctime=1454597652.869344534 yadifa-2.1.6-5826/lib/dnszone/src/0000775000077100007710000000000012654663024017166 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnszone/src/PaxHeaders.8028/hints_file_reader.c0000644000077100007710000000012412650131756023171 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.121344 30 ctime=1454597652.869344534 yadifa-2.1.6-5826/lib/dnszone/src/hints_file_reader.c0000664000077100007710000001525312650131756023004 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup hintsfile Zone file loader module * @ingroup dnshints * @brief Zone file loader module * * Implementation of routines for the hints_data struct * - add * - adjust * - init * - parse * - print * - remove database * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnszone/dnszone-config.h" #include #include #include /* or netinet/in.h */ #include #include #include #include "dnszone/hints_file_reader.h" #define ZFREADER_TAG 0x524544414552465a /** \def ttl value used for the zone hints if none provided */ #define DEFAULT_TTL 86400 #define DOT_DOMAIN "." #define BRACKET_CLOSED 0x00U #define BRACKET_OPEN 0x01U /** flag settings for printing the zone hints * \param 0 means not printing of the resource records * \param 1 means printing of the resource records */ #define WITHOUT_RR 0 #define WITH_RR 1 #ifndef NAME_MAX #define NAME_MAX 1024 #endif #define MAX_LINE_SIZE 1024 extern logger_handle *g_zone_logger; #define MODULE_MSG_HANDLE g_zone_logger /****************************************************************************************************/ /* Parsing */ /* */ /* These are the parsing functions used by the text-form hints file loader. */ /* It is NOT the right place for them. It would be better to have a parser in the core so both the */ /* dnshints and the server can use it. */ /* */ /****************************************************************************************************/ /***************************************************************************************************/ typedef struct hints_file_reader hints_file_reader; struct hints_file_reader { input_stream ins; /* Domain name of the hints file */ /* LOAD */ u8 *origin; /* LOAD */ /* Resource record data */ /* LOAD */ resource_record *rr; /* LOAD */ u32 default_ttl; /* LOAD */ u32 line_number; /* LOAD */ int bracket_status; /* LOAD */ u16 qclass; u8 label[MAX_DOMAIN_LENGTH]; /* LOAD */ }; static ya_result hints_file_reader_unread_record(zone_reader *zr, resource_record *entry) { return ERROR; // not implemented } /** @brief Reads a ZDB hints file entry * * Reads a ZDB hints file entry * * @param[in] hints a pointer to a valid (hints_file_open'ed) hints-file structure * @param[out] entry a pointer to a hintsfile_entry structure that will hold the record * * @return A result code * @retval OK : a record has been read successfully * @retval else : an error occurred */ static ya_result hints_file_reader_read_record(zone_reader *zr, resource_record *entry) { return ERROR; // not implemented } static ya_result hints_file_reader_free_record(zone_reader *hints, resource_record *entry) { return ERROR; } /** @brief Closes a hints file entry * * Closes a hints file entry. The function will do nothing if the hintsfile has already been closed * * @param[in] hintsfile a pointer to a valid (hints_file_open'ed) hints-file structure * */ static void hints_file_reader_close(zone_reader *zr) { } static bool hints_file_reader_canwriteback(zone_reader *zr) { return TRUE; } static void hints_file_reader_handle_error(zone_reader *zr, ya_result error_code) { /* nop */ } static const char* hints_file_reader_get_last_error_message(zone_reader *zr) { return NULL; } static zone_reader_vtbl hints_file_reader_vtbl = { hints_file_reader_read_record, hints_file_reader_unread_record, hints_file_reader_free_record, hints_file_reader_close, hints_file_reader_handle_error, hints_file_reader_canwriteback, hints_file_reader_get_last_error_message, "hints_file_reader" }; /** @brief Initializing hints_data variable * * The function not only initialize a new hints_data struct, but if needed * will add the struct to the linked list * * @param[in,out] dst the new hints_data struct * * @retval OK */ /* BUT ALSO ... */ /** @brief Opens a hints file * * Opens a hints file * * @param[in] fullpath the path and name of the file to open * @param[out] hints a pointer to a structure that will be used by the function * to hold the hints-file information * * @return A result code * @retval OK : the file has been opened successfully * @retval else : an error occurred */ ya_result hints_file_reader_open(const char* fullpath, zone_reader *dst) { (void)&hints_file_reader_vtbl; return ERROR; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnszone/src/PaxHeaders.8028/zone_axfr_reader.c0000644000077100007710000000012412650131756023040 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.127344 30 ctime=1454597652.862344534 yadifa-2.1.6-5826/lib/dnszone/src/zone_axfr_reader.c0000664000077100007710000001756312650131756022661 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup zoneaxfr AXFR file loader module * @ingroup dnszone * @brief zone functions * * Implementation of routines for the zone_data struct * - add * - adjust * - init * - parse * - print * - remove database * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnszone/dnszone-config.h" #include #include /* or netinet/in.h */ #include #include #include #include #include #include #include #include "dnsdb/zdb-zone-path-provider.h" #include "dnszone/zone_axfr_reader.h" #define AXREADER_TAG 0x5245444145525841 extern logger_handle *g_zone_logger; #define MODULE_MSG_HANDLE g_zone_logger typedef struct zone_axfr_reader zone_axfr_reader; struct zone_axfr_reader { input_stream is; /* LOAD */ char* file_path; resource_record* unread_next; bool soa_found; /* LOAD */ }; static ya_result zone_axfr_reader_unread_record(zone_reader *zr, resource_record *entry) { zone_axfr_reader *zone = (zone_axfr_reader*)zr->data; resource_record *rr; u32 required = offsetof(resource_record,rdata) + entry->rdata_size; MALLOC_OR_DIE(resource_record*, rr, required, GENERIC_TAG); memcpy(rr, entry, required); rr->next = zone->unread_next; zone->unread_next = rr; return SUCCESS; } static ya_result zone_axfr_reader_read_record(zone_reader *zr, resource_record *entry) { yassert((zr != NULL) && (entry != NULL)); zone_axfr_reader *zone = (zone_axfr_reader*)zr->data; if(zone->unread_next != NULL) { resource_record *top = zone->unread_next; u32 required = offsetof(resource_record,rdata) + top->rdata_size; memcpy(entry, top, required); zone->unread_next = top->next; free(top); return 0; } ya_result return_value; u16 rdata_len; if(ISOK(return_value = input_stream_read_dnsname(&zone->is, entry->name))) { if(ISOK(return_value = input_stream_read_u16(&zone->is, &entry->type))) { if(ISOK(return_value = input_stream_read_u16(&zone->is, &entry->class))) { if(ISOK(return_value = input_stream_read_nu32(&zone->is, &entry->ttl))) { if(ISOK(return_value = input_stream_read_nu16(&zone->is, &rdata_len))) { if(ISOK(return_value = input_stream_read_fully(&zone->is, entry->rdata, rdata_len))) { entry->rdata_size = return_value; if(entry->type == TYPE_SOA) { if(zone->soa_found) { return 1; /* done */ } zone->soa_found = TRUE; } return 0; } } } } } } return return_value; } static ya_result zone_axfr_reader_free_record(zone_reader *zone, resource_record *entry) { return OK; } static void zone_axfr_reader_close(zone_reader *zr) { yassert(zr != NULL); zone_axfr_reader *zone = (zone_axfr_reader*)zr->data; free(zone->file_path); input_stream_close(&zone->is); resource_record *rr = zone->unread_next; while(rr != NULL) { resource_record *tmp = rr; rr = rr->next; free(tmp); } free(zone); zr->data = NULL; zr->vtbl = NULL; } static bool zone_axfr_reader_canwriteback(zone_reader *zr) { yassert(zr != NULL); return TRUE; } static void zone_axfr_reader_handle_error(zone_reader *zr, ya_result error_code) { /* * If an error occurred loading the axfr : delete it * * More subtle tests on the error code could also be done. */ yassert(zr != NULL); if(FAIL(error_code)) { zone_axfr_reader *zone = (zone_axfr_reader*)zr->data; #ifdef DEBUG log_debug("zone axfr: deleting broken AXFR file: %s", zone->file_path); #endif if(unlink(zone->file_path) < 0) { log_err("zone axfr: unlink(%s): %r", zone->file_path, ERRNO_ERROR); } } } static const char* zone_axfr_reader_get_last_error_message(zone_reader *zr) { // not supported yet (void)zr; return NULL; } static zone_reader_vtbl zone_axfr_reader_vtbl = { zone_axfr_reader_read_record, zone_axfr_reader_unread_record, zone_axfr_reader_free_record, zone_axfr_reader_close, zone_axfr_reader_handle_error, zone_axfr_reader_canwriteback, zone_axfr_reader_get_last_error_message, "zone_axfr_reader" }; ya_result zone_axfr_reader_open(zone_reader *dst, const char *file_path) { zone_axfr_reader *zone; ya_result return_value; input_stream is; if(FAIL(return_value = file_input_stream_open(file_path, &is))) { return return_value; } /* ------------------------------------------------------------ */ MALLOC_OR_DIE(zone_axfr_reader*, zone, sizeof (zone_axfr_reader), AXREADER_TAG); ZEROMEMORY(zone, sizeof (zone_axfr_reader)); /* Initialize the new zone data */ buffer_input_stream_init(&is, &zone->is, 4096); zone->file_path = strdup(file_path); zone->soa_found = FALSE; dst->data = zone; dst->vtbl = &zone_axfr_reader_vtbl; return SUCCESS; } ya_result zone_axfr_reader_open_with_fqdn(zone_reader *dst, const u8 *origin) { ya_result ret; char file_path[PATH_MAX]; if(ISOK(ret = zdb_zone_path_get_provider()( origin, file_path, sizeof(file_path) - 6, ZDB_ZONE_PATH_PROVIDER_AXFR_FILE|ZDB_ZONE_PATH_PROVIDER_MKDIR))) { log_debug("opening '%s' for reading", file_path); ret = zone_axfr_reader_open(dst, file_path); } return ret; } yadifa-2.1.6-5826/lib/dnszone/src/PaxHeaders.8028/zone_file_reader.c0000644000077100007710000000012412650131756023017 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.126344 30 ctime=1454597652.865344534 yadifa-2.1.6-5826/lib/dnszone/src/zone_file_reader.c0000664000077100007710000016254612650131756022642 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnszone/dnszone-config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "dnszone/dnszone.h" #include "dnszone/zone_file_reader.h" #define ZFREADER_TAG 0x524544414552465a #define ZONE_FILE_READER_INCLUDE_DEPTH_MAX 16 extern logger_handle *g_zone_logger; #define MODULE_MSG_HANDLE g_zone_logger #define DEBUG_BENCH_TEXT_ZONE_PARSE 1 #ifndef DEBUG #undef DEBUG_BENCH_TEXT_ZONE_PARSE #define DEBUG_BENCH_TEXT_ZONE_PARSE 0 #endif static bool zone_file_reader_init_error_codes_done = FALSE; static const char * const zfr_string_delimiters = "\"\"''"; static const char * const zfr_multiline_delimiters = "()"; static const char * const zrf_comment_markers = ";#"; static const char * const zrf_blank_makers = "\040\t\r"; static const char * const zfr_escape_characters = "\\"; #define ZONE_FILE_READER_MESSAGE_STATIC 0 #define ZONE_FILE_READER_MESSAGE_ALLOCATED 1 typedef struct zone_file_reader zone_file_reader; struct zone_file_reader { parser_s parser; resource_record* unread_next; s32 zttl; s32 rttl; u32 dot_origin_size; // with the CHR0 sentinel u16 zclass; u16 rclass; u16 rdata_size; bool soa_found; bool template_source; u8 domain[MAX_DOMAIN_LENGTH]; u8 origin[MAX_DOMAIN_LENGTH]; char dot_origin[MAX_DOMAIN_LENGTH + 1]; //char text_buffer[512]; u8 rdata[RDATA_MAX_LENGTH]; input_stream includes[ZONE_FILE_READER_INCLUDE_DEPTH_MAX]; u8 includes_count; // ya_result error_message_code; u8 error_message_allocated; // 0: static 1: malloc char *error_message_buffer; // It's not aligned but this is an exception : // _ This is a rarely used structure (don't care too much about a hole) // _ This is an hopefully rarely used field (best case: "never" (besides setting it up to NULL)) // _ Putting it among the more popular fields will likely increase misses }; static void zone_file_reader_free_error_message(zone_file_reader *zfr) { if(zfr->error_message_allocated == ZONE_FILE_READER_MESSAGE_ALLOCATED) { free(zfr->error_message_buffer); } } /* static void zone_file_reader_clear_error_message(zone_file_reader *zfr) { zone_file_reader_free_error_message(zfr); zfr->error_message_buffer = NULL; } */ static inline ya_result zone_file_reader_copy_rdata_inline(parser_s *p, u16 rtype, u8 *rdata, u32 rdata_size, const u8 *origin) { const char *text; u32 text_len; ya_result return_code; char text_buffer[1024]; type_bit_maps_context tbmctx; if(FAIL(return_code = parser_copy_next_word(p, text_buffer, sizeof(text_buffer)))) { return return_code; } text = text_buffer; text_len = return_code; if(!((text_len >= 1) && (text[0] == '#'))) { switch(rtype) { case TYPE_A: { if(inet_pton(AF_INET, text, rdata)) { return_code = 4; } else { return_code = INCORRECT_IPADDRESS; } break; } case TYPE_AAAA: { if(inet_pton(AF_INET6, text, rdata)) { return_code = 16; } else { return_code = INCORRECT_IPADDRESS; } break; } case TYPE_SOA: { s32 total_size; if(FAIL(return_code = cstr_to_locase_dnsname_with_check_len_with_origin(rdata, text, text_len, origin))) { break; } total_size = return_code; rdata += return_code; rdata_size -= return_code; if(FAIL(return_code = parser_copy_next_fqdn_locase_with_origin(p, rdata, origin))) { break; } total_size += return_code + 20; rdata += return_code; rdata_size -= return_code; return_code = total_size; for(u8 i = 5; i > 0; i--) { s32 tmp_int32; ya_result err; if(FAIL(err = parser_copy_next_ttl(p, &tmp_int32))) { return_code = err; break; } tmp_int32 = htonl(tmp_int32); SET_U32_AT_P(rdata, tmp_int32); rdata += 4; } break; } case TYPE_NS: case TYPE_CNAME: case TYPE_PTR: case TYPE_MD: /** @NOTE: obsolete */ case TYPE_MF: /** NOTE: obsolete */ case TYPE_MB: /** NOTE: obsolete */ case TYPE_MG: /** NOTE: obsolete */ case TYPE_MR: /** NOTE: obsolete */ { return_code = cstr_to_locase_dnsname_with_check_len_with_origin(rdata, text, text_len, origin); break; } case TYPE_AFSDB: // As THX pointed out, this is the same format as MX case TYPE_MX: { u16 preference; if(FAIL(return_code = parser_get_u16(text, text_len, &preference))) { break; } preference = htons(preference); SET_U16_AT_P(rdata, preference); rdata += 2; if(FAIL(return_code = parser_copy_next_fqdn_locase_with_origin(p, rdata, origin))) { break; } return_code += 2; break; } case TYPE_RRSIG: { u16 rtype; if(FAIL(return_code = get_type_from_case_name_len(text, text_len, &rtype))) { break; } SET_U16_AT_P(rdata, rtype); rdata += 2; // algorithm (8 bits integer) if(FAIL(return_code = parser_copy_next_u8(p, rdata))) { break; } rdata++; // labels (8 bits integer) if(FAIL(return_code = parser_copy_next_u8(p, rdata))) { break; } rdata++; // original TTL (32 bits integer) s32 ttl; if(FAIL(return_code = parser_copy_next_ttl(p, &ttl))) { break; } ttl = htonl(ttl); SET_U32_AT_P(rdata, ttl); rdata += 4; // signature expiration (YYYYMMDDHHMMSS epoch -> 32 bits) u32 epoch; if(FAIL(return_code = parser_copy_next_yyyymmddhhmmss(p, &epoch))) { break; } epoch = htonl(epoch); SET_U32_AT_P(rdata, epoch); rdata += 4; // signature inception (YYYYMMDDHHMMSS epoch -> 32 bits) if(FAIL(return_code = parser_copy_next_yyyymmddhhmmss(p, &epoch))) { break; } epoch = htonl(epoch); SET_U32_AT_P(rdata, epoch); rdata += 4; // key tag (16 bits integer) u16 tag; if(FAIL(return_code = parser_copy_next_u16(p, &tag))) { break; } tag = htons(tag); SET_U16_AT_P(rdata, tag); rdata += 2; // signer's name (fqdn) if(FAIL(return_code = parser_copy_next_fqdn_with_origin(p, rdata, origin))) { break; } rdata += return_code; u32 signer_len = return_code; // signature (base64) if(FAIL(return_code = parser_concat_next_tokens_nospace(p))) { break; } if(FAIL(return_code = base64_decode(parser_text(p), parser_text_length(p), rdata))) { break; } return_code += 18 + signer_len; break; } case TYPE_DNSKEY: { // flags u16 flags; if(FAIL(return_code = parser_get_u16(text, text_len, &flags))) { break; } flags = htons(flags); SET_U16_AT_P(rdata, flags); rdata += 2; // protocol (8 bits integer) if(FAIL(return_code = parser_copy_next_u8(p, rdata))) { break; } rdata++; // algorithm (8 bits integer) if(FAIL(return_code = parser_copy_next_u8(p, rdata))) { break; } rdata++; // key (base64) if(FAIL(return_code = parser_concat_next_tokens_nospace(p))) { break; } if(FAIL(return_code = base64_decode(parser_text(p), parser_text_length(p), rdata))) { break; } return_code += 4; break; } case TYPE_NSEC3PARAM: { // hash algorithm if(FAIL(return_code = parser_get_u8(text, text_len, rdata))) { break; } rdata++; // flags if(FAIL(return_code = parser_copy_next_u8(p, rdata))) { break; } rdata++; // iterations u16 iterations; if(FAIL(return_code = parser_copy_next_u16(p, &iterations))) { break; } iterations = htons(iterations); SET_U16_AT_P(rdata, iterations); rdata += 2; // salt if(FAIL(return_code = parser_next_token(p))) { break; } if(FAIL(return_code = base16_decode(parser_text(p), parser_text_length(p), rdata + 1))) { break; } if(return_code > 255) { return_code = ZONEFILE_SALT_TOO_BIG; // parse error ... break; } rdata[0] = (u8)return_code; return_code += 5; break; } case TYPE_NSEC3: { u8 *rdata_start = rdata; // hash algorithm if(FAIL(return_code = parser_get_u8(text, text_len, rdata))) { break; } rdata++; // flags if(FAIL(return_code = parser_copy_next_u8(p, rdata))) { break; } rdata++; // iterations u16 iterations; if(FAIL(return_code = parser_copy_next_u16(p, &iterations))) { break; } iterations = htons(iterations); SET_U16_AT_P(rdata, iterations); rdata += 2; // salt if(FAIL(return_code = parser_next_token(p))) { break; } if(FAIL(return_code = base16_decode(parser_text(p), parser_text_length(p), rdata + 1))) { break; } if(return_code > 255) { return_code = ZONEFILE_SALT_TOO_BIG; // parse error ... break; } rdata[0] = (u8)return_code; rdata += return_code + 1; // digest if(FAIL(return_code = parser_next_token(p))) { break; } if(FAIL(return_code = base32hex_decode(parser_text(p), parser_text_length(p), rdata + 1))) { break; } rdata[0] = (u8)return_code; rdata += return_code + 1; // type bitmap if(FAIL(return_code = parser_type_bit_maps_initialize(p, &tbmctx))) { break; } if(return_code > 0) { type_bit_maps_write(rdata, &tbmctx); rdata += return_code; } return_code = rdata - rdata_start; parser_set_eol(p); break; } case TYPE_NSEC: { u8 *rdata_start = rdata; if(FAIL(return_code = cstr_to_locase_dnsname_with_check_len_with_origin(rdata, text, text_len, origin))) { break; } rdata += return_code; // type bitmap if(FAIL(return_code = parser_type_bit_maps_initialize(p, &tbmctx))) { break; } type_bit_maps_write(rdata, &tbmctx); rdata += return_code; return_code = rdata - rdata_start; parser_set_eol(p); break; } case TYPE_DS: { // keytag u16 keytag; if(FAIL(return_code = parser_get_u16(text, text_len, &keytag))) { break; } keytag = htons(keytag); SET_U16_AT_P(rdata, keytag); rdata += 2; // algorithm if(FAIL(return_code = parser_copy_next_u8(p, rdata))) { break; } rdata++; // digest type if(FAIL(return_code = parser_copy_next_u8(p, rdata))) { break; } rdata++; // digest if(FAIL(return_code = parser_concat_next_tokens_nospace(p))) { break; } if(FAIL(return_code = base16_decode(parser_text(p), parser_text_length(p), rdata))) { break; } return_code += 4; break; } case TYPE_TXT: { u8 *rdata_start = rdata; for(;;) { if(text_len > 255) { return_code = ZONEFILE_TEXT_TOO_BIG; break; } *rdata++ = (u8)text_len; memcpy(rdata, text, text_len); rdata += text_len; if(FAIL(return_code = parser_next_token(p))) { break; } if((return_code & (PARSER_COMMENT|PARSER_EOL|PARSER_EOF)) != 0) { // stop break; } text = parser_text(p); text_len = parser_text_length(p); } return_code = rdata - rdata_start; parser_set_eol(p); break; } case TYPE_SSHFP: { // algorithm if(FAIL(return_code = parser_get_u8(text, text_len, rdata))) { break; } rdata++; // fp type if(FAIL(return_code = parser_copy_next_u8(p, rdata))) { break; } rdata++; // fingerprint if(FAIL(return_code = parser_concat_next_tokens_nospace(p))) { break; } if(FAIL(return_code = base16_decode(parser_text(p), parser_text_length(p), rdata))) { break; } return_code += 2; break; } case TYPE_TLSA: { // ? if(FAIL(return_code = parser_get_u8(text, text_len, rdata))) { break; } rdata++; // ? if(FAIL(return_code = parser_copy_next_u8(p, rdata))) { break; } rdata++; // ? if(FAIL(return_code = parser_copy_next_u8(p, rdata))) { break; } rdata++; // ? if(FAIL(return_code = parser_concat_next_tokens_nospace(p))) { break; } if(FAIL(return_code = base16_decode(parser_text(p), parser_text_length(p), rdata))) { break; } return_code += 3; break; } case TYPE_SRV: { u16 tmp16; // ? if(FAIL(return_code = parser_get_u16(text, text_len, &tmp16))) { break; } tmp16 = htons(tmp16); SET_U16_AT_P(rdata, tmp16); rdata += 2; // ? if(FAIL(return_code = parser_copy_next_u16(p, &tmp16))) { break; } tmp16 = htons(tmp16); SET_U16_AT_P(rdata, tmp16); rdata += 2; // ? if(FAIL(return_code = parser_copy_next_u16(p, &tmp16))) { break; } tmp16 = htons(tmp16); SET_U16_AT_P(rdata, tmp16); rdata += 2; if(FAIL(return_code = parser_copy_next_fqdn_with_origin(p, rdata, origin))) { break; } return_code += 6; break; } case TYPE_NAPTR: { u8 *rdata_start = rdata; u16 tmp16; // order if(FAIL(return_code = parser_get_u16(text, text_len, &tmp16))) { break; } tmp16 = htons(tmp16); SET_U16_AT_P(rdata, tmp16); rdata += 2; // preference if(FAIL(return_code = parser_copy_next_u16(p, &tmp16))) { break; } tmp16 = htons(tmp16); SET_U16_AT_P(rdata, tmp16); rdata += 2; // flags if(FAIL(return_code = parser_next_token(p))) { break; } if((return_code & (PARSER_COMMENT|PARSER_EOL|PARSER_EOF)) != 0) { // stop break; } text = parser_text(p); text_len = parser_text_length(p); if(text_len > 255) { return_code = ZONEFILE_FLAGS_TOO_BIG; break; } *rdata++ = (u8)text_len; memcpy(rdata, text, text_len); rdata += text_len; // service if(FAIL(return_code = parser_next_token(p))) { break; } if((return_code & (PARSER_COMMENT|PARSER_EOL|PARSER_EOF)) != 0) { // stop break; } text = parser_text(p); text_len = parser_text_length(p); if(text_len > 255) { return_code = ZONEFILE_SERVICE_TOO_BIG; break; } *rdata++ = (u8)text_len; memcpy(rdata, text, text_len); rdata += text_len; // regex if(FAIL(return_code = parser_next_token(p))) { break; } if((return_code & (PARSER_COMMENT|PARSER_EOL|PARSER_EOF)) != 0) { // stop break; } text = parser_text(p); text_len = parser_text_length(p); if(text_len > 255) { return_code = ZONEFILE_REGEX_TOO_BIG; break; } *rdata++ = (u8)text_len; memcpy(rdata, text, text_len); rdata += text_len; if(FAIL(return_code = parser_copy_next_fqdn_with_origin(p, rdata, origin))) { break; } return_code += rdata - rdata_start; break; } // exist out of two parts // 1. mbox-dname // 2. only 1 txt-dname case TYPE_RP: { // 1.mbox-name //s32 total_size; // return_code = "length" or "error code" if(FAIL(return_code = cstr_to_locase_dnsname_with_check_len_with_origin(rdata, text, text_len, origin))) { break; } // set rdata to the next chunk rdata += return_code; // 2.txt-dname u8 *rdata_start = rdata; if(FAIL(return_code = parser_next_token(p))) { break; } text_len = return_code; // only 1 txt-dname will be parsed //for(;;) { if(text_len > 255) { return_code = ZONEFILE_TEXT_TOO_BIG; break; } *rdata++ = (u8)text_len; memcpy(rdata, text, text_len); rdata += text_len; if(FAIL(return_code = parser_next_token(p))) { break; } if((return_code & (PARSER_COMMENT|PARSER_EOL|PARSER_EOF)) != 0) { // stop break; } //text = parser_text(p); //text_len = parser_text_length(p); } return_code += rdata - rdata_start; parser_set_eol(p); break; } case TYPE_HINFO: { u8 *rdata_start = rdata; if(text_len > 255) { return_code = ZONEFILE_TEXT_TOO_BIG; break; } *rdata++ = (u8)text_len; memcpy(rdata, text, text_len); rdata += text_len; if(FAIL(return_code = parser_next_token(p))) { break; } if((return_code & (PARSER_COMMENT|PARSER_EOL|PARSER_EOF)) != 0) { // stop break; } text = parser_text(p); text_len = parser_text_length(p); if(text_len > 255) { return_code = ZONEFILE_TEXT_TOO_BIG; break; } *rdata++ = (u8)text_len; memcpy(rdata, text, text_len); rdata += text_len; if(FAIL(return_code = parser_copy_next_fqdn_with_origin(p, rdata, origin))) { break; } return_code += rdata - rdata_start; break; } case TYPE_OPT: case TYPE_TSIG: case TYPE_IXFR: case TYPE_AXFR: case TYPE_ANY: { return_code = ZONEFILE_INVALID_TYPE; break; } case TYPE_DNAME: case TYPE_NULL: case TYPE_MINFO: case TYPE_X25: case TYPE_ISDN: case TYPE_RT: case TYPE_NSAP: case TYPE_NSAP_PTR: case TYPE_SIG: case TYPE_KEY: case TYPE_PX: case TYPE_GPOS: case TYPE_LOC: case TYPE_NXT: case TYPE_EID: case TYPE_NIMLOC: case TYPE_ATMA: case TYPE_KX: case TYPE_CERT: case TYPE_A6: case TYPE_SINK: case TYPE_APL: case TYPE_IPSECKEY: case TYPE_DHCID: case TYPE_HIP: case TYPE_NINFO: case TYPE_RKEY: case TYPE_TALINK: case TYPE_CDS: case TYPE_SPF: case TYPE_UINFO: case TYPE_UID: case TYPE_GID: case TYPE_UNSPEC: case TYPE_NID: case TYPE_L32: case TYPE_L64: case TYPE_LP: case TYPE_EUI48: case TYPE_EUI64: case TYPE_TKEY: case TYPE_MAILB: case TYPE_MAILA: case TYPE_URI: case TYPE_CAA: case TYPE_DLV: case TYPE_TA: case TYPE_WKS: { return_code = ZONEFILE_UNSUPPORTED_TYPE; /** unsupported type, TYPE## */ break; } default: { return_code = UNSUPPORTED_RECORD; log_err("parser_copy_rdata: %{dnstype}: %r", &rtype, return_code); break; } } // end switch } else { // hex return_code = ZONEFILE_RDATA_PARSE_ERROR; /// parse error if((text_len == 1) && (text[0] == '#')) { u16 unknown_rdata_len; if(ISOK(return_code = parser_copy_next_u16(p, &unknown_rdata_len))) { return_code = ZONEFILE_RDATA_BUFFER_TOO_SMALL; /// buffer too small if(unknown_rdata_len <= rdata_size) { if(ISOK(return_code = parser_concat_next_tokens_nospace(p))) { if((return_code << 1) <= rdata_size) { if(ISOK(return_code = base16_decode(parser_text(p), parser_text_length(p), rdata))) { if(return_code != unknown_rdata_len) { return_code = ZONEFILE_RDATA_SIZE_MISMATCH; /// unexpected size } } } else { return_code = ZONEFILE_RDATA_BUFFER_TOO_SMALL; /// buffer too small } } } } } } if(ISOK(return_code)) { // expect to find EOL ya_result got_eol = parser_expect_eol(p); if(FAIL(got_eol)) { return_code = got_eol; log_err("parser_copy_rdata: EXPECTED EOL: %{dnstype}: %r", &rtype, return_code); } } return return_code; } static ya_result zone_file_reader_unread_record(zone_reader *zr, resource_record *entry) { zone_file_reader *zfr = (zone_file_reader*)zr->data; resource_record *rr; u32 required = offsetof(resource_record,rdata) + entry->rdata_size; MALLOC_OR_DIE(resource_record*, rr, required, GENERIC_TAG); memcpy(rr, entry, required); rr->next = zfr->unread_next; zfr->unread_next = rr; return SUCCESS; } static ya_result zone_file_reader_read_record(zone_reader *zr, resource_record *entry) { yassert((zr != NULL) && (entry != NULL)); zone_file_reader *zfr = (zone_file_reader*)zr->data; if(zfr->unread_next != NULL) { resource_record *top = zfr->unread_next; u32 required = offsetof(resource_record,rdata) + top->rdata_size; memcpy(entry, top, required); zfr->unread_next = top->next; free(top); return 0; } parser_s *p = &zfr->parser; ya_result return_code; for(;;) { if(ISOK(return_code = parser_next_token(p))) { if(!(return_code & PARSER_WORD)) { if(return_code & PARSER_COMMENT) { #if DO_PRINT print("[COMMENT]"); #endif continue; } if(return_code & PARSER_EOL) { #if DO_PRINT println("[EOL]"); #endif continue; } if(return_code & PARSER_EOF) { #if DO_PRINT println("[EOF]"); #endif input_stream *completed_stream = parser_pop_stream(p); /// @todo EDF NOW ! /* #if (DNSDB_USE_POSIX_ADVISE != 0) && (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L) input_stream *file_stream = buffer_input_stream_get_filtered(completed_stream); int fd = fd_input_stream_get_filedescriptor(file_stream); fdatasync(fd); posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED); #endif */ input_stream_close(completed_stream); if(parser_stream_count(p) > 0) { continue; } else { break; } } continue; } p->needle_mark = p->text; // keywords or new domain u32 text_len = parser_text_length(p); const char *text = parser_text(p); if(text_len > 0) { if(text[0] == '$') { // keyword match if(parse_word_match(text, text_len, "$ORIGIN", 7)) { if(FAIL(return_code = parser_next_word(p))) { entry->name[0] = '\0'; entry->type = TYPE_NONE; entry->class = CLASS_NONE; entry->rdata_size = 0; // zone_file_reader_free_error_message(zfr); zfr->error_message_code = return_code; zfr->error_message_buffer = "failed to parse $ORIGIN"; return return_code; } text_len = parser_text_length(p); text = parser_text(p); memcpy(&zfr->dot_origin[1], text, text_len); zfr->dot_origin_size = text_len + 1; // +1 for the dot if(FAIL(return_code = cstr_to_locase_dnsname_with_check_len(zfr->origin, &zfr->dot_origin[1], zfr->dot_origin_size - 1))) { entry->name[0] = '\0'; entry->type = TYPE_NONE; entry->class = CLASS_NONE; entry->rdata_size = 0; // zone_file_reader_free_error_message(zfr); zfr->error_message_code = return_code; zfr->error_message_buffer = "failed to parse $ORIGIN"; return return_code; } } else if(parse_word_match(text, text_len, "$TTL", 4)) { if(FAIL(return_code = parser_copy_next_ttl(p, &zfr->zttl))) { entry->name[0] = '\0'; entry->type = TYPE_NONE; entry->class = CLASS_NONE; entry->rdata_size = 0; // zone_file_reader_free_error_message(zfr); zfr->error_message_code = return_code; zfr->error_message_buffer = "failed to parse $TTL"; return return_code; } } else if(parse_word_match(text, text_len, "$INCLUDE", 8)) { char file_name[PATH_MAX]; if(FAIL(return_code = parser_copy_next_word(p, file_name, sizeof(file_name)))) { entry->name[0] = '\0'; entry->type = TYPE_NONE; entry->class = CLASS_NONE; entry->rdata_size = 0; // zone_file_reader_free_error_message(zfr); zfr->error_message_code = return_code; zfr->error_message_buffer = "failed to parse $INCLUDE"; return return_code; } if((return_code & PARSER_WORD) != 0) { ya_result err; if(ISOK(err = file_input_stream_open(file_name, &zfr->includes[zfr->includes_count]))) { parser_push_stream(&zfr->parser, &zfr->includes[zfr->includes_count]); /* #if (DNSDB_USE_POSIX_ADVISE != 0) && (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L) int fd = fd_input_stream_get_filedescriptor(&zfr->includes[zfr->includes_count]); fdatasync(fd); posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED); #endif */ zfr->includes_count++; } else { entry->name[0] = '\0'; entry->type = TYPE_NONE; entry->class = CLASS_NONE; entry->rdata_size = 0; // zone_file_reader_free_error_message(zfr); zfr->error_message_code = err; if(ISOK(asformat(&zfr->error_message_buffer, "failed to open file %s", file_name))) { zfr->error_message_allocated = ZONE_FILE_READER_MESSAGE_ALLOCATED; } return err; } } else { return_code = ZONEFILE_EXPECTED_FILE_PATH; // zone_file_reader_free_error_message(zfr); zfr->error_message_code = return_code; zfr->error_message_buffer = "expected file path after $INCLUDE"; return return_code; } } else if(parse_word_match(text, text_len, "$GENERATE", 9)) { entry->name[0] = '\0'; entry->type = TYPE_NONE; entry->class = CLASS_NONE; entry->rdata_size = 0; // zone_file_reader_free_error_message(zfr); zfr->error_message_code = ZONEFILE_FEATURE_NOT_SUPPORTED; zfr->error_message_buffer = "$GENERATE not supported"; return ZONEFILE_FEATURE_NOT_SUPPORTED; } else if(parse_word_match(text, text_len, "$CLASS", 6)) { } else if(parse_word_match(text, text_len, "$RETURN", 7)) { input_stream *completed_stream = parser_pop_stream(p); input_stream_close(completed_stream); if(parser_stream_count(p) > 0) { continue; } else { break; } } else if(parse_word_match(text, text_len, "$END", 4)) { break; } } else { // domain if((return_code & PARSER_BLANK_START) == 0) { // new domain u8 *domain = entry->name; if(!((text_len == 1) && (text[0] == '@'))) { if(text[text_len - 1] != '.') { if(FAIL(return_code = charp_to_locase_dnsname_with_check(domain, text, text_len))) { entry->type = TYPE_NONE; entry->class = CLASS_NONE; entry->rdata_size = 0; // zone_file_reader_free_error_message(zfr); zfr->error_message_code = return_code; MALLOC_OR_DIE(char*, zfr->error_message_buffer, text_len + 1, GENERIC_TAG); memcpy(zfr->error_message_buffer, text, text_len); zfr->error_message_buffer[text_len] = '\0'; zfr->error_message_allocated = ZONE_FILE_READER_MESSAGE_ALLOCATED; return return_code; } return_code = dnsname_copy(&domain[return_code - 1], zfr->origin); /// @note: cannot fail } else { if(FAIL(return_code = charp_to_locase_dnsname(domain, text, text_len))) { entry->type = TYPE_NONE; entry->class = CLASS_NONE; entry->rdata_size = 0; // zone_file_reader_free_error_message(zfr); zfr->error_message_code = return_code; MALLOC_OR_DIE(char*, zfr->error_message_buffer, text_len + 1, GENERIC_TAG); memcpy(zfr->error_message_buffer, text, text_len); zfr->error_message_buffer[text_len] = '\0'; zfr->error_message_allocated = ZONE_FILE_READER_MESSAGE_ALLOCATED; return return_code; } } } else // label is @ { dnsname_copy(domain, zfr->origin); /// @note: cannot fail dnsname_to_cstr(&zfr->dot_origin[1], zfr->origin); /// @note: cannot fail zfr->dot_origin_size = return_code + 1; zfr->template_source = TRUE; } } else { parser_rewind(p); } // TTL CLASS TYPE ... RDATA parser_mark(p); if(FAIL(parser_copy_next_ttl(p, &zfr->rttl))) { parser_rewind(p); } entry->ttl = zfr->rttl; u16 rclass = CLASS_NONE; parser_mark(p); if(FAIL(parser_copy_next_class(p, &rclass))) { parser_rewind(p); } entry->class = zfr->zclass; u16 rtype; if(FAIL(return_code = parser_copy_next_type(p, &rtype))) { entry->type = TYPE_NONE; entry->class = CLASS_NONE; entry->rdata_size = 0; // zone_file_reader_free_error_message(zfr); zfr->error_message_code = return_code; if(ISOK(asformat(&zfr->error_message_buffer, "could not parse type for %{dnsname}", entry->name))) { zfr->error_message_allocated = ZONE_FILE_READER_MESSAGE_ALLOCATED; } return return_code; } entry->type = rtype; if(rtype == TYPE_SOA) { entry->class = rclass; if(rclass == CLASS_NONE) { entry->rdata_size = 0; // zone_file_reader_free_error_message(zfr); zfr->error_message_code = ZONEFILE_SOA_WITHOUT_CLASS; zfr->error_message_buffer = "no class set on the SOA record"; return ZONEFILE_SOA_WITHOUT_CLASS; } } if(FAIL(return_code = zone_file_reader_copy_rdata_inline(p, rtype, entry->rdata, sizeof(entry->rdata), zfr->origin))) { entry->rdata_size = 0; // zone_file_reader_free_error_message(zfr); zfr->error_message_code = return_code; if(ISOK(asformat(&zfr->error_message_buffer, "could not parse rdata for %{dnsname} %{dnsclass} %{dnstype}", entry->name, &entry->class, &entry->type))) { zfr->error_message_allocated = ZONE_FILE_READER_MESSAGE_ALLOCATED; } return return_code; } entry->rdata_size = return_code; // FULL RECORD READY return SUCCESS; } } #if DO_PRINT flushout(); #endif } else { #if DO_PRINT formatln("[ERROR %r]", return_code); #endif break; } } if(ISOK(return_code)) { return_code = 1; } return return_code; } static ya_result zone_file_reader_free_record(zone_reader *zone, resource_record *entry) { return OK; } /** @brief Closes a zone file entry * * Closes a zone file entry. The function will do nothing if the zonefile has already been closed * * @param[in] zonefile a pointer to a valid (zone_file_open'ed) zone-file structure * */ static void zone_file_reader_close(zone_reader *zr) { yassert(zr != NULL); zone_file_reader *zfr = (zone_file_reader*)zr->data; parser_finalize(&zfr->parser); /* #if (DNSDB_USE_POSIX_ADVISE != 0) && (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L) int fd = fd_input_stream_get_filedescriptor(&zfr->includes[0]); fdatasync(fd); posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED); #endif */ resource_record *rr = zfr->unread_next; while(rr != NULL) { resource_record *tmp = rr; rr = rr->next; free(tmp); } zone_file_reader_free_error_message(zfr); free(zfr); zr->data = NULL; zr->vtbl = NULL; } static bool zone_file_reader_canwriteback(zone_reader *zr) { yassert(zr != NULL); zone_file_reader *zfr = (zone_file_reader*)zr->data; return !zfr->template_source; } static void zone_file_reader_handle_error(zone_reader *zr, ya_result error_code) { /* nop */ } static const char* zone_file_reader_get_last_error_message(zone_reader *zr) { zone_file_reader *zfr = (zone_file_reader*)zr->data; return zfr->error_message_buffer; } static zone_reader_vtbl zone_file_reader_vtbl = { zone_file_reader_read_record, zone_file_reader_unread_record, zone_file_reader_free_record, zone_file_reader_close, zone_file_reader_handle_error, zone_file_reader_canwriteback, zone_file_reader_get_last_error_message, "zone_file_reader_v2" }; void zone_file_reader_init_error_codes() { if(zone_file_reader_init_error_codes_done) { return; } zone_file_reader_init_error_codes_done = TRUE; error_register(ZONEFILE_FEATURE_NOT_SUPPORTED, "ZONEFILE_FEATURE_NOT_SUPPORTED"); error_register(ZONEFILE_EXPECTED_FILE_PATH, "ZONEFILE_EXPECTED_FILE_PATH"); error_register(ZONEFILE_SOA_WITHOUT_CLASS, "ZONEFILE_SOA_WITHOUT_CLASS"); error_register(ZONEFILE_SALT_TOO_BIG, "ZONEFILE_SALT_TOO_BIG"); error_register(ZONEFILE_TEXT_TOO_BIG, "ZONEFILE_TEXT_TOO_BIG"); error_register(ZONEFILE_FLAGS_TOO_BIG, "ZONEFILE_FLAGS_TOO_BIG"); error_register(ZONEFILE_SERVICE_TOO_BIG, "ZONEFILE_SERVICE_TOO_BIG"); error_register(ZONEFILE_REGEX_TOO_BIG, "ZONEFILE_REGEX_TOO_BIG"); error_register(ZONEFILE_RDATA_PARSE_ERROR, "ZONEFILE_RDATA_PARSE_ERROR"); error_register(ZONEFILE_RDATA_BUFFER_TOO_SMALL, "ZONEFILE_RDATA_BUFFER_TOO_SMALL"); error_register(ZONEFILE_RDATA_SIZE_MISMATCH, "ZONEFILE_RDATA_SIZE_MISMATCH"); } static ya_result zone_file_reader_init(zone_reader *zr) { ya_result error_code; zone_file_reader *zfr; /* ------------------------------------------------------------ */ MALLOC_OR_DIE(zone_file_reader*, zfr, sizeof (zone_file_reader), ZFREADER_TAG); ZEROMEMORY(zfr, sizeof (zone_file_reader)); if(ISOK(error_code = parser_init(&zfr->parser, zfr_string_delimiters, // by 2 zfr_multiline_delimiters, // by 2 zrf_comment_markers, // by 1 zrf_blank_makers, // by 1 zfr_escape_characters))) // by 1 { zfr->zttl = 86400; zfr->rttl = 86400; zfr->dot_origin_size = 2; // with the CHR0 sentinel zfr->zclass = CLASS_IN; zfr->rclass = CLASS_IN; zfr->rdata_size = 0; zfr->soa_found = FALSE; zfr->domain[0] = (u8)'\0'; zfr->dot_origin[0] = '.'; zfr->dot_origin[1] = '\0'; } zr->data = zfr; zr->vtbl = &zone_file_reader_vtbl; return error_code; } ya_result zone_file_reader_parse_stream(input_stream *ins, zone_reader *zr) { if(ISOK(zone_file_reader_init(zr))) { zone_file_reader *zfr = (zone_file_reader*)zr->data; // push the stream parser_push_stream(&zfr->parser, ins); } return OK; } #if DEBUG_BENCH_TEXT_ZONE_PARSE static debug_bench_s zone_file_reader_parse; static bool zone_file_reader_parse_done = FALSE; static inline void zone_file_reader_bench_register() { if(!zone_file_reader_parse_done) { zone_file_reader_parse_done = TRUE; debug_bench_register(&zone_file_reader_parse, "text parse"); } } #endif /** @brief Opens a zone file * * Opens a zone file * * @param[in] fullpath the path and name of the file to open * @param[out] zone a pointer to a structure that will be used by the function * to hold the zone-file information * * @return A result code * @retval OK : the file has been opened successfully * @retval else : an error occurred */ ya_result zone_file_reader_open(const char* fullpath, zone_reader *zr) { ya_result return_value; #if DEBUG_BENCH_TEXT_ZONE_PARSE zone_file_reader_bench_register(); u64 bench = debug_bench_start(&zone_file_reader_parse); #endif if(ISOK(return_value = zone_file_reader_init(zr))) { // push the stream zone_file_reader *zfr = (zone_file_reader*)zr->data; if(ISOK(return_value = file_input_stream_open(fullpath, &zfr->includes[0]))) { /* #if (DNSDB_USE_POSIX_ADVISE != 0) && (_XOPEN_SOURCE >= 600 || _POSIX_C_SOURCE >= 200112L) int fd = fd_input_stream_get_filedescriptor(&zfr->includes[0]); fdatasync(fd); posix_fadvise(fd, 0, 0, POSIX_FADV_DONTNEED); #endif */ parser_push_stream(&zfr->parser, &zfr->includes[zfr->includes_count++]); } else { log_debug("zone file: cannot open: '%s': %r", fullpath, return_value); zone_file_reader_close(zr); return return_value; } #if DEBUG_BENCH_TEXT_ZONE_PARSE zone_file_reader_bench_register(); debug_bench_stop(&zone_file_reader_parse, bench); #endif } return return_value; } void zone_file_reader_ignore_missing_soa(zone_reader *zr) { zone_file_reader *zfr = (zone_file_reader*)zr->data; zfr->soa_found = TRUE; } ya_result zone_file_reader_set_origin(zone_reader *zr, const u8* origin) { zone_file_reader *zfr = (zone_file_reader*)zr->data; ya_result return_code = dnsname_copy(zfr->origin, origin); return return_code; } ya_result zone_file_reader_copy_rdata(const char *text, u16 rtype, u8 *rdata, u32 rdata_size, const u8 *origin) { parser_s parser; ya_result return_code; char buffer[4096]; int n = strlen(text); if(n > sizeof(buffer) - 2) { return -1; } if(text[n - 1] != '\n') { memcpy(buffer, text, n); buffer[n] = '\n'; buffer[n + 1] = '\0'; n++; text = buffer; } if(ISOK(return_code = parser_init(&parser, zfr_string_delimiters, // by 2 zfr_multiline_delimiters, // by 2 zrf_comment_markers, // by 1 zrf_blank_makers, // by 1 zfr_escape_characters))) // by 1 { input_stream text_is; bytearray_input_stream_init_const(&text_is, (const u8*)text, n); if(ISOK(return_code = parser_push_stream(&parser, &text_is))) { return_code = zone_file_reader_copy_rdata_inline(&parser, rtype, rdata, rdata_size, origin); } // will be closed by the parser // input_stream_close(&text_is); parser_finalize(&parser); } return return_code; } /** @} */ yadifa-2.1.6-5826/lib/dnszone/src/PaxHeaders.8028/dnszone.c0000644000077100007710000000012412650131756021203 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.119344 30 ctime=1454597652.858344534 yadifa-2.1.6-5826/lib/dnszone/src/dnszone.c0000664000077100007710000001030412650131756021006 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnszone Zone loader modules * * @brief Zone loader modules * * @{ */ #include "dnszone/dnszone-config.h" #include #include #include "dnszone/dnszone-config.h" #include #include #include #include #include #include "dnszone/dnszone.h" #include "dnszone/zone_file_reader.h" #ifndef __DATE__ #define __DATE__ "date?" #endif #ifndef __TIME__ #define __TIME__ "time?" #endif #ifdef DEBUG const char *dnszone_lib = "dnszone " __DATE__ " " __TIME__ " debug"; #else const char *dnszone_lib = "dnszone " __DATE__ " " __TIME__ " release"; #endif dnslib_fingerprint dnszone_getfingerprint() { dnslib_fingerprint ret = 0 #if HAS_TSIG_SUPPORT | DNSLIB_TSIG #endif #if HAS_ACL_SUPPORT != 0 | DNSLIB_ACL #endif #if HAS_NSEC_SUPPORT != 0 | DNSLIB_NSEC #endif #if HAS_NSEC3_SUPPORT != 0 | DNSLIB_NSEC3 #endif ; return ret; } u32 dnszone_fingerprint_mask() { return DNSLIB_TSIG|DNSLIB_ACL|DNSLIB_NSEC|DNSLIB_NSEC3; } static void dnszone_register_errors() { error_register(ZONEREAD_ERROR_BASE,"ZONEREAD_ERROR_BASE"); error_register(ZRE_AXFR_FILE_NOT_FOUND,"ZRE_AXFR_FILE_NOT_FOUND"); error_register(ZRE_NO_VALID_FILE_FOUND,"ZRE_NO_VALID_FILE_FOUND"); zone_file_reader_init_error_codes(); } logger_handle *g_zone_logger = NULL; ya_result dnszone_init() { dnszone_register_errors(); if(dnscore_getfingerprint() != (dnszone_getfingerprint() & dnscore_fingerprint_mask())) { fprintf(stderr, "dnszone: Mismatched fingerprint: %s: %08x != (%08x = %08x & %08x)\n", "core", dnscore_getfingerprint(), dnszone_getfingerprint() & dnscore_fingerprint_mask(), dnszone_getfingerprint() , dnscore_fingerprint_mask()); fflush(NULL); exit(-1); } if(dnsdb_getfingerprint() != (dnszone_getfingerprint() & dnsdb_fingerprint_mask())) { fprintf(stderr, "dnszone: Mismatched fingerprint: %s: %08x != (%08x = %08x & %08x)\n", "db", dnsdb_getfingerprint(), dnszone_getfingerprint() & dnsdb_fingerprint_mask(), dnszone_getfingerprint() , dnsdb_fingerprint_mask()); fflush(NULL); exit(-1); } //g_zone_logger = logger_handle_get("zone"); return SUCCESS; } /** @} */ yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/config.guess0000644000077100007710000000013212473710127021102 xustar000000000000000030 mtime=1424986199.147058409 30 atime=1424986199.146058409 30 ctime=1454597652.837344534 yadifa-2.1.6-5826/lib/dnszone/config.guess0000755000077100007710000012367212473710127020724 0ustar00yadifayadifa00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-11-04' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/lib/dnszone/PaxHeaders.8028/depcomp0000644000077100007710000000013212473710127020137 xustar000000000000000030 mtime=1424986199.161058409 30 atime=1424986199.161058409 30 ctime=1454597652.844344534 yadifa-2.1.6-5826/lib/dnszone/depcomp0000755000077100007710000005601612473710127017756 0ustar00yadifayadifa00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # 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, 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, see . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/PaxHeaders.8028/dnsdb0000644000077100007710000000013212654663024016126 xustar000000000000000030 mtime=1454597652.282344534 30 atime=1454597651.681344534 30 ctime=1454597652.282344534 yadifa-2.1.6-5826/lib/dnsdb/0000775000077100007710000000000012654663024016011 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/Makefile.am0000644000077100007710000000012412650131756020236 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.476344 30 ctime=1454597651.907344534 yadifa-2.1.6-5826/lib/dnsdb/Makefile.am0000664000077100007710000002061212650131756020044 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ############################################################################## # # YADIFA dnsdb Makefile.am script # ############################################################################## srcdir = @srcdir@ libdir = @libdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ ACLOCAL_AMFLAGS = -I m4 dist_noinst_DATA = VERSION lib_LTLIBRARIES = libdnsdb.la I = include/dnsdb FEATURESFILE=zdb-config-features.h FEATURES=$(I)/$(FEATURESFILE) # alphabetically please pkginclude_HEADERS = \ $(FEATURES) \ $(I)/avl.h \ $(I)/btree.h \ $(I)/dictionary.h \ $(I)/dictionary-node.h \ $(I)/dnsdb-config.h \ $(I)/dnsrdata.h \ $(I)/dnssec.h \ $(I)/dnssec_config.h \ $(I)/dnssec_keystore.h \ $(I)/dnssec_task.h \ $(I)/dynupdate.h \ $(I)/hash.h \ $(I)/htable.h \ $(I)/htbt.h \ $(I)/icmtl_input_stream.h \ $(I)/journal.h \ $(I)/journal_ix.h \ $(I)/journal-cjf.h \ $(I)/journal-cjf-common.h \ $(I)/journal-cjf-idxt.h \ $(I)/journal-cjf-page.h \ $(I)/journal-cjf-page-cache.h \ $(I)/journal-cjf-page-output-stream.h \ $(I)/nsec.h \ $(I)/nsec3.h \ $(I)/nsec3_collection.h \ $(I)/nsec3_hash.h \ $(I)/nsec3_icmtl.h \ $(I)/nsec3_item.h \ $(I)/nsec3_load.h \ $(I)/nsec3_name_error.h \ $(I)/nsec3_nodata_error.h \ $(I)/nsec3_owner.h \ $(I)/nsec3_rrsig_updater.h \ $(I)/nsec3_types.h \ $(I)/nsec3_update.h \ $(I)/nsec3_zone.h \ $(I)/nsec_collection.h \ $(I)/nsec_common.h \ $(I)/rr_canonize.h \ $(I)/rrsig.h \ $(I)/rrsig_updater.h \ $(I)/xfr_copy.h \ $(I)/zdb.h \ $(I)/zdb_config.h \ $(I)/zdb_error.h \ $(I)/zdb_icmtl.h \ $(I)/zdb_listener.h \ $(I)/zdb_record.h \ $(I)/zdb_rr_label.h \ $(I)/zdb_sanitize.h \ $(I)/zdb_types.h \ $(I)/zdb_utils.h \ $(I)/zdb_cache.h \ $(I)/zdb_zone.h \ $(I)/zdb-lock.h \ $(I)/zdb-zone-arc.h \ $(I)/zdb-zone-find.h \ $(I)/zdb-zone-garbage.h \ $(I)/zdb-zone-journal.h \ $(I)/zdb-zone-lock.h \ $(I)/zdb-zone-answer-axfr.h \ $(I)/zdb-zone-answer-ixfr.h \ $(I)/zdb_zone_axfr_input_stream.h \ $(I)/zdb_zone_label.h \ $(I)/zdb_zone_label_iterator.h \ $(I)/zdb_zone_load.h \ $(I)/zdb_zone_load_interface.h \ $(I)/zdb-zone-path-provider.h \ $(I)/zdb_zone_process.h \ $(I)/zdb-zone-reader-filter.h \ $(I)/zdb_zone_write.h libdnsdb_la_SOURCES = \ src/avl.c \ src/dictionary.c \ src/dictionary_btree.c \ src/dictionary_htbt.c \ src/dynupdate_check_prerequisites.c \ src/dynupdate_icmtlhook.c \ src/dynupdate_update.c \ src/hash.c \ src/hash_table_values.c \ src/htable.c \ src/htbt.c \ src/icmtl_input_stream.c \ src/journal.c \ src/journal_ix.c \ src/journal-cjf.c \ src/journal-cjf-idxt.c \ src/journal-cjf-page.c \ src/journal-cjf-page-cache.c \ src/journal-cjf-page-output-stream.c \ src/xfr_copy.c \ src/zdb.c \ src/zdb_error.c \ src/zdb_icmtl.c \ src/zdb_listener.c \ src/zdb_query_ex.c \ src/zdb_query_ex_wire.c \ src/zdb_record.c \ src/zdb_rr_label.c \ src/zdb_sanitize.c \ src/zdb_utils.c \ src/zdb_cache.c \ src/zdb_zone.c \ src/zdb-zone-arc.c \ src/zdb-zone-find.c \ src/zdb-zone-garbage.c \ src/zdb-zone-journal.c \ src/zdb-zone-lock.c \ src/zdb-zone-answer-axfr.c \ src/zdb-zone-answer-ixfr.c \ src/zdb_zone_axfr_input_stream.c \ src/zdb_zone_label.c \ src/zdb_zone_label_iterator.c \ src/zdb_zone_load.c \ src/zdb-zone-path-provider.c \ src/zdb_zone_process.c \ src/zdb-zone-reader-filter.c \ src/zdb_zone_store_axfr.c \ src/zdb_zone_update_ixfr.c \ src/zdb_zone_write_text.c \ src/zdb_zone_write_unbound.c # DNSSEC is defined if either NSEC3 or NSEC are defined if HAS_DNSSEC_SUPPORT libdnsdb_la_SOURCES += \ src/dnssec.c \ src/dnssec_keystore.c \ src/dnssec_process.c \ src/nsec_common.c \ src/rr_canonize.c \ src/rrsig.c \ src/rrsig_updater.c \ src/zdb_update_signatures.c endif if HAS_NSEC3_SUPPORT libdnsdb_la_SOURCES += \ src/nsec3.c \ src/nsec3_collection.c \ src/nsec3_hash.c \ src/nsec3_item.c \ src/nsec3_icmtl.c \ src/nsec3_load.c \ src/nsec3_name_error.c \ src/nsec3_nodata_error.c \ src/nsec3_owner.c \ src/nsec3_rrsig_updater.c \ src/nsec3_update.c \ src/nsec3_zone.c endif if HAS_NSEC_SUPPORT libdnsdb_la_SOURCES += \ src/nsec.c \ src/nsec_collection.c endif libdnsdb_la_LDFLAGS = -version-info 3:0:0 include ../../mk/common-settings.mk include ../../mk/common-labels.mk all: REVISION REVISION: (svn info 2>/dev/null;if [ $$? -ne 0 ];then echo "Revision: 0";fi)|grep Revision:|sed 's/^Revision: *//' > REVISION src/avl.c: $(FEATURES) $(FEATURES): config.log REVISION VERSION echo "#pragma once" > $(FEATURES) if HAS_RRCACHE_ENABLED echo "#define ZDB_HAS_RRCACHE_ENABLED 1" >> $(FEATURES) else echo "#define ZDB_HAS_RRCACHE_ENABLED 0" >> $(FEATURES) endif if HAS_DNSSEC_SUPPORT echo "#define ZDB_HAS_DNSSEC_SUPPORT 1" >> $(FEATURES) else echo "#define ZDB_HAS_DNSSEC_SUPPORT 0" >> $(FEATURES) endif if HAS_NSEC_SUPPORT echo "#define ZDB_HAS_NSEC_SUPPORT 1" >> $(FEATURES) else echo "#define ZDB_HAS_NSEC_SUPPORT 0" >> $(FEATURES) endif if HAS_NSEC3_SUPPORT echo "#define ZDB_HAS_NSEC3_SUPPORT 1" >> $(FEATURES) else echo "#define ZDB_HAS_NSEC3_SUPPORT 0" >> $(FEATURES) endif if HAS_ACL_SUPPORT echo "#define ZDB_HAS_ACL_SUPPORT 1" >> $(FEATURES) else echo "#define ZDB_HAS_ACL_SUPPORT 0" >> $(FEATURES) endif if HAS_TSIG_SUPPORT echo "#define ZDB_HAS_TSIG_SUPPORT 1" >> $(FEATURES) else echo "#define ZDB_HAS_TSIG_SUPPORT 0" >> $(FEATURES) endif VP=DNSDB which printf > /dev/null 2>&1 if [ $$? -eq 0 ];then \ printf '// version %i.%i.%i.%i-%i\n' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ printf '#define $(VP)_VERSION 0x%02x%02x%02x%02x%04xLL' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ else \ echo "#define $(VP)_VERSION_(vmain_,vsub_,vminor_,vpatch_,vrevision_) ((vmain_)<<40)|((vsub_)<<32)|((vminor_)<<24)|((vpatch_)<<16)|(vrevision_)" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMAIN_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VSUB_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMINOR_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VPATCH_ 0 >> $(FEATURES)" ; \ echo "#define $(VP)_VERSION_VREVISION_ $$(cat REVISION)" >> $(FEATURES) ; \ echo '#define $(VP)_VERSION $(VP)_VERSION_($(VP)_VERSION_VMAIN_,$(VP)_VERSION_VSUB_,$(VP)_VERSION_VMINOR_,$(VP)_VERSION_VPATCH_,$(VP)_VERSION_VREVISION_)' >> $(FEATURES) ; \ fi echo "// $(FEATURES)" >> $(FEATURES) echo >> $(FEATURES) #if XXX # echo "#define ZDB_XXX 1" >> $(FEATURES) #else # echo "#define ZDB_XXX 0" >> $(FEATURES) #endif yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/ar-lib0000644000077100007710000000013212473710127017270 xustar000000000000000030 mtime=1424986199.162058409 30 atime=1424986199.162058409 30 ctime=1454597652.255344534 yadifa-2.1.6-5826/lib/dnsdb/ar-lib0000755000077100007710000001330212473710127017076 0ustar00yadifayadifa00000000000000#! /bin/sh # Wrapper for Microsoft lib.exe me=ar-lib scriptversion=2012-03-01.08; # UTC # Copyright (C) 2010-2014 Free Software Foundation, Inc. # Written by Peter Rosin . # # 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, 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . # func_error message func_error () { echo "$me: $1" 1>&2 exit 1 } file_conv= # func_file_conv build_file # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv in mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin) file=`cygpath -m "$file" || echo "$file"` ;; wine) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_at_file at_file operation archive # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE # for each of them. # When interpreting the content of the @FILE, do NOT use func_file_conv, # since the user would need to supply preconverted file names to # binutils ar, at least for MinGW. func_at_file () { operation=$2 archive=$3 at_file_contents=`cat "$1"` eval set x "$at_file_contents" shift for member do $AR -NOLOGO $operation:"$member" "$archive" || exit $? done } case $1 in '') func_error "no command. Try '$0 --help' for more information." ;; -h | --h*) cat < Eric Diaz Fernandez yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/Makefile.in0000644000077100007710000000013212654662626020257 xustar000000000000000030 mtime=1454597526.743344535 30 atime=1454597526.742344535 30 ctime=1454597652.225344534 yadifa-2.1.6-5826/lib/dnsdb/Makefile.in0000664000077100007710000017701312654662626020076 0ustar00yadifayadifa00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ############################################################################## # # YADIFA dnsdb Makefile.am script # ############################################################################## ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # ALL # ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@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@ # DNSSEC is defined if either NSEC3 or NSEC are defined @HAS_DNSSEC_SUPPORT_TRUE@am__append_1 = \ @HAS_DNSSEC_SUPPORT_TRUE@ src/dnssec.c \ @HAS_DNSSEC_SUPPORT_TRUE@ src/dnssec_keystore.c \ @HAS_DNSSEC_SUPPORT_TRUE@ src/dnssec_process.c \ @HAS_DNSSEC_SUPPORT_TRUE@ src/nsec_common.c \ @HAS_DNSSEC_SUPPORT_TRUE@ src/rr_canonize.c \ @HAS_DNSSEC_SUPPORT_TRUE@ src/rrsig.c \ @HAS_DNSSEC_SUPPORT_TRUE@ src/rrsig_updater.c \ @HAS_DNSSEC_SUPPORT_TRUE@ src/zdb_update_signatures.c @HAS_NSEC3_SUPPORT_TRUE@am__append_2 = \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3.c \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_collection.c \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_hash.c \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_item.c \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_icmtl.c \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_load.c \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_name_error.c \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_nodata_error.c \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_owner.c \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_rrsig_updater.c \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_update.c \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_zone.c @HAS_NSEC_SUPPORT_TRUE@am__append_3 = \ @HAS_NSEC_SUPPORT_TRUE@ src/nsec.c \ @HAS_NSEC_SUPPORT_TRUE@ src/nsec_collection.c @USES_SUNC_TRUE@am__append_4 = @USES_SUNC_FALSE@am__append_5 = -O0 @HAS_CC_NO_IDENT_TRUE@am__append_6 = -fno-ident @HAS_CC_ANSI_TRUE@am__append_7 = -ansi @HAS_CC_PEDANTIC_TRUE@am__append_8 = -pedantic @HAS_CC_WALL_TRUE@am__append_9 = -Wall -Wno-unknown-pragmas @HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE@am__append_10 = -Werror=missing-field-initializers @HAS_CC_STD_GNU99_TRUE@am__append_11 = -std=gnu99 @HAS_CC_STD_C99_TRUE@@HAS_CC_STD_GNU99_FALSE@am__append_12 = -std=c99 @HAS_CC_STD_GNU99_FALSE@@HAS_CC_XC99_TRUE@am__append_13 = -xc99 @HAS_CC_TUNE_NATIVE_TRUE@am__append_14 = -mtune=native @FORCE64BITS_TRUE@@HAS_CC_M64_TRUE@am__append_15 = -m64 @FORCE64BITS_TRUE@@HAS_CC_M64_TRUE@am__append_16 = -m64 @FORCE32BITS_TRUE@@FORCE64BITS_FALSE@@HAS_CC_M32_TRUE@am__append_17 = -m32 @FORCE32BITS_TRUE@@FORCE64BITS_FALSE@@HAS_CC_M32_TRUE@am__append_18 = -m32 # # DEBUG # @HAS_CC_G3_TRUE@am__append_19 = -g3 @HAS_CC_G3_FALSE@@HAS_CC_G_TRUE@am__append_20 = -g @HAS_CC_DWARF4_TRUE@am__append_21 = -gdwarf-4 @HAS_CC_DWARF3_TRUE@@HAS_CC_DWARF4_FALSE@am__append_22 = -gdwarf-3 # # Intel C Compiler # ############################################################################### #ICC #IPO= -ipo (need to use the intel xiar instead of ar) @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@am__append_23 = -DLTO -ipo @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@am__append_24 = -ipo @USES_ICC_TRUE@am__append_25 = -DUSES_ICC @HAS_CC_ANSI_ALIAS_TRUE@@USES_ICC_TRUE@am__append_26 = -ansi-alias -U__STRICT_ANSI__ @USES_ICC_TRUE@am__append_27 = -DMODE_DEBUG_ICC # # LLVM Clang # ############################################################################### # CLANG @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@am__append_28 = -DLTO -flto @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@am__append_29 = -flto @USES_CLANG_TRUE@am__append_30 = -DUSES_LLVM @USES_CLANG_TRUE@am__append_31 = -DMODE_DEBUG_CLANG # Note: add a _d suffix for debug builds ? # # Gnu C # ############################################################################### #GCC @HAS_CPU_NIAGARA_TRUE@@USES_GCC_TRUE@am__append_32 = -mcpu=niagara @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@am__append_33 = -DLTO -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@am__append_34 = -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin @USES_GCC_TRUE@am__append_35 = -DUSES_GCC @USES_GCC_TRUE@am__append_36 = -DMODE_DEBUG_GCC @USES_SUNC_TRUE@am__append_37 = -DUSES_SUNC @USES_SUNC_TRUE@am__append_38 = -DMODE_DEBUG_SUNC # Note: add a _d suffix for debug builds ? # # Unknown compiler # ############################################################################### # if an unknown compiler is used, it should have its own section @USES_UNKNOWN_TRUE@am__append_39 = -DUSES_UNKNOWN_COMPILER @USES_UNKNOWN_TRUE@am__append_40 = -DMODE_DEBUG_UNKNOWN # # Some BSD-based OSes need this # @IS_BSD_FAMILY_TRUE@am__append_41 = -I./include @IS_SOLARIS_FAMILY_TRUE@am__append_42 = -D_POSIX_PTHREAD_SEMANTICS @HAS_CC_RDYNAMIC_TRUE@am__append_43 = -rdynamic @HAS_CC_RDYNAMIC_TRUE@am__append_44 = -rdynamic # workaround a bug where clang does not handle properly profiling and optimizations @USES_CLANG_TRUE@am__append_45 = -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/../../m4/eurid.m4 \ $(top_srcdir)/../../m4/yadifa.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(dist_noinst_DATA) \ $(pkginclude_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/dnsdb/dnsdb-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = 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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libdnsdb_la_LIBADD = am__libdnsdb_la_SOURCES_DIST = src/avl.c src/dictionary.c \ src/dictionary_btree.c src/dictionary_htbt.c \ src/dynupdate_check_prerequisites.c src/dynupdate_icmtlhook.c \ src/dynupdate_update.c src/hash.c src/hash_table_values.c \ src/htable.c src/htbt.c src/icmtl_input_stream.c src/journal.c \ src/journal_ix.c src/journal-cjf.c src/journal-cjf-idxt.c \ src/journal-cjf-page.c src/journal-cjf-page-cache.c \ src/journal-cjf-page-output-stream.c src/xfr_copy.c src/zdb.c \ src/zdb_error.c src/zdb_icmtl.c src/zdb_listener.c \ src/zdb_query_ex.c src/zdb_query_ex_wire.c src/zdb_record.c \ src/zdb_rr_label.c src/zdb_sanitize.c src/zdb_utils.c \ src/zdb_cache.c src/zdb_zone.c src/zdb-zone-arc.c \ src/zdb-zone-find.c src/zdb-zone-garbage.c \ src/zdb-zone-journal.c src/zdb-zone-lock.c \ src/zdb-zone-answer-axfr.c src/zdb-zone-answer-ixfr.c \ src/zdb_zone_axfr_input_stream.c src/zdb_zone_label.c \ src/zdb_zone_label_iterator.c src/zdb_zone_load.c \ src/zdb-zone-path-provider.c src/zdb_zone_process.c \ src/zdb-zone-reader-filter.c src/zdb_zone_store_axfr.c \ src/zdb_zone_update_ixfr.c src/zdb_zone_write_text.c \ src/zdb_zone_write_unbound.c src/dnssec.c \ src/dnssec_keystore.c src/dnssec_process.c src/nsec_common.c \ src/rr_canonize.c src/rrsig.c src/rrsig_updater.c \ src/zdb_update_signatures.c src/nsec3.c src/nsec3_collection.c \ src/nsec3_hash.c src/nsec3_item.c src/nsec3_icmtl.c \ src/nsec3_load.c src/nsec3_name_error.c \ src/nsec3_nodata_error.c src/nsec3_owner.c \ src/nsec3_rrsig_updater.c src/nsec3_update.c src/nsec3_zone.c \ src/nsec.c src/nsec_collection.c am__dirstamp = $(am__leading_dot)dirstamp @HAS_DNSSEC_SUPPORT_TRUE@am__objects_1 = src/dnssec.lo \ @HAS_DNSSEC_SUPPORT_TRUE@ src/dnssec_keystore.lo \ @HAS_DNSSEC_SUPPORT_TRUE@ src/dnssec_process.lo \ @HAS_DNSSEC_SUPPORT_TRUE@ src/nsec_common.lo src/rr_canonize.lo \ @HAS_DNSSEC_SUPPORT_TRUE@ src/rrsig.lo src/rrsig_updater.lo \ @HAS_DNSSEC_SUPPORT_TRUE@ src/zdb_update_signatures.lo @HAS_NSEC3_SUPPORT_TRUE@am__objects_2 = src/nsec3.lo \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_collection.lo \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_hash.lo src/nsec3_item.lo \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_icmtl.lo src/nsec3_load.lo \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_name_error.lo \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_nodata_error.lo \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_owner.lo \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_rrsig_updater.lo \ @HAS_NSEC3_SUPPORT_TRUE@ src/nsec3_update.lo src/nsec3_zone.lo @HAS_NSEC_SUPPORT_TRUE@am__objects_3 = src/nsec.lo \ @HAS_NSEC_SUPPORT_TRUE@ src/nsec_collection.lo am_libdnsdb_la_OBJECTS = src/avl.lo src/dictionary.lo \ src/dictionary_btree.lo src/dictionary_htbt.lo \ src/dynupdate_check_prerequisites.lo \ src/dynupdate_icmtlhook.lo src/dynupdate_update.lo src/hash.lo \ src/hash_table_values.lo src/htable.lo src/htbt.lo \ src/icmtl_input_stream.lo src/journal.lo src/journal_ix.lo \ src/journal-cjf.lo src/journal-cjf-idxt.lo \ src/journal-cjf-page.lo src/journal-cjf-page-cache.lo \ src/journal-cjf-page-output-stream.lo src/xfr_copy.lo \ src/zdb.lo src/zdb_error.lo src/zdb_icmtl.lo \ src/zdb_listener.lo src/zdb_query_ex.lo \ src/zdb_query_ex_wire.lo src/zdb_record.lo src/zdb_rr_label.lo \ src/zdb_sanitize.lo src/zdb_utils.lo src/zdb_cache.lo \ src/zdb_zone.lo src/zdb-zone-arc.lo src/zdb-zone-find.lo \ src/zdb-zone-garbage.lo src/zdb-zone-journal.lo \ src/zdb-zone-lock.lo src/zdb-zone-answer-axfr.lo \ src/zdb-zone-answer-ixfr.lo src/zdb_zone_axfr_input_stream.lo \ src/zdb_zone_label.lo src/zdb_zone_label_iterator.lo \ src/zdb_zone_load.lo src/zdb-zone-path-provider.lo \ src/zdb_zone_process.lo src/zdb-zone-reader-filter.lo \ src/zdb_zone_store_axfr.lo src/zdb_zone_update_ixfr.lo \ src/zdb_zone_write_text.lo src/zdb_zone_write_unbound.lo \ $(am__objects_1) $(am__objects_2) $(am__objects_3) libdnsdb_la_OBJECTS = $(am_libdnsdb_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libdnsdb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libdnsdb_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include/dnsdb depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdnsdb_la_SOURCES) DIST_SOURCES = $(am__libdnsdb_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dist_noinst_DATA) HEADERS = $(pkginclude_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope am__DIST_COMMON = $(srcdir)/../../mk/common-labels.mk \ $(srcdir)/../../mk/common-settings.mk $(srcdir)/Makefile.in \ $(top_srcdir)/include/dnsdb/dnsdb-config.h.in AUTHORS COPYING \ ChangeLog INSTALL NEWS README ar-lib compile config.guess \ config.sub depcomp install-sh ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print VPATH = @srcdir@ ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCOPTIMISATIONFLAGS = @CCOPTIMISATIONFLAGS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DNSCORE = @DNSCORE@ DNSDB = @DNSDB@ DNSLG = @DNSLG@ DNSZONE = @DNSZONE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAS_ACL_SUPPORT = @HAS_ACL_SUPPORT@ HAS_BFD_DEBUG_SUPPORT = @HAS_BFD_DEBUG_SUPPORT@ HAS_BIG_ENDIAN = @HAS_BIG_ENDIAN@ HAS_CC_ADDRESS_SANITIZER_CHECK = @HAS_CC_ADDRESS_SANITIZER_CHECK@ HAS_CC_ANSI = @HAS_CC_ANSI@ HAS_CC_ANSI_ALIAS = @HAS_CC_ANSI_ALIAS@ HAS_CC_CATCH_UNDEFINED_BEHAVIOR = @HAS_CC_CATCH_UNDEFINED_BEHAVIOR@ HAS_CC_DWARF2 = @HAS_CC_DWARF2@ HAS_CC_DWARF3 = @HAS_CC_DWARF3@ HAS_CC_DWARF4 = @HAS_CC_DWARF4@ HAS_CC_EXCEPTIONS = @HAS_CC_EXCEPTIONS@ HAS_CC_G = @HAS_CC_G@ HAS_CC_G3 = @HAS_CC_G3@ HAS_CC_M32 = @HAS_CC_M32@ HAS_CC_M64 = @HAS_CC_M64@ HAS_CC_MISSING_FIELD_INITIALIZERS = @HAS_CC_MISSING_FIELD_INITIALIZERS@ HAS_CC_NO_IDENT = @HAS_CC_NO_IDENT@ HAS_CC_NO_OMIT_FRAME_POINTER = @HAS_CC_NO_OMIT_FRAME_POINTER@ HAS_CC_PEDANTIC = @HAS_CC_PEDANTIC@ HAS_CC_RDYNAMIC = @HAS_CC_RDYNAMIC@ HAS_CC_SANITIZE_ADDRESS = @HAS_CC_SANITIZE_ADDRESS@ HAS_CC_STACK_PROTECTOR = @HAS_CC_STACK_PROTECTOR@ HAS_CC_STD_C99 = @HAS_CC_STD_C99@ HAS_CC_STD_GNU99 = @HAS_CC_STD_GNU99@ HAS_CC_TUNE_NATIVE = @HAS_CC_TUNE_NATIVE@ HAS_CC_WALL = @HAS_CC_WALL@ HAS_CC_XC99 = @HAS_CC_XC99@ HAS_CTRL = @HAS_CTRL@ HAS_CTRL_DYNAMIC_PROVISIONING = @HAS_CTRL_DYNAMIC_PROVISIONING@ HAS_DYNUPDATE_SUPPORT = @HAS_DYNUPDATE_SUPPORT@ HAS_FULL_ASCII7 = @HAS_FULL_ASCII7@ HAS_LITTLE_ENDIAN = @HAS_LITTLE_ENDIAN@ HAS_LOGDIR = @HAS_LOGDIR@ HAS_LOG_PID_ALWAYS_ON = @HAS_LOG_PID_ALWAYS_ON@ HAS_LOG_THREAD_ID_ALWAYS_ON = @HAS_LOG_THREAD_ID_ALWAYS_ON@ HAS_MALLOC_DEBUG_SUPPORT = @HAS_MALLOC_DEBUG_SUPPORT@ HAS_MASTER_SUPPORT = @HAS_MASTER_SUPPORT@ HAS_MESSAGES_SUPPORT = @HAS_MESSAGES_SUPPORT@ HAS_MUTEX_DEBUG_SUPPORT = @HAS_MUTEX_DEBUG_SUPPORT@ HAS_NON_AA_AXFR_SUPPORT = @HAS_NON_AA_AXFR_SUPPORT@ HAS_NSID_SUPPORT = @HAS_NSID_SUPPORT@ HAS_RRL_SUPPORT = @HAS_RRL_SUPPORT@ HAS_RRSIG_MANAGEMENT_SUPPORT = @HAS_RRSIG_MANAGEMENT_SUPPORT@ HAS_TSIG_SUPPORT = @HAS_TSIG_SUPPORT@ HAS_ZALLOC_DEBUG_SUPPORT = @HAS_ZALLOC_DEBUG_SUPPORT@ HAS_ZALLOC_STATISTICS_SUPPORT = @HAS_ZALLOC_STATISTICS_SUPPORT@ HAS_ZALLOC_SUPPORT = @HAS_ZALLOC_SUPPORT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IS_BSD_FAMILY = @IS_BSD_FAMILY@ IS_DARWIN_OS = @IS_DARWIN_OS@ IS_LINUX_FAMILY = @IS_LINUX_FAMILY@ IS_SOLARIS_FAMILY = @IS_SOLARIS_FAMILY@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL = @OPENSSL@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ 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@ logdir = @logdir@ 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_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 dist_noinst_DATA = VERSION lib_LTLIBRARIES = libdnsdb.la I = include/dnsdb FEATURESFILE = zdb-config-features.h FEATURES = $(I)/$(FEATURESFILE) # alphabetically please pkginclude_HEADERS = \ $(FEATURES) \ $(I)/avl.h \ $(I)/btree.h \ $(I)/dictionary.h \ $(I)/dictionary-node.h \ $(I)/dnsdb-config.h \ $(I)/dnsrdata.h \ $(I)/dnssec.h \ $(I)/dnssec_config.h \ $(I)/dnssec_keystore.h \ $(I)/dnssec_task.h \ $(I)/dynupdate.h \ $(I)/hash.h \ $(I)/htable.h \ $(I)/htbt.h \ $(I)/icmtl_input_stream.h \ $(I)/journal.h \ $(I)/journal_ix.h \ $(I)/journal-cjf.h \ $(I)/journal-cjf-common.h \ $(I)/journal-cjf-idxt.h \ $(I)/journal-cjf-page.h \ $(I)/journal-cjf-page-cache.h \ $(I)/journal-cjf-page-output-stream.h \ $(I)/nsec.h \ $(I)/nsec3.h \ $(I)/nsec3_collection.h \ $(I)/nsec3_hash.h \ $(I)/nsec3_icmtl.h \ $(I)/nsec3_item.h \ $(I)/nsec3_load.h \ $(I)/nsec3_name_error.h \ $(I)/nsec3_nodata_error.h \ $(I)/nsec3_owner.h \ $(I)/nsec3_rrsig_updater.h \ $(I)/nsec3_types.h \ $(I)/nsec3_update.h \ $(I)/nsec3_zone.h \ $(I)/nsec_collection.h \ $(I)/nsec_common.h \ $(I)/rr_canonize.h \ $(I)/rrsig.h \ $(I)/rrsig_updater.h \ $(I)/xfr_copy.h \ $(I)/zdb.h \ $(I)/zdb_config.h \ $(I)/zdb_error.h \ $(I)/zdb_icmtl.h \ $(I)/zdb_listener.h \ $(I)/zdb_record.h \ $(I)/zdb_rr_label.h \ $(I)/zdb_sanitize.h \ $(I)/zdb_types.h \ $(I)/zdb_utils.h \ $(I)/zdb_cache.h \ $(I)/zdb_zone.h \ $(I)/zdb-lock.h \ $(I)/zdb-zone-arc.h \ $(I)/zdb-zone-find.h \ $(I)/zdb-zone-garbage.h \ $(I)/zdb-zone-journal.h \ $(I)/zdb-zone-lock.h \ $(I)/zdb-zone-answer-axfr.h \ $(I)/zdb-zone-answer-ixfr.h \ $(I)/zdb_zone_axfr_input_stream.h \ $(I)/zdb_zone_label.h \ $(I)/zdb_zone_label_iterator.h \ $(I)/zdb_zone_load.h \ $(I)/zdb_zone_load_interface.h \ $(I)/zdb-zone-path-provider.h \ $(I)/zdb_zone_process.h \ $(I)/zdb-zone-reader-filter.h \ $(I)/zdb_zone_write.h libdnsdb_la_SOURCES = src/avl.c src/dictionary.c \ src/dictionary_btree.c src/dictionary_htbt.c \ src/dynupdate_check_prerequisites.c src/dynupdate_icmtlhook.c \ src/dynupdate_update.c src/hash.c src/hash_table_values.c \ src/htable.c src/htbt.c src/icmtl_input_stream.c src/journal.c \ src/journal_ix.c src/journal-cjf.c src/journal-cjf-idxt.c \ src/journal-cjf-page.c src/journal-cjf-page-cache.c \ src/journal-cjf-page-output-stream.c src/xfr_copy.c src/zdb.c \ src/zdb_error.c src/zdb_icmtl.c src/zdb_listener.c \ src/zdb_query_ex.c src/zdb_query_ex_wire.c src/zdb_record.c \ src/zdb_rr_label.c src/zdb_sanitize.c src/zdb_utils.c \ src/zdb_cache.c src/zdb_zone.c src/zdb-zone-arc.c \ src/zdb-zone-find.c src/zdb-zone-garbage.c \ src/zdb-zone-journal.c src/zdb-zone-lock.c \ src/zdb-zone-answer-axfr.c src/zdb-zone-answer-ixfr.c \ src/zdb_zone_axfr_input_stream.c src/zdb_zone_label.c \ src/zdb_zone_label_iterator.c src/zdb_zone_load.c \ src/zdb-zone-path-provider.c src/zdb_zone_process.c \ src/zdb-zone-reader-filter.c src/zdb_zone_store_axfr.c \ src/zdb_zone_update_ixfr.c src/zdb_zone_write_text.c \ src/zdb_zone_write_unbound.c $(am__append_1) $(am__append_2) \ $(am__append_3) libdnsdb_la_LDFLAGS = -version-info 3:0:0 # # # AM_CFLAGS = -D_THREAD_SAFE -D_REENTRANT -D_FILE_OFFSET_BITS=64 \ -I$(abs_builddir) -I$(abs_srcdir)/include $(am__append_6) \ $(am__append_7) $(am__append_8) $(am__append_9) \ $(am__append_10) $(am__append_11) $(am__append_12) \ $(am__append_13) $(am__append_14) $(am__append_15) \ $(am__append_17) $(am__append_23) $(am__append_25) \ $(am__append_26) $(am__append_28) $(am__append_30) \ $(am__append_32) $(am__append_33) $(am__append_35) \ $(am__append_37) $(am__append_39) $(am__append_41) \ $(am__append_42) $(LOCALFLAGS) $(YCFLAGS) AM_LDFLAGS = $(am__append_16) $(am__append_18) $(am__append_24) \ $(am__append_29) $(am__append_34) $(YLDFLAGS) DEBUGFLAGS = $(am__append_4) $(am__append_5) $(am__append_19) \ $(am__append_20) $(am__append_21) $(am__append_22) \ $(am__append_27) $(am__append_31) $(am__append_36) \ $(am__append_38) $(am__append_40) LOCALFLAGS = -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)"' -DLOCALSTATEDIR='"$(localstatedir)"' -DDATAROOTDIR='"$(datarootdir)"' -DDATADIR='"$(datadir)"' -DLOCALEDIR='"$(localedir)"' -DLOGDIR='"$(logdir)"' @HAS_LTO_SUPPORT_FALSE@@USES_CLANG_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_FALSE@@USES_GCC_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@AM_AR = llvm-ar @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@AM_AR = gcc-ar @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@AM_AR = xiar # # Sun C # ############################################################################### # SUNC @USES_SUNC_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_FALSE@@USES_CLANG_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_FALSE@@USES_GCC_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@AM_LD = ld.gold @USES_ICC_TRUE@AM_LD = ld @USES_SUNC_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@AM_RANLIB = gcc-ranlib YRCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -DCMR YPCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -pg -DCMP $(am__append_45) YDCFLAGS = -DDEBUG $(DEBUGFLAGS) -DCMD YSCFLAGS = $(YRCFLAGS) YRLDFLAGS = YPLDFLAGS = -pg $(am__append_43) YDLDFLAGS = -g $(am__append_44) YSLDFLAGS = $(YRLDFLAGS) AM_MAKEFLAGS = MODE_CFLAGS="$(AM_CFLAGS)" CC=$(CC) AR=$(AM_AR) LD=$(AM_LD) YCFLAGS = $(YSCFLAGS) YLDFLAGS = $(YNLDFLAGS) VP = DNSDB all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../mk/common-settings.mk $(srcdir)/../../mk/common-labels.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu 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; $(srcdir)/../../mk/common-settings.mk $(srcdir)/../../mk/common-labels.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): include/dnsdb/dnsdb-config.h: include/dnsdb/stamp-h1 @test -f $@ || rm -f include/dnsdb/stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/dnsdb/stamp-h1 include/dnsdb/stamp-h1: $(top_srcdir)/include/dnsdb/dnsdb-config.h.in $(top_builddir)/config.status @rm -f include/dnsdb/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/dnsdb/dnsdb-config.h $(top_srcdir)/include/dnsdb/dnsdb-config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f include/dnsdb/stamp-h1 touch $@ distclean-hdr: -rm -f include/dnsdb/dnsdb-config.h include/dnsdb/stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/$(DEPDIR) @: > src/$(DEPDIR)/$(am__dirstamp) src/avl.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/dictionary.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/dictionary_btree.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/dictionary_htbt.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/dynupdate_check_prerequisites.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/dynupdate_icmtlhook.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/dynupdate_update.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/hash.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/hash_table_values.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/htable.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/htbt.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/icmtl_input_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/journal.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/journal_ix.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/journal-cjf.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/journal-cjf-idxt.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/journal-cjf-page.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/journal-cjf-page-cache.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/journal-cjf-page-output-stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/xfr_copy.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb_error.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb_icmtl.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb_listener.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb_query_ex.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb_query_ex_wire.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb_record.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb_rr_label.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb_sanitize.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb_utils.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb_cache.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb_zone.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb-zone-arc.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/zdb-zone-find.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb-zone-garbage.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb-zone-journal.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb-zone-lock.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb-zone-answer-axfr.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb-zone-answer-ixfr.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb_zone_axfr_input_stream.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb_zone_label.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb_zone_label_iterator.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb_zone_load.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb-zone-path-provider.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb_zone_process.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb-zone-reader-filter.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb_zone_store_axfr.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb_zone_update_ixfr.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb_zone_write_text.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb_zone_write_unbound.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/dnssec.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/dnssec_keystore.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/dnssec_process.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/nsec_common.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/rr_canonize.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/rrsig.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/rrsig_updater.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/zdb_update_signatures.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/nsec3.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/nsec3_collection.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/nsec3_hash.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/nsec3_item.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/nsec3_icmtl.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/nsec3_load.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/nsec3_name_error.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/nsec3_nodata_error.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/nsec3_owner.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/nsec3_rrsig_updater.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/nsec3_update.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/nsec3_zone.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/nsec.lo: src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp) src/nsec_collection.lo: src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) libdnsdb.la: $(libdnsdb_la_OBJECTS) $(libdnsdb_la_DEPENDENCIES) $(EXTRA_libdnsdb_la_DEPENDENCIES) $(AM_V_CCLD)$(libdnsdb_la_LINK) -rpath $(libdir) $(libdnsdb_la_OBJECTS) $(libdnsdb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f src/*.$(OBJEXT) -rm -f src/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/avl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dictionary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dictionary_btree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dictionary_htbt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dnssec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dnssec_keystore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dnssec_process.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dynupdate_check_prerequisites.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dynupdate_icmtlhook.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/dynupdate_update.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/hash_table_values.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/htable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/htbt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/icmtl_input_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/journal-cjf-idxt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/journal-cjf-page-cache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/journal-cjf-page-output-stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/journal-cjf-page.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/journal-cjf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/journal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/journal_ix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec3_collection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec3_hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec3_icmtl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec3_item.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec3_load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec3_name_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec3_nodata_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec3_owner.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec3_rrsig_updater.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec3_update.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec3_zone.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec_collection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/nsec_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/rr_canonize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/rrsig.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/rrsig_updater.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/xfr_copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb-zone-answer-axfr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb-zone-answer-ixfr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb-zone-arc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb-zone-find.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb-zone-garbage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb-zone-journal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb-zone-lock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb-zone-path-provider.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb-zone-reader-filter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_cache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_icmtl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_listener.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_query_ex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_query_ex_wire.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_record.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_rr_label.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_sanitize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_update_signatures.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_zone.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_zone_axfr_input_stream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_zone_label.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_zone_label_iterator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_zone_load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_zone_process.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_zone_store_axfr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_zone_update_ixfr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_zone_write_text.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/zdb_zone_write_unbound.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf src/.libs src/_libs distclean-libtool: -rm -f libtool config.lt install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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 "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -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__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(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 \ && cd "$$am__cwd" \ || exit 1 $(am__post_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: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { 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-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgincludedir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f src/$(DEPDIR)/$(am__dirstamp) -rm -f src/$(am__dirstamp) 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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf src/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pkgincludeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf src/$(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-libLTLIBRARIES uninstall-pkgincludeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ clean-cscope clean-generic clean-libLTLIBRARIES clean-libtool \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-compile 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-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pkgincludeHEADERS 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 tags-am uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-pkgincludeHEADERS .PRECIOUS: Makefile release: echo YCFLAGS=$(YRCFLAGS) echo YLDFLAGS=$(YRLDFLAGS) $(MAKE) all "YCFLAGS=$(YRCFLAGS)" "YLDFLAGS=$(YRLDFLAGS)" profile: echo YCFLAGS=$(YPCFLAGS) echo YLDFLAGS=$(YPLDFLAGS) $(MAKE) all "YCFLAGS=$(YPCFLAGS)" "YLDFLAGS=$(YPLDFLAGS)" debug: echo YCFLAGS=$(YDCFLAGS) echo YLDFLAGS=$(YDLDFLAGS) $(MAKE) all "YCFLAGS=$(YDCFLAGS)" "YLDFLAGS=$(YDLDFLAGS)" rebuild: clean release release-install: release install profile-install: profile install debug-install: debug install buildinfo.h: config.log echo \#pragma once > buildinfo.h 2> /dev/null echo // generated file, do not modify >> buildinfo.h 2> /dev/null echo \#define BUILD_OPTIONS \"$$(grep "./configure" config.log | head -1 | sed 's/.*\.\/configure *//')\" >> buildinfo.h 2> /dev/null all: REVISION REVISION: (svn info 2>/dev/null;if [ $$? -ne 0 ];then echo "Revision: 0";fi)|grep Revision:|sed 's/^Revision: *//' > REVISION src/avl.c: $(FEATURES) $(FEATURES): config.log REVISION VERSION echo "#pragma once" > $(FEATURES) @HAS_RRCACHE_ENABLED_TRUE@ echo "#define ZDB_HAS_RRCACHE_ENABLED 1" >> $(FEATURES) @HAS_RRCACHE_ENABLED_FALSE@ echo "#define ZDB_HAS_RRCACHE_ENABLED 0" >> $(FEATURES) @HAS_DNSSEC_SUPPORT_TRUE@ echo "#define ZDB_HAS_DNSSEC_SUPPORT 1" >> $(FEATURES) @HAS_DNSSEC_SUPPORT_FALSE@ echo "#define ZDB_HAS_DNSSEC_SUPPORT 0" >> $(FEATURES) @HAS_NSEC_SUPPORT_TRUE@ echo "#define ZDB_HAS_NSEC_SUPPORT 1" >> $(FEATURES) @HAS_NSEC_SUPPORT_FALSE@ echo "#define ZDB_HAS_NSEC_SUPPORT 0" >> $(FEATURES) @HAS_NSEC3_SUPPORT_TRUE@ echo "#define ZDB_HAS_NSEC3_SUPPORT 1" >> $(FEATURES) @HAS_NSEC3_SUPPORT_FALSE@ echo "#define ZDB_HAS_NSEC3_SUPPORT 0" >> $(FEATURES) @HAS_ACL_SUPPORT_TRUE@ echo "#define ZDB_HAS_ACL_SUPPORT 1" >> $(FEATURES) @HAS_ACL_SUPPORT_FALSE@ echo "#define ZDB_HAS_ACL_SUPPORT 0" >> $(FEATURES) @HAS_TSIG_SUPPORT_TRUE@ echo "#define ZDB_HAS_TSIG_SUPPORT 1" >> $(FEATURES) @HAS_TSIG_SUPPORT_FALSE@ echo "#define ZDB_HAS_TSIG_SUPPORT 0" >> $(FEATURES) which printf > /dev/null 2>&1 if [ $$? -eq 0 ];then \ printf '// version %i.%i.%i.%i-%i\n' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ printf '#define $(VP)_VERSION 0x%02x%02x%02x%02x%04xLL' $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1 \2 \3/') 0 $$(cat REVISION) >> $(FEATURES) ; \ else \ echo "#define $(VP)_VERSION_(vmain_,vsub_,vminor_,vpatch_,vrevision_) ((vmain_)<<40)|((vsub_)<<32)|((vminor_)<<24)|((vpatch_)<<16)|(vrevision_)" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMAIN_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\1')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VSUB_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VMINOR_ $$(cat VERSION|sed 's/.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\3')" >> $(FEATURES) ; \ echo "#define $(VP)_VERSION_VPATCH_ 0 >> $(FEATURES)" ; \ echo "#define $(VP)_VERSION_VREVISION_ $$(cat REVISION)" >> $(FEATURES) ; \ echo '#define $(VP)_VERSION $(VP)_VERSION_($(VP)_VERSION_VMAIN_,$(VP)_VERSION_VSUB_,$(VP)_VERSION_VMINOR_,$(VP)_VERSION_VPATCH_,$(VP)_VERSION_VREVISION_)' >> $(FEATURES) ; \ fi echo "// $(FEATURES)" >> $(FEATURES) echo >> $(FEATURES) #if XXX # echo "#define ZDB_XXX 1" >> $(FEATURES) #else # echo "#define ZDB_XXX 0" >> $(FEATURES) #endif # 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: yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/INSTALL0000644000077100007710000000012411734354534017236 xustar000000000000000027 mtime=1332861276.075564 27 atime=1454597464.254344 30 ctime=1454597652.244344534 yadifa-2.1.6-5826/lib/dnsdb/INSTALL0000664000077100007710000004015611734354534017051 0ustar00yadifayadifa00000000000000Quick installation ****************** You will need the most up-to-date aclocal, autoheader, libtoolize, automaken autoconf, make and gcc installed dnscore must be installed openssl should be installed rm -f config.sub config.guess ltmain.sh aclocal autoheader libtoolize automake --add-missing autoconf ./configure make sudo make install Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `--enable-tiny-footprint' Tell to the internal memory allocator of the database to allocate smaller chunks of memory at once. `--disable-acl' Disables ACL support (not recommended) `--disable-tsig' Disables TSIG support (not recommended) `--disable-nsec3' Disables NSEC3 support (not recommended) `--disable-nsec' Disables NSEC support (not recommended) `--with-openssl=DIR' Use the openssl from directory DIR (where DIR is the PREFIX of openssl) `--with-dnscore=DIR' Use the dnscore from directory DIR (where DIR is the PREFIX of dnscore) `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/compile0000644000077100007710000000013212473710127017552 xustar000000000000000030 mtime=1424986199.162058409 30 atime=1424986199.162058409 30 ctime=1454597652.259344534 yadifa-2.1.6-5826/lib/dnsdb/compile0000755000077100007710000001624512473710127017371 0ustar00yadifayadifa00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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, 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/configure0000644000077100007710000000013212654662627020117 xustar000000000000000030 mtime=1454597527.734344535 30 atime=1454597527.216344535 30 ctime=1454597651.912344534 yadifa-2.1.6-5826/lib/dnsdb/configure0000775000077100007710000240720612654662627017743 0ustar00yadifayadifa00000000000000#! /bin/sh # From configure.ac Revision: 5826 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for dnsdb 2.1.6-5826. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: bugreport@yadifa.eu about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='dnsdb' PACKAGE_TARNAME='dnsdb' PACKAGE_VERSION='2.1.6-5826' PACKAGE_STRING='dnsdb 2.1.6-5826' PACKAGE_BUGREPORT='bugreport@yadifa.eu' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS HAS_LTO_SUPPORT_FALSE HAS_LTO_SUPPORT_TRUE DNSLG DNSZONE DNSDB DNSCORE OPENSSL HAS_RRCACHE_ENABLED_FALSE HAS_RRCACHE_ENABLED_TRUE HAS_RDTSC_FALSE HAS_RDTSC_TRUE HAS_TCL_FALSE HAS_TCL_TRUE HAS_DROPALL_SUPPORT_FALSE HAS_DROPALL_SUPPORT_TRUE HAS_MIRROR_SUPPORT_FALSE HAS_MIRROR_SUPPORT_TRUE HAS_NSEC_SUPPORT_FALSE HAS_NSEC_SUPPORT_TRUE HAS_NSEC3_SUPPORT_FALSE HAS_NSEC3_SUPPORT_TRUE HAS_DNSSEC_SUPPORT_FALSE HAS_DNSSEC_SUPPORT_TRUE HAS_SOCKADDR_IN6_SIN6_LEN_FALSE HAS_SOCKADDR_IN6_SIN6_LEN_TRUE HAS_SOCKADDR_IN_SIN_LEN_FALSE HAS_SOCKADDR_IN_SIN_LEN_TRUE HAS_SOCKADDR_SA_LEN_FALSE HAS_SOCKADDR_SA_LEN_TRUE logdir HAS_LOGDIR HAS_LOGDIR_FALSE HAS_LOGDIR_TRUE HAS_NON_AA_AXFR_SUPPORT HAS_NON_AA_AXFR_SUPPORT_FALSE HAS_NON_AA_AXFR_SUPPORT_TRUE HAS_FULL_ASCII7 HAS_FULL_ASCII7_FALSE HAS_FULL_ASCII7_TRUE HAS_LOG_PID_ALWAYS_ON HAS_LOG_PID_ALWAYS_ON_FALSE HAS_LOG_PID_ALWAYS_ON_TRUE HAS_LOG_THREAD_ID_ALWAYS_ON HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE HAS_MUTEX_DEBUG_SUPPORT HAS_MUTEX_DEBUG_SUPPORT_FALSE HAS_MUTEX_DEBUG_SUPPORT_TRUE HAS_BFD_DEBUG_SUPPORT HAS_BFD_DEBUG_SUPPORT_FALSE HAS_BFD_DEBUG_SUPPORT_TRUE HAS_MALLOC_DEBUG_SUPPORT HAS_MALLOC_DEBUG_SUPPORT_FALSE HAS_MALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_DEBUG_SUPPORT HAS_ZALLOC_DEBUG_SUPPORT_FALSE HAS_ZALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_STATISTICS_SUPPORT HAS_ZALLOC_STATISTICS_SUPPORT_FALSE HAS_ZALLOC_STATISTICS_SUPPORT_TRUE HAS_ZALLOC_SUPPORT HAS_ZALLOC_SUPPORT_FALSE HAS_ZALLOC_SUPPORT_TRUE HAS_RRSIG_MANAGEMENT_SUPPORT HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE HAS_DYNUPDATE_SUPPORT HAS_DYNUPDATE_SUPPORT_FALSE HAS_DYNUPDATE_SUPPORT_TRUE HAS_TSIG_SUPPORT HAS_TSIG_SUPPORT_FALSE HAS_TSIG_SUPPORT_TRUE HAS_ACL_SUPPORT HAS_ACL_SUPPORT_FALSE HAS_ACL_SUPPORT_TRUE HAS_NSID_SUPPORT HAS_NSID_SUPPORT_FALSE HAS_NSID_SUPPORT_TRUE HAS_CTRL HAS_MASTER_SUPPORT HAS_MASTER_SUPPORT_FALSE HAS_MASTER_SUPPORT_TRUE HAS_MESSAGES_SUPPORT HAS_MESSAGES_SUPPORT_FALSE HAS_MESSAGES_SUPPORT_TRUE HAS_RRL_SUPPORT HAS_RRL_SUPPORT_FALSE HAS_RRL_SUPPORT_TRUE HAS_CTRL_DYNAMIC_PROVISIONING HAS_CTRL_DYNAMIC_PROVISIONING_FALSE HAS_CTRL_DYNAMIC_PROVISIONING_TRUE HAS_CTRL_FALSE HAS_CTRL_TRUE HAS_BIG_ENDIAN HAS_LITTLE_ENDIAN HAS_BIG_ENDIAN_FALSE HAS_BIG_ENDIAN_TRUE HAS_LITTLE_ENDIAN_FALSE HAS_LITTLE_ENDIAN_TRUE HAS_MEMALIGN_ISSUES_FALSE HAS_MEMALIGN_ISSUES_TRUE HAS_CC_RDYNAMIC HAS_CC_RDYNAMIC_FALSE HAS_CC_RDYNAMIC_TRUE HAS_CC_CATCH_UNDEFINED_BEHAVIOR HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE HAS_CC_ADDRESS_SANITIZER_CHECK HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE HAS_CC_NO_OMIT_FRAME_POINTER HAS_CC_NO_OMIT_FRAME_POINTER_FALSE HAS_CC_NO_OMIT_FRAME_POINTER_TRUE HAS_CC_SANITIZE_ADDRESS HAS_CC_SANITIZE_ADDRESS_FALSE HAS_CC_SANITIZE_ADDRESS_TRUE HAS_CC_MISSING_FIELD_INITIALIZERS HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE HAS_CC_EXCEPTIONS HAS_CC_EXCEPTIONS_FALSE HAS_CC_EXCEPTIONS_TRUE HAS_CC_STACK_PROTECTOR HAS_CC_STACK_PROTECTOR_FALSE HAS_CC_STACK_PROTECTOR_TRUE HAS_CC_DWARF4 HAS_CC_DWARF4_FALSE HAS_CC_DWARF4_TRUE HAS_CC_DWARF3 HAS_CC_DWARF3_FALSE HAS_CC_DWARF3_TRUE HAS_CC_DWARF2 HAS_CC_DWARF2_FALSE HAS_CC_DWARF2_TRUE HAS_CC_G3 HAS_CC_G3_FALSE HAS_CC_G3_TRUE HAS_CC_G HAS_CC_G_FALSE HAS_CC_G_TRUE HAS_CC_WALL HAS_CC_WALL_FALSE HAS_CC_WALL_TRUE HAS_CC_M64 HAS_CC_M64_FALSE HAS_CC_M64_TRUE HAS_CC_M32 HAS_CC_M32_FALSE HAS_CC_M32_TRUE HAS_CC_XC99 HAS_CC_XC99_FALSE HAS_CC_XC99_TRUE HAS_CC_STD_C99 HAS_CC_STD_C99_FALSE HAS_CC_STD_C99_TRUE HAS_CC_STD_GNU99 HAS_CC_STD_GNU99_FALSE HAS_CC_STD_GNU99_TRUE HAS_CC_PEDANTIC HAS_CC_PEDANTIC_FALSE HAS_CC_PEDANTIC_TRUE HAS_CC_ANSI_ALIAS HAS_CC_ANSI_ALIAS_FALSE HAS_CC_ANSI_ALIAS_TRUE HAS_CC_ANSI HAS_CC_ANSI_FALSE HAS_CC_ANSI_TRUE HAS_CC_NO_IDENT HAS_CC_NO_IDENT_FALSE HAS_CC_NO_IDENT_TRUE HAS_CC_TUNE_NATIVE HAS_CC_TUNE_NATIVE_FALSE HAS_CC_TUNE_NATIVE_TRUE CCOPTIMISATIONFLAGS USES_UNKNOWN_FALSE USES_UNKNOWN_TRUE USES_SUNC_FALSE USES_SUNC_TRUE USES_CLANG_FALSE USES_CLANG_TRUE USES_GCC_FALSE USES_GCC_TRUE USES_ICC_FALSE USES_ICC_TRUE FORCE64BITS_FALSE FORCE64BITS_TRUE FORCE32BITS_FALSE FORCE32BITS_TRUE HAS_CPU_AMDINTEL_FALSE HAS_CPU_AMDINTEL_TRUE HAS_CPU_NIAGARA_FALSE HAS_CPU_NIAGARA_TRUE IS_SOLARIS_FAMILY IS_SOLARIS_FAMILY_FALSE IS_SOLARIS_FAMILY_TRUE IS_LINUX_FAMILY IS_LINUX_FAMILY_FALSE IS_LINUX_FAMILY_TRUE IS_BSD_FAMILY IS_BSD_FAMILY_FALSE IS_BSD_FAMILY_TRUE IS_DARWIN_OS IS_DARWIN_OS_FALSE IS_DARWIN_OS_TRUE CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC ac_ct_AR AR build_os build_vendor build_cpu build AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_largefile enable_force32bits enable_force64bits enable_ctrl_dynamic_provisioning enable_rrl enable_messages enable_master enable_ctrl enable_nsid enable_acl enable_tsig enable_dynupdate enable_rrsig_management enable_zalloc enable_zalloc_statistics enable_zalloc_debug enable_malloc_debug enable_bfd_debug enable_mutex_debug enable_log_thread_id enable_log_pid enable_full_ascii7 enable_non_aa_axfr_support with_logdir with_openssl_lib with_openssl_include with_openssl with_dnscore with_dnsdb with_dnszone with_dnslg enable_lto ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures dnsdb 2.1.6-5826 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/dnsdb] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of dnsdb 2.1.6-5826:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=no] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --enable-force32bits Forces a 32 bits binary compilation --enable-force64bits Forces a 64 bits binary compilation --enable-ctrl-dynamic-provisioning Enable dynamic provisioning --disable-rrl Disable DNS Response Rate Limiter --enable-messages Enable use messages instead of send (needed if you use more than one IP aliased on the same network interface) --disable-master Disable DNS master --enable-ctrl Enable remote control --disable-nsid Disable NSID support --disable-acl Disable ACL support --disable-tsig Disable TSIG support --disable-dynupdate Disable dynamic update support --disable-rrsig-management Disable RRSIG verification and generation for zones --disable-zalloc Disable zalloc memory system --enable-zalloc-statistics Enable zalloc statistics support --enable-zalloc-debug Enable zalloc debug support --enable-malloc-debug Enable malloc debug support --enable-bfd-debug Enable bfd debug support --enable-mutex-debug Enable mutex debug support --enable-log-thread-id Enable write the thread id in each line of log --enable-log-pid Enable write the pid in each line of log --enable-full-ascii7 Enable YADIFA will now accept ASCII7 characters in DNS names (not recommended) --enable-non-aa-axfr-support Enable Allows AXFR answer from master without AA bit set (Microsoft DNS) --enable-lto Enable LTO support, requires gold linker Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-logdir build sets the directory where to put the log files --with-openssl-lib=DIR Use the openssl library from directory DIR --with-openssl-include=DIR Use the openssl headers from directory DIR --with-openssl=DIR Use the openssl from directory DIR --with-dnscore=DIR Use the dnscore from directory DIR/lib (devs only) --with-dnsdb=DIR Use the dnsdb from directory DIR/lib (devs only) --with-dnszone=DIR Use the dnszone from directory DIR/lib (devs only) --with-dnslg=DIR Use the dnslg from directory DIR/lib (devs only) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF dnsdb configure 2.1.6-5826 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------------- ## ## Report this to bugreport@yadifa.eu ## ## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by dnsdb $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo echo echo "DNSDB START" echo "-----------" echo echo cpu_intel_compatible=1 icc_enabled=0 ac_os_workaround_done=0 # requires_tcl=0 requires_ssl=0 requires_dnscore=0 requires_dnsdb=0 requires_dnszone=0 requires_dnslg=0 requires_dnstcl=0 ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='dnsdb' VERSION='2.1.6-5826' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 $as_echo_n "checking how to create a pax tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_pax-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' am__tar_="$_am_tar --format=posix -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x pax -w "$$tardir"' am__tar_='pax -L -x pax -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H pax -L' am__tar_='find "$tardir" -print | cpio -o -H pax -L' am__untar='cpio -i -H pax -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_pax}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_pax+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_pax=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 $as_echo "$am_cv_prog_tar_pax" >&6; } # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers include/dnsdb/dnsdb-config.h" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -n "$ac_tool_prefix"; then for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 $as_echo_n "checking the archiver ($AR) interface... " >&6; } if ${am_cv_ar_interface+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 $as_echo "$am_cv_ar_interface" >&6; } case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) as_fn_error $? "could not determine $AR interface" "$LINENO" 5 ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=no fi enable_dlopen=no enable_win32_dll=no # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: case "$(uname -s)" in Darwin) alias libtoolize="glibtoolize" which libtool > /dev/null 2>&1 if [ $? -ne 0 ] then which glibtool > /dev/null 2>&1 if [ $? -eq 0 ] then alias libtool="glibtool" fi fi echo 'brol' | sed 's/brol/truc/' > /dev/null 2>&1 if [ $? -ne 0 ] then alias sed="gsed" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin workaround" >&5 $as_echo "Darwin workaround" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: nothing to do" >&5 $as_echo "nothing to do" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf in -lc" >&5 $as_echo_n "checking for printf in -lc... " >&6; } if ${ac_cv_lib_c_printf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char printf (); int main () { return printf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_printf=yes else ac_cv_lib_c_printf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_printf" >&5 $as_echo "$ac_cv_lib_c_printf" >&6; } if test "x$ac_cv_lib_c_printf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBC 1 _ACEOF LIBS="-lc $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in linux/limits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/types.h i386/types.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default" if test "x$ac_cv_type_uint64_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UINT64_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default" if test "x$ac_cv_type_int64_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INT64_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" if test "x$ac_cv_type_long_long" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LONG_LONG 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "$ac_includes_default" if test "x$ac_cv_type_u_char" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_U_CHAR 1 _ACEOF fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi if [ $ac_os_workaround_done -eq 0 ] then ac_os_workaround_done=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of OS this is" >&5 $as_echo_n "checking what kind of OS this is... " >&6; } is_darwin_os=0 is_bsd_family=0 is_solaris_family=0 is_linux_family=0 case "$(uname -s)" in Darwin) is_darwin_os=1 is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OSX" >&5 $as_echo "OSX" >&6; } ;; FreeBSD) is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: BSD" >&5 $as_echo "BSD" >&6; } ;; Linux) is_linux_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 $as_echo "Linux" >&6; } ;; SunOS) is_solaris_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SunOS" >&5 $as_echo "SunOS" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: not specifically supported" >&5 $as_echo "not specifically supported" >&6; } ;; esac if [ "$is_darwin_os" = "" ] then echo "OS detection failed to give relevant results" exit 1; fi if [ $is_darwin_os -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 1 _ACEOF if true; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 0 _ACEOF if false; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi fi if [ $is_bsd_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 1 _ACEOF if true; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 0 _ACEOF if false; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi fi if [ $is_linux_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 1 _ACEOF if true; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 0 _ACEOF if false; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi fi if [ $is_solaris_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 1 _ACEOF if true; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 0 _ACEOF if false; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi fi fi cat >>confdefs.h <<_ACEOF #define DEFAULT_ASSUMED_CPU_COUNT 2 _ACEOF cpu_intel_compatible=1 if false; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi if false; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for the CPU options" >&5 $as_echo_n "checking checking for the CPU options... " >&6; } CPU_UNKNOWN=1 CFLAGS3264= case "$(uname -i 2>/dev/null)" in SUNW,SPARC-Enterprise-T1000) cat >>confdefs.h <<_ACEOF #define HAS_CPU_NIAGARA 1 _ACEOF if true; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: UtrasparcT1" >&5 $as_echo "UtrasparcT1" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=0 ;; *) ;; esac case "$(uname -m)" in x86_64) cat >>confdefs.h <<_ACEOF #define HAS_CPU_AMDINTEL 1 _ACEOF if true; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: AMD/Intel" >&5 $as_echo "AMD/Intel" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=1 ;; *) ;; esac case "${CPU_UNKNOWN}" in 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: generic" >&5 $as_echo "generic" >&6; } ;; 0) ;; esac if [ "$is_solaris_family" = "" ] then echo "OS must be detected first" exit 1 fi if [ $is_solaris_family -eq 1 ] then echo "Solaris ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if either force 32 or 64 bits is enabled" >&5 $as_echo_n "checking if either force 32 or 64 bits is enabled... " >&6; } if [ ! "$enable_force32bits" = "yes" ] then if [ ! "$enable_force64bits" = "yes" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forcing 64 bits" >&5 $as_echo "no, forcing 64 bits" >&6; } enable_force64bits="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else echo "Not Solaris ..." fi echo "Force ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 32 bits is enabled" >&5 $as_echo_n "checking if force 32 bits is enabled... " >&6; } if false; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi # Check whether --enable-force32bits was given. if test "${enable_force32bits+set}" = set; then : enableval=$enable_force32bits; enable_force32bits=yes else enable_force32bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force32bits" >&5 $as_echo "$enable_force32bits" >&6; } case "$enable_force32bits" in yes) CFLAGS3264=-m32 if test $enable_force32bits = yes; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 64 bits is enabled" >&5 $as_echo_n "checking if force 64 bits is enabled... " >&6; } if false; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi # Check whether --enable-force64bits was given. if test "${enable_force64bits+set}" = set; then : enableval=$enable_force64bits; enable_force64bits=yes else enable_force64bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force64bits" >&5 $as_echo "$enable_force64bits" >&6; } case "$enable_force64bits" in yes) CFLAGS3264=-m64 if test $enable_force64bits = yes; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi if [ "$enable_force32" = "yes" ] then echo "cannot do both --enable-force32bits and --enable-force64bits at the same time" exit 1 fi ;; *) ;; esac cat /etc/redhat-version > /dev/null 2>&1 if [ $? -eq 0 ] then is_redhat_family=1 else is_redhat_family=0 fi CFLAGS= VERSION_OPT=--version $CC --version > /dev/null 2>&1 if [ $? -ne 0 ] then $CC -V > /dev/null 2>&1 if [ $? -ne 0 ] then CCVER='0.0' CCNAME='unknown' VERSION_OPT='' else VERSION_OPT='-V' fi fi if [ ! "$VERSION_OPT" = "" ] then CCVER=$($CC $VERSION_OPT 2>&1|head -1|sed 's/[^0-9.]*\([0-9.]*\).*/\1/') if [ "$CCVER" = "" ] then CCVER='0.0' fi CCNAME=$($CC $VERSION_OPT 2>&1|head -1|sed -e 's/.*clang.*/clang/' -e 's/.*gcc.*/gcc/' -e 's/.*icc.*/icc/' -e 's/.*Sun C.*/Sun C/'|tr A-Z a-z) if [ "$CCNAME" = "" ] then CCNAME='unknown' fi else CCVER='0.0' CCNAME='unknown' fi # version opt CCMAJOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $1}') CCMINOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $2}') if [ "$CCMAJOR" = "" ] then CCMAJOR=0 fi if [ "$CCMINOR" = "" ] then CCMINOR=0 fi if [ "$CCNAME" = "gcc" ] then CCOPTIMISATIONFLAGS=-O3 if [ $CCMAJOR -lt 4 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC < 4.0 has optimisations issues with YADIFA." sleep 1 elif [ $CCMAJOR -eq 4 ] then if [ $CCMINOR -lt 6 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC before 4.6 have optimisation issues with YADIFA." sleep 1 elif [ $CCMINOR -eq 6 ] then CCOPTIMISATIONFLAGS=-O2 else # hopefully after 4.6 the issue is fixed ... CCOPTIMISATIONFLAGS=-O3 fi fi if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if true; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "icc" ] then echo "ICC" CCOPTIMISATIONFLAGS=-O3 if true; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi AR=xiar elif [ "$CCNAME" = "clang" ] then echo "CLANG" CCOPTIMISATIONFLAGS=-O3 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if true; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "Sun C" ] then echo "Sun C" CCOPTIMISATIONFLAGS=-xO5 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if true; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi else echo "unsupported compiler" CCNAME=$CC CCOPTIMISATIONFLAGS=-O2 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if true; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi fi # # We've been told RedHat does not like -O3 at all, so ... # if [ $is_redhat_family -ne 0 ] then if [ "$CCOPTIMISATIONFLAGS " eq "-O3" ] then CCOPTIMISATIONFLAGS=-O2 fi fi echo "detected compiler is $CCNAME $CCMAJOR $CCMINOR" CCOPTIMISATIONFLAGS=$CCOPTIMISATIONFLAGS if [ $cpu_intel_compatible -eq 0 ] then if [ $icc_enabled -ne 0 ] then echo "ERROR: cannot enable ICC with CPU other than x86 or amd64" exit 1 fi fi # # AC_COMPILER_SUPPORTS -mtune=native # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mtune=native" >&5 $as_echo_n "checking if compiler supports -mtune=native... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-TUNE_NATIVE.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -mtune=native test-gcc-TUNE_NATIVE.c -o test-gcc-TUNE_NATIVE > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-TUNE_NATIVE* # # AC_COMPILER_SUPPORTS -fno-ident # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-ident" >&5 $as_echo_n "checking if compiler supports -fno-ident... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_IDENT.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-ident test-gcc-NO_IDENT.c -o test-gcc-NO_IDENT > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_IDENT* # # AC_COMPILER_SUPPORTS -ansi # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi" >&5 $as_echo_n "checking if compiler supports -ansi... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi test-gcc-ANSI.c -o test-gcc-ANSI > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI* # # AC_COMPILER_SUPPORTS -ansi-alias # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi-alias" >&5 $as_echo_n "checking if compiler supports -ansi-alias... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI_ALIAS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi-alias test-gcc-ANSI_ALIAS.c -o test-gcc-ANSI_ALIAS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI_ALIAS* # # AC_COMPILER_SUPPORTS -pedantic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -pedantic" >&5 $as_echo_n "checking if compiler supports -pedantic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-PEDANTIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -pedantic test-gcc-PEDANTIC.c -o test-gcc-PEDANTIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-PEDANTIC* # # AC_COMPILER_SUPPORTS -std=gnu99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=gnu99" >&5 $as_echo_n "checking if compiler supports -std=gnu99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_GNU99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=gnu99 test-gcc-STD_GNU99.c -o test-gcc-STD_GNU99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_GNU99* # # AC_COMPILER_SUPPORTS -std=c99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=c99" >&5 $as_echo_n "checking if compiler supports -std=c99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_C99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=c99 test-gcc-STD_C99.c -o test-gcc-STD_C99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_C99* # # AC_COMPILER_SUPPORTS -xc99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -xc99" >&5 $as_echo_n "checking if compiler supports -xc99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-XC99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -xc99 test-gcc-XC99.c -o test-gcc-XC99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-XC99* # # AC_COMPILER_SUPPORTS -m32 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m32" >&5 $as_echo_n "checking if compiler supports -m32... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M32.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m32 test-gcc-M32.c -o test-gcc-M32 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M32* # # AC_COMPILER_SUPPORTS -m64 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m64" >&5 $as_echo_n "checking if compiler supports -m64... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M64.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m64 test-gcc-M64.c -o test-gcc-M64 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M64* # # AC_COMPILER_SUPPORTS -Wall # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Wall" >&5 $as_echo_n "checking if compiler supports -Wall... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-WALL.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Wall test-gcc-WALL.c -o test-gcc-WALL > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-WALL* # # AC_COMPILER_SUPPORTS -g # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g" >&5 $as_echo_n "checking if compiler supports -g... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g test-gcc-G.c -o test-gcc-G > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G* # # AC_COMPILER_SUPPORTS -g3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g3" >&5 $as_echo_n "checking if compiler supports -g3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g3 test-gcc-G3.c -o test-gcc-G3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G3* # # AC_COMPILER_SUPPORTS -gdwarf-2 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-2" >&5 $as_echo_n "checking if compiler supports -gdwarf-2... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF2.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-2 test-gcc-DWARF2.c -o test-gcc-DWARF2 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF2* # # AC_COMPILER_SUPPORTS -gdwarf-3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-3" >&5 $as_echo_n "checking if compiler supports -gdwarf-3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-3 test-gcc-DWARF3.c -o test-gcc-DWARF3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF3* # # AC_COMPILER_SUPPORTS -gdwarf-4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-4" >&5 $as_echo_n "checking if compiler supports -gdwarf-4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF4.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-4 test-gcc-DWARF4.c -o test-gcc-DWARF4 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF4* # # AC_COMPILER_SUPPORTS -fstack-protector --param=ssp-buffer-size=4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fstack-protector --param=ssp-buffer-size=4" >&5 $as_echo_n "checking if compiler supports -fstack-protector --param=ssp-buffer-size=4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STACK_PROTECTOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fstack-protector --param=ssp-buffer-size=4 test-gcc-STACK_PROTECTOR.c -o test-gcc-STACK_PROTECTOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STACK_PROTECTOR* # # AC_COMPILER_SUPPORTS -fexceptions # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fexceptions" >&5 $as_echo_n "checking if compiler supports -fexceptions... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-EXCEPTIONS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fexceptions test-gcc-EXCEPTIONS.c -o test-gcc-EXCEPTIONS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-EXCEPTIONS* # # AC_COMPILER_SUPPORTS -Werror=missing-field-initializers # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=missing-field-initializers" >&5 $as_echo_n "checking if compiler supports -Werror=missing-field-initializers... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-MISSING_FIELD_INITIALIZERS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Werror=missing-field-initializers test-gcc-MISSING_FIELD_INITIALIZERS.c -o test-gcc-MISSING_FIELD_INITIALIZERS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-MISSING_FIELD_INITIALIZERS* # # AC_COMPILER_SUPPORTS -fsanitize=address # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fsanitize=address" >&5 $as_echo_n "checking if compiler supports -fsanitize=address... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-SANITIZE_ADDRESS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fsanitize=address test-gcc-SANITIZE_ADDRESS.c -o test-gcc-SANITIZE_ADDRESS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-SANITIZE_ADDRESS* # # AC_COMPILER_SUPPORTS -fno-omit-frame-pointer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-omit-frame-pointer" >&5 $as_echo_n "checking if compiler supports -fno-omit-frame-pointer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_OMIT_FRAME_POINTER.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-omit-frame-pointer test-gcc-NO_OMIT_FRAME_POINTER.c -o test-gcc-NO_OMIT_FRAME_POINTER > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_OMIT_FRAME_POINTER* # # AC_COMPILER_SUPPORTS -faddress-sanitizer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -faddress-sanitizer" >&5 $as_echo_n "checking if compiler supports -faddress-sanitizer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ADDRESS_SANITIZER_CHECK.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -faddress-sanitizer test-gcc-ADDRESS_SANITIZER_CHECK.c -o test-gcc-ADDRESS_SANITIZER_CHECK > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ADDRESS_SANITIZER_CHECK* # # AC_COMPILER_SUPPORTS -fcatch_undefined_behavior # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fcatch_undefined_behavior" >&5 $as_echo_n "checking if compiler supports -fcatch_undefined_behavior... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-CATCH_UNDEFINED_BEHAVIOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fcatch_undefined_behavior test-gcc-CATCH_UNDEFINED_BEHAVIOR.c -o test-gcc-CATCH_UNDEFINED_BEHAVIOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-CATCH_UNDEFINED_BEHAVIOR* # # AC_COMPILER_SUPPORTS -rdynamic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -rdynamic" >&5 $as_echo_n "checking if compiler supports -rdynamic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-RDYNAMIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -rdynamic test-gcc-RDYNAMIC.c -o test-gcc-RDYNAMIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-RDYNAMIC* { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking if memory accesses must be size-aligned" >&5 $as_echo_n "checking checking if memory accesses must be size-aligned... " >&6; } if false; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat > memalign_issues_test.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc, char** argv) { char* p = (char*)malloc(8); p++; int* intp= (int*)p; *intp=1; return 0; } _ACEOF ${CC} ${CFLAGS} memalign_issues_test.c -o memalign_issues_test > /dev/null 2>&1 has_memalign_issues=0 ./memalign_issues_test > /dev/null 2>&1 if [ $? -ne 0 ]; then has_memalign_issues=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f memalign_issues_test memalign_issues_test.c if test $has_memalign_issues; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MEMALIGN_ISSUES $has_memalign_issues _ACEOF # # AC_ENDIANNESS # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking endianness: " >&5 $as_echo_n "checking endianness: ... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-endian.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_STDIO_H #include #endif #if defined __FreeBSD__ #if HAVE_SYS_ENDIAN_H #include #endif #elif defined __APPLE__ #if HAVE_MACHINE_ENDIAN_H #include #endif #elif defined __sun #if HAVE_SYS_BYTEORDER_H #include #endif #else #if HAVE_ENDIAN_H #include #endif #if HAVE_BYTESWAP_H #include #endif #endif static int magic = 0x00525545; int main(int argc,char** argv) { (void)argc; (void)argv; int pp = -1; int c = -1; #if defined _BIG_ENDIAN pp = 2; #elif defined _LITTLE_ENDIAN pp = 1; #endif #ifdef __BYTE_ORDER #if __BYTE_ORDER == __LITTLE_ENDIAN pp = 1; #elif __BYTE_ORDER == __BIG_ENDIAN pp = 2; #endif // printf("__BYTE_ORDER=%x\n", __BYTE_ORDER); #endif #ifdef _BYTE_ORDER #if _BYTE_ORDER == _LITTLE_ENDIAN pp = 1; #elif _BYTE_ORDER == _BIG_ENDIAN pp = 2; #endif printf("_BYTE_ORDER=%x\n", _BYTE_ORDER); #endif #ifdef BYTE_ORDER #if BYTE_ORDER == LITTLE_ENDIAN pp = 1; #elif BYTE_ORDER == BIG_ENDIAN pp = 2; #endif // printf("BYTE_ORDER=%x\n", BYTE_ORDER); #endif # #ifdef WORDS_BIGENDIAN // printf("WORDS_BIGENDIAN=%x\n", WORDS_BIGENDIAN); if(pp == 1) // could be -1 or 2 { pp = -2; } else { pp = 2; } #endif char *p = (char*)&magic; if(*p == '\0') { c = 2; } else if(*p == 'E') { c = 1; } if((pp < 0) || (c < 0)) { printf("*** WARNING *** preprocessor says %i, real test says %i *** WARNING ***\n", pp, c); } if(c == pp) { return c; } else { return -1; } } _ACEOF $CC test-gcc-endian.c -o test-gcc-endian > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"failed to compile test\"" >&5 $as_echo "\"failed to compile test\"" >&6; } exit 1 fi ./test-gcc-endian if [ $? -eq 1 ] then if true; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if false; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: little" >&5 $as_echo "little" >&6; } else if false; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if true; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: big" >&5 $as_echo "big" >&6; } fi rm -f test-gcc-endian.c* test-gcc-endian for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done for ac_header in stdio.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDIO_H 1 _ACEOF fi done for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRING_H 1 _ACEOF fi done for ac_header in endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default" if test "x$ac_cv_header_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ENDIAN_H 1 _ACEOF fi done for ac_header in syslog.h do : ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYSLOG_H 1 _ACEOF fi done for ac_header in fcntl.h do : ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FCNTL_H 1 _ACEOF fi done for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF fi done for ac_header in linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in byteswap.h do : ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" if test "x$ac_cv_header_byteswap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BYTESWAP_H 1 _ACEOF fi done for ac_header in machine/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "machine/endian.h" "ac_cv_header_machine_endian_h" "$ac_includes_default" if test "x$ac_cv_header_machine_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACHINE_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/time.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIME_H 1 _ACEOF fi done for ac_header in sys/stat.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_stat_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_STAT_H 1 _ACEOF fi done for ac_header in sys/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" if test "x$ac_cv_header_sys_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/byteorder.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/byteorder.h" "ac_cv_header_sys_byteorder_h" "$ac_includes_default" if test "x$ac_cv_header_sys_byteorder_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_BYTEORDER_H 1 _ACEOF fi done for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done for ac_header in netinet/in.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET_IN_H 1 _ACEOF fi done for ac_header in netinet6/in6.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet6/in6.h" "ac_cv_header_netinet6_in6_h" "$ac_includes_default" if test "x$ac_cv_header_netinet6_in6_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET6_IN6_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_spin_init" >&5 $as_echo_n "checking checking for pthread_spin_init... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_spinlock_t lock; pthread_spin_init(&lock, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SPINLOCK 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_setname_np" >&5 $as_echo_n "checking checking for pthread_setname_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __USE_GNU #include int main () { pthread_setname_np(pthread_self(), "myname"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SETNAME_NP 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # # AC_HAS_ENABLE ctrl_dynamic_provisioning # if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL_DYNAMIC_PROVISIONING has been enabled" >&5 $as_echo_n "checking if CTRL_DYNAMIC_PROVISIONING has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl_dynamic_provisioning was given. if test "${enable_ctrl_dynamic_provisioning+set}" = set; then : enableval=$enable_ctrl_dynamic_provisioning; fi # CASE case "y$enable_ctrl_dynamic_provisioning" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl_dynamic_provisioning DONE # # AC_HAS_DISABLE rrl # if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRL_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrl was given. if test "${enable_rrl+set}" = set; then : enableval=$enable_rrl; fi # MSG RESULT # CASE case "y$enable_rrl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrl DONE # # AC_HAS_ENABLE messages # if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MESSAGES_SUPPORT has been enabled" >&5 $as_echo_n "checking if MESSAGES_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-messages was given. if test "${enable_messages+set}" = set; then : enableval=$enable_messages; fi # CASE case "y$enable_messages" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE messages DONE # # AC_HAS_DISABLE master # if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MASTER_SUPPORT has been disabled" >&5 $as_echo_n "checking if MASTER_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-master was given. if test "${enable_master+set}" = set; then : enableval=$enable_master; fi # MSG RESULT # CASE case "y$enable_master" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_dynupdate='no' enable_rrsig_management='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE master DONE # # AC_HAS_ENABLE ctrl # if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL has been enabled" >&5 $as_echo_n "checking if CTRL has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl was given. if test "${enable_ctrl+set}" = set; then : enableval=$enable_ctrl; fi # CASE case "y$enable_ctrl" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl DONE # # AC_HAS_DISABLE nsid # if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NSID_SUPPORT has been disabled" >&5 $as_echo_n "checking if NSID_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-nsid was given. if test "${enable_nsid+set}" = set; then : enableval=$enable_nsid; fi # MSG RESULT # CASE case "y$enable_nsid" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE nsid DONE # # AC_HAS_DISABLE acl # if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ACL_SUPPORT has been disabled" >&5 $as_echo_n "checking if ACL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-acl was given. if test "${enable_acl+set}" = set; then : enableval=$enable_acl; fi # MSG RESULT # CASE case "y$enable_acl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_tsig='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE acl DONE # # AC_HAS_DISABLE tsig # if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if TSIG_SUPPORT has been disabled" >&5 $as_echo_n "checking if TSIG_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-tsig was given. if test "${enable_tsig+set}" = set; then : enableval=$enable_tsig; fi # MSG RESULT # CASE case "y$enable_tsig" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE tsig DONE # # AC_HAS_DISABLE dynupdate # if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if DYNUPDATE_SUPPORT has been disabled" >&5 $as_echo_n "checking if DYNUPDATE_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-dynupdate was given. if test "${enable_dynupdate+set}" = set; then : enableval=$enable_dynupdate; fi # MSG RESULT # CASE case "y$enable_dynupdate" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE dynupdate DONE # # AC_HAS_DISABLE rrsig_management # if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRSIG_MANAGEMENT_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRSIG_MANAGEMENT_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrsig_management was given. if test "${enable_rrsig_management+set}" = set; then : enableval=$enable_rrsig_management; fi # MSG RESULT # CASE case "y$enable_rrsig_management" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrsig_management DONE # # AC_HAS_DISABLE zalloc # if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_SUPPORT has been disabled" >&5 $as_echo_n "checking if ZALLOC_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc was given. if test "${enable_zalloc+set}" = set; then : enableval=$enable_zalloc; fi # MSG RESULT # CASE case "y$enable_zalloc" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE zalloc DONE # # AC_HAS_ENABLE zalloc_statistics # if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_STATISTICS_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_STATISTICS_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_statistics was given. if test "${enable_zalloc_statistics+set}" = set; then : enableval=$enable_zalloc_statistics; fi # CASE case "y$enable_zalloc_statistics" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_statistics DONE # # AC_HAS_ENABLE zalloc_debug # if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_debug was given. if test "${enable_zalloc_debug+set}" = set; then : enableval=$enable_zalloc_debug; fi # CASE case "y$enable_zalloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_debug DONE # # AC_HAS_ENABLE malloc_debug # if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-malloc_debug was given. if test "${enable_malloc_debug+set}" = set; then : enableval=$enable_malloc_debug; fi # CASE case "y$enable_malloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE malloc_debug DONE # # AC_HAS_ENABLE bfd_debug # if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if BFD_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if BFD_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-bfd_debug was given. if test "${enable_bfd_debug+set}" = set; then : enableval=$enable_bfd_debug; fi # CASE case "y$enable_bfd_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE bfd_debug DONE case "$enable_bfd_debug" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlinfo" >&5 $as_echo_n "checking for library containing dlinfo... " >&6; } if ${ac_cv_search_dlinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlinfo (); int main () { return dlinfo (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlinfo+:} false; then : break fi done if ${ac_cv_search_dlinfo+:} false; then : else ac_cv_search_dlinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlinfo" >&5 $as_echo "$ac_cv_search_dlinfo" >&6; } ac_res=$ac_cv_search_dlinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no dl fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sha1_init_ctx" >&5 $as_echo_n "checking for library containing sha1_init_ctx... " >&6; } if ${ac_cv_search_sha1_init_ctx+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sha1_init_ctx (); int main () { return sha1_init_ctx (); ; return 0; } _ACEOF for ac_lib in '' iberty; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sha1_init_ctx=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sha1_init_ctx+:} false; then : break fi done if ${ac_cv_search_sha1_init_ctx+:} false; then : else ac_cv_search_sha1_init_ctx=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sha1_init_ctx" >&5 $as_echo "$ac_cv_search_sha1_init_ctx" >&6; } ac_res=$ac_cv_search_sha1_init_ctx if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo iberty fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bfd_init" >&5 $as_echo_n "checking for library containing bfd_init... " >&6; } if ${ac_cv_search_bfd_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bfd_init (); int main () { return bfd_init (); ; return 0; } _ACEOF for ac_lib in '' bfd; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bfd_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bfd_init+:} false; then : break fi done if ${ac_cv_search_bfd_init+:} false; then : else ac_cv_search_bfd_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bfd_init" >&5 $as_echo "$ac_cv_search_bfd_init" >&6; } ac_res=$ac_cv_search_bfd_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no bfd;exit 1 fi ;; no|*) ;; esac # # AC_HAS_ENABLE mutex_debug # if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MUTEX_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MUTEX_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-mutex_debug was given. if test "${enable_mutex_debug+set}" = set; then : enableval=$enable_mutex_debug; fi # CASE case "y$enable_mutex_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE mutex_debug DONE # # AC_HAS_ENABLE log_thread_id # if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_THREAD_ID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_THREAD_ID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_thread_id was given. if test "${enable_log_thread_id+set}" = set; then : enableval=$enable_log_thread_id; fi # CASE case "y$enable_log_thread_id" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_thread_id DONE # # AC_HAS_ENABLE log_pid # if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_PID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_PID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_pid was given. if test "${enable_log_pid+set}" = set; then : enableval=$enable_log_pid; fi # CASE case "y$enable_log_pid" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_pid DONE # # AC_HAS_ENABLE full_ascii7 # if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if FULL_ASCII7 has been enabled" >&5 $as_echo_n "checking if FULL_ASCII7 has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-full_ascii7 was given. if test "${enable_full_ascii7+set}" = set; then : enableval=$enable_full_ascii7; fi # CASE case "y$enable_full_ascii7" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 1 _ACEOF # CONDITIONAL Y if true; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 0 _ACEOF # CONDITIONAL N if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE full_ascii7 DONE # # AC_HAS_ENABLE non_aa_axfr_support # if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NON_AA_AXFR_SUPPORT has been enabled" >&5 $as_echo_n "checking if NON_AA_AXFR_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-non_aa_axfr_support was given. if test "${enable_non_aa_axfr_support+set}" = set; then : enableval=$enable_non_aa_axfr_support; fi # CASE case "y$enable_non_aa_axfr_support" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE non_aa_axfr_support DONE # # AC_HAS_WITH logdir # if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if logdir has been given" >&5 $as_echo_n "checking if logdir has been given... " >&6; } # ARG WITH # Check whether --with-logdir was given. if test "${with_logdir+set}" = set; then : withval=$with_logdir; # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_WITH_LOGDIR "$with_logdir" // $withval _ACEOF with_logdir="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES logdir="$withval" # ENDIF else # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 0 _ACEOF # CONDITIONAL N if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi with_logdir="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO logdir=${localstatedir}/log/yadifa # ENDIF fi # SUBST # AC_HAS_WITH logdir DONE { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has a sa_len field" >&5 $as_echo_n "checking if sockaddr has a sa_len field... " >&6; } cat > sockaddr_sa_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr sa; sa.sa_len = 4; } _ACEOF has_sockaddr_sa_len=0 ${CC} ${CFLAGS} sockaddr_sa_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_sa_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_sa_len.c sockaddr_sa_len if test $has_sockaddr_sa_len = yes; then HAS_SOCKADDR_SA_LEN_TRUE= HAS_SOCKADDR_SA_LEN_FALSE='#' else HAS_SOCKADDR_SA_LEN_TRUE='#' HAS_SOCKADDR_SA_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_SA_LEN $has_sockaddr_sa_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in has a sin_len field" >&5 $as_echo_n "checking if sockaddr_in has a sin_len field... " >&6; } cat > sockaddr_in_sin_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in sa; sa.sin_len = sizeof(struct sockaddr_in); } _ACEOF has_sockaddr_in_sin_len=0 ${CC} ${CFLAGS} sockaddr_in_sin_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in_sin_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in_sin_len.c sockaddr_in_sin_len if test $has_sockaddr_in_sin_len = yes; then HAS_SOCKADDR_IN_SIN_LEN_TRUE= HAS_SOCKADDR_IN_SIN_LEN_FALSE='#' else HAS_SOCKADDR_IN_SIN_LEN_TRUE='#' HAS_SOCKADDR_IN_SIN_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN_SIN_LEN $has_sockaddr_in_sin_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in6 has a sin6_len field" >&5 $as_echo_n "checking if sockaddr_in6 has a sin6_len field... " >&6; } cat > sockaddr_in6_sin6_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in6 sa; sa.sin6_len = sizeof(struct sockaddr_in6); } _ACEOF has_sockaddr_in6_sin6_len=0 ${CC} ${CFLAGS} sockaddr_in6_sin6_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in6_sin6_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in6_sin6_len.c sockaddr_in6_sin6_len if test $has_sockaddr_in6_sin6_len = yes; then HAS_SOCKADDR_IN6_SIN6_LEN_TRUE= HAS_SOCKADDR_IN6_SIN6_LEN_FALSE='#' else HAS_SOCKADDR_IN6_SIN6_LEN_TRUE='#' HAS_SOCKADDR_IN6_SIN6_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN6_SIN6_LEN $has_sockaddr_in6_sin6_len _ACEOF if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF if true; then HAS_DNSSEC_SUPPORT_TRUE= HAS_DNSSEC_SUPPORT_FALSE='#' else HAS_DNSSEC_SUPPORT_TRUE='#' HAS_DNSSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DNSSEC_SUPPORT 1 _ACEOF if true; then HAS_NSEC3_SUPPORT_TRUE= HAS_NSEC3_SUPPORT_FALSE='#' else HAS_NSEC3_SUPPORT_TRUE='#' HAS_NSEC3_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC3_SUPPORT 1 _ACEOF if true; then HAS_NSEC_SUPPORT_TRUE= HAS_NSEC_SUPPORT_FALSE='#' else HAS_NSEC_SUPPORT_TRUE='#' HAS_NSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC_SUPPORT 1 _ACEOF if false; then HAS_MIRROR_SUPPORT_TRUE= HAS_MIRROR_SUPPORT_FALSE='#' else HAS_MIRROR_SUPPORT_TRUE='#' HAS_MIRROR_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MIRROR_SUPPORT 0 _ACEOF if false; then HAS_DROPALL_SUPPORT_TRUE= HAS_DROPALL_SUPPORT_FALSE='#' else HAS_DROPALL_SUPPORT_TRUE='#' HAS_DROPALL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DROPALL_SUPPORT 0 _ACEOF if false; then HAS_TCL_TRUE= HAS_TCL_FALSE='#' else HAS_TCL_TRUE='#' HAS_TCL_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TCL 0 _ACEOF if false; then HAS_RDTSC_TRUE= HAS_RDTSC_FALSE='#' else HAS_RDTSC_TRUE='#' HAS_RDTSC_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RDTSC 0 _ACEOF if false; then HAS_RRCACHE_ENABLED_TRUE= HAS_RRCACHE_ENABLED_FALSE='#' else HAS_RRCACHE_ENABLED_TRUE='#' HAS_RRCACHE_ENABLED_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RRCACHE_ENABLED 0 _ACEOF requires_dnscore=1 LDDYN="-Wl,-Bdynamic" LDSTAT="-Wl,-Bstatic" echo -n "checking if -Bstatic & -Bdynamic are supported ... " $CC -Wl,-Bstatic 2>&1|grep Bstatic > /dev/null if [ $? -eq 0 ] then echo "not supported"; LDDYN="" LDSTAT="" else echo "supported"; fi LIBS="$LDDYN $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_gethostbyname=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_gethostbyname+:} false; then : break fi done if ${ac_cv_search_gethostbyname+:} false; then : else ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 $as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_socket+:} false; then : break fi done if ${ac_cv_search_socket+:} false; then : else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi if [ $requires_tcl -eq 1 ] then echo "TCL is required by this setup ..." CFLAGS="$CFLAGS -DWITHTCLINCLUDED -I${tcl_includedir}" LDFLAGS="-L${tcl_libdir} $LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing Tcl_Main" >&5 $as_echo_n "checking for library containing Tcl_Main... " >&6; } if ${ac_cv_search_Tcl_Main+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char Tcl_Main (); int main () { return Tcl_Main (); ; return 0; } _ACEOF for ac_lib in '' ${tcl_version}; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_Tcl_Main=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_Tcl_Main+:} false; then : break fi done if ${ac_cv_search_Tcl_Main+:} false; then : else ac_cv_search_Tcl_Main=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_Tcl_Main" >&5 $as_echo "$ac_cv_search_Tcl_Main" >&6; } ac_res=$ac_cv_search_Tcl_Main if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo "could not find ${tcl_version} :: tcl_includedir=${tcl_includedir} :: tcl_libdir=${tcl_libdir}"; exit 1 fi fi if [ $requires_ssl -eq 1 ] then echo "SSL is required by this setup ..." SSLDEPS="" echo "Finding the SSL dependencies" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing deflate" >&5 $as_echo_n "checking for library containing deflate... " >&6; } if ${ac_cv_search_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflate (); int main () { return deflate (); ; return 0; } _ACEOF for ac_lib in '' z; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_deflate=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_deflate+:} false; then : break fi done if ${ac_cv_search_deflate+:} false; then : else ac_cv_search_deflate=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_deflate" >&5 $as_echo "$ac_cv_search_deflate" >&6; } ac_res=$ac_cv_search_deflate if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi echo "SSLDEPS=${SSLDEPS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SSL is available" >&5 $as_echo_n "checking if SSL is available... " >&6; } ac_check_lib_ssl=0 # Check whether --with-openssl_lib was given. if test "${with_openssl_lib+set}" = set; then : withval=$with_openssl_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LDFLAGS="-L$with_openssl_lib $SSLDEPS $LDFLAGS" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi # Check whether --with-openssl_include was given. if test "${with_openssl_include+set}" = set; then : withval=$with_openssl_include; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CFLAGS="-I$with_openssl_include $CFLAGS $CFLAGS3264" echo "CFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi # Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; echo "yes" OPENSSL="${withval}" CFLAGS="-I$with_openssl/include $CFLAGS $CFLAGS3264" LDFLAGS="-L$with_openssl/lib $SSLDEPS $LDFLAGS" echo "CFLAGS=$CFLAGS" echo "LDFLAGS=$LDFLAGS" ac_check_lib_ssl=1 else echo "no" CFLAGS="$CFLAGS $CFLAGS3264" LDFLAGS="$SSLDEPS $LDFLAGS" echo "CFLAGS=${CFLAGS}" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi if [ $ac_check_lib_ssl -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RSA_new" >&5 $as_echo_n "checking for library containing RSA_new... " >&6; } if ${ac_cv_search_RSA_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char RSA_new (); int main () { return RSA_new (); ; return 0; } _ACEOF for ac_lib in '' crypto; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_RSA_new=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_RSA_new+:} false; then : break fi done if ${ac_cv_search_RSA_new+:} false; then : else ac_cv_search_RSA_new=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RSA_new" >&5 $as_echo "$ac_cv_search_RSA_new" >&6; } ac_res=$ac_cv_search_RSA_new if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5 $as_echo_n "checking for library containing SSL_library_init... " >&6; } if ${ac_cv_search_SSL_library_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char SSL_library_init (); int main () { return SSL_library_init (); ; return 0; } _ACEOF for ac_lib in '' ssl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_SSL_library_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_SSL_library_init+:} false; then : break fi done if ${ac_cv_search_SSL_library_init+:} false; then : else ac_cv_search_SSL_library_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5 $as_echo "$ac_cv_search_SSL_library_init" >&6; } ac_res=$ac_cv_search_SSL_library_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi fi else echo "SSL is not required by this setup" fi if [ $requires_dnscore -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Core library" >&5 $as_echo_n "checking for the DNS Core library... " >&6; } # Check whether --with-dnscore was given. if test "${with_dnscore+set}" = set; then : withval=$with_dnscore; CFLAGS="-I$with_dnscore/include $CFLAGS" LDFLAGS="-L$with_dnscore/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnscore_init in -ldnscore" >&5 $as_echo_n "checking for dnscore_init in -ldnscore... " >&6; } if ${ac_cv_lib_dnscore_dnscore_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnscore $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnscore_init (); int main () { return dnscore_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnscore_dnscore_init=yes else ac_cv_lib_dnscore_dnscore_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnscore_dnscore_init" >&5 $as_echo "$ac_cv_lib_dnscore_dnscore_init" >&6; } if test "x$ac_cv_lib_dnscore_dnscore_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSCORE 1 _ACEOF LIBS="-ldnscore $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnscore ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnscore_init in -ldnscore" >&5 $as_echo_n "checking for dnscore_init in -ldnscore... " >&6; } if ${ac_cv_lib_dnscore_dnscore_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnscore $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnscore_init (); int main () { return dnscore_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnscore_dnscore_init=yes else ac_cv_lib_dnscore_dnscore_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnscore_dnscore_init" >&5 $as_echo "$ac_cv_lib_dnscore_dnscore_init" >&6; } if test "x$ac_cv_lib_dnscore_dnscore_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSCORE 1 _ACEOF LIBS="-ldnscore $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnscore/include $CFLAGS" LDFLAGS="-L../../lib/dnscore/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnscore $LDDYN" fi fi fi if [ $requires_dnsdb -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Database library" >&5 $as_echo_n "checking for the DNS Database library... " >&6; } # Check whether --with-dnsdb was given. if test "${with_dnsdb+set}" = set; then : withval=$with_dnsdb; CFLAGS="-I$with_dnsdb/include $CFLAGS" LDFLAGS="-L$with_dnsdb/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zdb_init in -ldnsdb" >&5 $as_echo_n "checking for zdb_init in -ldnsdb... " >&6; } if ${ac_cv_lib_dnsdb_zdb_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnsdb $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zdb_init (); int main () { return zdb_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnsdb_zdb_init=yes else ac_cv_lib_dnsdb_zdb_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnsdb_zdb_init" >&5 $as_echo "$ac_cv_lib_dnsdb_zdb_init" >&6; } if test "x$ac_cv_lib_dnsdb_zdb_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSDB 1 _ACEOF LIBS="-ldnsdb $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnsdb ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zdb_init in -ldnsdb" >&5 $as_echo_n "checking for zdb_init in -ldnsdb... " >&6; } if ${ac_cv_lib_dnsdb_zdb_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnsdb $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zdb_init (); int main () { return zdb_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnsdb_zdb_init=yes else ac_cv_lib_dnsdb_zdb_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnsdb_zdb_init" >&5 $as_echo "$ac_cv_lib_dnsdb_zdb_init" >&6; } if test "x$ac_cv_lib_dnsdb_zdb_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSDB 1 _ACEOF LIBS="-ldnsdb $LIBS" else exit fi else echo "embedded" CFLAGS="-I${srcdir}/../../lib/dnsdb/include $CFLAGS" LDFLAGS="-L../../lib/dnsdb/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnsdb $LDDYN" fi fi fi if [ $requires_dnszone -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Zone library" >&5 $as_echo_n "checking for the DNS Zone library... " >&6; } # Check whether --with-dnszone was given. if test "${with_dnszone+set}" = set; then : withval=$with_dnszone; CFLAGS="-I$with_dnszone/include $CFLAGS" LDFLAGS="-L$with_dnszone/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnszone_init in -ldnszone" >&5 $as_echo_n "checking for dnszone_init in -ldnszone... " >&6; } if ${ac_cv_lib_dnszone_dnszone_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnszone $LDSTAT -ldnsdb -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnszone_init (); int main () { return dnszone_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnszone_dnszone_init=yes else ac_cv_lib_dnszone_dnszone_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnszone_dnszone_init" >&5 $as_echo "$ac_cv_lib_dnszone_dnszone_init" >&6; } if test "x$ac_cv_lib_dnszone_dnszone_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSZONE 1 _ACEOF LIBS="-ldnszone $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnszone ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnszone_init in -ldnszone" >&5 $as_echo_n "checking for dnszone_init in -ldnszone... " >&6; } if ${ac_cv_lib_dnszone_dnszone_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnszone $LDSTAT -ldnsdb -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnszone_init (); int main () { return dnszone_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnszone_dnszone_init=yes else ac_cv_lib_dnszone_dnszone_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnszone_dnszone_init" >&5 $as_echo "$ac_cv_lib_dnszone_dnszone_init" >&6; } if test "x$ac_cv_lib_dnszone_dnszone_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSZONE 1 _ACEOF LIBS="-ldnszone $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnszone/include $CFLAGS" LDFLAGS="-L../../lib/dnszone/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnszone $LDDYN" fi fi fi if [ $requires_dnslg -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Looking Glass library" >&5 $as_echo_n "checking for the DNS Looking Glass library... " >&6; } # Check whether --with-dnslg was given. if test "${with_dnslg+set}" = set; then : withval=$with_dnslg; CFLAGS="-I$with_dnslg/include $CFLAGS" LDFLAGS="-L$with_dnslg/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnslg_init in -ldnslg" >&5 $as_echo_n "checking for dnslg_init in -ldnslg... " >&6; } if ${ac_cv_lib_dnslg_dnslg_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnslg $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnslg_init (); int main () { return dnslg_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnslg_dnslg_init=yes else ac_cv_lib_dnslg_dnslg_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnslg_dnslg_init" >&5 $as_echo "$ac_cv_lib_dnslg_dnslg_init" >&6; } if test "x$ac_cv_lib_dnslg_dnslg_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSLG 1 _ACEOF LIBS="-ldnslg $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnslg ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnslg_init in -ldnslg" >&5 $as_echo_n "checking for dnslg_init in -ldnslg... " >&6; } if ${ac_cv_lib_dnslg_dnslg_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnslg $LDSTAT -ldnscore $LDDYN $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnslg_init (); int main () { return dnslg_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnslg_dnslg_init=yes else ac_cv_lib_dnslg_dnslg_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnslg_dnslg_init" >&5 $as_echo "$ac_cv_lib_dnslg_dnslg_init" >&6; } if test "x$ac_cv_lib_dnslg_dnslg_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSLG 1 _ACEOF LIBS="-ldnslg $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnslg/include $CFLAGS" LDFLAGS="-L../../lib/dnslg/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnslg $LDDYN" fi fi fi LDFLAGS="$LDFLAGS $LDDYN" LIBS="$LDDYN $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LTO has been enabled" >&5 $as_echo_n "checking if LTO has been enabled... " >&6; } # Check whether --enable-lto was given. if test "${enable_lto+set}" = set; then : enableval=$enable_lto; enable_lto=yes else enable_lto=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lto" >&5 $as_echo "$enable_lto" >&6; } case "$enable_lto" in yes) type -p gold if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: 'gold' not found" >&5 $as_echo "WARNING: 'gold' not found" >&6; } sleep 1 fi if [ ! "$LD" = "" ] then $LD -v |grep -i gold > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: LTO enabled but LD ($LD) is not gold" >&5 $as_echo "WARNING: LTO enabled but LD ($LD) is not gold" >&6; } sleep 1 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: LD not defined" >&5 $as_echo "LD not defined" >&6; } fi if true; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; no|*) if false; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; esac CPPFLAGS="$CPPFLAGS -DDNSDB_BUILD" for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done done # Provide a safe default value. : "${ac_cv_func_select_args=int,int *,struct timeval *}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG1 $1 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in bzero memset select socket do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_SA_LEN_TRUE}" && test -z "${HAS_SOCKADDR_SA_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_SA_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN_SIN_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN_SIN_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN_SIN_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN6_SIN6_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DNSSEC_SUPPORT_TRUE}" && test -z "${HAS_DNSSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DNSSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC3_SUPPORT_TRUE}" && test -z "${HAS_NSEC3_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC3_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC_SUPPORT_TRUE}" && test -z "${HAS_NSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MIRROR_SUPPORT_TRUE}" && test -z "${HAS_MIRROR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MIRROR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DROPALL_SUPPORT_TRUE}" && test -z "${HAS_DROPALL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DROPALL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TCL_TRUE}" && test -z "${HAS_TCL_FALSE}"; then as_fn_error $? "conditional \"HAS_TCL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RDTSC_TRUE}" && test -z "${HAS_RDTSC_FALSE}"; then as_fn_error $? "conditional \"HAS_RDTSC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRCACHE_ENABLED_TRUE}" && test -z "${HAS_RRCACHE_ENABLED_FALSE}"; then as_fn_error $? "conditional \"HAS_RRCACHE_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by dnsdb $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ dnsdb config.status 2.1.6-5826 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "include/dnsdb/dnsdb-config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/dnsdb/dnsdb-config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi make buildinfo.h echo echo "SUMMARY for DNSDB:" echo "------------------" echo echo "CC .................................. : $CC" echo "LD .................................. : $LD" echo "AR .................................. : $AR" echo "CFLAGS .............................. : $CFLAGS" echo "CPPFLAGS ............................ : $CPPFLAGS" echo "LDFLAGS ............................. : $LDFLAGS" echo "LIBS ................................ : $LIBS" if [ ! "${OPENSSL}" = "" ] then echo "Using OpenSLL from .................. : ${OPENSSL}" fi echo echo "Install prefix ...................... : $prefix" echo "Install sysconf ..................... : $sysconfdir" echo "NSEC ................................ : $enable_nsec" echo "NSEC3 ............................... : $enable_nsec3" echo "TSIG ................................ : $enable_tsig" echo "caching ............................. : $enable_caching" echo echo echo "DNSDB DONE" echo "----------" echo echo yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/missing0000644000077100007710000000013212473710127017573 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597652.282344534 yadifa-2.1.6-5826/lib/dnsdb/missing0000755000077100007710000001533012473710127017404 0ustar00yadifayadifa00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 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, 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/COPYING0000644000077100007710000000012412650131756017235 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.475344 30 ctime=1454597652.236344534 yadifa-2.1.6-5826/lib/dnsdb/COPYING0000664000077100007710000000312012650131756017036 0ustar00yadifayadifa00000000000000 Copyright (c) 2011-2016, EURid. All rights reserved. The YADIFA TM software product is provided under the BSD 3-clause license: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of EURid nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/README0000644000077100007710000000012412654656702017071 xustar000000000000000027 mtime=1454595522.700671 27 atime=1454597464.480344 30 ctime=1454597652.251344534 yadifa-2.1.6-5826/lib/dnsdb/README0000664000077100007710000005773012654656702016712 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ 20160126: YADIFA 2.1.6 Fixes: - fixed an issue where the referral would not be measured for UDP on a optimised build. 20160108: YADIFA 2.1.5 Dynamic updates do not use temporary files anymore which improves their general performance. The statistics now shows the referrals. Fixes: - fixed an issue where getting a huge incremental transfer would prevent the server from answering queries while applying the changes. - fixed an issue serving IXFR that would occur when a incremental change step was bigger than 64KB - fixed an issue for Solaris with the memory alignment fix not active everywhere - fixed an issue on the Solaris build settings - fixed an issue where sometimes yadifad would not find a configuration file given as a parameter with a relative path - fixed an issue where a wild-card would not be properly returned with an AXFR - fixed an issue where dynamically updating a zone at a speed such that the zone file would need to be written multiple times on disk before finishing the previous write could lead to a deadlock 20151026: YADIFA 2.1.4 The zone reader error reporting has been improved. Stacktrace support added for Solaris. Known issue: - Adding and or removing NSEC3PARAM dynamically is not properly handled. Fixes: - fixed an issue where an NSEC3 answer proving a * query would lead to a crash - fixed an issue where a private key may be not recognised as such - fixed an issue where dynamic update prerequisite check would fail a valid match - fixed an issue where zone signature maintenance would only start if all private keys were available. 20150821: YADIFA 2.1.3 Fixes: - fixed an issue that could lead to a crash at startup - fixed an issue where parsing a TYPE#### record would stop the parser prematurely 20150814: YADIFA 2.1.2 The ./configure script has a new option: --enable-full-ascii7 This changes the behaviour of DNS name validation to accept all the ASCII7 characters instead of only the DNS-space ones. Enabling this option is not recommended. Fixes: - fixes an issue where the hmac-shaX identification string sent with a TSIG had the suffix ".sig-alg.reg.int". 20150714: YADIFA 2.1.1 The yadifa command line has a new option: --config|-c file : read the specific configuration file instead of ~/.yadifa.rc Issues detected on the NSEC3 database have now been upgraded from debug to info/warning Fixes: - fixed an issue where, on some cases; the garbage collector for the zones was not triggering for a long time. - fixed an issue in the Makefile (courtesy of DENIC) - fixed an issue where a few bytes could be leaked in some rare cases when failing to unload a zone - fixed an issue in RRL where some values of IPv6 prefix - fixed an issue accepting some answers on IXFR transfers 20150424: YADIFA 2.1.0 New journal file format: This new format addresses a few issues like having maximum journal file and a relatively constant random access time even for very big sizes. The internal messaging queue has been changed to address huge amount of zones. New CHaos queries supported: hostname id.server Known issues: _ building successfully with LTO may require to append both AR=gcc-ar and RANLIB=gcc-ranlib to the ./configure command 20150403: YADIFA 2.0.6 This release is a public release. This minor update's sole purpose is to fix YADIFA builds on OpenBSD. Fixes: - fixed a crash that could occur while sending a massive amount of notifications - OpenBSD builds are fixed. Tested on: OpenBSD 5.6 amd64, standard installation. Configure: ./configure Tested on: OpenBSD 5.6 amd64, with gcc 4.9 installed. Configure: ./configure CC=egcc 20150226: YADIFA 2.0.5 This release is a public release. Fixes: - fixed an issue with huge IXFR transfers as a master - fixed an issue with notifications on slave-slave-master setup - fixed an issue with a potential infinite loop loading an AXFR from a master - fixed missing hmac-sha* from configuration - fixed an issue with TLSA records parsing - fixed an issue with base 16 encoding - fixed an issue parsing * domains - fixed an issue with some RRL motivated answers - increased the maximum number of network interfaces from 5 to 16 - fixed an error in the configuration examples where "statistics" was used instead of "stats" - minor fixes and improvements 20141216: YADIFA 2.0.4 This release is a public release. By popular demand, the default log file directory is now PREFIX/var/log/yadifa. It can be set using --with-logdir=/my/dir Improved build mechanism. It has been tested to work automatically on Linux, FreeBSD, OSX, SunOS. RedHat family builds will use -O2 as maximum optimisations. Note that some optional features are now enabled by default but can be disabled. Fixes: - fixed an issue with the AXFR transfer where the serial number would not be properly taken into account - fixed an issue with the notify mechanism that could occur if the server was only listening to 127.0.0.1 - fixed an issue with bogus DNSKEY records that may potentially lead to a crash in openssl - fixed a reported potential "tmpfile" vulnerability on DEBUG builds (generated with make debug) - fixed an issue with IPv6 connections on some architectures - typos fixes - minor fixes and improvements 20141104: Architecture portability enhancements. On Solaris, if no --enable-force32bits nor --enable-force64bits is set, then 64 bits will be forced (fixes an issue at link-time) ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC3 Extensions Required, dynamically linked, not stripped, no debugging information available PATH=/opt/csw/bin:/usr/ccs/bin:$PATH ./configure --enable-force32bits PATH=/opt/csw/bin:/usr/ccs/bin:$PATH make 20141030: Architecture portability enhancements. FreeBSD 9 FreeBSD dnode3 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 gcc (GCC) 4.2.1 20070831 patched [FreeBSD] ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900044), not stripped Ubuntu Linux dnode10 3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xe3b8601b9b5e59f8c9ce519cacbe9b8ff544ff1d, not stripped OSX Darwin RD-Mac-Mini.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Mach-O 64-bit executable x86_64 20141029: Architecture portability enhancements. uname -a gcc --version file yadifad YellowDog Linux Linux 2.6.29-3.ydl61.4 #1 SMP Mon Sep 7 14:50:27 PDT 2009 ppc64 ppc64 ppc64 GNU/Linux gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available Debian PPC64 Linux 3.2.0-3-powerpc64 #1 SMP Mon Jul 23 08:03:56 UTC 2012 ppc64 GNU/Linux gcc (Debian 4.6.3-8) 4.6.3 ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xedc47c984a4af7eb9a7ecbc0f135e4d064ba08f0, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available 20141016: YADIFA 2.0.2 TCP fallback support on truncation 20140905: YADIFA 2.0.0 This release is a public release Fixes: - fixed a log incorrectly reporting an error when the client didn't close the TCP connection fast enough - fixed an issue with the statistics on TCP queries Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140829: YADIFA 2.0.0-beta3-public This release is a public release - --disable-master feature at configure now builds a slave-only server Fixes: - fixed an issue with TSIG signed queries - fixed an issue with thread pool live resizing - fixed an issue where reading an undeleted obsolete journal ending at the start of a newly transferred zone from the master would incorrectly trigger an error Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140630: YADIFA 2.0.0-beta2-public This release is a public release - basepath disabled - pidpath removed, only pidfile remains - log reopen notification is now timestamped - slave zones no longer complain about missing NSEC/NSEC3 private keys - the error code ZRE_FILE_NOT_FOUND has been replaced by the more accurate code ZRE_NO_VALID_FILE_FOUND - default logging settings no longer output debug Fixes: - fixed issue in flag computation (AD,CD) - fixed an issue with journal truncation sometimes leading to a crash - zone parsing now correctly accepts '#' as a comment marker - zone parsing now rejects wrong fqdn as soon as it reads them, leading to a more accurate error message - removing the last dnskey of a zone no longer crashes the server Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. yadifa remote client commands prototype is now available with the following supported commands: -shutdown shuts down yadifa e.g. ./yadifa -s "192.0.2.1 port 53" -t shutdown -cfgreload reloads the and sections of the yadifad configuration e.g. ./yadifa -s "192.0.2.1 port 53" -t cfgreload -logreopen closes and reopen the log files e.g. ./yadifa -s "192.0.2.1 port 53" -t logreopen -freezeall prevents all zones from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freezeall -freeze prevents a zone from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freeze -q somedomain.eu -unfreezeall enables updates of all zones again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreezeall -unfreeze enables updates of a zone again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreeze -q somedomain.eu In order to work, the allow-control ACL must be defined either in
for the global commands and may also be defined in for the ones targeting a specific zone. e.g. allow-control 127.0.0.1 Note that tsig is not supported in the client yet. 20140528: YADIFA 2.0.0-beta1-public This release is a public release - NSID implemented (enabled at ./configure time with --enable-nsid - generic parser for: - getops - zone file - resolv.conf - configuration - '@' can now be used in a zone file - new binary for controlling 'yadifad' (yadifa) - framework is rewritten for multi core systems - single core server has been removed Fixes: - fixed several minor issues Know issues: - removing all dnskeys from a zone file crashes the server - yadifa has some issues with nodelay, nocork 20130424: YADIFA 1.1.0 _ added DSA signature _ added SHA-256 SHA-384 SHA-512 digest algorithms _ now supports additional DNSSEC algorithms: DSASHA1 DSASHA1_NSEC3 RSASHA256_NSEC3 RSASHA512_NSEC3 _ Respone Rate Limitation implemented (enabled at ./configure time with --enable-rrl) _ --enable-tiny-footprint now reduces the memory usage further by reducing the standard log queue from 2^20 to 2^12 entries _ the general speed has been slightly improved _ dynamic updates pending for more than 3 seconds are now dropped with an error _ dynamic provisioning Fixes: _ fixed a memory leak that could occur at NSEC3 generation when loading the zone failed in a particular way _ fixed a memory leak at ixfr send _ fixed handling of '_' character that was improperly stored in the database _ fixed bandwidth limit settings (tcp stream in and out) not always being taken from the configuration _ fixed TSIG answer verification for notifies _ fixed error codes not being registered and thus logged as unknown hexadecimal error code. _ other minor fixes 20130612: YADIFA 1.0.3 Fixes only (backports from 1.1.0) Fixes: _ fixed an issue preventing YADIFA from being build from another directory _ fixed an issue with OSX systems where gsed has to be used instead of sed _ fixed an issue with the '_' character not being properly handled _ fixed an issue where reading MX record from a zone file would incorrecly be rejected as invalid _ fixed an issue where the OPT record would not be properly written _ fixed an issue where an undefined ACL reference would be silently ignored _ fixed missing code tags for several error codes. From now on unregistered codes are dumped in hexadicimal. _ fixed portability issues with BSD and OSX _ fixed several minor issues 20120921: YADIFA 1.0.2 Fixes only Fixes: _ fixed an issue where the journal file was sometimes not properly closed at the end of a task _ fixed an issue where the TCP usage slots would sometimes wrongly return that they were all being used _ fixed an issue on IXFR processing (slave side) where the type of answer from the master would not be properly detected _ fixed an issue with TSIG on secrets not exactly 16 bytes long (binary form) _ fixed an issue on 32 bits architectures where the sig-validity-* fields would not be properly handled if not set on each zone section. _ slightly improved the replay time of big journal files _ fixed several minor issues Known issues: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120709: YADIFA 1.0.1 _ logging repeat compression is now by channel instead of global Fixes: _ fixed an issue where glibc whould assert if libgcc_s.so (libgcc_s.so.1) and libc.so (libc.so.6) where not available inside the chrooted directory of YADIFA _ fixed an issue in the syslog module Known issues: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120625: YADIFA 1.0.0 _ LTO support can be enabled with --enable-lto but this is not working with clang. LTO does not increase the performance significally _ parallel processing of listening addresses can now be enabled. It can be set using thread-count-by-address in the
section. By default YADIFA will not use parallel processing as this feature has not been as thoroughly tested as the single-thread processing model _ default parameters tuning _ fixes Known issue: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 20120530: YADIFA 1.0.0RC3 _ the configuration parser now ignores undefined logger names and report them with a warning _ syslog messages are now put in the name of "yadifad" instead of the name used for the "syslog" channel _ syslog messages do not print the time from YADIFA anymore _ improved the steps involved in loading a locally cached slave zone _ zones are now loaded in background _ man page yadifad-conf.man5 renamed into yadifad.conf.man5 Fixes: _ AXFR/IXFR answers with the RA bit set are nolonger rejected as invalid _ YADIFA now answers to SIGINT again (shutdown) _ fixed an issue where obsolete AXFR files were not always being deleted _ fixed an issue occurring when both IPv4 and IPv6 were available to handle a notify _ fixed journal replay issue where some RRSIGs records were not properly removed _ fixed an issue occurring with IPv6 queries _ fixed an issue in the generation of a specific NSEC3 error answer _ fixed named query style layout Known issue: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120328: YADIFA 1.0.0RC2 _ fixed logging issue on work file creation error _ fixed an issue where IXFR queries could be rejected as being wrongly formatted _ fixed an issue in the query logging text _ enabled command line options ( -u uid -g gid -d ) 20120319: YADIFA 1.0.0RC1 Is a full functional authoritative name server: - works as primary or secondary name server - AXFR - IXFR - NOTIFY - NSUPDATE - TSIG - CLASSES: - IN - CH (just for version) - TYPES: - AAAA - CNAME - DNSKEY - DS - HINFO - MX - NAPTR - NS - NSEC3 - NSEC3PARAM - NSEC - PTR - RRSIG - SOA - SRV - SSHFP - TXT - Automatic resigning - DNSSEC algorithms: - 5 (RSASHA1) - 7 (RSASHA1-NSEC3 - ACL's KNOWN ISSUES: NSEC3: _ cannot work with multiple NSEC3PARAM chains with mixed OPT-IN/OUT settings _ adding a new NSEC3 chain expects that the master sends the NSEC3PARAM first (it does not seems to be always the case) We have a case where a master starts with 2 thousands NSEC3 opt-out records then adds 6 millions NSEC3 opt-in records but does not give the NSEC3PARAM record first. The slave server rejects them all because it's unable to link them to a chain. (This one has high priority) DNSSEC: _ it is not allowed to change the zone security mode (unsecure, NSEC, or NSEC3). Once the zone is loaded it keeps its security mode. _ dynamic updates of NSEC as well as NSEC3 records are refused QUIT: the server will shutdown on the following conditions: _ detection of an impossible situation or an internal integrity issue (ie: for any reason the SOA has vanished from a zone) _ memory limit reached which prevents any more work _ ipc issue which prevent internal services communication ACL: _ since the access control is set by zone and CHAOS class is not implemented as a configurable zone, it is not possible (yet) to specifically block CHAOS queries. 20111121: YADIFA 0.5.5 - many fixes KNOWN ISSUE: NSEC3 slave zone replay fails. 20110706: YADIFA 0.5.0 - slave mode, AXFR/IXFR (no TSIG yet for the slave-side transfer) - answers to a notify from the master - polls the (first) master on the masters list - maintains the .axfr & .ix files (deletes the obsoletes ones) - TSIG queries are checked - Replays the zone journal on startup after the zone load (journaling) - Answers IXFR queries (journaling) 20110601: YADIFA 0.4.0 Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries with TSIG - nsupdate functionality (journaling) - TSIG on client server side will be transmitted, but not checked - ACL works - The zone has SOA, NS A resource records. 20110524: YADIFA 0.3.0 First release internally of yadifad 20110524115500 GMT+1. Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries - The zone has SOA, NS A resource records. 20091224: YADIFA 0.2.0 _ Answers AXFR queries _ ACL based on IP and TSIG (not all query types are ACL'ed yet) 20091104: YADIFA 0.1.0 YADIFA is a work in progress. The main goal is to have an alternative for BIND or NSD. Version 0.1.0 is an authoritative server only. It has no: - AXFR/IXFR functionality - dynupdate - support for NSEC - support for NSEC3 - caching mechanism - additional tools (eg.dig, dnssectools, drill,...) It has: - a very fast way to give authoritative answer - a very fast method for loading the database and checking the zone files This first release is to have a feeling how it works in an operational environment. TODO Everything what is not implemented, has to be implemented. Most of the code is there, but is not activated. No comformity tests has been done. (This of course is on the todo list) Bug Reports and Mailing Lists Bugs reports should be sent to bugreport@yadifa.eu yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/include0000644000077100007710000000013212654663023017550 xustar000000000000000030 mtime=1454597651.901344534 30 atime=1454597651.901344534 30 ctime=1454597651.901344534 yadifa-2.1.6-5826/lib/dnsdb/include/0000775000077100007710000000000012654663023017433 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnsdb/include/PaxHeaders.8028/dnsdb0000644000077100007710000000013212654663024020643 xustar000000000000000030 mtime=1454597652.229344534 30 atime=1454597651.901344534 30 ctime=1454597652.229344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/0000775000077100007710000000000012654663024020526 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/rrsig_updater.h0000644000077100007710000000012412650131756023742 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.176344 30 ctime=1454597652.106344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/rrsig_updater.h0000664000077100007710000000604212650131756023551 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup rrsig RRSIG functions * @ingroup dnsdbdnssec * @brief * * * * @{ * * lock for readers * * label iterator -> Q -> sign -> Q * U -> sign -> U * E -> sign -> E * U -> sign -> U * E -> sign -> E -> get results -> set lock to writer -> store * *----------------------------------------------------------------------------*/ #pragma once struct rrsig_updater_result_process_item_s; struct rrsig_updater_parms { dnssec_task_s task; smp_int remaining_quota; struct rrsig_updater_result_process_item_s *to_commit; s32 quota; /// maximum number of signatures allowed // output u32 good_signatures; u32 expired_signatures; u32 wrong_signatures; bool signatures_are_verified; }; typedef struct rrsig_updater_parms rrsig_updater_parms; rrsig_updater_parms *rrsig_updater_parms_alloc(); void rrsig_updater_parms_free(rrsig_updater_parms *parms); void rrsig_updater_init(rrsig_updater_parms *parms, zdb_zone *zone); ya_result rrsig_updater_process_zone(rrsig_updater_parms *parms); void rrsig_updater_commit(rrsig_updater_parms *parms); void rrsig_updater_finalize(rrsig_updater_parms *parms); /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/journal-cjf.h0000644000077100007710000000012412650131756023302 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.176344 30 ctime=1454597652.015344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/journal-cjf.h0000664000077100007710000000401412650131756023106 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once #include #ifdef __cplusplus extern "C" { #endif ya_result journal_cjf_open(journal **jh, const u8 *origin, const char *workingdir, bool create); #ifdef __cplusplus } #endif /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/dnssec_task.h0000644000077100007710000000012412650131756023371 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.168344 30 ctime=1454597651.985344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/dnssec_task.h0000664000077100007710000001401612650131756023200 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbdnssec DNSSEC functions * @ingroup dnsdb * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef _DNSSEC_TASK_H #define _DNSSEC_TASK_H /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include #include //#include #include #ifdef __cplusplus extern "C" { #endif typedef struct dnssec_task_s dnssec_task_s; #define DNSSEC_THREAD_TASK_FILTER_IGNORE 0 #define DNSSEC_THREAD_TASK_FILTER_ACCEPT 1 typedef ya_result dnssec_thread_task_init_method(dnssec_task_s*); typedef ya_result dnssec_thread_task_create_context_method(dnssec_task_s*, s32 processor, void**); typedef void dnssec_thread_task_destroy_context_method(dnssec_task_s*, s32 processor, void*); typedef ya_result dnssec_thread_task_filter_label_method(dnssec_task_s*, zdb_rr_label *rr_label); typedef ya_result dnssec_thread_task_filter_nsec3_item_method(dnssec_task_s*, nsec3_zone_item *item, nsec3_zone_item *next); typedef ya_result dnssec_thread_task_finalise_method(dnssec_task_s*); typedef struct dnssec_task_vtbl dnssec_task_vtbl; struct dnssec_task_vtbl { dnssec_thread_task_init_method *init; dnssec_thread_task_create_context_method *create_context; dnssec_thread_task_destroy_context_method *destroy_context; dnssec_thread_task_filter_label_method *filter_label; dnssec_thread_task_filter_nsec3_item_method *filter_nsec3_item; thread_pool_function *process; thread_pool_function *result; dnssec_thread_task_finalise_method *finalise; const char* name; }; struct processor_thread_context; struct dnssec_task_s { const dnssec_task_vtbl *vtbl; // the specific set of functions for this task (rrsig/rrsig nsec3) zdb_zone *zone; // the zone being worked on void *args; // the specific parameters for the set of functions ? void **contexts; // one for each thread struct thread_pool_s *pool; // thread pool for the parallel processing volatile ya_result error_code; // an error code volatile bool stop_task; // stop /** The do task query queue */ threaded_queue dnssec_task_query_queue; // /** The do answer query queue */ threaded_queue dnssec_answer_query_queue; // s32 processor_threads_count; // the number of threads used in the thread pool }; ya_result dnssec_process_set_default_pool(struct thread_pool_s *pool); /** * Initialises a task with two threads (given by the descriptor) * Sets the start time of the task. * * @param task task to initialise * @param desc structure pointing to the two threads an a friendly name */ void dnssec_process_initialize(dnssec_task_s *task, dnssec_task_vtbl *vtbl, struct thread_pool_s *pool, zdb_zone *zone); ya_result dnssec_process_begin(dnssec_task_s *task); void dnssec_process_end(dnssec_task_s *task); void dnssec_process_finalize(dnssec_task_s *task); /** * * Processes all the labels of the zone using dnssec_process_task * * @param db * @param task * @return */ ya_result dnssec_process_zone(dnssec_task_s *task); #if ZDB_HAS_NSEC3_SUPPORT != 0 ya_result dnssec_process_zone_nsec3(dnssec_task_s* task); #endif /** * Clears the threads and name of a task. * Sets the stop time of the task. * * @param task */ typedef ya_result dnssec_process_task_callback(dnssec_task_s* task, void* whatyouwant); /** * Using the parameters in task, * creates a task and an answer MT queues * queues task and answer threads to a thread pool * then calls the callback to work on the task/zone. * * When the callback returns, * waits for the end of the threads, * releases resoures, * exits with the callback return code. * * @param task the task structure * @param callback the callback to call * @param whatyouwant a pointer passer to the callback * * @return an error code * */ ya_result dnssec_process_task(dnssec_task_s *task, dnssec_process_task_callback *callback, void *whatyouwant); #ifdef __cplusplus } #endif #endif /* _DNSSEC_KEY_H */ /* ------------------------------------------------------------ */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/avl.h0000644000077100007710000000012412650131756021652 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.225344 30 ctime=1454597651.951344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/avl.h0000664000077100007710000002606612650131756021471 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief AVL structure and functions * * AVL structure and functions * * @{ */ #ifndef _AVL_H #define _AVL_H #include #include #ifndef ZDB_INLINES_AVL_FIND #error "ZDB_INLINES_AVL_FIND not defined" #endif #ifdef __cplusplus extern "C" { #endif #define AVL_NODE_TAG 0x0045444F4E4c5641 /* "AVLNODE" */ /* * In the worst case, AVL is Fibonacci-balanced. */ /* Python script to compute fibo nodes for each depth: import sys import math def fibonacci(n): a,b,c = 1,1,0 for i in range(0,n): c = c+a print "F#",i," Value=",a," Items=",c, " Log2=",math.log(c,2); a,b = b,a+b if __name__ == "__main__": fibonacci(64); */ /* And here are the first values: F# 0 Value= 1 Items= 1 Log2= 0.0 F# 1 Value= 1 Items= 2 Log2= 1.0 F# 2 Value= 2 Items= 4 Log2= 2.0 F# 3 Value= 3 Items= 7 Log2= 2.80735492206 F# 4 Value= 5 Items= 12 Log2= 3.58496250072 F# 5 Value= 8 Items= 20 Log2= 4.32192809489 F# 6 Value= 13 Items= 33 Log2= 5.04439411936 F# 7 Value= 21 Items= 54 Log2= 5.75488750216 F# 8 Value= 34 Items= 88 Log2= 6.45943161864 F# 9 Value= 55 Items= 143 Log2= 7.15987133678 F# 10 Value= 89 Items= 232 Log2= 7.85798099513 F# 11 Value= 144 Items= 376 Log2= 8.55458885168 F# 12 Value= 233 Items= 609 Log2= 9.25029841791 F# 13 Value= 377 Items= 986 Log2= 9.94544383638 F# 14 Value= 610 Items= 1596 Log2= 10.6402449362 F# 15 Value= 987 Items= 2583 Log2= 11.3348319281 F# 16 Value= 1597 Items= 4180 Log2= 12.029287227 F# 17 Value= 2584 Items= 6764 Log2= 12.7236609444 F# 18 Value= 4181 Items= 10945 Log2= 13.4179843341 F# 19 Value= 6765 Items= 17710 Log2= 14.1122765916 F# 20 Value= 10946 Items= 28656 Log2= 14.806549622 F# 21 Value= 17711 Items= 46367 Log2= 15.5008107652 F# 22 Value= 28657 Items= 75024 Log2= 16.1950645637 F# 23 Value= 46368 Items= 121392 Log2= 16.8893138224 F# 24 Value= 75025 Items= 196417 Log2= 17.5835602755 F# 25 Value= 121393 Items= 317810 Log2= 18.2778049947 F# 26 Value= 196418 Items= 514228 Log2= 18.9720486423 F# 27 Value= 317811 Items= 832039 Log2= 19.6662916275 F# 28 Value= 514229 Items= 1346268 Log2= 20.3605342035 F# 29 Value= 832040 Items= 2178308 Log2= 21.0547765264 F# 30 Value= 1346269 Items= 3524577 Log2= 21.749018693 F# 31 Value= 2178309 Items= 5702886 Log2= 22.443260763 F# 32 Value= 3524578 Items= 9227464 Log2= 23.1375027733 F# 33 Value= 5702887 Items= 14930351 Log2= 23.8317447466 F# 34 Value= 9227465 Items= 24157816 Log2= 24.5259866972 F# 35 Value= 14930352 Items= 39088168 Log2= 25.2202286336 F# 36 Value= 24157817 Items= 63245985 Log2= 25.9144705613 F# 37 Value= 39088169 Items= 102334154 Log2= 26.6087124837 F# 38 Value= 63245986 Items= 165580140 Log2= 27.3029544027 F# 39 Value= 102334155 Items= 267914295 Log2= 27.9971963197 F# 40 Value= 165580141 Items= 433494436 Log2= 28.6914382353 F# 41 Value= 267914296 Items= 701408732 Log2= 29.3856801502 F# 42 Value= 433494437 Items= 1134903169 Log2= 30.0799220647 F# 43 Value= 701408733 Items= 1836311902 Log2= 30.7741639788 F# 44 Value= 1134903170 Items= 2971215072 Log2= 31.4684058927 F# 45 Value= 1836311903 Items= 4807526975 Log2= 32.1626478065 */ #define AVL_MAX_DEPTH 40 /* Covers more than enough (433494436 items) */ struct avl_leftrightchildren { struct avl_node_* left; struct avl_node_* right; }; struct avl_node_ { union { struct avl_node_ * child[2]; /* 2 ptr */ struct avl_leftrightchildren lr; } children; void* data; /* 1 ptr */ hashcode hash; /* hashcode of the data */ s8 balance; /* used for balance check */ }; /* 17 29 => 24 32 */ typedef struct avl_node_ avl_node; typedef avl_node* avl_tree; typedef struct { s32 stack_pointer; avl_node *stack[AVL_MAX_DEPTH]; /* An AVL depth of 64 is HUGE */ } avl_iterator; #undef AVL_MAX_DEPTH /** @brief Initializes the tree * * Initializes the tree. * Basically : *tree=NULL; * * @param[in] tree the tree to initialize * */ void avl_init(avl_tree* tree); /** @brief Find a node in the tree * * Find a node in the tree matching a hash value. * * @param[in] tree the tree to search in * @param[in] obj_hash the hash to find * * @return A pointer to the node or NULL if there is no such node. */ #if ZDB_INLINES_AVL_FIND == 0 void* avl_find(avl_tree* tree, hashcode obj_hash); #else #define CHILD(node,id) ((node)->children.child[(id)]) static inline void* avl_find(const avl_tree* root, hashcode obj_hash) { assert(root != NULL); avl_node* node = *root; hashcode h; /* This is one of the parts I could try to optimize * I've checked the assembly, and it sucks ... */ /* Both the double-test while/ternary and the current one * are producing the same assembly code. */ while(node != NULL) { if((h = node->hash) == obj_hash) { return node->data; } node = CHILD(node, (obj_hash > h)&1); } /*return (node!=NULL)?node->data:NULL;*/ return NULL; } #endif /** @brief Find a node in the tree * * Find a node in the tree matching a hash value. * This is required for search that could lead to a change to the data. * * @param[in] tree the tree to search in * @param[in] obj_hash the hash to find * * @return A pointer to a pointer to the node or NULL if there is no such node. */ #if ZDB_INLINES_AVL_FIND == 0 void** avl_findp(avl_tree* tree, hashcode obj_hash); #else static inline void** avl_findp(const avl_tree* root, hashcode obj_hash) { assert(root != NULL); avl_node* node = *root; hashcode h; while(node != NULL /* &&((h=node->hash)!=obj_hash) */) { if((h = node->hash) == obj_hash) { return &node->data; } node = CHILD(node, (obj_hash > h)&1); } /* return (node!=NULL)?&node->data:NULL; */ return NULL; } #undef CHILD #endif /** @brief Insert a node into the tree. * * Insert data into the tree. * Since hash can have collisions, the data will most likely be a collection * (another tree, a list, ...) * * NOTE: * If the node associated to the hash already exists, it is returned unaltered, * the caller will be responsible to manipulate the node's data. * Else a new node is created, pointing to the data. * * @param[in] tree the tree where the insertion should be made * @param[in] obj_hash the hash associated to the data * * @return The node associated to the hash */ void** avl_insert(avl_tree* tree, hashcode obj_hash); /** @brief Deletes a node from the tree. * * Deletes a node from the tree. * * @param[in] tree the tree from which the delete will be made * @param[in] obj_hash the hash associated to the node to remove * * @return The node associated to the hash, NULL if it did not exist. */ void* avl_delete(avl_tree* tree, hashcode obj_hash); /** @brief Releases all the nodes of a tree * * Releases all the nodes of a tree. Data is not destroyed. * * @param[in] tree the tree to empty */ void avl_destroy(avl_tree* tree); void avl_iterator_init(avl_tree tree, avl_iterator* iter); void avl_iterator_init_from(avl_tree tree, avl_iterator* iter, hashcode obj_hash); #if ZDB_INLINES_AVL_FIND == 0 bool avl_iterator_hasnext(avl_iterator* iter); #else static inline bool avl_iterator_hasnext(avl_iterator* iter) { return iter->stack_pointer >= 0; } #endif void** avl_iterator_next(avl_iterator* iter); avl_node* avl_iterator_next_node(avl_iterator* iter); /** @brief Releases all the nodes of a tree * * Releases all the nodes of a tree. * Calls a function passed in parameter before destroying the data. * It's the responsibility of the callback to process (destroy) the data * in the tree. * * @param[in] tree the tree to empty */ void avl_callback_and_destroy(avl_tree tree, callback_function callback); #ifdef DEBUG /** @brief DEBUG: check that a tree fits the AVL definition. * * DEBUG: check that a tree fits the AVL definition. * * @param[in] tree the tree to check * * @return A positive integer if the AVL is right (the depth actually) else * a negative integer. * */ ya_result avl_check(avl_tree tree); /** @brief DEBUG: check that a node fits the AVL definition. * * DEBUG: check that a node fits the AVL definition. * * @param[in] node the node to check * * @return A positive integer if the AVL is right (the depth actually) else * a negative integer. * */ s32 avl_checkdepth(avl_node* node); /** @brief DEBUG: Prints the (sorted) content of the AVL * * DEBUG: Prints the (sorted) content of the AVL * * @param[in] tree the tree to print * */ void avl_print(avl_tree tree); /** @brief DEBUG: Prints the content of the AVL node * * DEBUG: Prints the (sorted) content of the AVL node * * @param[in] node the node to print * */ void avl_printnode(avl_node* node); #endif #ifdef __cplusplus } #endif #endif /* _AVL_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_rr_label.h0000644000077100007710000000012412650131756023511 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.220344 30 ctime=1454597652.137344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_rr_label.h0000664000077100007710000002404712650131756023325 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup records_labels Internal functions for the database: zoned resource records label. * @ingroup dnsdb * @brief Internal functions for the database: zoned resource records label. * * Internal functions for the database: zoned resource records label. * * @{ */ #ifndef _RR_LABEL_H #define _RR_LABEL_H #include #ifdef __cplusplus extern "C" { #endif #define ZDB_RR_LABEL_DELETE_NODE COLLECTION_PROCESS_DELETENODE /* = 2 matches the dictionary delete node */ #define ZDB_RR_LABEL_DELETE_TREE 3 /* */ #define ZDB_RRLABEL_TAG 0x4c424c525242445a /** "ZDBRRLBL" */ /** * Instanciate a new rr_label. */ zdb_rr_label* zdb_rr_label_new_instance(const u8* label_name); /** * @brief Finds the resource record label matching a path of labels starting from another rr label * * Finds the resource record label matching a path of labels starting from another rr label * Typically the starting label is a zone cut. * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[in] path_index the index of the top of the stack * * @return the matching label or NULL if it has not been found */ /* 3 USES */ zdb_rr_label* zdb_rr_label_find_exact(zdb_rr_label* apex,dnslabel_vector_reference path,s32 path_index); /** * @brief Finds the resource record label matching a path of labels starting from another rr label or the wildcard label * * Finds the resource record label matching a path of labels starting from another rr label or the wildcard label * Typically the starting label is a zone cut. * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[in] path_index the index of the top of the stack * * @return the matching label, the * label or NULL if none of them has not been found */ /* NOT USED (YET) */ zdb_rr_label* zdb_rr_label_find(zdb_rr_label* apex, dnslabel_vector_reference sections, s32 index); zdb_rr_label* zdb_rr_label_find_from_name(zdb_rr_label* apex, const u8 *fqdn); zdb_rr_label* zdb_rr_label_stack_find(zdb_rr_label* apex, dnslabel_stack_reference sections, s32 pos, s32 index); zdb_rr_label* zdb_rr_label_find_child(zdb_rr_label* parent, const u8* dns_label); /** * @brief Finds the closest resource record label matching a path of labels starting from another rr label * * Finds the resource record label matching a path of labels starting from another rr label * Typically the starting label is a zone cut. * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[inout] path_index the index of the top of the stack, set the index of the label in the stack at return * * @return the matching label or the apex if none has been found */ /* 3 USES */ zdb_rr_label* zdb_rr_label_find_closest(zdb_rr_label* apex, dnslabel_vector_reference path, s32* closest_level); zdb_rr_label* zdb_rr_label_find_closest_authority(zdb_rr_label* apex, dnslabel_vector_reference path, s32* closest_level); struct zdb_rr_label_find_ext_data { zdb_rr_label *authority; zdb_rr_label *closest; zdb_rr_label *answer; s32 authority_index; s32 closest_index; }; typedef struct zdb_rr_label_find_ext_data zdb_rr_label_find_ext_data; zdb_rr_label* zdb_rr_label_find_ext(zdb_rr_label* apex, dnslabel_vector_reference sections, s32 index_, zdb_rr_label_find_ext_data *ext); /** * @brief Returns the authority fqdn * * Returns the pointer to the authority fqdn located inside the qname (based on the rr_label_info) * * @param qname * @param rr_label_info * @return */ static inline const u8 * zdb_rr_label_info_get_authority_qname(const u8 *qname, const zdb_rr_label_find_ext_data *rr_label_info) { const u8 * authority_qname = qname; s32 i = rr_label_info->authority_index; while(i > 0) { authority_qname += authority_qname[0] + 1; i--; } return authority_qname; } /** * @brief Adds the resource record label matching a path of labels starting from another rr label * * Adds the resource record label matching a path of labels starting from another rr label * Typically the starting label is a zone cut. * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[in] path_index the index of the top of the stack * * @return the matching label or NULL if it has not been found */ /* 1 USE */ zdb_rr_label* zdb_rr_label_add(zdb_zone* zone, dnslabel_vector_reference sections, s32 index); /** * @brief Deletes the resource record of the given type on the label matching a path of labels starting from another rr label * * Deletes the resource record of the given type on the label matching a path of labels starting from another rr label * Typically the starting label is a zone cut. * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[in] path_index the index of the top of the stack * * @return the matching label or NULL if it has not been found */ /* 2 USES */ ya_result zdb_rr_label_delete_record(zdb_zone* zone, dnslabel_vector_reference path, s32 path_index, u16 type); /** * @brief Deletes the resource record of the given type, ttl and rdata on the label matching a path of labels starting from another rr label * * Deletes the resource record of the given type, ttl and rdata on the label matching a path of labels starting from another rr label * Typically the starting label is a zone cut. * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[in] path_index the index of the top of the stack * * @return the matching label or NULL if it has not been found */ /* 1 USE */ ya_result zdb_rr_label_delete_record_exact(zdb_zone* zone,dnslabel_vector_reference path,s32 path_index,u16 type,zdb_ttlrdata* ttlrdata); /** * @brief Deletes an EMPTY label * * Deletes an EMPTY label an all it's EMPTY parents * Parents bound to an NSEC structures are not removed * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[in] path_index the index of the top of the stack * * @return the matching label or NULL if it has not been found */ static inline zdb_packed_ttlrdata* zdb_rr_label_get_rrset(zdb_rr_label *rr_label, u16 type) { zdb_packed_ttlrdata* rrset = zdb_record_find(&rr_label->resource_record_set, type); return rrset; } /** * @brief Destroys a zone label and its contents * * Destroys a zone label and its contents * * @param[in] zone_labep a pointer to a pointer to the label to destroy * */ /* 1 USE */ void zdb_rr_label_destroy(zdb_zone* zone, zdb_rr_label** rr_labelp); void zdb_rr_label_truncate(zdb_zone* zone, zdb_rr_label* rr_labelp); static inline bool zdb_rr_label_is_glue(zdb_rr_label* label) { return (label->flags & (ZDB_RR_LABEL_UNDERDELEGATION | ZDB_RR_LABEL_DELEGATION)) == ZDB_RR_LABEL_UNDERDELEGATION; } #if ZDB_HAS_DNSSEC_SUPPORT != 0 /* 2 USES */ #define RR_LABEL_RELEVANT(rr_label_) ((dictionary_notempty(&(rr_label_)->sub))||(btree_notempty((rr_label_)->resource_record_set))||(rr_label_->nsec.dnssec != NULL)) /* label is only alive because of NSEC3 */ #define RR_LABEL_HASSUB(rr_label_) (dictionary_notempty(&(rr_label_)->sub)) #define RR_LABEL_HASSUBORREC(rr_label_)((dictionary_notempty(&(rr_label_)->sub))||(btree_notempty((rr_label_)->resource_record_set))) #define RR_LABEL_NOSUBNORREC(rr_label_)((dictionary_notempty(&(rr_label_)->sub))&&(btree_notempty((rr_label_)->resource_record_set))) /* 9 USES */ #define RR_LABEL_IRRELEVANT(rr_label_) ((dictionary_isempty(&(rr_label_)->sub))&&(btree_isempty((rr_label_)->resource_record_set))&&(rr_label_->nsec.dnssec == NULL)) #else /* 2 USES */ #define RR_LABEL_RELEVANT(rr_label_) (dictionary_notempty(&(rr_label_)->sub)||btree_notempty(&(rr_label_)->resource_record_set)) /* 9 USES */ #define RR_LABEL_IRRELEVANT(rr_label_) (dictionary_isempty(&(rr_label_)->sub)&&btree_isempty(&(rr_label_)->resource_record_set)) #endif /* 0 USES */ static inline bool zdb_rr_label_has_records(zdb_rr_label *rr_label) { bool ret = btree_notempty(rr_label->resource_record_set); return ret; } #ifdef DEBUG void zdb_rr_label_print_indented(zdb_rr_label* rr_label, output_stream *os, int indent); void zdb_rr_label_print(zdb_rr_label* zone_label, output_stream *os); #endif #ifdef __cplusplus } #endif #endif /* _rr_LABEL_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_zone_process.h0000644000077100007710000000012412650131756024440 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.199344 30 ctime=1454597652.213344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_zone_process.h0000664000077100007710000000761212650131756024253 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #pragma once #include #define ZDB_ZONE_PROCESS_CONTINUE 0 #define ZDB_ZONE_PROCESS_SKIP_LABEL 1 #define ZDB_ZONE_PROCESS_STOP 2 struct zdb_zone_process_rrset_callback_parms; typedef ya_result zdb_zone_process_rrset_callback(struct zdb_zone_process_rrset_callback_parms *parms); struct zdb_zone_process_rrset_callback_parms { zdb_zone_process_rrset_callback *cb; const zdb_zone *zone; void *args; const zdb_rr_label *rr_label; const zdb_packed_ttlrdata *rrset; u16 record_type; dnsname_stack fqdn_stack; }; typedef struct zdb_zone_process_rrset_callback_parms zdb_zone_process_rrset_callback_parms; struct zdb_zone_process_label_callback_parms; typedef ya_result zdb_zone_process_label_callback(struct zdb_zone_process_label_callback_parms *parms); struct zdb_zone_process_label_callback_parms { zdb_zone_process_label_callback *cb; zdb_zone *zone; void *args; zdb_rr_label *rr_label; dnsname_stack fqdn_stack; }; typedef struct zdb_zone_process_label_callback_parms zdb_zone_process_label_callback_parms; /** * * All zdb_rr_label of the zone will be passed to the callback * through a zdb_zone_process_label_callback_parms structure * * @param zone * @param cb * @param args * @return */ ya_result zdb_zone_process_all_labels_from_zone(zdb_zone *zone, zdb_zone_process_label_callback *cb, void *args); /** * * All zdb_packed_ttlrdata of all labels of the zone will be passed to the callback * through a zdb_zone_process_rrset_callback_parms * * If the zone is NSEC3, the NSEC3 records and their signature will also be passed * with a virtual/fake (most likely on stack) zdb_rr_label and zdb_packed_ttlrdata * These are meant to be read-only * * @param zone * @param cb * @param args * @return */ ya_result zdb_zone_process_all_rrsets_from_all_labels_from_zone(zdb_zone *zone, zdb_zone_process_rrset_callback *cb, void *args); /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb-zone-journal.h0000644000077100007710000000012412650131756024270 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.210344 30 ctime=1454597652.175344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb-zone-journal.h0000664000077100007710000000650512650131756024103 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnsdb * @brief * * Journal API * * * @{ */ #pragma once #define ZDB_ZONE_JOURNAL_AVAILABLE 1 #include #include /** * Returns the first and last serial in the journal of a loaded zone. * If the journal has not been opened yet (and bound to the zone) then it will be. * * @param zone the zone * @param out_serial_from, can be NULL * @param out_serial_to, can be NULL * * @return an error code */ ya_result zdb_zone_journal_get_serial_range(zdb_zone *zone, u32 *out_serial_from, u32 *out_serial_to); /** * Opens a stream from the journal for reading an IXFR starting at a given serial. * * @param zone the zone * @param serial the serial to start from * @param out_is the stream to be initialised for reading the IXFR * @param rr the last SOA record, can be NULL * * @return an error code */ ya_result zdb_zone_journal_get_ixfr_stream_at_serial(zdb_zone *zone, u32 serial, input_stream *out_is, dns_resource_record *rr); /** * Appends an IXFR stream to the journal. * The expected stream lacks the repeated last SOA record at the first and last position. * * @param zone * @param is stream of uncompressed wire records : (SOA DEL DEL DEL ... SOA ADD ADD ADD ...)+ * @return an error code */ ya_result zdb_zone_journal_append_ixfr_stream(zdb_zone *zone, input_stream *is); /** * Deletes the file of the journal of a zone * * @param zone * @return an error code */ ya_result zdb_zone_journal_delete(zdb_zone *zone); /** * @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/dnsdb-config.h0000644000077100007710000000013212654662717023436 xustar000000000000000030 mtime=1454597583.398344535 30 atime=1454597583.393344535 30 ctime=1454597651.966344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/dnsdb-config.h0000664000077100007710000002341612654662717023252 0ustar00yadifayadifa00000000000000/* include/dnsdb/dnsdb-config.h. Generated from dnsdb-config.h.in by configure. */ /* include/dnsdb/dnsdb-config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ /* #undef AC_APPLE_UNIVERSAL_BUILD */ /* number of harware core if the auto-detect fails */ #define DEFAULT_ASSUMED_CPU_COUNT 2 /* always on */ #define HAS_ACL_SUPPORT 1 /* bfd debug support disabled. */ #define HAS_BFD_DEBUG_SUPPORT 0 /* i386, Athlon, Opteron, Core2, i3, i5, i7, ... */ #define HAS_CPU_AMDINTEL 1 /* T1000 has a Niagara cpu */ /* #undef HAS_CPU_NIAGARA */ /* remote control disabled. */ #define HAS_CTRL 0 /* dynamic provisioning disabled. */ #define HAS_CTRL_DYNAMIC_PROVISIONING 0 /* always on */ #define HAS_DNSSEC_SUPPORT 1 /* always off */ #define HAS_DROPALL_SUPPORT 0 /* dynamic update support disabled. */ #define HAS_DYNUPDATE_SUPPORT 1 /* YADIFA will now accept ASCII7 characters in DNS names (not recommended) disabled. */ #define HAS_FULL_ASCII7 0 /* where to put the log files */ #define HAS_LOGDIR 0 /* write the pid in each line of log disabled. */ #define HAS_LOG_PID_ALWAYS_ON 0 /* write the thread id in each line of log disabled. */ #define HAS_LOG_THREAD_ID_ALWAYS_ON 0 /* malloc debug support disabled. */ #define HAS_MALLOC_DEBUG_SUPPORT 0 /* DNS master disabled. */ #define HAS_MASTER_SUPPORT 1 /* Define this to enable slow but safe unaligned memory accesses */ #define HAS_MEMALIGN_ISSUES 0 /* use messages instead of send (needed if you use more than one IP aliased on the same network interface) disabled. */ #define HAS_MESSAGES_SUPPORT 0 /* always off */ #define HAS_MIRROR_SUPPORT 0 /* mutex debug support disabled. */ #define HAS_MUTEX_DEBUG_SUPPORT 0 /* Allows AXFR answer from master without AA bit set (Microsoft DNS) disabled. */ #define HAS_NON_AA_AXFR_SUPPORT 0 /* always on */ #define HAS_NSEC3_SUPPORT 1 /* always on */ #define HAS_NSEC_SUPPORT 1 /* NSID support disabled. */ #define HAS_NSID_SUPPORT 1 /* The system supports thread names */ #define HAS_PTHREAD_SETNAME_NP 1 /* The system supports spinlocks */ #define HAS_PTHREAD_SPINLOCK 1 /* always off */ #define HAS_RDTSC 0 /* always off */ #define HAS_RRCACHE_ENABLED 0 /* DNS Response Rate Limiter disabled. */ #define HAS_RRL_SUPPORT 1 /* RRSIG verification and generation for zones disabled. */ #define HAS_RRSIG_MANAGEMENT_SUPPORT 1 /* The sockaddr_in6 struct has an sin6_len field */ #define HAS_SOCKADDR_IN6_SIN6_LEN 0 /* The sockaddr_in struct has an sin_len field */ #define HAS_SOCKADDR_IN_SIN_LEN 0 /* The sockaddr struct has an sa_len field */ #define HAS_SOCKADDR_SA_LEN 0 /* always off */ #define HAS_TCL 0 /* always on */ #define HAS_TSIG_SUPPORT 1 /* where to put the log files */ /* #undef HAS_WITH_LOGDIR */ /* zalloc debug support disabled. */ #define HAS_ZALLOC_DEBUG_SUPPORT 0 /* zalloc statistics support disabled. */ #define HAS_ZALLOC_STATISTICS_SUPPORT 0 /* zalloc memory system disabled. */ #define HAS_ZALLOC_SUPPORT 1 /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 /* Define to 1 if you have the header file. */ #define HAVE_BYTESWAP_H 1 /* Define to 1 if you have the `bzero' function. */ /* #undef HAVE_BZERO */ /* Define to 1 if you have the header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_ENDIAN_H 1 /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the `fork' function. */ /* #undef HAVE_FORK */ /* Define to 1 if you have the header file. */ /* #undef HAVE_I386_LIMITS_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_I386_TYPES_H */ /* Define to 1 if the system has the type `int64_t'. */ #define HAVE_INT64_T 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `c' library (-lc). */ #define HAVE_LIBC 1 /* Define to 1 if you have the `dnscore' library (-ldnscore). */ /* #undef HAVE_LIBDNSCORE */ /* Define to 1 if you have the `dnsdb' library (-ldnsdb). */ /* #undef HAVE_LIBDNSDB */ /* Define to 1 if you have the `dnslg' library (-ldnslg). */ /* #undef HAVE_LIBDNSLG */ /* Define to 1 if you have the `dnszone' library (-ldnszone). */ /* #undef HAVE_LIBDNSZONE */ /* Define to 1 if you have the `pthread' library (-lpthread). */ #define HAVE_LIBPTHREAD 1 /* Define to 1 if you have the header file. */ #define HAVE_LINUX_LIMITS_H 1 /* Define to 1 if the system has the type `long long'. */ #define HAVE_LONG_LONG 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_MACHINE_ENDIAN_H */ /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ /* #undef HAVE_MEMSET */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NETINET6_IN6_H */ /* Define to 1 if you have the header file. */ #define HAVE_NETINET_IN_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_PPC_LIMITS_H */ /* Define to 1 if you have the header file. */ #define HAVE_PTHREAD_H 1 /* Define to 1 if you have the `select' function. */ /* #undef HAVE_SELECT */ /* Define to 1 if you have the `socket' function. */ /* #undef HAVE_SOCKET */ /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #define HAVE_STAT_EMPTY_STRING_BUG 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDIO_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYSLOG_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_BYTEORDER_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_ENDIAN_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_SELECT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_SOCKET_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SYSLIMITS_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIME_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if the system has the type `uint64_t'. */ #define HAVE_UINT64_T 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if the system has the type `u_char'. */ #define HAVE_U_CHAR 1 /* Define to 1 if you have the `vfork' function. */ /* #undef HAVE_VFORK */ /* Define to 1 if you have the header file. */ /* #undef HAVE_VFORK_H */ /* Define to 1 if `fork' works. */ /* #undef HAVE_WORKING_FORK */ /* Define to 1 if `vfork' works. */ /* #undef HAVE_WORKING_VFORK */ /* BSD */ #define IS_BSD_FAMILY 0 /* OSX */ #define IS_DARWIN_OS 0 /* LINUX */ #define IS_LINUX_FAMILY 1 /* SOLARIS */ #define IS_SOLARIS_FAMILY 0 /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ /* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ /* Define to the sub-directory where libtool stores uninstalled libraries. */ #define LT_OBJDIR ".libs/" /* Name of package */ #define PACKAGE "dnsdb" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "bugreport@yadifa.eu" /* Define to the full name of this package. */ #define PACKAGE_NAME "dnsdb" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "dnsdb 2.1.6-5826" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "dnsdb" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ #define PACKAGE_VERSION "2.1.6-5826" /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* Define to the type of arg 1 for `select'. */ #define SELECT_TYPE_ARG1 int /* Define to the type of args 2, 3 and 4 for `select'. */ #define SELECT_TYPE_ARG234 (fd_set *) /* Define to the type of arg 5 for `select'. */ #define SELECT_TYPE_ARG5 (struct timeval *) /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ #define VERSION "2.1.6-5826" /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN /* # undef WORDS_BIGENDIAN */ # endif #endif /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ /* Define for large files, on AIX-style hosts. */ /* #undef _LARGE_FILES */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define to `int' if does not define. */ /* #undef mode_t */ /* Define to `int' if does not define. */ /* #undef pid_t */ /* Define to `unsigned int' if does not define. */ /* #undef size_t */ /* Define as `fork' if `vfork' does not work. */ #define vfork fork yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_record.h0000644000077100007710000000012412650131756023205 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.182344 30 ctime=1454597652.133344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_record.h0000664000077100007710000002125312650131756023015 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup records Internal functions for the database: resource records. * @ingroup dnsdb * @brief Internal functions for the database: resource records. * * Internal functions for the database: resource records. * * Handling of the the class->type->ttl+rdata list. * * @{ */ #ifndef _ZDB_RECORD_H #define _ZDB_RECORD_H #include #include #ifdef __cplusplus extern "C" { #endif #define SUCCESS_STILL_RECORDS SUCCESS #define SUCCESS_LAST_RECORD SUCCESS + 1 /** * * Internal functions for the ZDB structure. */ #define ZDB_RECORDS_COLLECTION_TAG 0x4343455242445a /** "ZDBRECC" */ #define ZDB_RECORD_RDATA_TAG 0x5243455242445a /** "ZDBRECR" */ #define COULD_BE_GLUE(type) (((type)==TYPE_A)||((type)==TYPE_AAAA)||((type)==TYPE_A6)) /** @brief Inserts a resource record into the resource collection * * Inserts a ttl-rdata record into the rtl-rdata collection * * @param[in] collection the collection * @param[in] class_ the class of the resource record * @param[in] type the type of the resource record * @param[in] ttl the ttl of the resource record * @param[in] rdata_size the size of the rdata of the resource record * @param[in] rdata a pointer to the rdata of the resource record * * @return OK in case of success. */ /* 4 USES */ void zdb_record_insert(zdb_rr_collection* collection, u16 type, zdb_packed_ttlrdata* ttlrdata); /** @brief Inserts a resource record into the resource collection, checks for dups * * Do not assume anything. * Inserts a ttl-rdata record into the rtl-rdata collection * The caller loses the property of the record. * If the record is a dup, it is destroyed. * * @param[in] collection the collection * @param[in] class_ the class of the resource record * @param[in] type the type of the resource record * @param[in] ttl the ttl of the resource record * @param[in] rdata_size the size of the rdata of the resource record * @param[in] rdata a pointer to the rdata of the resource record * * @return OK in case of success. */ /* 1 USE */ bool zdb_record_insert_checked(zdb_rr_collection* collection, u16 type, zdb_packed_ttlrdata* record); /** @brief Finds and return all the a resource record matching the class and type * * Finds and returl all the a resource record matching the class and type * * @param[in] collection the collection * @param[in] class_ the class of the resource record to match * @param[in] type the type of the resource record to match * * @return the first record, or NULL of none has been found. */ /* 5 USES */ zdb_packed_ttlrdata* zdb_record_find(const zdb_rr_collection* collection, u16 type); /** @brief Finds and return a pointer to the list of all the a resource record matching the class and type * * Finds and returns a pointer to the list of all the a resource record matching the class and type * * @param[in] collection the collection * @param[in] class_ the class of the resource record to match * @param[in] type the type of the resource record to match * * @return the first record, or NULL of none has been found. */ zdb_packed_ttlrdata** zdb_record_findp(const zdb_rr_collection* collection, u16 type); /** @brief Finds and return all the a resource record matching the class and type * Create the node if no such resource exists * * Finds and returl all the a resource record matching the class and type * Create the node if no such resource exists * * @param[in] collection the collection * @param[in] class_ the class of the resource record to match * @param[in] type the type of the resource record to match * * @return the first record, or NULL of none has been found. */ zdb_packed_ttlrdata** zdb_record_find_insert(zdb_rr_collection* collection, u16 type); /** @brief Deletes all the a resource record matching the class and type * * Deletes and return all the a resource record matching the class and type * * @param[in] collection the collection * @param[in] class_ the class of the resource record to match * @param[in] type the type of the resource record to match * * @return OK in case of success. ERROR if no record were deleted. */ /* 2 USES */ ya_result zdb_record_delete(zdb_rr_collection* collection, u16 type); /** @brief Deletes the a resource record matching the class, type, ttl, rdata * * Deletes the a resource record matching the class, type, ttl, rdata * * @param[in] collection the collection * @param[in] type the type of the resource record to match * @param[in] ttl the ttl of the resource record to match * @param[in] rdata_size the size of the rdata of the resource record to match * @param[in] rdata a pointer to the rdata of the resource record to match * * @return SUCCESS if we removed the last record of this type. * >SUCCESS if we removed the record but other of this type are still available. * ERROR if no record were deleted. * */ /* 4 USES */ ya_result zdb_record_delete_exact(zdb_rr_collection* collection, u16 type, const zdb_ttlrdata* ttl_rdata); /** @brief Destroys all the a resource record of the collection * * Destroys all the a resource record of the collection * * @param[in] collection the collection to destroy */ /* 23 USES */ void zdb_record_destroy(zdb_rr_collection* collection); /** @brief Checks if a collection is empty * * Checks if a collection is empty * * @return TRUE if the collection is empty, FALSE otherwise. */ /* 1 USE */ bool zdb_record_isempty(const zdb_rr_collection* collection); /** @brief Checks if two records are equal. * * Checks if two records are equal. * * @return TRUE if the records are equal, FALSE otherwise. */ /* 1 USE */ bool zdb_record_equals_unpacked(const zdb_packed_ttlrdata* a, const zdb_ttlrdata* b); /** @brief Checks if two records are equal. * * Checks if two records are equal. * * @return TRUE if the records are equal, FALSE otherwise. */ /* 1 USE */ bool zdb_record_equals(const zdb_packed_ttlrdata* a, const zdb_packed_ttlrdata* b); /** * @brief Copies the soa rdata to an soa_rdata native structure. * * Copies the soa of a zone to an soa_rdata structure. * No memory is allocated for the soa_rdata. If the zone is destroyed, * the soa_rdata becomes invalid. * * @param[in] zone a pointer to the zone * @param[out] soa_out a pointer to an soa_rdata structure */ ya_result zdb_record_getsoa(const zdb_packed_ttlrdata* soa, soa_rdata* soa_out); /** * @brief Allocated and duplicates the content of the source */ zdb_ttlrdata* zdb_ttlrdata_clone(const zdb_ttlrdata* source); /** * @brief Frees the content of the source */ void zdb_ttlrdata_delete(zdb_ttlrdata* record); #ifdef DEBUG /** * DEBUG */ void zdb_record_print_indented(zdb_rr_collection collection, output_stream *os, int indent); void zdb_record_print(zdb_rr_collection collection, output_stream *os); #endif #ifdef __cplusplus } #endif #endif /* _ZDB_RECORD_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_zone_label_iterator.h0000644000077100007710000000012412650131756025752 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.246344 30 ctime=1454597652.198344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_zone_label_iterator.h0000664000077100007710000001024112650131756025555 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to iterate through the labels of a zone * * @{ */ #ifndef _ZDB_ZONE_LABEL_ITERATOR_H #define _ZDB_ZONE_LABEL_ITERATOR_H #include #ifdef __cplusplus extern "C" { #endif /** * @brief Initializes a zone label iterator * * Initializes a zone label iterator (iterates zdb_rr_label) * * @param[in] zone The zone to explore * @param[in] iter a pointer to the iterator to initialise * */ void zdb_zone_label_iterator_init(const zdb_zone* zone, zdb_zone_label_iterator* iter); /** * @brief Initializes a zone label iterator from a given starting name * * Initializes a zone label iterator (iterates zdb_rr_label) * * @param[in] zone The zone to explore * @param[in] iter a pointer to the iterator to initialise * @param[in] from_name the first name the iterator should start from * */ void zdb_zone_label_iterator_init_from(const zdb_zone* zone, zdb_zone_label_iterator* iter, const u8 *from_name); /** * @brief Checks if there is still data available from an iterator * * Checks if there is still data available from an iterator * * @param[in] iter a pointer to the iterator * * @return TRUE if data is available, FALSE otherwise. * */ bool zdb_zone_label_iterator_hasnext(zdb_zone_label_iterator* iter); /** * @brief Copies the full name of the next label returned by the "next" call. * * Copies the full name of the next label returned by the "next" call. * * CALL IT BEFORE USING zdb_zone_label_iterator_next * * @param[in] iter a pointer to the iterator * @param[in] buffer256 a pointer to a buffer that will hold the full dns name * * @return the size of the dns name * */ u32 zdb_zone_label_iterator_nextname_to_cstr(zdb_zone_label_iterator* iter, char* buffer256); u32 zdb_zone_label_iterator_nextname(zdb_zone_label_iterator* iter, u8* buffer256); /** * @brief Returns the next data available from an iterator * * Returns the next data available from an iterator * * @param[in] iter a pointer to the iterator * * @return a pointer the the next label * */ zdb_rr_label* zdb_zone_label_iterator_next(zdb_zone_label_iterator* iter); /** * @brief Skips the children * * Skips the children * * @return * */ void zdb_zone_label_skip_children(zdb_zone_label_iterator* iter); #ifdef __cplusplus } #endif #endif /* _ZDB_ITERATOR_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb-config-features.h0000644000077100007710000000013212654663023024726 xustar000000000000000030 mtime=1454597651.847344534 30 atime=1454597651.794344534 30 ctime=1454597651.947344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb-config-features.h0000664000077100007710000000045712654663023024542 0ustar00yadifayadifa00000000000000#pragma once #define ZDB_HAS_RRCACHE_ENABLED 0 #define ZDB_HAS_DNSSEC_SUPPORT 1 #define ZDB_HAS_NSEC_SUPPORT 1 #define ZDB_HAS_NSEC3_SUPPORT 1 #define ZDB_HAS_ACL_SUPPORT 1 #define ZDB_HAS_TSIG_SUPPORT 1 // version 2.1.6.0-0 #define DNSDB_VERSION 0x020106000000LL// include/dnsdb/zdb-config-features.h yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/hash.h0000644000077100007710000000012412650131756022013 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.188344 30 ctime=1454597651.993344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/hash.h0000664000077100007710000001136112650131756021622 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Functions used to hash a dns formatted string * * Implements the functions used to hash a dns formatted string. * There functions require the call to an initialization function (hash_init); * * @{ */ #ifndef _HASH_H #define _HASH_H #include #ifdef __cplusplus extern "C" { #endif typedef u32 hashcode; #define ZDB_HASH_TABLE_CHAR_SET_SIZE 37 extern const u32 ZDB_HASH_TABLE[256][ZDB_HASH_TABLE_CHAR_SET_SIZE]; extern const u32 ZDB_HASH_TABLE_MAP[256]; extern const u8* WILD_LABEL; extern const hashcode WILD_HASH; /** @brief Initializes the hash functions * * Initializes the hash function. This MUST be called at least one before * calling any other hash function. * */ void hash_init(); /** @brief Compute the hash code of a dns name (concatenation of pascal strings ending with an empty one.) * * Compute the hash code of a dns name (concatenation of pascal strings ending with an empty one.) * The function hash_init() MUST be called once first. (This requirement will be lifted later) * * @param[in] dns_name the name in its DNS form * * @return the hash code as a 32 bits integer */ hashcode hash_dnsname(const u8* dns_name); /** @brief Compute the hash code of a dns label (one pascal string) * * Compute the hash code of a dns name (a pascal string) * The function hash_init() MUST be called once first. * * This is one of the most-called functions in the ZDB. Its speed is critical. * * @param[in] dns_name the name in its DNS form * * @return the hash code as a 32 bits integer */ static inline hashcode hash_dnslabel(const u8 *dns_label) { u32 len = *dns_label++; u32 hash = ZDB_HASH_TABLE[len][0]; const u32 *hash_line = (u32*) & ZDB_HASH_TABLE[1][0]; const u8 * const limit = &dns_label[len]; while(dns_label != limit) { hash += hash_line[ZDB_HASH_TABLE_MAP[*dns_label++]]; hash_line += ZDB_HASH_TABLE_CHAR_SET_SIZE; } return hash; } /** @brief Compute the hash code of a pascal name * * Compute the hash code of a pascal name. * The function hash_init() MUST be called once first. (This requirement will be lifted later) * An interesting thing about a dnsname label : it's a pascal string. * * @param[in] pascal_name the name in pascal form * * @return the hash code as a 32 bits integer */ hashcode hash_pascalname(const u8* pascal_name); /** @brief Compute the hash code of an asciiz name * * Compute the hash code of a pascal name from its asciiz form. * The function hash_init() MUST be called once first. (This requirement will be lifted later) * * @param[in] pascal_name the name in asciiz form * * @return the hash code as a 32 bits integer */ hashcode hash_asciizname(const char* asciiz_name); #ifdef __cplusplus #endif #endif /* _HASH_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_config.h0000644000077100007710000000012412650131756023174 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.196344 30 ctime=1454597652.118344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_config.h0000664000077100007710000001345312650131756023007 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup config Database configuration * @ingroup dnsdb * @brief Database configuration * * Database configuration #defines * * @{ */ #ifndef _ZDB_CONFIG_H #define _ZDB_CONFIG_H #include #include #ifdef __cplusplus extern "C" { #endif #define DEFAULT_ASSUMED_CPU_COUNT 2 /** * Version of the database. */ #define ZDB_VERSION "1.0" /** * Inlines the find operation of the AVLs/BTREEs */ #define ZDB_INLINES_AVL_FIND 1 /** * Inlines the quick operation of the HTBT */ #define ZDB_INLINES_HTBT_FIND 1 /** * * Enables or disables the use of openssl for digital signatures. * Disabling this is not fully supported yet. (Not at all actually) * * MANDATORY: 1 (for now) * */ #define ZDB_OPENSSL_SUPPORT 1 /* * Required for building the IXFR streams */ #define ZDB_CHANGE_FEEDBACK_SUPPORT 1 /* * Use the threadpool system instead of the raw threads */ #define ZDB_USE_THREADPOOL 1 /*#define ZDB_HAS_DNSSEC_SUPPORT (ZDB_HAS_NSEC_SUPPORT+ZDB_HAS_NSEC3_SUPPORT)*/ #ifdef ZDB_HAS_DNSSEC_SUPPORT #define ZDB_HAS_DNSSEC_SUPPORT 1 #else #define ZDB_HAS_DNSSEC_SUPPORT 0 #endif /* Here disable all the DNSSEC related third party libs */ #if ZDB_HAS_DNSSEC_SUPPORT == 0 #undef ZDB_OPENSSL_SUPPORT #define ZDB_OPENSSL_SUPPORT 0 #endif /** * * Enables or disables caching. * * 0 => global_resource_record field not needed * 1 => global_resource_record field is the cache * */ #ifndef ZDB_HAS_RRCACHE_ENABLED #error "ZDB_HAS_RRCACHE_ENABLED has not been defined" #endif /** * DEBUG: Ensures that the memory allocated by ZALLOC is trashed. * This is of course to avoid uninitialized memory issues. * * Please disable for production. * * Recommended value: 0 */ #define ZDB_DEBUG_ZALLOC_TRASHMEMORY 0 /*defined(DEBUG)*/ /** * If the number of items in a dictionnary goes beyond this number, the dictionnary * will change from a balanced tree (AVL) to an hash-table of balanced trees. * * Recommended value: 500000 * */ #define ZDB_HASHTABLE_THRESHOLD 500000 /** * * @todo edf 20141006 -- this is becoming obsolete * * Number of classes [1..n] to support. * Set to 1 to support only the IN class * * Setting this to 1 also enables some code optimizations. * * Please note that the caller is responsible for checking that (qclass>0)&&(qclass<=ZDB_RECORDS_MAX_CLASS) * zdb_query_ex does the check but really should not. * It's faster to check that a qclass is in that range or is not "CHaos" or "HeSiod" on the caller's side. * (ie: if ==IN -> query, else if ==CH answer chaos, else answer no match.) * * Recommended value: 1 * */ #define ZDB_RECORDS_MAX_CLASS 1 /** * Previously, readers had to be "stopped" before any write was done into the database. It's a reasonably fast mechanism. * With the drastic improve of the MT model on kernels > 3.x, the zone can now be explicitely locked by readers. * The first experiments tends to show that the price is minimal. * The lock can still be drastically improved. * * == 0: no lock * != 0: lock * * The locking mechanism itself can be vastly improved */ #define ZDB_EXPLICIT_READER_ZONE_LOCK 1 /** * * DEBUG: Enables (1) or disable (0) stdout statistics output while loading a zone. * * Recommended value: 0 * */ #define ZDB_DEBUG_LOADZONE 0 /** * DEBUG: try to read the zone file no matter what error occurs. * * Recommended value: 0 * */ #define ZDB_DEBUG_ZONEFILE_BESTEFFORT 0 /** * The maximum number of loops allowed with a cname. */ #define ZDB_CNAME_LOOP_MAX 20 /** * The fixed minimum number of file descriptors opened at the same time for journals */ #define ZDB_JOURNAL_FD_MIN 4096 /** * The fixed maximum number of file descriptors opened at the same time for journals */ #define ZDB_JOURNAL_FD_MAX 4096 /** * The default maximum number of file descriptors opened at the same time for journals */ #define ZDB_JOURNAL_FD_DEFAULT 512 #ifdef __cplusplus } #endif #endif /* _ZDB_CONFIG_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/dictionary.h0000644000077100007710000000012412650131756023235 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.172344 30 ctime=1454597651.958344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/dictionary.h0000664000077100007710000004455512650131756023057 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Hash-based collection designed to change it's structure to improve speed. * * Hash-based collection designed to change it's structure to improve speed. * * @{ */ #ifndef _dictionary_H #define _dictionary_H #include #include #include //#define DICTIONARY_NODE_MODE 0 // struct #define DICTIONARY_NODE_MODE 1 // union #ifdef __cplusplus extern "C" { #endif #if DICTIONARY_NODE_MODE == 0 struct dictionary_node; typedef struct dictionary_node dictionary_node; #else union dictionary_node; typedef union dictionary_node dictionary_node; #endif /** * @brief Function type used to find a node match * * Function type used to find a node match * * @param[in] data an arbitrary data (whose meaning is known by the function, of course) * @param[in] node the node to checked for a match * * @return non-zero if the node matches the data, 0 otherwise. */ typedef int dictionary_data_record_compare_function(const void* data, const dictionary_node* node); /** * @brief Function type used to create a node * * Function type used to create a node * * @param[in] data an arbitrary data (whose meaning is known by the function, of course) * * @return a pointer to a node created from the data */ typedef dictionary_node* dictionary_data_record_create_function(const void* data); /** * @brief Function type used to destroy a node * * Function type used to destroy a node * * @param[in] node the node to destroy */ typedef void dictionary_destroy_record_function(dictionary_node* node); /** * @brief Function type used to destroy a node * * Function type used to destroy a node * * @param[in] node the node to destroy */ typedef void dictionary_destroy_ex_record_function(dictionary_node* node, void* arg); /** * @brief Function type used to transfer a node just detached from a dictionary * * Function type used to transfer a node just detached from a dictionary to another * * @param[in] bucket_data an arbitrary data passed to the function * @param[in] key the hashcode of the node detached from the dicionary * @param[in] node the node detached from the dictionary */ typedef void dictionary_bucket_record_function(void* bucket_data, hashcode key, dictionary_node* node); #define COLLECTION_PROCESS_RETURNERROR -1 #define COLLECTION_PROCESS_STOP 0 #define COLLECTION_PROCESS_NEXT 1 #define COLLECTION_PROCESS_DELETENODE 2 /** * Function type called by a dictionary_process_method to do whatever is required on a node. * * Mostly used for deletion in a cascade of dictionaries (what the database is) * * In case of deletion of the node, the function cannot process the dictionary_node pointed * by the next field (node->next). * * Returns a control code to the caller. * * @param[in] data an arbitrary data passed to the callee. * @param[in] node the node to be processed by the callee. * * @return COLLECTION_PROCESS_NEXT if the next node must be proccessed. * @return COLLECTION_PROCESS_STOP if the process MUST be stopped immediately. * @return COLLECTION_PROCESS_DELETENODE if the node has been deleted and the process MUST be stopped immediately. * @return COLLECTION_PROCESS_RETURNERROR if an error occurred and the process MUST be stopped immediately. */ typedef ya_result dictionary_process_record_function(void* data, dictionary_node* node); struct dictionary_vtbl; typedef struct dictionary dictionary; /** * @brief The dictionary descriptor. * * The dictionary descriptor. * */ struct dictionary { union { btree btree_collection; /* 4 8 */ htbt htbt_collection; /* 4 8 */ } ct; /* Collection-type*/ const struct dictionary_vtbl* vtbl; /* 4 8 */ u32 count; /* 4 4 */ u32 threshold; /* 4 4 */ }; /* 16 24 */ typedef struct dictionary_iterator dictionary_iterator; /** * @brief The dictionary iterator. * * The dictionary iterator. * */ struct dictionary_iterator { const struct dictionary_iterator_vtbl* vtbl; dictionary_node* sll; union { btree_iterator as_btree; htbt_iterator as_htbt; } ct; }; /** * @brief Function type called to initialize a dictionary. * * Function type called to initialize a dictionary. * * @param[in] dico a pointer to the dictionary descriptor to initialize. * */ typedef void dictionary_init_method(dictionary* dico); /** * @brief Function type called to destroy a dictionary * * Function type called to destroy a dictionary * * @param[in] dico a pointer to the dictionary descriptor * @param[in] destroy a pointer to a function called for each node of the dictionary in order to delete them. * */ typedef void dictionary_destroy_method(dictionary* dico, dictionary_destroy_record_function destroy); /** * @brief Function type called to destroy a dictionary * * Function type called to destroy a dictionary * * @param[in] dico a pointer to the dictionary descriptor * @param[in] destroyex a pointer to a function called for each node of the dictionary in order to delete them. * @param[in] arg a pointer to an argument that will be passed to the destroyex function * */ typedef void dictionary_destroy_ex_method(dictionary* dico, dictionary_destroy_ex_record_function destroyex, void* arg); /** * @brief Function type called to add a record to a dictionary * * Function type called to add a record to a dictionary * * @param[in] dico a pointer to the dictionary descriptor * @param[in] key the hashcode of the record that will be inserted * @param[in] record_match_data arbitrary data for the compare and create functions * @param[in] compare pointer to a function called to check for duplicates (same hashcode) * @param[in] create pointer to a function called to create the new record * * @return Returns a pointer to the newly created record, or NULL if an error occurred. * */ typedef dictionary_node* dictionary_add_method(dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare, dictionary_data_record_create_function create); /** * @brief Function type called to find a record in a dictionary * * Function type called to find a record in a dictionary * * @param[in] dico a pointer to the dictionary descriptor * @param[in] key the hashcode of the record * @param[in] record_match_data arbitrary data for the compare function * @param[in] compare pointer to a function called to check for duplicates (same hashcode) * * @return Returns a pointer to the record matching the search, or NULL if no record has been found * */ typedef dictionary_node* dictionary_find_method(const dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare); /** * @brief Function type called to find a record in a dictionary * * Function type called to find a record in a dictionary * * @param[in] dico a pointer to the dictionary descriptor * @param[in] key the hashcode of the record * @param[in] record_match_data arbitrary data for the compare function * @param[in] compare pointer to a function called to check for a match * * @return Returns a pointer to a pointer to the record matching the search, or NULL if no record has been found * */ typedef dictionary_node** dictionary_findp_method(const dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare); /** * @brief Function type called to remove a record from a dictionary * * Function type called to remove a record from a dictionary * * @param[in] dico a pointer to the dictionary descriptor * @param[in] key the hashcode of the record that will be inserted * @param[in] record_match_data arbitrary data for the compare function * @param[in] compare pointer to a function called to check for a match * * @return Returns a pointer to a pointer to the record matching the search, or NULL if no record has been found * */ typedef dictionary_node* dictionary_remove_method(dictionary* dico, hashcode key, void* record_match_data, dictionary_data_record_compare_function compare); /** * @brief Function type called to process a record from a dictionary * * Function type called to process a record from a dictionary * * @param[in] dico a pointer to the dictionary descriptor * @param[in] key the hashcode of the record that will be inserted * @param[in] record_match_data arbitrary data for the compare function * @param[in] compare pointer to a function called to check for a match and do whatever operation on the record. * * @return COLLECTION_PROCESS_STOP if the process succeeded * @return COLLECTION_PROCESS_DELETENODE if the process succeeded and the node has been deleted * @return COLLECTION_PROCESS_RETURNERROR if an error occurred * */ typedef ya_result dictionary_process_method(dictionary* dico, hashcode key, void* record_match_data, dictionary_process_record_function compare); /** * @brief Function type called to empty a dictionary * * Function type called to empty a dictionary. * This is a part of the dictionary's mutating feature. * * @param[in] dico a pointer to the dictionary descriptor * @param[in] bucket a pointer to an arbitrary data passed to the bucket_record function (ie: the new dictionary) * @param[in] bucket_record pointer to a function called to take care of the removed record. (ie: add it to another dictionary) * */ typedef void dictionary_empties_method(dictionary* dico, void* bucket, dictionary_bucket_record_function bucket_record); /** * @brief Function type called to fill a dictionary * * Function type called to fill a dictionary * This is a part of the dictionary's mutating feature. * * Note there is no MATCH callback because collisions cannot occur. * (It's used to transfer node from a dictionary to another ... so ...) * * @param[in] dico a pointer to the dictionary descriptor * @param[in] key the hashcode of the node that needs to be added into the dictionary * @param[in] node the node that needs to be added into the dictionary * */ typedef void dictionary_fills_method(dictionary* dico, hashcode key, dictionary_node* node); /** * @brief Function type called to initialize a dictionary iterator * * Function type called to initialize a dictionary iterator * * @param[in] dico a pointer to the dictionary descriptor * @param[in] iter a pointer to the dictionary iterator */ typedef void dictionary_iterator_init_method(const dictionary* dico, dictionary_iterator* iter); /** * @brief Function type called check if the iterator still has items to return * * Function type called check if the iterator still has items to return * * @param[in] iter a pointer to the dictionary iterator * * @return TRUE if calling the dictionary_iterator_next_method will return an item, FALSE otherwise */ typedef bool dictionary_iterator_hasnext_method(dictionary_iterator* dico); /** * @brief Function type called to get the next item of the iterator * * Function type called to get the next item of the iterator * The caller should check for item availability by calling the "hasnext" method. * * @param[in] iter a pointer to the dictionary iterator * * @return A pointer to a pointer to the next item. */ typedef void** dictionary_iterator_next_method(dictionary_iterator* dico); /** * @brief Function type called to initialize a dictionary iterator from a starting point * * Function type called to initialize a dictionary iterator * If the key has not been found the previous or next key is used instead (whatever has been hit last) * * @param[in] dico a pointer to the dictionary descriptor * @param[in] iter a pointer to the dictionary iterator * @param[in] the key to start from. */ typedef void dictionary_iterator_init_from_method(const dictionary* dico, dictionary_iterator* iter, hashcode key); typedef const char * const dictionary_class; /** * @brief The dictionary virtual table * * The dictionary virtual table */ struct dictionary_vtbl { /*dictionary_init_method* dictionary_init_call;*/ dictionary_destroy_method * const dictionary_destroy_call; dictionary_add_method * const dictionary_add_call; dictionary_find_method * const dictionary_find_call; dictionary_findp_method * const dictionary_findp_call; dictionary_remove_method * const dictionary_remove_call; dictionary_process_method * const dictionary_process_call; dictionary_destroy_ex_method * const dictionary_destroy_ex_call; dictionary_iterator_init_method * const dictionary_iterator_init_call; dictionary_iterator_init_from_method * const dictionary_iterator_init_from_call; dictionary_empties_method * const dictionary_empties_call; dictionary_fills_method * const dictionary_fills_call; dictionary_class __class__; }; /** * @brief The dictionary_iterator virtual table * * The dictionary virtual table */ struct dictionary_iterator_vtbl { dictionary_iterator_hasnext_method * const dictionary_iterator_hasnext_call; dictionary_iterator_next_method * const dictionary_iterator_next_call; }; /** * @brief Used to initialize a dictionary * * Used to initialize a dictionary. * This will set the dictionary's initial type. * * @param[in] dico a pointer to the dictionary descriptor * */ void dictionary_init(dictionary* dico); /** * @brief Used to mutate a dictionary * * Used to mutate a dictionary * This will change the dictionary's type to the one adapted for its current * item count. * If dictionary_should_mutate(dico) is FALSE, then this function does nothing. * * @param[in] dico a pointer to the dictionary descriptor * */ void dictionary_mutate(dictionary* dico); /** * * Initialises the iterator so that it has no next items to return * * @param iter */ void dictionary_empty_iterator_init(dictionary_iterator* iter); /** * @brief Checks if a dictionary should be processed by dictionary_mutate * * Checks if a dictionary should be processed by dictionary_mutate * * @return TRUE if and only if the dictionary should be processed by dictionary_mutate */ #define dictionary_should_mutate(dico_) ((dico_)->count>(dico_)->threshold) /** @brief helper macro */ #define dictionary_destroy(dico_, destroy_) (dico_)->vtbl->dictionary_destroy_call((dico_), (destroy_)) /** @brief helper macro */ #define dictionary_destroy_ex(dico_, destroy_, arg_) (dico_)->vtbl->dictionary_destroy_ex_call((dico_), (destroy_), (arg_)) /** @brief helper macro */ #define dictionary_add(dico_, key_, record_match_data_, compare_, create_) (dico_)->vtbl->dictionary_add_call((dico_), (key_), (record_match_data_), (compare_), (create_)) /** @brief helper macro */ #define dictionary_find(dico_, key_, record_match_data_, compare_) (dico_)->vtbl->dictionary_find_call((dico_), (key_), (record_match_data_), (compare_)) /** @brief helper macro */ #define dictionary_findp(dico_, key_, record_match_data_, compare_) (dico_)->vtbl->dictionary_findp_call((dico_), (key_), (record_match_data_), (compare_)) /** @brief helper macro */ #define dictionary_remove(dico_, key_, record_match_data_, compare_) (dico_)->vtbl->dictionary_remove_call((dico_), (key_), (record_match_data_), (compare_)) /** @brief helper macro */ #define dictionary_process(dico_, key_, record_match_data_, compare_) (dico_)->vtbl->dictionary_process_call((dico_), (key_), (record_match_data_), (compare_)) /** @brief helper macro */ #define dictionary_iterator_init(dico_, iter_) (dico_)->vtbl->dictionary_iterator_init_call((dico_), (iter_)) /** @brief helper macro */ #define dictionary_iterator_init_from(dico_, iter_, key_) (dico_)->vtbl->dictionary_iterator_init_from_call((dico_), (iter_), (key_)) /** @brief helper macro */ #define dictionary_iterator_hasnext(iter_) (iter_)->vtbl->dictionary_iterator_hasnext_call((iter_)) /** @brief helper macro */ #define dictionary_iterator_next(iter_) (iter_)->vtbl->dictionary_iterator_next_call((iter_)) /** @brief helper macro */ #define dictionary_empties(dico_,bucket_data_,callback_) (dico_)->vtbl->dictionary_empties_call((dico_),(bucket_data_),(callback_)) /** @brief helper macro */ #define dictionary_fills(dico_,key_,node_) (dico_)->vtbl->dictionary_fills_call((dico_),(key_),(node_)) /** @brief helper macro*/ #define dictionary_size(dico_) ((dico_)->count) /** @brief Checks if a dictionary is not empty * * Checks if a dictionary is not empty * * @return TRUE if and only if the dictionary is not empty */ #define dictionary_notempty(dico_) ((dico_)->count!=0) /** @brief Checks if a dictionary is empty * * Checks if a dictionary is empty * * @return TRUE if and only if the dictionary is empty */ #define dictionary_isempty(dico_) ((dico_)->count==0) #ifdef __cplusplus } #endif #endif /* _dictionary_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3_update.h0000644000077100007710000000012412650131756023445 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.245344 30 ctime=1454597652.084344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3_update.h0000664000077100007710000000542412650131756023257 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NSEC3_UPDATE_H #define _NSEC3_UPDATE_H #include #ifdef __cplusplus extern "C" { #endif /* Builds the NSEC3 records in a zone, * after this call all the signatures of each NSEC3 from the zone should be updated */ ya_result nsec3_update_zone(zdb_zone* zone); bool nsec3_is_label_covered(zdb_rr_label *label, bool opt_out); /** * * Commits the changes * There is NO lock made on the zone * * @param removed_rrsig_sll * @param added_rrsig_sll * @param item * @param zone */ void nsec3_update_rrsig_commit(zdb_packed_ttlrdata *removed_rrsig_sll, zdb_packed_ttlrdata *added_rrsig_sll, nsec3_zone_item *item, zdb_zone *zone); #ifdef __cplusplus } #endif #endif /* _NSEC3_UPDATE_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/icmtl_input_stream.h0000644000077100007710000000012412650131756024772 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.213344 30 ctime=1454597652.004344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/icmtl_input_stream.h0000664000077100007710000000522612650131756024604 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup dnsdb * @brief * * Incremental-fileS-to-ICMTL input stream. * Takes the 3 files translates them into an incremental stream. * An incremntal stream is ALMOST an IXFR. * * @{ */ #ifndef _ICMTL_INPUT_STREAM_H #define _ICMTL_INPUT_STREAM_H /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include #ifdef __cplusplus extern "C" { #endif ya_result icmtl_input_stream_open(u8* origin, u32 from, u32 to, input_stream* out_is, const char* folder); void icmtl_input_stream_skip_headtail(input_stream* out_is); #ifdef __cplusplus } #endif #endif /* _IXFR_INPUT_STREAM_H */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_zone_axfr_input_stream.h0000644000077100007710000000012412650131756026514 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.205344 30 ctime=1454597652.190344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_zone_axfr_input_stream.h0000664000077100007710000000562312650131756026327 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef __ZDB_ZONE_AXFR_INPUT_STREAM__H__ #define __ZDB_ZONE_AXFR_INPUT_STREAM__H__ #include #include #ifdef __cplusplus extern "C" { #endif /** * Opens the specified file as an AXFR image for the given zone. * Will fail if the file cannot be opened. * * @param is * @param zone * @param filepath * @return */ ya_result zdb_zone_axfr_input_stream_open_with_path(input_stream *is, zdb_zone *zone, const char *filepath); /** * Opens the file on disk and starts to stream it until it has been marked as fully written * Used to send to slaves. * * @param is * @param zone * @return */ ya_result zdb_zone_axfr_input_stream_open(input_stream *is, zdb_zone *zone); #ifdef __cplusplus } #endif #endif /* __ZDB_ZONE_AXFR_INPUT_STREAM__H__ */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3_item.h0000644000077100007710000000012412650131756023121 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.162344 30 ctime=1454597652.057344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3_item.h0000664000077100007710000001332012650131756022725 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NSEC3_ITEM_H #define _NSEC3_ITEM_H #include #include #ifdef __cplusplus extern "C" { #endif /* NOTE: The first byte of the digest is its length */ nsec3_zone_item* nsec3_zone_item_find(nsec3_zone *n3, const u8 *digest); /** * * @param n3 * @param dnsnamedigest * @return */ nsec3_zone_item* nsec3_zone_item_find_by_name(nsec3_zone *n3, const u8 *dnsnamedigest); /** * * Also returns the nsec3 chain. * * @param zone * @param nsec3_label * @param out_n3 * @return */ nsec3_zone_item* nsec3_zone_item_find_by_name_ext(zdb_zone *zone, const u8 *nsec3_label, nsec3_zone **out_n3); nsec3_zone_item* nsec3_zone_item_find_by_record(zdb_zone *zone, const u8 *fqdn, u16 rdata_size, const u8 *rdata); bool nsec3_zone_item_equals_rdata( const nsec3_zone* n3, const nsec3_zone_item* item, u16 rdata_size, const u8* rdata); ya_result nsec3_zone_item_to_zdb_packed_ttlrdata( const nsec3_zone* n3, const nsec3_zone_item* item, const u8* origin, u8* out_owner, /* dnsname */ u32 ttl, zdb_packed_ttlrdata* nsec3, u32 nsec3_max_size, const zdb_packed_ttlrdata** out_nsec3_rrsig); struct nsec3_zone_item_to_new_zdb_packed_ttlrdata_parm { const nsec3_zone* n3; const nsec3_zone_item* item; const u8* origin; u8 * restrict * pool; // memory pool u32 ttl; }; typedef struct nsec3_zone_item_to_new_zdb_packed_ttlrdata_parm nsec3_zone_item_to_new_zdb_packed_ttlrdata_parm; #define NSEC3_ZONE_ITEM_TO_NEW_ZDB_PACKED_TTLRDATA_SIZE (ALIGN16(MAX_DOMAIN_LENGTH) + ALIGN16(NSEC3_ZONE_STRUCT_SIZE_FROM_SALT(255))) void nsec3_zone_item_to_new_zdb_packed_ttlrdata( nsec3_zone_item_to_new_zdb_packed_ttlrdata_parm *nsec3_parms, u8 **out_owner_p, /* dnsname */ zdb_packed_ttlrdata** out_nsec3, const zdb_packed_ttlrdata** out_nsec3_rrsig); u32 nsec3_zone_item_get_label( nsec3_zone_item* item, u8* output_buffer, u32 buffer_size); void nsec3_zone_item_write_owner( output_stream* os, nsec3_zone_item* item, u8* origin); void nsec3_zone_item_to_output_stream( output_stream* os, nsec3_zone* n3, nsec3_zone_item* item, u8* origin, u32 ttl); void nsec3_zone_item_rrsig_del_by_keytag(nsec3_zone_item *item, u16 native_key_tag); void nsec3_zone_item_rrsig_del(nsec3_zone_item *item, zdb_ttlrdata *nsec3_rrsig); void nsec3_zone_item_rrsig_add(nsec3_zone_item *item, zdb_packed_ttlrdata *nsec3_rrsig); /* * Deletes ALL rrsig in the NSEC3 item */ void nsec3_zone_item_rrsig_delete_all(nsec3_zone_item *item); /* * Empties an nsec3_zone_item * * Only frees the payload : owners, stars, bitmap, rrsig * * This should be followed by the destruction of the item itself */ void nsec3_zone_item_empties(nsec3_zone_item* item); /* * Sets the type bitmap of the nsec3 item to match the one in the rdata * Does nothing if the bitmap is already ok * * NOTE: Remember that the item does not contain * * _ hash_algorithm * _ iterations * _ salt_length * _ salt * _ hash_length * _ next_hashed_owner_name */ ya_result nsec3_zone_item_update_bitmap(nsec3_zone_item* nsec3_item, const u8 *rdata, u16 rdatasize); #ifdef __cplusplus } #endif #endif /* _NSEC3_ITEM_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/dnssec_config.h0000644000077100007710000000012412650131756023674 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.239344 30 ctime=1454597651.977344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/dnssec_config.h0000664000077100007710000000467012650131756023510 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbdnssec DNSSEC functions * @ingroup dnsdb * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #ifndef _DNSSEC_CONFIG_H #define _DNSSEC_CONFIG_H #if ZDB_HAS_DNSSEC_SUPPORT == 0 #error "Please do not include dnssec_config.h if ZDB_HAS_DNSSEC_SUPPORT is 0 (Not NSEC3 nor NSEC)" #endif #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif /* _DNSSEC_CONFIG_H */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/dnssec.h0000644000077100007710000000012412650131756022347 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.220344 30 ctime=1454597651.974344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/dnssec.h0000664000077100007710000000647312650131756022166 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbdnssec DNSSEC functions * @ingroup dnsdb * @brief * * @{ */ #ifndef _DNSSEC_H #define _DNSSEC_H /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include #include #include #include #include #include /** * @todo NOTE: WARNING: IF THE MIN_TTL CHANGES IN THE SOA we MUST resign the NSEC* stuff. */ #if ZDB_HAS_DNSSEC_SUPPORT != 0 #ifndef _DNSSEC_C #include extern logger_handle *g_dnssec_logger; #endif #ifdef __cplusplus extern "C" { #endif #define DEFAULT_ENGINE_NAME "openssl" #define DNSSEC_DIGEST_TYPE_SHA1 1 #define DNSSEC_DIGEST_TYPE_SHA256 2 #define DNSSEC_MINIMUM_KEY_SIZE_BYTES ((DNSSEC_MINIMUM_KEY_SIZE+7)/8) #define DNSSEC_MAXIMUM_KEY_SIZE_BYTES ((DNSSEC_MAXIMUM_KEY_SIZE+7)/8) #define ENGINE_PRESET_DELIMITER "," #define ENGINE_COMMAND_DELIMITER ":" ENGINE* dnssec_loadengine(const char *engine_name); void dnssec_unloadengine(ENGINE *engine); ya_result zdb_update_zone_signatures_alarm(void *zone); /* zdb_zone* */ ya_result zdb_update_zone_signatures(zdb_zone *zone, u32 signature_count_loose_limit, bool present_signatures_are_verified); /// @note MUST BE SET void dnssec_set_xfr_path(const char *xfr_path); #ifdef __cplusplus } #endif #endif #endif /* _DNSSEC_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/htbt.h0000644000077100007710000000012412650131756022031 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.213344 30 ctime=1454597652.000344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/htbt.h0000664000077100007710000002152612650131756021644 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Hash-Table of Balanced trees structure and functions. * * Implementation of the Hash-Table of Balanced trees structure and functions. * An hashtable holding htbt collections. * * The idea behind this structure is that, although balanced trees are FAST, * the deeper, the slower they are. * * Another important thing is that btrees are accessed by a hash and thus, can collide. * * This structure is thus used for the top-level balanced tree in order to * * _ divide the top-level domains into smaller, faster trees. * _ reduce the number of potential collisions in said trees. * * @{ */ #ifndef _HHTBT_H #define _HHTBT_H /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include #include #include #ifdef __cplusplus extern "C" { #endif /** * This macro is the transformation on the hash to distribute the collided hashes * on different btree. * * To work as intended (potentially split collisions) it has to be generated with * another formula than the one used for the BT. * * The idea is: * * H(x) = H(y) => collision * h(x) != h(y) => no collision anymore * * h(x) must not be a function of H(x) * * */ #define HTBT_HASH_TRANSFORM(x) (x) typedef htable_entry* htbt; typedef btree_node htbt_node; /** @brief Initializes the collection * * Initializes the collection. * Basically : *collection=NULL; * * @param[in] collection the collection to initialize * */ htbt htbt_create(); void htbt_init(htbt* collection); #if ZDB_INLINES_HTBT_FIND == 0 /** @brief Finds a node in the collection. * * Finds a node in the collection. * * THIS CALL IS NOT THREAD SAFE. * * @param[in] collection the collection to search in * @param[in] obj_hash the hash to find * * @return A pointer to the node or NULL if there is no such node. */ void* htbt_find(htbt collection, hashcode obj_hash); /** @brief Finds a node in the collection. * * Finds a node in the collection. * * THIS CALL IS NOT THREAD SAFE. * * @param[in] collection the collection to search in * @param[in] obj_hash the hash to find * * @return A pointer to a pointer to the node or NULL if there is no such node. */ void** htbt_findp(htbt collection, hashcode obj_hash); /** @brief Inserts data into the collection. * * Insert datat into the collection. * The caller will then have to use the returned void** to set his data. * * THIS CALL IS NOT THREAD SAFE * * @param[in] collection the collection where the insertion should be made * @param[in] obj_hash the hash associated to the node * * @return A pointer to the data field associated to the hash, or NULL (out of memory) */ void** htbt_insert(htbt collection, hashcode obj_hash); /** @brief Deletes a node from the collection. * * Deletes a node from the collection. * * THIS CALL IS NOT THREAD SAFE * * @param[in] collection the collection from which the delete will be made * @param[in] obj_hash the hash associated to the node to remove * * @return The node associated to the hash */ void* htbt_delete(htbt collection, hashcode obj_hash); #endif /** @brief Destroys the collection. * * Destroys the collection. * No other thread should access it, obiviously. * * @param[in] collection the collection to destroy */ void htbt_destroy(htbt* collection); typedef struct htbt_iterator { htbt table; s32 count; btree_iterator iter; } htbt_iterator; void htbt_iterator_init(htbt tree, htbt_iterator* iter); void htbt_iterator_init_from(htbt collection, htbt_iterator* iter, hashcode obj_hash); #if ZDB_INLINES_HTBT_FIND == 0 bool htbt_iterator_hasnext(htbt_iterator* iter); #endif void** htbt_iterator_next(htbt_iterator* iter); htbt_node* htbt_iterator_next_node(htbt_iterator* iter); #if ZDB_INLINES_HTBT_FIND != 0 /** @brief Finds a node in the collection. * * Finds a node in the collection. * * THIS CALL IS NOT THREAD SAFE. * * @param[in] collection the collection to search in * @param[in] obj_hash the hash to find * * @return A pointer to the node or NULL if there is no such node. */ static inline void* htbt_find(htbt collection, hashcode obj_hash) { /* compute the table hash from the object hash */ hashcode table_hash = HTBT_HASH_TRANSFORM(obj_hash); /* grab the entry for the given hash */ htable_entry* entry = &htable_get(collection, table_hash); /* search the tree of the entry */ return btree_find((btree*) & entry->data, obj_hash); } /** @brief Finds a node in the collection. * * Finds a node in the collection. * * THIS CALL IS NOT THREAD SAFE. * * @param[in] collection the collection to search in * @param[in] obj_hash the hash to find * * @return A pointer to a pointer to the node or NULL if there is no such node. */ static inline void** htbt_findp(htbt collection, hashcode obj_hash) { /* compute the table hash from the object hash */ hashcode table_hash = HTBT_HASH_TRANSFORM(obj_hash); /* grab the entry for the given hash */ htable_entry* entry = &htable_get(collection, table_hash); /* search the tree of the entry */ return btree_findp((btree*) & entry->data, obj_hash); } /** @brief Inserts data into the collection. * * Insert datat into the collection. * The caller will then have to use the returned void** to set his data. * * THIS CALL IS NOT THREAD SAFE * * @param[in] collection the collection where the insertion should be made * @param[in] obj_hash the hash associated to the node * * @return A pointer to the data field associated to the hash, or NULL (out of memory) */ static inline void** htbt_insert(htbt collection, hashcode obj_hash) { /* compute the table hash from the object hash */ hashcode table_hash = HTBT_HASH_TRANSFORM(obj_hash); /* grab the entry for the given hash */ htable_entry* entry = &htable_get(collection, table_hash); /* search the tree of the entry */ void** pdata = btree_insert((btree*) & entry->data, obj_hash); return pdata; } /** @brief Deletes a node from the collection. * * Deletes a node from the collection. * * THIS CALL IS NOT THREAD SAFE * * @param[in] collection the collection from which the delete will be made * @param[in] obj_hash the hash associated to the node to remove * * @return The node associated to the hash */ static inline void* htbt_delete(htbt collection, hashcode obj_hash) { /* compute the table hash from the object hash */ hashcode table_hash = HTBT_HASH_TRANSFORM(obj_hash); /* grab the entry for the given hash */ htable_entry* entry = &htable_get(collection, table_hash); /* search the tree of the entry */ void** pdata = btree_delete((btree*) & entry->data, obj_hash); return pdata; } static inline bool htbt_iterator_hasnext(htbt_iterator* iter) { return btree_iterator_hasnext(&iter->iter); } #endif #ifdef __cplusplus } #endif #endif /* _Hhtbt_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_sanitize.h0000644000077100007710000000012412650131756023555 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.247344 30 ctime=1454597652.141344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_sanitize.h0000664000077100007710000000570212650131756023366 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup zone Functions used to manipulate a zone * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #ifndef _ZDB_SANITIZE_H #define _ZDB_SANITIZE_H #include #ifdef __cplusplus extern "C" { #endif #define SANITY_ERROR_BASE 0x800b0000 #define SANITY_UNEXPECTEDSOA 1 #define SANITY_TOOMANYSOA 2 #define SANITY_CNAMENOTALONE 4 #define SANITY_UNEXPECTEDCNAME 8 #define SANITY_EXPECTEDNS 16 #define SANITY_UNEXPECTEDDS 32 #define SANITY_TRASHATDELEGATION 64 #define SANITY_TRASHUNDERDELEGATION 128 #define SANITY_TOOMANYNSEC 256 #define SANITY_RRSIGWITHOUTKEYS 512 #define SANITY_MUSTDROPZONE 32768 ya_result zdb_sanitize_rr_set(zdb_zone *zone, zdb_rr_label *label); ya_result zdb_sanitize_rr_label(zdb_zone *zone, zdb_rr_label *label, dnsname_stack *name); ya_result zdb_sanitize_rr_label_with_parent(zdb_zone *zone, zdb_rr_label *label, dnsname_stack *name); ya_result zdb_sanitize_zone(zdb_zone *zone); #ifdef __cplusplus } #endif #endif /* _ZDB_ZONE_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_error.h0000644000077100007710000000012412650131756023060 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.232344 30 ctime=1454597652.122344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_error.h0000664000077100007710000001175512650131756022676 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup error Database error handling * @ingroup dnsdb * @brief Database error handling * * @{ */ #ifndef _ZDB_ERROR_H #define _ZDB_ERROR_H #include #ifdef __cplusplus extern "C" { #endif /** @brief a negative number that marks the start of the ZDB error codes */ #define ZDB_ERROR_BASE 0x80040000 #define ZDB_ERROR_CODE(code_) ((s32)(ZDB_ERROR_BASE+(code_))) #define ZDB_ERROR_GENERAL ZDB_ERROR_CODE(0x0000) #define ZDB_ERROR_KEY_NOTFOUND ZDB_ERROR_CODE(0x0001) // DATABASE KEY #define ZDB_ERROR_DELETEFROMEMPTY ZDB_ERROR_CODE(0x0002) // DATABASE could not delete because collection is empty #define ZDB_ERROR_NOSUCHCLASS ZDB_ERROR_CODE(0x0003) // DATABASE class not found #define ZDB_ERROR_NOSOAATAPEX ZDB_ERROR_CODE(0x0004) // DATABASE zone has not SOA #define ZDB_ERROR_CORRUPTEDSOA ZDB_ERROR_CODE(0x1001) // RECORD soa is corrupted #define ZDB_ERROR_ZONE_IS_NOT_SIGNED ZDB_ERROR_CODE(0x3001) // DATABASE zone dnssec #define ZDB_ERROR_ZONE_IS_ALREADY_BEING_SIGNED ZDB_ERROR_CODE(0x3002) // DATABASE zone dnssec #define ZDB_ERROR_ZONE_INVALID ZDB_ERROR_CODE(0x3003) // DATABASE zone dynamic update #define ZDB_ERROR_ZONE_IS_NOT_DNSSEC ZDB_ERROR_CODE(0x3004) // DATABASE zone dnssec #define ZDB_ERROR_ZONE_NO_ZSK_PRIVATE_KEY_FILE ZDB_ERROR_CODE(0x3005) // DATABASE zone dnssec #define ZDB_READER_WRONGNAMEFORZONE ZDB_ERROR_CODE(0x4001) // DATABASE zone load #define ZDB_READER_ZONENOTLOADED ZDB_ERROR_CODE(0x4002) // DATABASE zone load #define ZDB_READER_FIRST_RECORD_NOT_SOA ZDB_ERROR_CODE(0x4003) // DATABASE zone load #define ZDB_READER_ANOTHER_DOMAIN_WAS_EXPECTED ZDB_ERROR_CODE(0x4004) // DATABASE zone load #define ZDB_READER_NSEC3WITHOUTNSEC3PARAM ZDB_ERROR_CODE(0x4005) // DATABASE zone load #define ZDB_READER_MIXED_DNSSEC_VERSIONS ZDB_ERROR_CODE(0x4006) // DATABASE zone load #define ZDB_READER_ALREADY_LOADED ZDB_ERROR_CODE(0x4007) // DATABASE zone load #define ZDB_READER_NSEC3PARAMWITHOUTNSEC3 ZDB_ERROR_CODE(0x4008) // DATABASE zone load #define ZDB_ERROR_ICMTL_NOTFOUND ZDB_ERROR_CODE(0x3001) // ICMTL #define ZDB_ERROR_ICMTL_STATUS_INVALID ZDB_ERROR_CODE(0x3002) // ICMTL #define ZDB_ERROR_ICMTL_FOLDERPATHTOOLONG ZDB_ERROR_CODE(0x3003) // ICMTL #define ZDB_JOURNAL_WRONG_PARAMETERS ZDB_ERROR_CODE(0x6001) #define ZDB_JOURNAL_READING_DID_NOT_FOUND_SOA ZDB_ERROR_CODE(0x6002) // nowhere in a scan #define ZDB_JOURNAL_SOA_RECORD_EXPECTED ZDB_ERROR_CODE(0x6003) // record being read was expected to be an SOA #define ZDB_JOURNAL_SERIAL_OUT_OF_KNOWN_RANGE ZDB_ERROR_CODE(0x6004) #define ZDB_JOURNAL_FEATURE_NOT_SUPPORTED ZDB_ERROR_CODE(0x6005) #define ZDB_JOURNAL_ERROR_READING_JOURNAL ZDB_ERROR_CODE(0x6006) #define ZDB_JOURNAL_NSEC3_LABEL_NOT_FOUND_IN_DB ZDB_ERROR_CODE(0x6007) #define ZDB_JOURNAL_NSEC3_ADDED_IN_NSEC ZDB_ERROR_CODE(0x6008) #define ZDB_JOURNAL_NSEC3_HASH_NOT_SUPPORTED ZDB_ERROR_CODE(0x6009) #define ZDB_JOURNAL_IXFR_SERIAL_OUT_OF_KNOWN_RANGE ZDB_ERROR_CODE(0x600a) void zdb_register_errors(); #ifdef __cplusplus } #endif #endif /* _ZDB_ERROR_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3_rrsig_updater.h0000644000077100007710000000012412650131756025035 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.197344 30 ctime=1454597652.076344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3_rrsig_updater.h0000664000077100007710000000720012650131756024641 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup rrsig RRSIG functions * @ingroup dnsdbdnssec * @brief * * * * @{ * * lock for readers * * label iterator -> Q -> sign -> Q * U -> sign -> U * E -> sign -> E * U -> sign -> U * E -> sign -> E -> get results -> set lock to writer -> store * *----------------------------------------------------------------------------*/ #pragma once #include struct nsec3_rrsig_updater_result_process_item_s { struct nsec3_rrsig_updater_result_process_item_s *next; zdb_packed_ttlrdata *added_rrsig_sll; zdb_packed_ttlrdata *removed_rrsig_sll; nsec3_node *item; }; typedef struct nsec3_rrsig_updater_result_process_item_s nsec3_rrsig_updater_result_process_item_s; struct nsec3_rrsig_answer_context_s { dnssec_task_s *task; struct nsec3_rrsig_updater_result_process_item_s *items; }; typedef struct nsec3_rrsig_answer_context_s nsec3_rrsig_answer_context_s; struct nsec3_rrsig_updater_parms { dnssec_task_s task; smp_int remaining_quota; struct nsec3_rrsig_updater_result_process_item_s *to_commit; s32 quota; /// maximum number of signatures allowed // output u32 good_signatures; u32 expired_signatures; u32 wrong_signatures; bool signatures_are_verified; }; typedef struct nsec3_rrsig_updater_parms nsec3_rrsig_updater_parms; void nsec3_rrsig_updater_init(nsec3_rrsig_updater_parms *parms, zdb_zone *zone); ya_result nsec3_rrsig_updater_process_zone(nsec3_rrsig_updater_parms *parms); void nsec3_rrsig_updater_commit(nsec3_rrsig_updater_parms *parms); void nsec3_rrsig_updater_finalize(nsec3_rrsig_updater_parms *parms); ya_result nsec3_rrsig_generate_signatures(rrsig_context_s *context, nsec3_zone* n3, struct nsec3_node* item, struct nsec3_node* next); /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_utils.h0000644000077100007710000000012412650131756023067 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.207344 30 ctime=1454597652.148344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_utils.h0000664000077100007710000000702712650131756022702 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnsdb * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _ZDB_UTILS_H #define _ZDB_UTILS_H #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* * FILE IOs FOR SPECIFIC TYPES * THE STORAGE IS NOT "RAW" * These will be obsoleted by the "streams" */ ya_result fread_u8(FILE* f, u8* value); ya_result fread_u16(FILE* f, u16* valuep); ya_result fread_u32(FILE* f, u32* valuep); ya_result fread_pstr(FILE* f, u8* value, u32 maxsize); ya_result fread_dnsname(FILE* f, u8* value, u32 maxsize); ya_result fread_buffer(FILE* f, u8* buffer, u32 size); u8* fread_zalloc_pstr(FILE* f); u8* fread_zalloc_buffer(FILE* f,u32* size); /* * SOA */ ya_result rr_soa_get_serial(const u8* rdata, u16 rdata_size, u32* serial); ya_result rr_soa_increase_serial(u8* rdata, u16 rdata_size, u32 increment); ya_result rr_soa_get_minimumttl(const u8* rdata, u16 rdata_size, u32* minimum_ttl); /* * PRINT ANSWER */ ya_result log_rdata(logger_handle *hndl, int level, u16 type, u8* rdata_pointer, u16 rdata_size); ya_result osprint_query_ex_section(output_stream* os, zdb_resourcerecord* section); void print_query_ex_section(zdb_resourcerecord* section); void osprint_query_ex(output_stream* os, zdb_query_ex_answer* answer); void print_query_ex(zdb_query_ex_answer* answer); #ifdef __cplusplus } #endif #endif /* _ZDB_UTILS_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb-zone-garbage.h0000644000077100007710000000012412650131756024206 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.185344 30 ctime=1454597652.171344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb-zone-garbage.h0000664000077100007710000000455512650131756024024 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #pragma once #include #ifdef DNSDB_BUILD void zdb_zone_garbage_init(); void zdb_zone_garbage_finalize(); void zdb_zone_garbage_collect(zdb_zone *zone); zdb_zone *zdb_zone_garbage_get(); #endif void zdb_zone_garbage_run(); bool zdb_zone_garbage_empty(); typedef void zdb_zone_garbage_run_cb(zdb_zone *); void zdb_zone_garbage_run_ex(zdb_zone_garbage_run_cb *destroyer); /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_types.h0000644000077100007710000000012412650131756023073 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.171344 30 ctime=1454597652.145344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_types.h0000664000077100007710000005633312650131756022712 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup types The types used in the database * @ingroup dnsdb * @brief The types used in the database * * The types used in the database * * @{ */ #ifndef _ZDB_TYPES_H #define _ZDB_TYPES_H #include #include #include #include #include #include #include #include #include //#include #include #ifdef __cplusplus extern "C" { #endif struct journal; #define ROOT_LABEL ((u8*)"") /* zdb_ttlrdata * * This record is allocated in: * * zdb_zone_load * zdb_add_global * * */ typedef struct zdb_packed_ttlrdata zdb_packed_ttlrdata; struct zdb_packed_ttlrdata { /* DO NOT CHANGE THE ORDER OF THE FIELDS !!! */ zdb_packed_ttlrdata* next; /* 4 8 */ u32 ttl; /* 4 4 */ u16 rdata_size; /* 2 2 */ u8 rdata_start[1]; }; #define ZDB_RDATABUF_TAG 0x4655424154414452 #define ZDB_RECORD_TAG 0x4443455242445a /** "ZDBRECD" */ #define ZDB_RECORD_SIZE_FROM_RDATASIZE(rdata_size_) (sizeof(zdb_packed_ttlrdata)-1+(rdata_size_)) #define ZDB_RECORD_SIZE(record_) ZDB_RECORD_SIZE_FROM_RDATASIZE((record_)->rdata_size) #if DNSCORE_HAS_ZALLOC==0 #define ZDB_MEMORY_ZALLOC(cast_,data_,size_) \ { \ MALLOC_OR_DIE(cast_,data_,size_, GENERIC_TAG); /* ZALLOC IMPOSSIBLE */ \ } #define ZDB_RECORD_ZALLOC(record,ttl_,len_,rdata_) \ { \ MALLOC_OR_DIE(zdb_packed_ttlrdata*,(record),sizeof(zdb_packed_ttlrdata)-1+len_,ZDB_RECORD_TAG); /* ZALLOC IMPOSSIBLE */ \ (record)->ttl=ttl_; \ (record)->rdata_size=len_; \ MEMCOPY(&(record)->rdata_start[0],rdata_,len_); \ } #define ZDB_RECORD_ZALLOC_EMPTY(record,ttl_,len_) \ { \ MALLOC_OR_DIE(zdb_packed_ttlrdata*,(record),sizeof(zdb_packed_ttlrdata)-1+len_,ZDB_RECORD_TAG); /* ZALLOC IMPOSSIBLE */ \ (record)->ttl=ttl_; \ (record)->rdata_size=len_; \ } #define ZDB_RECORD_CLONE(record_s_,record_d_) \ { \ u32 size=sizeof(zdb_packed_ttlrdata)-1+(record_s_)->rdata_size; \ MALLOC_OR_DIE(zdb_packed_ttlrdata*,(record_d_),size,ZDB_RECORD_TAG); /* ZALLOC IMPOSSIBLE */ \ record_d_->ttl=record_s_->ttl; \ record_d_->rdata_size=record_s_->rdata_size; \ MEMCOPY(&(record_d_)->rdata_start[0],&(record_s_)->rdata_start[0],record_s_->rdata_size); \ } #define ZDB_RECORD_ZFREE(record) free(record) #define ZDB_RECORD_SAFE_ZFREE(record) free(record) #else /* Do not forget that ZALLOC can only be used where the size of the record * can be found from the allocated memory. */ #define ZDB_MEMORY_ZALLOC(cast_,data_,size_) \ { \ if(size_<=ZALLOC_PG_PAGEABLE_MAXSIZE) \ { \ (data_)=(cast_)zalloc_line(((size_)-1)>>3); \ } \ else \ { \ MALLOC_OR_DIE(cast_,data_,size_, GENERIC_TAG); /* ZALLOC IMPOSSIBLE */ \ } \ } #define ZDB_RECORD_ZALLOC(record_,ttl_,len_,rdata_) \ { \ u32 size=ZDB_RECORD_SIZE_FROM_RDATASIZE(len_); \ if(size<=ZALLOC_PG_PAGEABLE_MAXSIZE) \ { \ record_=(zdb_packed_ttlrdata*)zalloc_line((size-1)>>3); \ } \ else \ { \ MALLOC_OR_DIE(zdb_packed_ttlrdata*,(record_),sizeof(zdb_packed_ttlrdata)-1+len_,ZDB_RECORD_TAG); /* ZALLOC IMPOSSIBLE */ \ } \ \ (record_)->ttl=ttl_; \ (record_)->rdata_size=len_; \ MEMCOPY(&(record_)->rdata_start[0],rdata_,len_); \ } #define ZDB_RECORD_ZALLOC_EMPTY(record_,ttl_,len_) \ { \ u32 size=ZDB_RECORD_SIZE_FROM_RDATASIZE(len_); \ if(size<=ZALLOC_PG_PAGEABLE_MAXSIZE) \ { \ record_=(zdb_packed_ttlrdata*)zalloc_line((size-1)>>3); \ } \ else \ { \ MALLOC_OR_DIE(zdb_packed_ttlrdata*,(record_),sizeof(zdb_packed_ttlrdata)-1+len_,ZDB_RECORD_TAG); /* ZALLOC IMPOSSIBLE */ \ } \ \ (record_)->ttl=ttl_; \ (record_)->rdata_size=len_; \ } #define ZDB_RECORD_CLONE(record_s_,record_d_) \ { \ u32 size=ZDB_RECORD_SIZE_FROM_RDATASIZE((record_s_)->rdata_size);\ if(size<=ZALLOC_PG_PAGEABLE_MAXSIZE) \ { \ record_d_=(zdb_packed_ttlrdata*)zalloc_line((size-1)>>3); \ } \ else \ { \ MALLOC_OR_DIE(zdb_packed_ttlrdata*,(record_d_),size,ZDB_RECORD_TAG); /* ZALLOC IMPOSSIBLE */ \ } \ record_d_->ttl=record_s_->ttl; \ record_d_->rdata_size=record_s_->rdata_size; \ MEMCOPY(&(record_d_)->rdata_start[0],&(record_s_)->rdata_start[0],record_s_->rdata_size); \ } /* DOES NOT CHECKS FOR NULL */ #define ZDB_RECORD_ZFREE(record_) \ { \ u32 size=ZDB_RECORD_SIZE_FROM_RDATASIZE((record_)->rdata_size); \ if(size<=ZALLOC_PG_PAGEABLE_MAXSIZE) \ { \ zfree_line(record_,(size-1)>>3); \ } \ else \ { \ free(record_); \ } \ } /* DOES CHECKS FOR NULL */ #define ZDB_RECORD_SAFE_ZFREE(record_) \ if(record_ != NULL) \ { \ u32 size=ZDB_RECORD_SIZE_FROM_RDATASIZE((record_)->rdata_size); \ if(size<=ZALLOC_PG_PAGEABLE_MAXSIZE) \ { \ zfree_line(record_,(size-1)>>3); \ } \ else \ { \ free(record_); \ } \ } #endif #define ZDB_RECORD_MALLOC_EMPTY(record_,ttl_,rdata_size_) \ { \ u32 size=ZDB_RECORD_SIZE_FROM_RDATASIZE(rdata_size_); \ MALLOC_OR_DIE(zdb_packed_ttlrdata*,(record_),size,ZDB_RECORD_TAG); /* ZALLOC IMPOSSIBLE */ \ (record_)->ttl=ttl_; \ (record_)->rdata_size=rdata_size_; \ } /* * These macros existed when 2 different ways for storing the record were * available at compile time. * * The zdb_packed_ttlrdata having proved to be the best (by far), * the other one has been removed. * */ #define ZDB_PACKEDRECORD_PTR_RDATAPTR(record_) (&(record_)->rdata_start[0]) #define ZDB_PACKEDRECORD_PTR_RDATASIZE(record_) ((record_)->rdata_size) #define ZDB_RECORD_PTR_RDATASIZE(record_) ((record_)->rdata_size) #define ZDB_RECORD_PTR_RDATAPTR(record_) ((record_)->rdata_pointer) typedef struct zdb_ttlrdata zdb_ttlrdata; struct zdb_ttlrdata { zdb_ttlrdata* next; /* 4 8 */ u32 ttl; /* 4 4 */ u16 rdata_size; /* 2 2 */ u16 padding_reserved; void* rdata_pointer; /* 4 8 */ }; #define TTLRDATA_INLINESIZE THIS_SHOULD_NOT_BE_USED_IN_PACKED_MODE #define ZDB_RECORD_TTLRDATA_SET(record,ttl_,len_,rdata_) \ { \ (record).ttl=ttl_; \ (record).rdata_size=len_; \ (record).rdata_pointer=rdata_; \ } typedef btree zdb_rr_collection; #define ZDB_RESOURCERECORD_TAG 0x444345524c4c5546 /** "FULLRECD" */ /* zdb_zone */ typedef struct zdb_zone zdb_zone; #define LABEL_HAS_RECORDS(label_) ((label_)->resource_record_set != NULL) typedef struct zdb_resourcerecord zdb_resourcerecord; struct zdb_resourcerecord { zdb_resourcerecord* next; /* 4 8 */ zdb_packed_ttlrdata* ttl_rdata; /* 4 8 */ const u8* name; /* 4 8 */ u16 zclass; /* 2 2 */ u16 rtype; /* 2 2 */ u32 ttl; }; /* 16 28 => 16 32 */ /* zdb_rr_label */ typedef dictionary zdb_rr_label_set; typedef struct zdb_rr_label zdb_rr_label; #if ZDB_HAS_DNSSEC_SUPPORT != 0 #if ZDB_HAS_NSEC_SUPPORT != 0 typedef struct nsec_label_extension nsec_label; typedef struct nsec_label_extension nsec_label_extension; typedef struct nsec_node nsec_zone; #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 typedef struct nsec3_zone nsec3_zone; #endif typedef union nsec_zone_union nsec_zone_union; union nsec_zone_union { #if ZDB_HAS_NSEC_SUPPORT != 0 /* * A pointer to an array of nsec_label (nsec_label buffer[]) * The size is the same as the dictionnary */ nsec_zone* nsec; #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 nsec3_zone* nsec3; #endif }; typedef union nsec_label_union nsec_label_union; struct nsec_label_extension { struct nsec_node* node; }; union nsec_label_union { /* NSEC */ #if ZDB_HAS_NSEC_SUPPORT != 0 nsec_label_extension nsec; #endif /* NSEC3 */ #if ZDB_HAS_NSEC3_SUPPORT != 0 struct nsec3_label_extension* nsec3; #endif /* Placeholder */ void* dnssec; }; #endif /* * RR_LABEL flags */ // dff7 // unused : 2008 #define ZDB_RR_LABEL_RESERVED_0 0x0008 #define ZDB_RR_LABEL_RESERVED_1 0x2000 /* * For any label : marks that one owns a '*' label */ #define ZDB_RR_LABEL_GOT_WILD 0x0010 /* * For any label but the apex : marks it as being a delegation (contains an NS record) */ #define ZDB_RR_LABEL_DELEGATION 0x0020 /* * Forbid updates to the apex */ #define ZDB_RR_APEX_LABEL_FROZEN 0x0040 /** * For the apex, marks the zone as being loaded * (no NSEC3/RRSIG must be computed while the flag is on) */ #define ZDB_RR_APEX_LABEL_LOADING 0x0040 /* * For any label, marks it as having been updated (for DNSSEC post processing in a dynamic update) */ #define ZDB_RR_LABEL_UPDATING 0x0040 /* * For the apex, marks a label as being the apex */ #define ZDB_RR_LABEL_APEX 0x0080 /* * Explicitly mark a label as owner of a (single) CNAME */ #define ZDB_RR_LABEL_HASCNAME 0x0100 /* * Explicitly mark a label as owner of a something that is not a CNAME nor RRSIG nor NSEC */ #define ZDB_RR_LABEL_DROPCNAME 0x0200 /* * For any label, means there is a delegation (somewhere) above */ #define ZDB_RR_LABEL_UNDERDELEGATION 0x0400 /* * When a zone has expired, the apex is marked with this flag */ #define ZDB_RR_LABEL_INVALID_ZONE 0x0800 /** * This is a virtual label, most likely a translation of NSEC3 nodes */ #define ZDB_RR_LABEL_VIRTUAL 0x4000 #if ZDB_HAS_DNSSEC_SUPPORT /* * This flag means that the label has a valid NSEC structure * * IT IS NOT VALID TO CHECK THIS TO SEE IF A ZONE IS NSEC */ #define ZDB_RR_LABEL_NSEC 0x0001 /* * This flag means that the label has a valid NSEC3 structure * * IT IS NOT VALID TO CHECK THIS TO SEE IF A ZONE IS NSEC3 */ #define ZDB_RR_LABEL_NSEC3 0x0002 #define ZDB_RR_LABEL_DNSSEC_EDIT 0x0004 /* * The zone is (NSEC3) + OPTOUT (NSEC3 should also be set) */ #define ZDB_RR_LABEL_NSEC3_OPTOUT 0x1000 #endif /** * Reserved for zone wide processing */ #define ZDB_RR_LABEL_MARK 0x8000 #define ZDB_ZONE_VALID(__z__) ((((__z__)->apex->flags)&ZDB_RR_LABEL_INVALID_ZONE) == 0) #define ZDB_ZONE_INVALID(__z__) ((((__z__)->apex->flags)&ZDB_RR_LABEL_INVALID_ZONE) != 0) #define ZDB_LABEL_UNDERDELEGATION(__l__) ((((__l__)->flags)&ZDB_RR_LABEL_UNDERDELEGATION)!=0) #define ZDB_LABEL_ATDELEGATION(__l__) ((((__l__)->flags)&ZDB_RR_LABEL_DELEGATION)!=0) #define ZDB_LABEL_ATORUNDERDELEGATION(__l__) ((((__l__)->flags)&(ZDB_RR_LABEL_DELEGATION|ZDB_RR_LABEL_UNDERDELEGATION))!=0) #define ZDB_LABEL_ISAPEX(__l__) ((((__l__)->flags)&ZDB_RR_LABEL_APEX)!=0) struct zdb_rr_label { zdb_rr_label* next; /* dictionnary_node* next */ /* 4 8 */ zdb_rr_label_set sub; /* dictionnary of N children labels */ /* 16 24 */ zdb_rr_collection resource_record_set; /* resource records for the label (a btree)*/ /* 4 4 */ #if ZDB_HAS_DNSSEC_SUPPORT != 0 nsec_label_union nsec; #endif u16 flags; /* NSEC, NSEC3, and 6 for future usage ... */ u8 name[1]; /* label */ /* 4 8 */ /* No zone ptr */ }; /* 28 44 => 32 48 */ #define ZDB_ZONE_MUTEX_EXCLUSIVE_FLAG 0x80 #define ZDB_ZONE_MUTEX_NOBODY GROUP_MUTEX_NOBODY #define ZDB_ZONE_MUTEX_SIMPLEREADER 0x01 /* non-conflicting */ #define ZDB_ZONE_MUTEX_RRSIG_UPDATER 0x82 /* conflicting */ #define ZDB_ZONE_MUTEX_XFR 0x84 /* conflicting, cannot by nature be launched more than once in parallel. new ones have to be discarded */ #define ZDB_ZONE_MUTEX_REFRESH 0x85 /* conflicting, can never be launched more than once. new ones have to be discarded */ #define ZDB_ZONE_MUTEX_DYNUPDATE 0x86 /* conflicting */ #define ZDB_ZONE_MUTEX_UNFREEZE 0x87 /* conflicting, needs to be sure nobody else (ie: the freeze) is acting at the same time */ #define ZDB_ZONE_MUTEX_INVALIDATE 0x88 /* conflicting */ #define ZDB_ZONE_MUTEX_REPLACE 0x89 /* conflicting */ #define ZDB_ZONE_MUTEX_LOAD 0x8a /* conflicting but this case is impossible */ #define ZDB_ZONE_MUTEX_DESTROY 0xFF /* conflicting, can never be launched more than once. The zone will be destroyed before unlock. */ typedef ya_result zdb_zone_access_filter(const message_data* /*mesg*/, const void* /*zone_extension*/); #define ALARM_KEY_ZONE_SIGNATURE_UPDATE 1 #define ALARM_KEY_ZONE_AXFR_QUERY 2 #define ALARM_KEY_ZONE_REFRESH 3 #define ZDB_ZONE_KEEP_RAW_SIZE 1 struct dnskey_keyring; struct zdb_zone { u8 *origin; /* dnsname, origin */ zdb_rr_label *apex; /* pointer to the zone cut, 1 name for : SOA, NS, ... */ #if ZDB_HAS_DNSSEC_SUPPORT != 0 nsec_zone_union nsec; #endif zdb_zone_access_filter* query_access_filter; void *extension; /** * This pointer is meant to be used by the server so it can associate data with the zone * without having to do the match on its side too. * */ #if ZDB_HAS_DNSSEC_SUPPORT != 0 struct dnskey_keyring *keyring; u8 *sig_last_processed_node; #endif u32 min_ttl; /* a copy of the min-ttl from the SOA */ /* * AXFR handling. * * In order to be nicer with the resources of the machine and more reactive we are adding a pace mechanism. * MASTER: * init: ts=1, serial = real serial - 1 * axfr(1): ts=0, serial = real serial, writing on disk, streaming to client until axfr_timestamp>1 OR axfr_serial has changed * (both meaning the file has fully been written on disk) * axfr(2): ts=0, serial = real serial, reading from the file being written * axfr(3): ts=T, serial = real serial, reading from the written file * axfr(4): now - ts > too_much, do axfr(1) * SLAVE: * : ts=last time the axfr has been fully done, serial = serial in the axfr on file * */ volatile u32 axfr_timestamp; /* The last time when an AXFR has ENDED to be written on disk, if 0, an AXFR is being written right now */ volatile u32 axfr_serial; /* The serial number of the AXFR (being written) on disk */ #if ZDB_HAS_DNSSEC_SUPPORT != 0 u32 sig_validity_regeneration_seconds; u32 sig_validity_interval_seconds; u32 sig_validity_jitter_seconds; u32 sig_quota; // starts at 100, updated so a batch does not takes more than a fraction of a second #endif alarm_t alarm_handle; // 32 bits volatile s32 rc; // reference counter when it reaches 0, the zone and its content should be destroyed asap volatile u8 lock_owner; // the ID of who can manipulate the zone volatile u8 lock_count; // the number of owners with the current lock ID volatile u8 lock_reserved_owner; // to the next-owner mechanism (reserve an ownership change) #if ZDB_RECORDS_MAX_CLASS != 1 u16 zclass; #endif mutex_t lock_mutex; cond_t lock_cond; #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT stacktrace lock_trace; pthread_t lock_id; u64 lock_timestamp; #endif #if ZDB_ZONE_KEEP_RAW_SIZE volatile s64 wire_size; // approximation of the size of a zone. updated on load and store of the zone on disk volatile u64 write_time_elapsed; // the time that was spent writing the zone in a file (ie: axfr) #endif /** journal is only to be accessed trough the journal_* functions */ struct journal *journal; dnsname_vector origin_vector; }; /* 18 34 => 20 40 */ /* zdb_zone_label */ typedef dictionary zdb_zone_label_set; typedef struct zdb_zone_label zdb_zone_label; struct zdb_zone_label { zdb_zone_label* next;/* used to link labels with the same hash into a SLL */ zdb_zone_label_set sub; /* labels of the sub-level */ u8* name; /* label name */ zdb_zone *zone; /* zone cut starting at this level */ }; /* 32 56 */ typedef zdb_zone_label* zdb_zone_label_pointer_array[DNSNAME_MAX_SECTIONS]; /* zdb */ #define ZDB_MUTEX_NOBODY GROUP_MUTEX_NOBODY #define ZDB_MUTEX_READER 0x01 #define ZDB_MUTEX_WRITER 0x82 // only one allowed at once typedef struct zdb zdb; struct zdb { zdb_zone_label* root; alarm_t alarm_handle; group_mutex_t mutex; u16 zclass; }; typedef zdb_ttlrdata** zdb_ttlrdata_pointer_array; /* * */ typedef struct zdb_query_ex_answer zdb_query_ex_answer; struct zdb_query_ex_answer { zdb_resourcerecord *answer; zdb_resourcerecord *authority; zdb_resourcerecord *additional; u8 depth; // CNAME u8 delegation; // set as an integer to avoid testing for it }; /** * Iterator through the (rr) labels in a zone */ typedef struct zdb_zone_label_iterator zdb_zone_label_iterator; struct zdb_zone_label_iterator /// 47136 bytes on a 64 bits architecture { const zdb_zone* zone; zdb_rr_label* current_label; s32 top; s32 current_top; /* "top" of the label pointer by current_label */ s32 prev_top; /* "top" of the label returned with "_next" */ s32 __reserved__; dnslabel_stack dnslabels; dictionary_iterator stack[DNSNAME_MAX_SECTIONS]; }; #ifdef __cplusplus } #endif #endif /* _ZDB_TYPES_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb-zone-reader-filter.h0000644000077100007710000000012412650131756025343 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.242344 30 ctime=1454597652.217344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb-zone-reader-filter.h0000664000077100007710000000543412650131756025156 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone * @ingroup dnsdb * @brief Functions used to load a zone * * Functions used to load a zone * * @{ */ #pragma once #include #define ZONE_READER_FILTER_ACCEPT 0 #define ZONE_READER_FILTER_REJECT 1 /** * * The filter returns ACCEPT, REJECT or an error code. * */ typedef ya_result zone_file_reader_filter_callback(zone_reader *zr, resource_record *rr, void *callback_data); /** * * Wraps a zone_reader to a filter that skips records using a callback * * @param filtering_reader the filter * @param filtered_reader the filtered * @param callback the callback function * @param callback_data parameter given to the callback function */ void zone_file_reader_filter(zone_reader *filtering_reader, zone_reader *filtered_reader, zone_file_reader_filter_callback *callback, void *callback_data); /** * @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/journal_ix.h0000644000077100007710000000012412650131756023242 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.179344 30 ctime=1454597652.011344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/journal_ix.h0000664000077100007710000000410012650131756023042 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #ifndef JOURNAL_IX_H #define JOURNAL_IX_H #include #ifdef __cplusplus extern "C" { #endif ya_result journal_ix_open(journal **jh, const u8* origin, const char *workingdir, bool create); #ifdef __cplusplus } #endif #endif /* JOURNAL_IX_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3_zone.h0000644000077100007710000000012412650131756023136 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.175344 30 ctime=1454597652.088344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3_zone.h0000664000077100007710000000527712650131756022756 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NSEC3_ZONE_H #define _NSEC3_ZONE_H #include #ifdef __cplusplus extern "C" { #endif int nsec3_zone_rdata_compare(const u8* a_rdata, const u8* b_rdata); int nsec3_zone_compare(nsec3_zone* a, nsec3_zone* b); void nsec3_zone_destroy(zdb_zone* zone, nsec3_zone* n3); nsec3_zone* nsec3_zone_from_item(zdb_zone* zone, nsec3_zone_item* item); nsec3_zone* nsec3_zone_add_from_rdata(zdb_zone* zone, u16 nsec3param_rdata_size, const u8* nsec3param_rdata); nsec3_zone* nsec3_zone_get_from_rdata(zdb_zone* zone, u16 nsec3param_rdata_size, const u8* nsec3param_rdata); #ifdef __cplusplus } #endif #endif /* _NSEC3_ZONE_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/dnsdb-config.h.in0000644000077100007710000000013212654662624024040 xustar000000000000000030 mtime=1454597524.697344535 30 atime=1454597524.697344535 30 ctime=1454597652.229344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/dnsdb-config.h.in0000664000077100007710000002217512654662624023655 0ustar00yadifayadifa00000000000000/* include/dnsdb/dnsdb-config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* number of harware core if the auto-detect fails */ #undef DEFAULT_ASSUMED_CPU_COUNT /* always on */ #undef HAS_ACL_SUPPORT /* bfd debug support disabled. */ #undef HAS_BFD_DEBUG_SUPPORT /* i386, Athlon, Opteron, Core2, i3, i5, i7, ... */ #undef HAS_CPU_AMDINTEL /* T1000 has a Niagara cpu */ #undef HAS_CPU_NIAGARA /* remote control disabled. */ #undef HAS_CTRL /* dynamic provisioning disabled. */ #undef HAS_CTRL_DYNAMIC_PROVISIONING /* always on */ #undef HAS_DNSSEC_SUPPORT /* always off */ #undef HAS_DROPALL_SUPPORT /* dynamic update support disabled. */ #undef HAS_DYNUPDATE_SUPPORT /* YADIFA will now accept ASCII7 characters in DNS names (not recommended) disabled. */ #undef HAS_FULL_ASCII7 /* where to put the log files */ #undef HAS_LOGDIR /* write the pid in each line of log disabled. */ #undef HAS_LOG_PID_ALWAYS_ON /* write the thread id in each line of log disabled. */ #undef HAS_LOG_THREAD_ID_ALWAYS_ON /* malloc debug support disabled. */ #undef HAS_MALLOC_DEBUG_SUPPORT /* DNS master disabled. */ #undef HAS_MASTER_SUPPORT /* Define this to enable slow but safe unaligned memory accesses */ #undef HAS_MEMALIGN_ISSUES /* use messages instead of send (needed if you use more than one IP aliased on the same network interface) disabled. */ #undef HAS_MESSAGES_SUPPORT /* always off */ #undef HAS_MIRROR_SUPPORT /* mutex debug support disabled. */ #undef HAS_MUTEX_DEBUG_SUPPORT /* Allows AXFR answer from master without AA bit set (Microsoft DNS) disabled. */ #undef HAS_NON_AA_AXFR_SUPPORT /* always on */ #undef HAS_NSEC3_SUPPORT /* always on */ #undef HAS_NSEC_SUPPORT /* NSID support disabled. */ #undef HAS_NSID_SUPPORT /* The system supports thread names */ #undef HAS_PTHREAD_SETNAME_NP /* The system supports spinlocks */ #undef HAS_PTHREAD_SPINLOCK /* always off */ #undef HAS_RDTSC /* always off */ #undef HAS_RRCACHE_ENABLED /* DNS Response Rate Limiter disabled. */ #undef HAS_RRL_SUPPORT /* RRSIG verification and generation for zones disabled. */ #undef HAS_RRSIG_MANAGEMENT_SUPPORT /* The sockaddr_in6 struct has an sin6_len field */ #undef HAS_SOCKADDR_IN6_SIN6_LEN /* The sockaddr_in struct has an sin_len field */ #undef HAS_SOCKADDR_IN_SIN_LEN /* The sockaddr struct has an sa_len field */ #undef HAS_SOCKADDR_SA_LEN /* always off */ #undef HAS_TCL /* always on */ #undef HAS_TSIG_SUPPORT /* where to put the log files */ #undef HAS_WITH_LOGDIR /* zalloc debug support disabled. */ #undef HAS_ZALLOC_DEBUG_SUPPORT /* zalloc statistics support disabled. */ #undef HAS_ZALLOC_STATISTICS_SUPPORT /* zalloc memory system disabled. */ #undef HAS_ZALLOC_SUPPORT /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_BYTESWAP_H /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the header file. */ #undef HAVE_I386_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_I386_TYPES_H /* Define to 1 if the system has the type `int64_t'. */ #undef HAVE_INT64_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `c' library (-lc). */ #undef HAVE_LIBC /* Define to 1 if you have the `dnscore' library (-ldnscore). */ #undef HAVE_LIBDNSCORE /* Define to 1 if you have the `dnsdb' library (-ldnsdb). */ #undef HAVE_LIBDNSDB /* Define to 1 if you have the `dnslg' library (-ldnslg). */ #undef HAVE_LIBDNSLG /* Define to 1 if you have the `dnszone' library (-ldnszone). */ #undef HAVE_LIBDNSZONE /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_LIMITS_H /* Define to 1 if the system has the type `long long'. */ #undef HAVE_LONG_LONG /* Define to 1 if you have the header file. */ #undef HAVE_MACHINE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_NETINET6_IN6_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_PPC_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BYTEORDER_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSLIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if the system has the type `uint64_t'. */ #undef HAVE_UINT64_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `u_char'. */ #undef HAVE_U_CHAR /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* BSD */ #undef IS_BSD_FAMILY /* OSX */ #undef IS_DARWIN_OS /* LINUX */ #undef IS_LINUX_FAMILY /* SOLARIS */ #undef IS_SOLARIS_FAMILY /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef mode_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ #undef vfork yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3_hash.h0000644000077100007710000000012412650131756023106 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.217344 30 ctime=1454597652.050344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3_hash.h0000664000077100007710000000463412650131756022722 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NSEC3_HASH_H #define _NSEC3_HASH_H #include #ifdef __cplusplus extern "C" { #endif typedef ya_result nsec3_hash_function(const u8*, u32, const u8*, u32, u32, u8*, bool); nsec3_hash_function* nsec3_hash_get_function(u8 algorithm); u8 nsec3_hash_len(u8 algorithm); #ifdef __cplusplus } #endif #endif /* _NSEC3_HASH_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_listener.h0000644000077100007710000000012412650131756023554 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.206344 30 ctime=1454597652.129344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_listener.h0000664000077100007710000001325512650131756023367 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnsdb * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _ZDB_LISTENER_H #define _ZDB_LISTENER_H #include #include #if ZDB_HAS_NSEC3_SUPPORT!=0 #include #endif #ifdef __cplusplus extern "C" { #endif typedef struct dnssec_listener dnssec_listener; typedef struct dnssec_listener zdb_listener; typedef void zdb_listener_on_remove_type_callback(zdb_listener *listener, const zdb_zone *zone, const u8 *dnsname, zdb_rr_collection *recordssets, u16 type); typedef void zdb_listener_on_add_record_callback(zdb_listener *listener, const zdb_zone *zone, dnslabel_vector_reference labels, s32 top, u16 type, zdb_ttlrdata *record); typedef void zdb_listener_on_remove_record_callback(zdb_listener *listener, const zdb_zone *zone, const u8 *dnsname, u16 type, zdb_ttlrdata *record); typedef bool zdb_listener_has_changes_callback(zdb_listener *listener, const zdb_zone *zone); #if ZDB_HAS_NSEC3_SUPPORT!=0 typedef void zdb_listener_on_add_nsec3_callback(zdb_listener *listener, const zdb_zone *zone, nsec3_zone_item *nsec3_item, nsec3_zone *n3, u32 ttl); typedef void zdb_listener_on_remove_nsec3_callback(zdb_listener *listener, const zdb_zone *zone, nsec3_zone_item *nsec3_item, nsec3_zone *n3, u32 ttl); typedef void zdb_listener_on_update_nsec3rrsig_callback(zdb_listener *listener, const zdb_zone *zone, zdb_packed_ttlrdata *removed_rrsig_sll, zdb_packed_ttlrdata *added_rrsig_sll, nsec3_zone_item *item); #endif #if ZDB_HAS_DNSSEC_SUPPORT!=0 typedef void zdb_listener_on_update_rrsig_callback(zdb_listener *listener, const zdb_zone *zone, zdb_packed_ttlrdata *removed_rrsig_sll, zdb_packed_ttlrdata *added_rrsig_sll, zdb_rr_label *label, dnsname_stack *name); #endif struct dnssec_listener { zdb_listener_on_remove_type_callback *on_remove_record_type; zdb_listener_on_add_record_callback *on_add_record; zdb_listener_on_remove_record_callback *on_remove_record; zdb_listener_has_changes_callback *has_changes; #if ZDB_HAS_NSEC3_SUPPORT!=0 zdb_listener_on_add_nsec3_callback *on_add_nsec3; zdb_listener_on_remove_nsec3_callback *on_remove_nsec3; zdb_listener_on_update_nsec3rrsig_callback *on_update_nsec3rrsig; #endif #if ZDB_HAS_DNSSEC_SUPPORT!=0 zdb_listener_on_update_rrsig_callback *on_update_rrsig; #endif zdb_listener *next; }; void zdb_listener_chain(zdb_listener *listener); void zdb_listener_unchain(zdb_listener *listener); void zdb_listener_notify_remove_type(const zdb_zone *zone, const u8 *dnsname, zdb_rr_collection *recordssets, u16 type); void zdb_listener_notify_add_record(const zdb_zone *zone, dnslabel_vector_reference labels, s32 top, u16 type, zdb_ttlrdata *record); void zdb_listener_notify_remove_record(const zdb_zone *zone, const u8 *dnsname, u16 type, zdb_ttlrdata *record); /** * Returns true iff any of the listener(s) has recorded a change in the zone. * * @return true iff any of the listener(s) has recorded a change in the zone */ bool zdb_listener_notify_has_changes(const zdb_zone *zone); #if ZDB_HAS_NSEC3_SUPPORT!=0 void zdb_listener_notify_add_nsec3(const zdb_zone *zone, nsec3_zone_item *nsec3_item, nsec3_zone *n3, u32 ttl); void zdb_listener_notify_remove_nsec3(const zdb_zone *zone, nsec3_zone_item *nsec3_item, nsec3_zone *n3, u32 ttl); void zdb_listener_notify_update_nsec3rrsig(const zdb_zone *zone, zdb_packed_ttlrdata *removed_rrsig_sll, zdb_packed_ttlrdata *added_rrsig_sll, nsec3_zone_item *item); #endif #if ZDB_HAS_DNSSEC_SUPPORT!=0 void zdb_listener_notify_update_rrsig(const zdb_zone *zone, zdb_packed_ttlrdata *removed_rrsig_sll, zdb_packed_ttlrdata *added_rrsig_sll, zdb_rr_label *label, dnsname_stack *name); #endif bool zdb_listener_notify_enabled(); #ifdef __cplusplus } #endif #endif /* _zdb_listener_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/journal-cjf-common.h0000644000077100007710000000012412650131756024570 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.166344 30 ctime=1454597652.019344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/journal-cjf-common.h0000664000077100007710000001515212650131756024401 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once #define ZDB_JOURNAL_CODE 1 #define JOURNAL_CJF 1 #include #include "dnsdb/journal.h" #ifdef CJF_HEADER_SIZE #error "CJF_HEADER_SIZE already defined" #endif #define CJF_HEADER_SIZE 30 extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger struct jnl_page { u32 file_offset; // position in the file u32 count; // number of updates u32 size; // size is fixed to CJF_SECTION_INDEX_SLOT_COUNT u32 serial_start; // first serial in this section. Could probably be lost if not for debugging u32 serial_end; // last serial in this section u32 records_limit; // starts at file_offset (position of the PAGE in the file) + 4KB u32 file_offset_limit; // if the section is about to break this limit, something has to be done. ie: // _ resynchronise serials in the file // _ write the zone to disk }; typedef struct jnl_page jnl_page; struct journal_cjf; struct journal_cjf_idxt_tbl_header { u32 magic; u16 size; }; typedef struct journal_cjf_idxt_tbl_header journal_cjf_idxt_tbl_header; struct journal_cjf_idxt_tbl_item { u32 last_serial; // last serial for this item u32 file_offset; // position of the item }; typedef struct journal_cjf_idxt_tbl_item journal_cjf_idxt_tbl_item; struct journal_cjf_idxt { s16 count; s16 first; s16 size; bool dirty; bool marked; journal_cjf_idxt_tbl_item *entries; }; typedef struct journal_cjf_idxt journal_cjf_idxt; #define CJF_IDXT_MAGIC MAGIC4('I','D','X','T') #define JOURNAL_CFJ_FLAGS_OTHER_ENDIAN 0x8000 #define JOURNAL_CFJ_FLAGS_MY_ENDIAN 0x0080 #define JOURNAL_CFJ_FLAGS_NOT_EMPTY 0x0001 #define JOURNAL_CFJ_FLAGS_DIRTY 0x0002 struct journal_cjf { /* common points with journal base */ volatile struct journal_vtbl *vtbl; volatile zdb_zone *zone; volatile struct journal *next; volatile struct journal *prev; volatile bool mru; /* ******************************* */ journal_cjf_idxt idxt; jnl_page last_page; u32 serial_begin; u32 serial_end; u32 first_page_offset; u32 page_table_file_offset; u32 last_soa_offset; u32 file_maximum_size; int fd; shared_group_mutex_t mtx; u16 flags; char *journal_file_name; }; typedef struct journal_cjf journal_cjf; void log_debug_jnl(journal_cjf *jnl, const char *prefix); void jnl_header_flush(journal_cjf *jnl); void journal_cjf_remove_first_page(journal_cjf *jnl); static inline u32 journal_cjf_get_last_page_offset_limit(journal_cjf *jnl) { return jnl->last_page.file_offset_limit; } static inline u32 journal_cjf_get_last_page_first_available_byte_offset(journal_cjf *jnl) { return jnl->last_page.records_limit; } static inline u32 journal_cjf_get_last_page_has_room_left(journal_cjf *jnl) { return jnl->last_page.file_offset_limit >= jnl->last_page.records_limit; } static inline s64 journal_cjf_get_last_page_available_space_left(journal_cjf *jnl) { s64 to = (s64)jnl->last_page.file_offset_limit; s64 from = (s64)jnl->last_page.records_limit; s64 ret = MAX(to - from, 0); return ret; } bool jnl_ensure_file_opened(journal_cjf *jnl, bool create); static inline u32 journal_cjf_maximum_size(journal_cjf *jnl) { return jnl->file_maximum_size; } static inline bool journal_cjf_has_flag(journal_cjf *jnl, u16 bits) { return (jnl->flags & bits) == bits; } static inline void journal_cjf_set_flag(journal_cjf *jnl, u16 bits) { jnl->flags |= bits; } static inline void journal_cjf_clear_flag(journal_cjf *jnl, u16 bits) { jnl->flags &= ~bits; } static inline void journal_cjf_set_dirty(journal_cjf *jnl) { journal_cjf_set_flag(jnl, JOURNAL_CFJ_FLAGS_DIRTY); } static inline bool journal_cjf_is_dirty(journal_cjf *jnl) { bool ret = journal_cjf_has_flag(jnl, JOURNAL_CFJ_FLAGS_DIRTY); return ret; } static inline void journal_cjf_clear_dirty(journal_cjf *jnl) { journal_cjf_clear_flag(jnl, JOURNAL_CFJ_FLAGS_DIRTY); } static inline void journal_cjf_set_empty(journal_cjf *jnl) { journal_cjf_clear_flag(jnl, JOURNAL_CFJ_FLAGS_NOT_EMPTY); } static inline void journal_cjf_clear_empty(journal_cjf *jnl) { journal_cjf_set_flag(jnl, JOURNAL_CFJ_FLAGS_NOT_EMPTY); } static inline bool journal_cjf_is_empty(journal_cjf *jnl) { bool ret = !journal_cjf_has_flag(jnl, JOURNAL_CFJ_FLAGS_NOT_EMPTY); return ret; } static inline bool journal_cjf_is_my_endian(journal_cjf *jnl) { bool ret = journal_cjf_has_flag(jnl, JOURNAL_CFJ_FLAGS_MY_ENDIAN); return ret; } yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/btree.h0000644000077100007710000000012412650131756022171 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.167344 30 ctime=1454597651.955344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/btree.h0000664000077100007710000000623512650131756022004 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Balanced Tree structures and functions for the database * * Definitions of the Balanced Tree structures and functions for the database. * * btree is the chosen balanced tree for the database. * The current choice right now is AVL Tree. * It could be set to something else. ie: Red-Black Tree. * * @{ */ #ifndef _btree_H #define _btree_H #include #ifdef __cplusplus extern "C" { #endif /* * The iterator returns the nodes sorted with their hash value. * * This macro is true for AVL */ #define BTREE_ITERATION_SORTED 1 typedef avl_node btree_node; typedef avl_tree btree; typedef avl_iterator btree_iterator; #define btree_init avl_init #define btree_find avl_find #define btree_findp avl_findp #define btree_insert avl_insert #define btree_delete avl_delete #define btree_destroy avl_destroy #define btree_callback_and_destroy avl_callback_and_destroy #define btree_iterator_init avl_iterator_init #define btree_iterator_init_from avl_iterator_init_from #define btree_iterator_hasnext avl_iterator_hasnext #define btree_iterator_next avl_iterator_next #define btree_iterator_next_node avl_iterator_next_node #define btree_notempty(tree) ((tree)!=NULL) #define btree_isempty(tree) ((tree)==NULL) #ifdef __cplusplus } #endif #endif /* _btree_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_zone_load.h0000644000077100007710000000012412650131756023701 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.200344 30 ctime=1454597652.202344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_zone_load.h0000664000077100007710000000746612650131756023523 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #ifndef __ZDB_ZONE_LOAD__H__ #define __ZDB_ZONE_LOAD__H__ #include #include #ifdef __cplusplus extern "C" { #endif /** * @brief Load a zone in the database. * * Load a zone in the database. * This is clearly MASTER oriented. * * @param[in] db a pointer to the database * @param[in] filename a pointer to the filename of the zone * @param[out] zone_pointer_out will contains a pointer to the loaded zone if the call is successful * * @return an error code. * */ #define ZDB_ZONE_MOUNT_ON_LOAD 0x01 /* put the zone in the database after a load */ #define ZDB_ZONE_REPLAY_JOURNAL 0x02 /* replay the journal after the load */ #define ZDB_ZONE_DESTROY_JOURNAL 0x04 /* destroys the journal after a successful load */ #define ZDB_ZONE_IS_SLAVE 0x08 /* any NSEC3 inconsistencies must trigger an AXFR reload */ #define ZDB_ZONE_DNSSEC_SHIFT 4 #define ZDB_ZONE_DNSSEC_MASK 0x0070 #define ZDB_ZONE_NOSEC 0x0000 #define ZDB_ZONE_NSEC 0x0010 #define ZDB_ZONE_NSEC3 0x0020 #define ZDB_ZONE_NSEC3_OPTOUT 0x0030 ya_result zdb_zone_load(zdb* db, zone_reader* zr, zdb_zone** zone_out, const u8 *expected_origin, u16 flags); /** * @brief Load the zone SOA. * * Load the zone SOA record * This is meant mainly for the slave that could choose between, ie: zone file or axfr zone file * The SOA MUST BE the first record * * @param[in] db a pointer to the database * @param[in] zone_data a pointer to an opened zone_reader at its start * @param[out] zone_pointer_out will contains a pointer to the loaded zone if the call is successful * * @return an error code. * */ ya_result zdb_zone_get_soa(zone_reader *zone_data, u16 *rdata_size, u8 *rdata); #ifdef __cplusplus } #endif #endif /* __ZDB_ZONE_LOAD__H__ */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/rr_canonize.h0000644000077100007710000000012412650131756023401 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.176344 30 ctime=1454597652.099344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/rr_canonize.h0000664000077100007710000000525212650131756023212 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup rrsig RRSIG functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #pragma once #include #include /* CANNOT BE ALLOCATED BY Z-ALLOC (THREAD ISSUE) */ typedef struct zdb_canonized_packed_ttlrdata zdb_canonized_packed_ttlrdata; struct zdb_canonized_packed_ttlrdata { u16 rdata_size; u16 rdata_canonized_size; /* = htons(rdata_size) */ u8 rdata_start[1]; }; /** * Appends copy of the rrset with the given type to the vector. * Records are added in canonical order. * * @param type * @param rr_sll * @param rrsp */ void rr_canonize_rrset(u16 type, zdb_packed_ttlrdata* rr_sll, ptr_vector* rrsp); /** * Releases the records in the vector. * * @param rrsp */ void rr_canonize_free(ptr_vector* rrsp); /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_cache.h0000644000077100007710000000012412650131756022772 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.193344 30 ctime=1454597652.152344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_cache.h0000664000077100007710000000436412650131756022606 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Internal functions for the database: zoned resource records label. * * Internal functions for the database: zoned resource records label. * * The ZONE LABEL is a label that can: * * _ contains a zone cut * _ contains a cached label * * They should only be used as the top holding structure of the database * * @{ */ #pragma once #include yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/journal-cjf-page.h0000644000077100007710000000012412650131756024214 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.226344 30 ctime=1454597652.027344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/journal-cjf-page.h0000664000077100007710000000650412650131756024026 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once #include "dnsdb/journal-cjf-common.h" /** * Search from the offset of the stream for a serial, looking in an PAGE referenced by index * * @param jnl * @param idx * @param serial * @param out_offset * @return */ ya_result journal_cjf_page_get_stream_offset_from_serial(journal_cjf *jnl, int idx, u32 serial, u32 *out_offset); /** * * Returns true iff the current PAGE table is full * * @param jnl * @return */ bool journal_cjf_page_is_full(journal_cjf *jnl); /** * * Returns the file offset value at index in the current PAGE * * @param jnl * @param index * @return */ u32 journal_cjf_page_get_file_offset(journal_cjf *jnl); u32 journal_cjf_page_get_stream_file_offset(journal_cjf *jnl); /** * * Returns the last serial number value at index in the PAGE * * @param jnl * @param index * @return */ u32 journal_cjf_page_get_last_serial(journal_cjf *jnl, s16 index); bool journal_cjf_page_is_full(journal_cjf *jnl); bool journal_cjf_page_line_count(journal_cjf *jnl); /** * * Returns the file offset value at index in the current PAGE * * @param jnl * @param index * @return */ u32 journal_cjf_page_get_file_offset(journal_cjf *jnl); /** * * Returns the last serial number value at index in the PAGE * * @param jnl * @param index * @return */ u32 journal_cjf_page_get_last_serial(journal_cjf *jnl, s16 index); static inline bool journal_cjf_page_current_output_stream_may_overwrite(journal_cjf *jnl) { return (jnl->first_page_offset > jnl->last_page.file_offset); } yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/dnsrdata.h0000644000077100007710000000012412650131756022670 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.166344 30 ctime=1454597651.970344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/dnsrdata.h0000664000077100007710000001135512650131756022502 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup dnsdb * @brief * * @{ */ #ifndef _DNSRDATA_H #define _DNSRDATA_H #include #ifdef __cplusplus extern "C" { #endif /* * I need: * * NS,MD,MF,CNAME,SOA,MB,MG,MR,PTR,HINFO,MINFO,MX,RP,AFSDB,RT,SIG,PX,NXT,NAPTR,KX,SRV,DNAME,A6,RRSIG,NSEC * ++ ++ ++ +++++ +++ ++ ++ ++ +++ +++++ +++++ ++ ?? ????? ?? ++ +++++ ++++ */ typedef struct dnskey_rdata dnskey_rdata; struct dnskey_rdata { u16 flags; u8 protocol; u8 algorithm; u8* public_key; }; void rdata_to_dnskey(u8* rdata,struct dnskey_rdata* dnskey); struct rrsig_rdata { u16 type_covered; u8 algorithm; u8 labels; u32 original_ttl; u32 signature_expiration; u32 signature_inception; u8* signer_name; u8* signature; }; void rdata_to_rrsig(u8* rdata,struct rrsig_rdata* rrsig); typedef struct soa_rdata soa_rdata; struct soa_rdata { const u8* mname; const u8* rname; u32 serial; u32 refresh; u32 retry; u32 expire; u32 minimum; /* TTL / NTTL */ }; /* rfc3845 */ typedef struct { u8 window_number; u8 bitmap_length; u8* bitmap; /* NOT A NAME */ } nsec_rdata_typebitmap; /* rfc3845 */ struct nsec_rdata { u8* domain_name; nsec_rdata_typebitmap* type_bitmap; }; struct ns_rdata { u8* name; }; struct cname_rdata { u8* name; }; struct dname_rdata { u8* name; }; struct ptr_rdata { u8* name; }; struct mb_rdata { u8* madname; }; struct md_rdata { u8* madname; }; struct mf_rdata { u8* madname; }; struct mg_rdata { u8* madname; }; struct mr_rdata { u8* newname; }; struct mx_rdata { u16 preference; u8* exchange; }; struct hinfo_rdata { u8* cpu; u8* os; }; struct minfo_rdata { u8* rmailbx; u8* emailbx; }; /* rfc2782 */ struct srv_rdata { u16 priority; u16 weight; u16 port; u8* domain_name; }; /* rfc2874 */ struct a6_rdata { u8 prefix_length; u16 address_suffix; u8* prefix_name; }; typedef u64 u48; /* rfc2535 */ struct sig_rdata { u16 type_covered; u8 algorithm; u8 labels; u32 original_ttl; u32 signature_expiration; u32 signature_inception; u16 key_tag; u8* signer_name; u8* signature; /* NOT A NAME */ }; /* rfc2845 */ struct tsig_rdata { u8* domain_name; u48 time_signed; u16 fudge; u16 mac_size; u8* mac; u16 original_id; u16 error; u16 other_len; u8* other_data; }; /* No need to canonize */ struct txt_rdata { char* txt; }; struct a_rdata { u32 address; }; /** rfc1886 */ struct aaaa_rdata { u16 address[8]; }; struct wks_rdata { u32 address; u8 protocol; u8* bitmap; /* NOT A NAME */ }; #ifdef __cplusplus } #endif #endif /* _DNSRECORDS_H */ /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3.h0000644000077100007710000000012412650131756022103 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.243344 30 ctime=1454597652.042344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3.h0000664000077100007710000001757412650131756021726 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ #pragma once #include #include #include #include #include #include #include #include #include #include #include /** * Set this to 1 to dump a lot more about the NSEC3 updates/generation. * I use this whenever something weird happens with NSEC3. * (It seems bind is more liberal about handling broken/invalid NSEC3 databases, * YADIFA only accepts valid ones) */ #define NSEC3_UPDATE_ZONE_DEBUG 0 /** * Used to be like this (NSEC3_INCLUDE_ZONE_PATH 1) with older bind * Not anymore in 9.7.1 (probably since 9.7.x) * Set this to 1 to comply with that old bind issue. (not recommended) * */ #define NSEC3_INCLUDE_ZONE_PATH 0 #ifndef DEBUG #undef NSEC3_UPDATE_ZONE_DEBUG #define NSEC3_UPDATE_ZONE_DEBUG 0 #endif #ifdef __cplusplus extern "C" { #endif /* The biggest allowed label is 63 bytes. Let's assume 64. => * Since the digest is base32hex encoded, is un-encoded size is max (64/8)*5 = 40 bytes. * This covers more than a SHA-256 (32 bytes), but it (40) should be the upper bound. */ #define MAX_DIGEST_LENGTH 40 #define MAX_SALT_LENGTH 255 #define NSEC3_RDATA_IS_OPTIN(__rdata__) ((((u8*)(__rdata__))[1]&1) == 0) #define NSEC3_RDATA_IS_OPTOUT(__rdata__) ((((u8*)(__rdata__))[1]&1) != 0) #define NSEC3_RDATA_ALGORITHM(__rdata__) (((u8*)(__rdata__))[0]) /* Adds an NSEC3PARAM in a zone (no dups), adds the struct too */ ya_result nsec3_add_nsec3param(zdb_zone* zone, u8 default_hash_alg, u8 default_flags, u16 default_iterations, u8 default_salt_len, u8* default_salt); /* Removes an NSEC3PARAM from a zone, along with the struct. nsec3_remove_nsec3param_by_record does almost the same. (ixfr) */ ya_result nsec3_remove_nsec3param(zdb_zone* zone, u8 hash_alg, u8 flags, u16 iterations, u8 salt_len, const u8* salt); /** * Update the NSEC3 record on a label. * If there is no such record, calls nsec3_add_label * Note: Calling this on a non-NSEC3 (ie: basic or NSEC) zone will lead to a crash * * @param zone * @param label * @param labels * @param labels_top * * @return TRUE if a change occurred, FALSE otherwise */ bool nsec3_update_label(zdb_zone* zone, zdb_rr_label* label, dnslabel_vector_reference labels, s32 labels_top); /* * Adds NSEC3 records to a label. This is NOT an update. * We assume that the labels are not a fqdn bigger than MAX_DOMAIN_LENGTH */ void nsec3_add_label(zdb_zone* zone, zdb_rr_label* label, dnslabel_vector_reference labels, s32 labels_top); /** * Unlinks the label from the NSEC3 * * Destroy everything NSEC3 from the label * * @param zone * @param label */ void nsec3_remove_label(zdb_zone* zone, zdb_rr_label* label); /** * * Links a label to already existing nsec3 items * * This function is for when a label has been added "without intelligence". * It will find if the function has got a matching NSEC3 record (by digest) * If so, it will link to it. * * @param zone * @param label * @param fqdn */ void nsec3_label_link(zdb_zone* zone, zdb_rr_label* label, const u8 *fqdn); void nsec3_destroy_zone(zdb_zone* zone); /** * This sets the flags of each NSEC3PARAM of the zone * Please use nsec3_edit_zone_start and nsec3_edit_zone_end * */ void nsec3_set_nsec3param_flags(zdb_zone* zone, u8 flags); /** * This sets the flags of each NSEC3PARAM of the zone to 1 * This should be called before modifying an NSEC3 zone. * Note that NSEC3PARAM signature are not affected : the signed version has * alsways the flags set to 0 * * If an NSEC3PARAM RR is present at the apex of a zone with a Flags * field value of zero, then there MUST be an NSEC3 RR using the same * hash algorithm, iterations, and salt parameters present at every * hashed owner name in the zone. That is, the zone MUST contain a * complete set of NSEC3 RRs with the same hash algorithm, iterations, * and salt parameters. */ void nsec3_edit_zone_start(zdb_zone* zone); /** * This sets the flags of each NSEC3PARAM of the zone to 0 * This should be called after modifying an NSEC3 zone. * */ void nsec3_edit_zone_end(zdb_zone* zone); const zdb_rr_label* nsec3_get_closest_provable_encloser( const zdb_rr_label* apex, const_dnslabel_vector_reference sections, s32* sections_topp); void nsec3_closest_encloser_proof( const zdb_zone *zone, const dnsname_vector *qname, s32 apex_index, const nsec3_zone_item **encloser_nsec3p, const nsec3_zone_item **closest_provable_encloser_nsec3p, const nsec3_zone_item **wild_closest_provable_encloser_nsec3p ); /** * * @param item * @param param_index * @return */ bool nsec3_check_item(nsec3_zone_item *item, u32 param_index); /** * Verifies the coherence of the nsec3 database of a zone * * @param zone * */ bool nsec3_check(zdb_zone *zone); /** * For generates the digest label name of an fqdn for a specified NSEC3PARAM chain * * @param n3 the NSEC3PARAM chain * @param fqdn the name to digest * @param fqdn_len the size of the name of the digest * @param out_digest the resulting digest in a Pascal kind of format (1 byte lenght, then the bytes) * * 1 use (zdb_zone_load) */ void nsec3_compute_digest_from_fqdn_with_len(const nsec3_zone *n3, const u8 *fqdn, u32 fqdn_len, u8 *digest, bool isstar); #ifdef __cplusplus } #endif /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec_collection.h0000644000077100007710000000012412650131756024233 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.238344 30 ctime=1454597652.091344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec_collection.h0000664000077100007710000001301412650131756024037 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec NSEC functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ #ifndef _NSEC_COLLECTION_H #define _NSEC_COLLECTION_H #include #ifdef __cplusplus extern "C" { #endif /* * A digest is stored prefixed with its length ([1;255]) */ /* * A structure to hold both children with direct access */ typedef struct nsec_node nsec_node; struct nsec_children { struct nsec_node* left; struct nsec_node* right; }; /* * An union to have access to the children with direct or indexed access */ typedef union nsec_children_union nsec_children_union; union nsec_children_union { struct nsec_children lr; struct nsec_node * child[2]; }; typedef union nsec_label_pointer_array nsec_label_pointer_array; union nsec_label_pointer_array { zdb_rr_label* owner; zdb_rr_label** owners; }; /* * The node structure CANNOT have a varying size on a given collection * This means that the digest size is a constant in the whole tree */ struct nsec_node { union nsec_children_union children; /**/ struct nsec_node *parent; /**/ s8 balance; /* * The order is defined by the canonisation : I need the full dname (minus the origin) * * The name is stored inverse (ie: eu.eurid.www) beause its tested in that order * * I cannot use a nested name in this structure because the length is not a constant. * Allocating a constant size for every nsec would cost too much (memory, cache miss & cpu) */ zdb_rr_label *label; u8 *inverse_relative_name; /* * I'm tempted to add a pointer to the NSEC record here, but it would only help for * dynupdating and would cost 24MB for the TLD, all this for a few cycles: not worth it */ }; typedef struct nsec_node nsec_zone_item; /* * AVL definition part begins here */ /* * The maximum depth of a tree. * 40 is enough for storing 433494436 items (worst case) * * Depth 0 is one node. * * Worst case : N is enough for sum[n = 0,N](Fn) where F is Fibonacci * Best case : N is enough for (2^(N+1))-1 */ #define AVL_MAX_DEPTH 40 /* 64 */ /* * The previx that will be put in front of each function name */ #define AVL_PREFIX nsec_ /* * The type that hold the node */ #define AVL_NODE_TYPE nsec_node /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_TREE_TYPE AVL_NODE_TYPE* /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_CONST_TREE_TYPE AVL_NODE_TYPE* const /* * How to find the root in the tree */ #define AVL_TREE_ROOT(__tree__) (*(__tree__)) /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE u8* #define AVL_REFERENCE_IS_CONST FALSE #define AVL_REFERENCE_IS_POINTER TRUE /* * The node has got a pointer to its parent * * 0 : disable * !=0 : enable */ #define AVL_HAS_PARENT_POINTER 1 #ifdef __cplusplus } #endif #include #ifdef __cplusplus extern "C" { #endif AVL_NODE_TYPE* AVL_PREFIXED(avl_find_interval_start)(AVL_CONST_TREE_TYPE* tree, AVL_REFERENCE_TYPE obj_hash); /* * I recommand setting a define to identify the C part of the template * So it can be used to undefine what is not required anymore for every * C file but that one. * */ #ifndef _NSEC_COLLECTION_C #undef AVL_MAX_DEPTH #undef AVL_PREFIX #undef AVL_NODE_TYPE #undef AVL_TREE_TYPE #undef AVL_CONST_TREE_TYPE #undef AVL_TREE_ROOT #undef AVL_REFERENCE_TYPE #undef AVL_HAS_PARENT_POINTER #undef AVL_REFERENCE_IS_CONST #undef AVL_REFERENCE_IS_POINTER #undef _AVL_H_INC #endif /* _NSEC_COLLECTION_C */ #ifdef __cplusplus } #endif /* * AVL definition part ends here */ #endif /* _NSEC_COLLECTION_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3_types.h0000644000077100007710000000012412650131756023327 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.235344 30 ctime=1454597652.080344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3_types.h0000664000077100007710000001604312650131756023140 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NSEC3_TYPES_H #define _NSEC3_TYPES_H #include #include #include #include #include #if ZDB_HAS_NSEC3_SUPPORT == 0 #error "Please do not include nsec3.h if ZDB_HAS_NSEC3_SUPPORT is 0" #endif #ifdef __cplusplus extern "C" { #endif /* * There is no sense in using more than one. * Two can be a transition state * * This limit is actually used for ICMTL generation * The NSEC3 structure is cheap on memory (every bit count on a TLD) but * there is a price for this. It is mostly irrelevant, but for ICMTL and * anything trying to get specific NSEC3 rdata bits without knowing the * NSEC3PARAM as well. * */ #define MAX_SUPPORTED_NSEC3PARAM 4 #define NSEC3_DIGEST_TAG 0x474944334e /* N3DIG */ #define NSEC3_ZONE_TAG 0x454e4f5a334e /* N3ZONE */ #define NSEC3_CONTEXT_RECORD_TAG 0x585443334e /* N3CTX */ #define NSEC3_RDATA_TAG 0x4154414452334e /* N3RDATA */ #define NSEC3_LABELEXT_TAG 0x54584542414c334e /* N3LABEXT */ #define NSEC3_TYPEBITMAPS_TAG 0x5350414d4254334e /* N3TBMAPS */ #define NSEC3_LABELPTRARRAY_TAG 0x595252412a4c334e /* N3L*ARRY */ /** The NSEC3 node with this flag on is scheduled for a processing (ie: signature) * It is thus FORBIDDEN to delete it (but it MUST be removed from the NSEC3 collection) * * So instead of a delete the NSEC3_PROPRIETARY_FLAG_DELETED flag should be used and the NSEC3 record has to be put in a * "scheduled for delete" list. The schedule being done after the signature the nsec3 record will be effectively removed. * */ #define NSEC3_PROPRIETARY_FLAG_SCHEDULED 0x80 #define NSEC3_PROPRIETARY_FLAG_DELETED 0x40 #define TMP_NSEC3_TTLRDATA_SIZE (1 + 1 + 2 + 1 + MAX_DOMAIN_LENGTH + 1 + MAX_DOMAIN_LENGTH + TYPE_BIT_MAPS_MAX_RDATA_SIZE) //typedef struct nsec3_node nsec3_zone_item; #define nsec3_zone_item struct nsec3_node typedef nsec3_zone_item** nsec3_zone_item_pointer_array; typedef struct nsec3_label_extension nsec3_label_extension; typedef nsec3_label_extension** nsec3_label_extension_array; /* * Index instead of a pointer. * The relevant information are: * * index * (index+1) MOD count */ struct nsec3_label_extension { nsec3_zone_item* self; nsec3_zone_item* star; struct nsec3_label_extension *next; }; /* typedef struct nsec3_zone nsec3_zone; */ struct nsec3_zone { struct nsec3_zone* next; nsec3_zone_item* items; u8 rdata[1]; }; /* * This struct and the five functions are handling the loading of the nsec3 * records of a zone file. * * This not a trivial task. */ struct nsec3_chain_context { struct nsec3_chain_context *next; /* ptr_vector nsec3; ptr_vector rrsig; */ u8 *nsec3param_rdata; u16 nsec3param_rdata_size; }; typedef struct nsec3_chain_context nsec3_chain_context; struct nsec3_load_context { ptr_vector nsec3; ptr_vector rrsig; nsec3_chain_context *chain; zdb_zone* zone; u32 rrsig_added; u32 rrsig_ignored; u32 rrsig_discarded; u32 nsec3_accepted; u32 nsec3_rejected; u32 nsec3_discarded; bool opt_out; }; typedef struct nsec3_load_context nsec3_load_context; #define NSEC3_ZONE_FAKE_OWNER ((void*)~0) #define NSEC3PARAM_MINIMUM_LENGTH 5 #define NSEC3PARAM_RDATA_ALGORITHM(n3prd) ((n3prd)[0]) #define NSEC3PARAM_RDATA_FLAGS(n3prd) ((n3prd)[1]) #define NSEC3PARAM_RDATA_SALT_LEN(n3prd) ((n3prd)[4]) #define NSEC3PARAM_RDATA_SALT(n3prd) (&(n3prd)[NSEC3PARAM_MINIMUM_LENGTH]) #define NSEC3_ZONE_ALGORITHM(n3_) NSEC3PARAM_RDATA_ALGORITHM((n3_)->rdata) #define NSEC3_ZONE_FLAGS(n3_) NSEC3PARAM_RDATA_FLAGS((n3_)->rdata) #define NSEC3_ZONE_SALT_LEN(n3_) NSEC3PARAM_RDATA_SALT_LEN((n3_)->rdata) #define NSEC3_ZONE_SALT(n3_) NSEC3PARAM_RDATA_SALT((n3_)->rdata) #define NSEC3PARAM_DEFAULT_TTL 0 #define NSEC3_FLAGS_MARKED_FOR_ICMTL_ADD 0x80 /* DO NOT PUT THIS IN THE RFC * IT'S PROPRIETARY */ #define NSEC3_ZONE_RDATA_SIZE_FROM_SALT(salt_len) (NSEC3PARAM_MINIMUM_LENGTH + (salt_len)) #define NSEC3_ZONE_STRUCT_SIZE_FROM_SALT(salt_len) (sizeof(nsec3_zone) + NSEC3_ZONE_RDATA_SIZE_FROM_SALT(salt_len) - 1) #define NSEC3_ZONE_RDATA_SIZE(n3_) NSEC3_ZONE_RDATA_SIZE_FROM_SALT(NSEC3_ZONE_SALT_LEN(n3_)) #define NSEC3_ZONE_STRUCT_SIZE(n3_) NSEC3_ZONE_STRUCT_SIZE_FROM_SALT(NSEC3_ZONE_SALT_LEN(n3_)) #define nsec3_zone_get_iterations(n3_) (ntohs(GET_U16_AT((n3_)->rdata[2]))) #define nsec3_zone_set_iterations(n3_,iter_) (GET_U16_AT((n3_)->rdata[2]) = htons(iter_)) #define nsec3_zone_get_item_next(n3_,idx_) ((nsec3_zone_item*)((n3_)->items.data[(idx_+1)%nsec3_zone_get_item_count(n3_)])) #define ZONE_HAS_NSEC3PARAM(zone_) (((zone_)->nsec.nsec3!=NULL) && (zdb_record_find(&(zone_)->apex->resource_record_set, TYPE_NSEC3PARAM)!=NULL)) #define ZONE_NSEC3_AVAILABLE(zone_) ( ((zone_)->apex->flags & (ZDB_RR_LABEL_DNSSEC_EDIT|ZDB_RR_LABEL_NSEC3)) == ZDB_RR_LABEL_NSEC3) #ifdef __cplusplus } #endif #endif /* _NSEC3_TYPES_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/htable.h0000644000077100007710000000012412650131756022327 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.192344 30 ctime=1454597651.996344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/htable.h0000664000077100007710000001015512650131756022136 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Hash-Table structure and functions. * * Implementation of the Hash-Table structure and functions. * It can be configured to be thread-safe. (4 modes) * * It is used in the hash-table of balanced trees structure. (htbt) * * Mutex support has been removed the 2009/02/24. * * @{ */ #ifndef _HTABLE_H #define _HTABLE_H #define HTABLE_USE_MERSENE #ifdef __cplusplus extern "C" { #endif #define HTABLE_TAG 0x454c42415448 /* "HTABLE" */ typedef struct { void* data; /* 4 or 8 bytes (32 or 64 bits systems) */ } htable_entry; /* => 12 or 16 bytes (32 or 64 bits systems) */ /** @brief Allocates an hash table of the pre-defined size * * Allocates an hash table of the pre-defined size * * @return A pointer to the htable or NULL if an error occurred */ htable_entry* htable_alloc(); /** @brief Frees an htable * * Frees an htable * * @param[in] table a pointer to the htable to free * */ void htable_free(htable_entry* table); #if defined(HTABLE_USE_MERSENE) #define NOHASHTBL 0 #define MERSENE_1 3 #define MERSENE_2 7 #define MERSENE_3 31 #define MERSENE_4 127 #define MERSENE_5 8191 #define MERSENE_6 131071 #define MERSENE_7 524287 #define MERSENE_8 2147483647 /* This is, of course, not an option */ /* Given the statistics, MERSENE_7 is by far the best choice */ #define DEFAULT_HTABLE_SIZE (MERSENE_7+1) /** @brief Retrieve the htable entry for a given hash * * Retrieve the htable entry for a given hash. * This version uses a bitmask with a mersene prime. * * @param[in] table a pointer to the htable * @param[in] hash the hash value to look for. * */ #define htable_get(table,hash) ((table)[(hash)&(DEFAULT_HTABLE_SIZE-1)]) #else /* MODULO */ /* 1061 1063 */ /* 10007 10009 */ #define DEFAULT_HTABLE_SIZE 10007 /** @brief Retrieve the htable entry for a given hash * * Retrieve the htable entry for a given hash. * This version uses a modulo with a prime. * * @param[in] table a pointer to the htable * @param[in] hash the hash value to look for. * */ #define htable_get(table,hash) ((table)[(hash)%DEFAULT_HTABLE_SIZE]) #endif #ifdef __cplusplus } #endif #endif /* _HTABLE_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3_icmtl.h0000644000077100007710000000012412650131756023273 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.195344 30 ctime=1454597652.053344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3_icmtl.h0000664000077100007710000001306012650131756023100 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NSEC3_ICMTL_H #define _NSEC3_ICMTL_H #include #include #include #ifdef __cplusplus extern "C" { #endif /* * These functions are used by the ICMTL. * They are all removing functions. * The typical requirement of an ICMTL is : no ripple-effect. * * ie: Removing an item will not void it's predecessor's signature because if it * that signature was to be voided, the ICMTL should have something to say * about it. * */ /* * Finds the nsec3param's alter-ego and removes all the nsec3 records associated to it. * (icmtl) * */ void nsec3_remove_nsec3param_by_record(zdb_zone* zone, zdb_packed_ttlrdata* nsec3param); /* * Remove an NSEC3 without touching any of its siblings (icmtl) */ void nsec3_remove_nsec3(zdb_zone* zone, zdb_packed_ttlrdata* nsec3); void nsec3_remove_nsec3_by_name(zdb_zone* zone, const u8 *nsec3_label, const u8 *nsec3_rdata, u16 nsec3_rdata_size); // the size here is needed for debugging void nsec3_remove_nsec3_by_digest(zdb_zone* zone, const u8 *nsec3_digest, const u8* nsec3_rdata, u16 nsec3_rdata_size); nsec3_zone_item *nsec3_get_nsec3_by_name(zdb_zone* zone, const u8 *nsec3_label, const u8* nsec3_rdata, u16 nsec3_rdata_size); /* * Remove the RRSIG of an NSEC3 (icmtl) */ void nsec3_remove_rrsig(zdb_zone* zone, zdb_packed_ttlrdata* rrsig); void nsec3_add_nsec3_by_name(zdb_zone* zone, const u8 *nsec3_label, const u8* nsec3_rdata, u16 nsec3_rdata_size); struct nsec3_icmtl_replay { ptr_set nsec3_del; ptr_set nsec3_add; ptr_set nsec3rrsig_del; ptr_set nsec3rrsig_add; ptr_set nsec3_labels; ptr_set nsec3param_del; ptr_set nsec3param_add; zdb_zone *zone; }; typedef struct nsec3_icmtl_replay nsec3_icmtl_replay; /** * Initialises the replay structure * * @param replay * @param zone */ void nsec3_icmtl_replay_init(nsec3_icmtl_replay *replay, zdb_zone *zone); void nsec3_icmtl_replay_destroy(nsec3_icmtl_replay *replay); /** * Appends a NSEC3 del to the replay structure * * @param replay * @param fqdn * @param ttlrdata */ void nsec3_icmtl_replay_nsec3_del(nsec3_icmtl_replay *replay, const u8* fqdn, const zdb_ttlrdata *ttlrdata); /** * Appends a NSEC3 add to the replay structure * * @param replay * @param fqdn * @param ttlrdata */ void nsec3_icmtl_replay_nsec3_add(nsec3_icmtl_replay *replay, const u8* fqdn, const zdb_ttlrdata *ttlrdata); /** * Appends the RRSIG of an NSEC3 del to the replay structure * * @param replay * @param fqdn * @param ttlrdata */ void nsec3_icmtl_replay_nsec3_rrsig_del(nsec3_icmtl_replay *replay, const u8* fqdn, const zdb_ttlrdata *ttlrdata); /** * Appends the RRSIG of an NSEC3 add to the replay structure * * @param replay * @param fqdn * @param ttlrdata */ void nsec3_icmtl_replay_nsec3_rrsig_add(nsec3_icmtl_replay *replay, const u8* fqdn, zdb_packed_ttlrdata *packed_ttlrdata); /** * Appends a label add to the replay structure * @param replay * @param fqdn * @param labels * @param label_top */ void nsec3_icmtl_replay_label_add(nsec3_icmtl_replay *replay, const u8 *fqdn, dnslabel_vector_reference labels, s32 label_top); void nsec3_icmtl_replay_nsec3param_del(nsec3_icmtl_replay *replay, const zdb_ttlrdata *ttlrdata); void nsec3_icmtl_replay_nsec3param_add(nsec3_icmtl_replay *replay, const zdb_ttlrdata *ttlrdata); /** * Plays the replay structure, frees its content * * @param replay */ ya_result nsec3_icmtl_replay_execute(nsec3_icmtl_replay *replay); #ifdef __cplusplus } #endif #endif /* _NSEC3_ICMTL_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb-zone-arc.h0000644000077100007710000000012412650131756023363 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.163344 30 ctime=1454597652.163344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb-zone-arc.h0000664000077100007710000001135212650131756023172 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #pragma once #include #include #include #include /** * * Locks the database * Gets the zone * Starts locking the zone for the owner * Increment the zone RC * Unlocks the database * Resume locking the zone for the owner * returns the locked zone * * The read series implies no changes will be done to the database structure (no zone labels added/removed) * The write series implies changes will be done to the database structure. Most likely a removal of a zone label. * * @param db * @param fqdn/exact_match_origin * @param owner * @return */ zdb_zone *zdb_acquire_zone_read(zdb *db, dnsname_vector *exact_match_origin); zdb_zone *zdb_acquire_zone_read_from_fqdn(zdb *db, const u8 *fqdn); zdb_zone *zdb_acquire_zone_read_trylock(zdb *db, dnsname_vector *exact_match_origin, u8 owner); zdb_zone *zdb_acquire_zone_read_trylock_from_name(zdb *db, const char *name, u8 owner); zdb_zone *zdb_acquire_zone_read_trylock_from_fqdn(zdb *db, const u8 *fqdn, u8 owner); zdb_zone *zdb_acquire_zone_read_lock(zdb *db, dnsname_vector *exact_match_origin, u8 owner); zdb_zone *zdb_acquire_zone_read_lock_from_name(zdb *db, const char *name, u8 owner); zdb_zone *zdb_acquire_zone_read_lock_from_fqdn(zdb *db, const u8 *fqdn, u8 owner); zdb_zone *zdb_acquire_zone_write_lock(zdb *db, dnsname_vector *exact_match_origin, u8 owner); zdb_zone *zdb_acquire_zone_write_lock_from_name(zdb *db, const char *name, u8 owner); zdb_zone *zdb_acquire_zone_write_lock_from_fqdn(zdb *db, const u8 *fqdn, u8 owner); /** * The double lock allows the caller to lock a zone for an owner with dibs to change the owner. * Typically: lock for the simple reader and then change the lock to a writer. * This is useful when lock-out the readers is not needed yet, but will most likely be in the near future. * * ie: lock reader + dynupdate * verify prerequisites * do the dry run * transfer lock to dynupdate * do the actual update * unlock * * @param db * @param exact_match_origin * @param owner * @param nextowner * @return */ zdb_zone *zdb_acquire_zone_read_double_lock(zdb *db, dnsname_vector *exact_match_origin, u8 owner, u8 nextowner); zdb_zone *zdb_acquire_zone_read_double_lock_from_name(zdb *db, const char *name, u8 owner, u8 nextowner); zdb_zone *zdb_acquire_zone_read_double_lock_from_fqdn(zdb *db, const u8 *fqdn, u8 owner, u8 nextowner); /** * * Dereference and unlocks the zone. * If the RC reached 0, enqueues it for destruction * * @param zone * @param owner */ void zdb_zone_acquire(zdb_zone *zone); void zdb_zone_release(zdb_zone *zone); void zdb_zone_release_unlock(zdb_zone *zone, u8 owner); void zdb_zone_release_double_unlock(zdb_zone *zone, u8 owner, u8 nextowner); /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec.h0000644000077100007710000000012412650131756022020 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.229344 30 ctime=1454597652.038344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec.h0000664000077100007710000001367412650131756021640 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec NSEC functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NSEC_H #define _NSEC_H #include #if ZDB_HAS_NSEC_SUPPORT == 0 #error "Please do not include nsec.h if ZDB_HAS_NSEC_SUPPORT is 0" #endif #include #include #ifdef __cplusplus extern "C" { #endif #define ZDB_NSECLABEL_TAG 0x4c42414c4345534e #define NSEC_NEXT_DOMAIN_NAME(x__) (&(x__).rdata_start[0]) /* struct nsec_label_extension { nsec_node* node; }; */ struct nsec_zone { nsec_label* last_nsec_label; }; /** * Reverses the labels of the fqdn * * @param inverse_name * @param name * @return */ u32 nsec_inverse_name(u8 *inverse_name,const u8 *name); /** * * Updates/Verifies the NSEC structures of the zone. * * @param zone the zone * @param read_only a slave would not change the records. * * @return an error code (only fails if a slave got a zone with errors) */ ya_result nsec_update_zone(zdb_zone* zone, bool read_only); /* read_only a.k.a slave */ /** * Creates the NSEC node, creates or update the NSEC record * * @param zone * @param label * @param labels * @param labels_top */ void nsec_update_label(zdb_zone* zone, zdb_rr_label* label, dnslabel_vector_reference labels, s32 labels_top); /** * Verifies and, if needed, update the NSEC record. * There WILL be an NSEC record in the label at the end of the call. * It does NOT create the NSEC node (needs it created already). * It does NOT check for the relevancy of the NSEC record. * * @param label * @param node * @param next_node * @param name * @param ttl * @return */ bool nsec_update_label_record(zdb_zone *zone, zdb_rr_label *label, nsec_node *node, nsec_node *next_node, u8 *name); /** * Creates the NSEC node, link it to the label. * * @param zone * @param label * @param labels * @param labels_top * @return */ nsec_node *nsec_update_label_node(zdb_zone* zone, zdb_rr_label* label, dnslabel_vector_reference labels, s32 labels_top); /** * * Unlink the NSEC node from the label, then deletes said node from the chain. * * @param zone * @param label * @param labels * @param labels_top * @return */ bool nsec_delete_label_node(zdb_zone* zone, zdb_rr_label* label, dnslabel_vector_reference labels, s32 labels_top); /** * * Find the label that has got the right NSEC interval for "nextname" * * @param zone * @param name_vector * @param dname_out * @return */ zdb_rr_label *nsec_find_interval(const zdb_zone *zone, const dnsname_vector *name_vector, u8 **out_dname_p, u8 * restrict * pool); void nsec_name_error(const zdb_zone* zone, const dnsname_vector *qname_not_const, s32 closest_index, u8 * restrict * pool, u8 **out_encloser_nsec_name_p, zdb_rr_label** out_encloser_nsec_label, u8 **out_wild_encloser_nsec_name_p, zdb_rr_label** out_wildencloser_nsec_label ); void nsec_destroy_zone(zdb_zone* zone); struct nsec_icmtl_replay { ptr_set nsec_del; ptr_set nsec_add; zdb_zone *zone; }; typedef struct nsec_icmtl_replay nsec_icmtl_replay; /** * Initialises the replay structure * * @param replay * @param zone */ void nsec_icmtl_replay_init(nsec_icmtl_replay *replay, zdb_zone *zone); void nsec_icmtl_replay_destroy(nsec_icmtl_replay *replay); /** * Appends a NSEC del to the replay structure * * @param replay * @param fqdn * @param ttlrdata */ void nsec_icmtl_replay_nsec_del(nsec_icmtl_replay *replay, const u8* fqdn); /** * Appends a NSEC add to the replay structure * * @param replay * @param fqdn * @param ttlrdata */ void nsec_icmtl_replay_nsec_add(nsec_icmtl_replay *replay, const u8* fqdn); void nsec_icmtl_replay_execute(nsec_icmtl_replay *replay); void nsec_logdump_tree(zdb_zone *zone); #define ZONE_NSEC_AVAILABLE(zone_) ( ((zone_)->apex->flags & (ZDB_RR_LABEL_DNSSEC_EDIT|ZDB_RR_LABEL_NSEC)) == ZDB_RR_LABEL_NSEC) #ifdef __cplusplus } #endif #endif /* _NSEC_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_icmtl.h0000644000077100007710000000012412650131756023037 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.214344 30 ctime=1454597652.126344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_icmtl.h0000664000077100007710000001333712650131756022653 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdb * @ingroup dnsdb * @brief journal file & incremental changes * * @{ * *----------------------------------------------------------------------------*/ #ifndef _ZDB_ICMTL_H #define _ZDB_ICMTL_H #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /** * The incremental changes are in two files. This way we don't care about intertwined ADD & REMOVE. */ /* * ICMTL single-stream extension */ #define ICMTL_EXT "ix" #define ICMTL_EXT_STRLEN 2 /* * Contains the removed records */ #define ICMTL_REMOVE_FILE_FORMAT "%s/%{dnsname}%08x-%08x.ir" /* * Contains the added records */ #define ICMTL_ADD_FILE_FORMAT "%s/%{dnsname}%08x-%08x.ia" /* * Contains the summary (SOA from / SOA to) */ #define ICMTL_SUMMARY_FILE_FORMAT "%s/%{dnsname}%08x-%08x.is" /* * Contains the wire ICMTL (almost: not the matching start and end SOA) */ #define ICMTL_WIRE_FILE_FORMAT "%s/%{dnsname}%08x-%08x." ICMTL_EXT #define ZDB_ICMTL_ITEM_ADD 1 #define ZDB_ICMTL_ITEM_REMOVE 2 #define ZDB_ICMTL_ITEM_NOP (ZDB_ICMTL_ITEM_ADD|ZDB_ICMTL_ITEM_REMOVE) typedef struct zdb_icmtl_item zdb_icmtl_item; struct zdb_icmtl_item { u8* name; u8* rdata; u32 rttl; u16 rtype; u16 rdata_size; u8 flag; /* add or remove */ }; typedef struct zdb_icmtl zdb_icmtl; struct zdb_icmtl { output_stream os_remove_; output_stream os_add_; output_stream os_remove; output_stream os_add; zdb_zone* zone; u64 file_size_before_append; u64 file_size_after_append; counter_output_stream_data os_remove_stats; counter_output_stream_data os_add_stats; u32 patch_index; u32 soa_ttl; u16 soa_rdata_size; u8 soa_rdata[532]; }; /** * Reads the ix stream until the SOA of the remove part is bigger than or equal to serial * */ /* ya_result zdb_icmtl_skip_until(input_stream *is, u32 serial); ya_result zdb_icmtl_read_fqdn(input_steam *is, u8 *dst256bytes); ya_result zdb_icmtl_read_tctr(input_steam *is, struct type_class_ttl_rdlen *tctr); ya_result zdb_icmtl_read_rdata(input_steam *is, u8 *dst, u32 len); ya_result zdb_icmtl_skip_rdata(input_steam *is, u32 len); */ /** * Enables incremental changes recording in the zone */ ya_result zdb_icmtl_begin(zdb_icmtl *icmtl, zdb_zone *zone); /** * Disables incremental changes recording in the zone and records them into a file */ ya_result zdb_icmtl_end(zdb_icmtl* icmtl); /** * Disables incremental changes recording in the zone and discards recorded changes * * @param icmtl * @return */ ya_result zdb_icmtl_cancel(zdb_icmtl *icmtl); /** * Replays incremental changes for the zone, looking in the directory for the files (.ix) */ #define ZDB_ICMTL_REPLAY_SERIAL_OFFSET 1 // avoids scanning #define ZDB_ICMTL_REPLAY_SERIAL_LIMIT 2 // don't try to go beyond the set serial /* struct zdb_icmtl_replay_args { zdb_zone *zone; const char* directory; u64 serial_offset; u32 serial_limit; u8 flags; }; */ ya_result zdb_icmtl_replay(zdb_zone *zone); /** * Quick-check for the last available serial for an origin and return it. (It's based on file names) */ ya_result zdb_icmtl_get_last_serial_from(zdb_zone *zone, u32 *last_serial); /** * Loads the first "DEL" soa matching that serial */ ya_result zdb_icmtl_get_soa_with_serial(input_stream *is, u32 serial, u8 *out_dname, struct type_class_ttl_rdlen *out_tctr, u8 *soa_rdata_780); /** * Opens the right incremental stream and reads the soa for the serial */ ya_result zdb_icmtl_open_ix_get_soa(const u8 *origin, const char *directory, u32 serial, input_stream *is, struct type_class_ttl_rdlen *tctrp, u8 *rdata_buffer_780, u32 *rdata_size); #ifdef __cplusplus } #endif #endif /* _ZDB_ICMTL_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/journal.h0000644000077100007710000000012412650131756022542 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.217344 30 ctime=1454597652.008344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/journal.h0000664000077100007710000002211312650131756022346 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnsdb * @brief * * Journal API * * * @{ */ #ifndef JOURNAL_H #define JOURNAL_H #if !ZDB_JOURNAL_CODE /* * Direct usage of journal is risky. So now all allowed code (c files only) have : * #define ZDB_JOURNAL_CODE 1 before the includes. */ #error "Please do not include dnsdb/journal.h directly." #endif #include #include #include #ifdef __cplusplus extern "C" { #endif /* * We should handle multiple formats. So the journal can improve and the older formats still be loaded * At some point we could also register journal formats but it does not seems important for now. */ typedef struct journal journal; ya_result journal_init(u32 mru_size); void journal_finalise(); /** * * The default part for XFR'ing * * @param path */ void journal_set_xfr_path(const char *path); const char* journal_get_xfr_path(); /** * Opens (or create) the journal for the zone * * @param jh pointer will be set to the journal handling structure * @param origin origin of the zone * @param create create an empty journal if none has been found * * @return an error code */ typedef ya_result journal_open_method(journal **jh, u8* origin, bool create); typedef const char *journal_get_format_name_method(); typedef u32 journal_get_format_version_method(); /* * The stream is : [SOA- RR- RR- RR- SOA+ RR+ RR+ RR+]+ */ typedef ya_result journal_append_ixfr_stream_method(journal *jh, input_stream *ixfr_wire_is); /** * rr can be NULL */ typedef ya_result journal_get_ixfr_stream_at_serial_method(journal *jh, u32 serial_from, input_stream *out_input_stream, dns_resource_record* rr); typedef ya_result journal_get_first_serial_method(journal *jh, u32 *serial); typedef ya_result journal_get_last_serial_method(journal *jh, u32 *serial); typedef ya_result journal_get_serial_range_method(journal *jh, u32 *serial_start, u32 *serial_end); typedef ya_result journal_truncate_to_size_method(journal *jh, u32 size_); typedef ya_result journal_truncate_to_serial_method(journal *jh, u32 serial_); typedef ya_result journal_close_method(journal *jh); typedef ya_result journal_get_domain_method(journal *jh, u8 *out_domain); typedef void journal_destroy_method(journal *jh); typedef void journal_log_dump_method(journal *jh); typedef void journal_link_zone_method(journal *jh, zdb_zone *zone); struct journal_vtbl { journal_get_format_name_method *get_format_name; // returns a const char* journal_get_format_version_method *get_format_version; // returns the version journal_close_method *close; // closes the file journal_append_ixfr_stream_method *append_ixfr_stream; // appends IXFR (without the first/last SOA) to the journal journal_get_ixfr_stream_at_serial_method *get_ixfr_stream_at_serial;// returns a stream starting at serial SN journal_get_first_serial_method *get_first_serial; // returns the first serial in the journal journal_get_last_serial_method *get_last_serial; // returns the last serial in the journal journal_get_serial_range_method *get_serial_range; // returns both the first and last serials in the journal journal_truncate_to_size_method *truncate_to_size; // truncates the journal size (probably never used) journal_truncate_to_serial_method *truncate_to_serial; // truncates the journal to a serial (probably never used) journal_log_dump_method *log_dump; // dumps the status of the journal on the database logger journal_get_domain_method *get_domain; // copies the domain to the output buffer journal_destroy_method *destroy; // destroys the journal at the first opportunity journal_link_zone_method *link_zone; // links the zone to the journal and do required internal updates const char* __class__; }; struct journal { volatile struct journal_vtbl *vtbl; volatile zdb_zone *zone; volatile struct journal *next; volatile struct journal *prev; volatile bool mru; /* The journal is not like a stream, it's a full standalone entity always returned as a pointer. * So the handler can do whatever it wants after "vtbl" */ }; #define journal_get_format_name(j_) (j_)->vtbl->get_format_name() #define journal_get_format_version(j_) (j_)->vtbl->get_format_version() //#define journal_close(j_) (j_)->vtbl->close(j_) #define journal_append_ixfr_stream(j_, ixfr_wire_is_) (j_)->vtbl->append_ixfr_stream((j_), (ixfr_wire_is_)) #define journal_get_ixfr_stream_at_serial(j_, serial_form_, out_input_stream_, \ dns_rr_) (j_)->vtbl->get_ixfr_stream_at_serial((j_), (serial_form_), (out_input_stream_), (dns_rr_)) #define journal_get_first_serial(j_, serial_) (j_)->vtbl->get_first_serial((j_),(serial_)) #define journal_get_last_serial(j_, serial_) (j_)->vtbl->get_last_serial((j_),(serial_)) #define journal_get_serial_range(j_, serial_start_, serial_end_) (j_)->vtbl->get_serial_range((j_),(serial_start_),(serial_end_)) #define journal_truncate_to_size(j_, size_) (j_)->vtbl->truncate_to_size((j_), (size_)) #define journal_truncate_to_serial(j_, serial_) (j_)->vtbl->truncate_to_serial((j_), (serial_)) #define journal_link_zone(j_, zone_) (j_)->vtbl->link_zone((j_), (zone_)); /** * * Returns the journal for a loaded zone. * * DO NOT USE THE JOURNAL WITHOUT OPENING IT. * ie: TAKING IT DIRECTLY FROM THE ZONE NODE IN THE DATABASE. * IT ***WILL*** RACE-FAIL !!! * * @param jhp * @param zone * @param workingdir * @param create * @return */ ya_result journal_open(journal **jhp, zdb_zone *zone, bool create); /** * * Closes a journal (decrement the reference count and delete if zero) * If no reference exists, remove the journal * * @param jh * @return */ void journal_close(journal *jh); /** * Returns the last available serial of a journal for a zone. * Does this by opening the journal. * This function should NOT be used for a loaded zone. */ ya_result journal_last_serial(const u8 *origin, const char *workingdir, u32 *serialp); /* * Empties/deletes a journal * Does this by opening the journal and calling a truncate to size 0 * This function should NOT be used for a loaded zone. */ ya_result journal_truncate(const u8 *origin); /** * * @param origin * @param workingdir * @param last_soa_rdata * @param last_soa_rdata_size * @return */ ya_result journal_last_soa(const u8 *origin, const char *workingdir, u32 *serial, u32 *ttl, u8 *last_soa_rdata, u16 *last_soa_rdata_size); /** * Logs the current status of the journaling system */ void journal_log_status(); #ifdef __cplusplus } #endif #endif /* JOURNAL_H */ /* @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/journal-cjf-page-output-stream.h0000644000077100007710000000012412650131756027043 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.204344 30 ctime=1454597652.034344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/journal-cjf-page-output-stream.h0000664000077100007710000000612012650131756026647 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once #include "dnsdb/journal-cjf-common.h" /** * Prepares a stream for the next chunk (-SOA ... +SOA ...) * * @note before being closed, this stream MUST be either 'next'ed or 'cancel'ed */ void journal_cjf_page_output_stream_next(output_stream *stream); /** * Cancels a stream's currentchunk (-SOA ... +SOA ...) * * @note before being closed, this stream MUST be either 'next'ed or 'cancel'ed */ void journal_cjf_page_output_stream_cancel(output_stream *stream); void journal_cjf_page_output_stream_set_serial_from(output_stream *stream, u32 serial); void journal_cjf_page_output_stream_set_serial_to(output_stream *stream, u32 serial); void journal_cjf_page_output_stream_set_soa_to_offset(output_stream *stream, u32 offset); ya_result journal_cfj_page_output_stream_write_resource_record(output_stream *stream, dns_resource_record *rr); /** * * stream MUST be initalised with output_stream_set_void(stream) before first call * * @param stream * @param jnl * @return */ u32 journal_cjf_page_output_stream_reopen(output_stream *stream, journal_cjf *jnl); u32 journal_cfj_page_output_stream_get_size(output_stream *stream); u32 journal_cfj_page_output_stream_get_start_offset(output_stream *stream); u32 journal_cfj_page_output_stream_get_current_offset(output_stream *stream); yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb.h0000644000077100007710000000012412650131756021647 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.185344 30 ctime=1454597652.114344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb.h0000664000077100007710000002430112650131756021454 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdb Zone database * @brief The zone database * * Implementation of structures and functions for the database * * Memory usage approxymation: * * let: * * "digest" the size of a digest * "n3pc" the number of nsec3param * "r" the number of records * * Memory usage =~ (233.3333 + ((446.666+digest) * n3pc) * r * * Or, if the digest size is different for each n3p: * * With "digest(n)" being the size of the digest for the n-th nsec3param * * =~ (233.3333 + SUM[n=1..n3pc](446.666+digest(n))) * r * * @{ */ #ifndef _ZDB_H #define _ZDB_H #include #include #include #include #include #include /* EDNS -> */ /* <- EDNS */ #ifdef __cplusplus extern "C" { #endif #define ZDB_ROOT_TAG 0x544f4f5242445a /* "ZDBROOT" */ #define ZDB_DOMAIN_ROOT_TAG 0x524e4d4442445a /* "ZDBDMNR" */ #define ZDBZONE_TAG 0x454e4f5a42445a /* "ZDBZONE" */ /* * This fingerprint feature has been added so libraries could check they are compatible */ dnslib_fingerprint dnsdb_getfingerprint(); u32 dnsdb_fingerprint_mask(); /** @brief Initializes the database internals. * * Initializes the database internals. * Multiple calls is a NOP. * * This is not thread safe. * */ void zdb_init(); void zdb_init_ex(u32 thread_pool_count); /** @brief Destroys the database internals. * * Destroys the database internals. * Multiple calls is a NOP. * * This is not thread safe. * */ void zdb_finalize(); /** @brief Initializes a database. * * Initializes a database. * * @param[in] db a pointer to the zdb structure that will be initialized. * */ void zdb_create(zdb *db); /** * * Puts a zone in the DB. * * If a zone with the same name did exist, returns the old zone (to be released) * and replaces it with the one given as a parameter. * * This function temporarily locks the database for writing. * The zone added gets its RC increased. * * @param db * @param zone * * @return */ zdb_zone *zdb_set_zone(zdb *db, zdb_zone* zone); zdb_zone *zdb_remove_zone(zdb *db, dnsname_vector *name); zdb_zone *zdb_remove_zone_from_dnsname(zdb *db, const u8 *dnsname); /** @brief Search for a single match in the database * * Search for a match in the database. * Only the most relevant match will be returned (ONE record set) * * @param[in] db the database * @param[in] dnsname_name the name dnsname to search for * @param[in] class the class to match * @param[in] type the type to match * @param[out] ttl_rdara_out a pointer to a pointer set of results (single linked list) * * @return SUCCESS in case of success. */ ya_result zdb_query(zdb* db, const u8 *dnsname_name, u16 type, zdb_packed_ttlrdata** ttlrdara_out); static inline void zdb_query_ex_answer_create(zdb_query_ex_answer *ans_auth_add) { ZEROMEMORY(ans_auth_add, sizeof(zdb_query_ex_answer)); } /** * @brief Build a dns answer from a query. * * Build a dns answer from a query. * * Records are stored in the zdb_query_ex_answer structure (four lists) * * After the answer has been processed, it must be destroyed using zdb_query_ex_answer_destroy * * @param db * @param mesg * @param ans_auth_add * @param pool_buffer * * @return */ finger_print zdb_query_ex(zdb *db, message_data *mesg, zdb_query_ex_answer *ans_auth_add, u8 *restrict pool_buffer); /** * Destroys a zdb_query_ex_answer structure created with zdb_query_ex * * @param ans_auth_add */ // void zdb_query_ex_answer_destroy(zdb_query_ex_answer* ans_auth_add); #define zdb_query_ex_answer_destroy(unused__) ((void)unused__) /** * @brief Writes the answer into the message. * * Writes the content of a zdb_query_ex_answer into a message_data. * * Returns the offset in the packet. * * CANNOT FAIL ! * * @param message * @param answer_set * @return */ ya_result zdb_query_message_update(message_data* message, zdb_query_ex_answer* answer_set); /** * This function should not be used anymore. Please consider using zdb_append_ip_records instead. * * @param db * @param name_ * @param ttlrdata_out_a * @param ttlrdata_out_aaaa * @return */ ya_result zdb_query_ip_records(zdb* db, const u8* name_, zdb_packed_ttlrdata **ttlrdata_out_a, zdb_packed_ttlrdata **ttlrdata_out_aaaa); /** * * Appends all A and AAAA records found in the database for the given fqdn * Given the nature of the list, what is returned is a copy. * The call locks the database for reading, then each involved zone for reading. * Locks are released before the function returns. * * @param db database * @param name_ fqdn * @param target_list list * @return */ ya_result zdb_append_ip_records(zdb* db, const u8* name_, host_address *target_list); #if 0 /** * Get a label from the database. * Optionally, the zone can be retrieved (zonep != NULL) and the zone can be locked by a specific owner. * Note that lock without retrieval of the zone is forbidden (and will abort on debug code) * The zone of the label may be locked as well. * * Release the zone with: zdb_zone_release_unlock(*zonep, owner); * * Note that using the returned pointer without locking the zone may have undefined results on a multi threaded environment. * * @param db * @param name * @param zonep * @param owner * * @return */ zdb_rr_label *zdb_get_rr_label(zdb* db, const u8* name, zdb_zone **zonep, u8 owner); /** * Get an rr set from the database. * The type must be specific (TYPE_ANY will return NULL) * Optionally, the zone can be retrieved (zonep != NULL) and the zone can be locked by a specific owner. * Note that lock without retrieval of the zone is forbidden (and will abort on debug code) * The zone of the label may be locked as well. * * Release the zone with: zdb_zone_release_unlock(*zonep, owner); * * Note that using the returned pointer without locking the zone may have undefined results on a multi threaded environment. * * @param db * @param name * @param type * @param zonep * @param owner * * @return */ const zdb_packed_ttlrdata *zdb_get_rr_set(zdb* db, const u8* name, u16 rtype, zdb_zone **zonep, u8 owner); #endif #if OBSOLETE /** @brief Adds an entry in a zone of the database * * Adds an entry in a zone of the database * * @param[in] db the database * @param[in] origin_ the zone where to add the record * @param[in] name_ the full name of the record (dns form) * @param[in] zclass the class of the record * @param[in] type the type of the record * @param[in] ttl the ttl of the record * @param[in] rdata_size the size of the rdata of the record * @param[in] rdata a pointer to the rdata of the record * * @return SUCCESS in case of success. */ ya_result zdb_add(zdb* db, u8* origin_, u8* name_, u16 type, u32 ttl, u16 rdata_size, void* rdata); /* 4 match, add 1 */ /** @brief Deletes an entry from a zone in the database * * Matches and deletes an entry from a zone in the database * * @param[in] db the database * @param[in] origin_ the zone from which to remove the record * @param[in] name_ the name of the record * @param[in] zclass the class of the record * @param[in] type the type of the record * @param[in] ttl the ttl of the record * @param[in] rdata_size the size of the rdata of the record * @param[in] rdata a pointer to the rdata of the record * * @return SUCCESS in case of success. */ ya_result zdb_delete(zdb* db, u8* origin, u8* name, u16 type, u32 ttl, u16 rdata_size, void* rdata); /* 5 match, delete 1 */ #endif /** @brief Destroys the database * * Destroys a database. (Empties it) * * @param[in] db the database to destroy * */ void zdb_destroy(zdb* db); /** * Looks for a zone and tells if zone is marked as invalid. * The zone can only be invalid if it exists. * * @param db * @param origin * @param zclass * @return */ bool zdb_is_zone_invalid(zdb *db, const u8 *origin); /** @brief DEBUG: Prints the content of the database. * * DEBUG: Prints the content of the database. * * @param[in] db the database to print * */ void zdb_signature_check(int so_zdb, int so_zdb_zone, int so_zdb_zone_label, int so_zdb_rr_label, int so_mutex_t); #define ZDB_API_CHECK() zdb_signature_check(sizeof(zdb),sizeof(zdb_zone),sizeof(zdb_zone_label),sizeof(zdb_rr_label),sizeof(mutex_t)) #ifdef DEBUG /** * DEBUG */ void zdb_print(zdb *db, output_stream *os); #endif #ifdef __cplusplus } #endif #endif /* _ZDB_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_zone_load_interface.h0000644000077100007710000000012412650131756025721 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.232344 30 ctime=1454597652.206344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_zone_load_interface.h0000664000077100007710000001250412650131756025530 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #ifndef __ZDB_ZONE_LOAD_INTERFACE__H__ #define __ZDB_ZONE_LOAD_INTERFACE__H__ #include #include #ifdef __cplusplus extern "C" { #endif /** * Structure used to describe a resource record from a zone. * * Meant to be used by the zone reader modules : * * TEXT FILE * AXFR FILE * */ typedef struct resource_record resource_record; struct resource_record { /* Next resource record */ resource_record *next; u32 ttl; /* Contains one of the RR TYPE codes */ u16 type; /* Contains one of the RR CLASS codes */ u16 class; /* should be renamed to something else */ u16 rdata_size; /* The name of the node to which this resource record pertains */ u8 name[MAX_DOMAIN_LENGTH]; u8 rdata[RDATA_MAX_LENGTH + 1]; }; void resource_record_init(resource_record* entry); void resource_record_freecontent(resource_record* entry); void resource_record_resetcontent(resource_record* entry); s32 resource_record_size(resource_record* entry); struct zone_reader_vtbl; typedef struct zone_reader zone_reader; struct zone_reader { void *data; const struct zone_reader_vtbl *vtbl; }; typedef ya_result zone_reader_read_record_method(zone_reader *, resource_record *); typedef ya_result zone_reader_unread_record_method(zone_reader *, resource_record *); typedef ya_result zone_reader_free_record_method(zone_reader *, resource_record *); typedef void zone_reader_close_method(zone_reader *); typedef void zone_reader_handle_error_method(zone_reader *zr, ya_result error_code); // used for cleaning up after an error (AXFR feedback) typedef const char* zone_reader_get_last_error_message_method(zone_reader *zr); typedef bool zone_reader_canwriteback_method(zone_reader *); typedef struct zone_reader_vtbl zone_reader_vtbl; struct zone_reader_vtbl { zone_reader_read_record_method *read_record; zone_reader_unread_record_method *unread_record; zone_reader_free_record_method *free_record; zone_reader_close_method *close; zone_reader_handle_error_method *handle_error; zone_reader_canwriteback_method *can_write_back; zone_reader_get_last_error_message_method *get_last_error_message; const char* __class__; }; #define zone_reader_read_record(zr__,rr__) (zr__)->vtbl->read_record((zr__),(rr__)) #define zone_reader_free_record(zr__,rr__) (zr__)->vtbl->free_record((zr__),(rr__)) #define zone_reader_handle_error(zr__,rr__) (zr__)->vtbl->handle_error((zr__),(rr__)) #define zone_reader_close(zr__) (zr__)->vtbl->close((zr__)) #define zone_reader_canwriteback(zr__) (zr__)->vtbl->can_write_back((zr__)) #define zone_reader_get_last_error_message(zr__) (zr__)->vtbl->get_last_error_message((zr__)) #define zone_reader_unread_record(zr__,rr__) (zr__)->vtbl->unread_record((zr__),(rr__)) #define zone_reader_rdata(zr__) ((zr__).rdata) #define zone_reader_rdata_size(zr__) ((zr__).rdata_size) #ifdef __cplusplus } #endif #endif /* __ZDB_ZONE_LOAD_INTERFACE__H__ */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb-zone-path-provider.h0000644000077100007710000000012412650131756025402 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.179344 30 ctime=1454597652.209344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb-zone-path-provider.h0000664000077100007710000001275612650131756025222 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once #include /** * For backward compatibility * * @param path */ void journal_set_xfr_path(const char *path); /** * For backward compatibility * * @return */ const char* journal_get_xfr_path(); /** * The database does not know zone types. The only one that does is the server. * So it makes sense to provide it a way to chose where the DB will store journals. * This is especially important with the new master/slave journal separation * * The default provider returns something based on the XFR path (journal_set_xfr_path) * */ #define ZDB_ZONE_PATH_PROVIDER_ZONE_PATH 1 // want the full path of the directory for the zone #define ZDB_ZONE_PATH_PROVIDER_ZONE_FILE 2 // want the full path of the file for the zone #define ZDB_ZONE_PATH_PROVIDER_AXFR_PATH 3 // want the full path of the directory for the image of the zone (AXFR) #define ZDB_ZONE_PATH_PROVIDER_AXFR_FILE 4 // want the full path of the directory for the image of the zone (AXFR) #define ZDB_ZONE_PATH_PROVIDER_IXFR_PATH 5 // want the full path of the file for the incremental of the zone (IXFR/journal) #define ZDB_ZONE_PATH_PROVIDER_IXFR_FILE 6 // want the full path of the file for the incremental of the zone (IXFR/journal) #define ZDB_ZONE_PATH_PROVIDER_DNSKEY_PATH 7 // want the full path containing the DNSKEY keypairs for the zone (smart signing, key management) #define ZDB_ZONE_PATH_PROVIDER_RNDSUFFIX 64 // appends a suffix to the file name (.SUFFIX), useful for temporary files/files being build #define ZDB_ZONE_PATH_PROVIDER_MKDIR 128 // create the path before returning typedef ya_result zdb_zone_path_provider_callback(const u8* domain_fqdn, char *path_buffer, u32 path_buffer_size, u32 flags); /** * Sets the provider. * * @param provider the provider or NULL to reset to the default one. */ void zdb_zone_path_set_provider(zdb_zone_path_provider_callback *provider); zdb_zone_path_provider_callback *zdb_zone_path_get_provider(); struct zdb_zone_path_provider_buffer { void *ptr; u32 size; }; typedef struct zdb_zone_path_provider_buffer zdb_zone_path_provider_buffer; union zdb_zone_info_provider_data { bool _bool; u8 _u8; u16 _u16; u32 _u32; u64 _u64; ya_result _result; void *_ptr; zdb_zone_path_provider_buffer _buffer; }; typedef union zdb_zone_info_provider_data zdb_zone_info_provider_data; /** * Zone info should be renamed into zone ctrl (not to be mixed with the server ctrl) * The zone ctrl may become a superset of the path provider * The zdb_zone_path_provider_data could become a generic high-level type */ typedef ya_result zdb_zone_info_provider_callback(const u8 *origin, zdb_zone_info_provider_data *data, u32 flags); #define ZDB_ZONE_INFO_PROVIDER_STORED_SERIAL 0x100 // u32 #define ZDB_ZONE_INFO_PROVIDER_MAX_JOURNAL_SIZE 0x101 // u32 #define ZDB_ZONE_INFO_PROVIDER_ZONE_TYPE 0x102 // u8 (ZT_MASTER, ZT_SLAVE, ...) #define ZDB_ZONE_INFO_PROVIDER_STORE_TRIGGER 0x10000 // NULL, enqueues the storage of the zone #define ZDB_ZONE_INFO_PROVIDER_STORE_NOW 0x10001 // ?, stores the zone now, in this thread void zdb_zone_info_set_provider(zdb_zone_info_provider_callback *data); zdb_zone_info_provider_callback *zdb_zone_info_get_provider(); ya_result zdb_zone_info_get_stored_serial(const u8 *origin, u32 *serial); ya_result zdb_zone_info_get_zone_max_journal_size(const u8 *origin, u32 *size); ya_result zdb_zone_info_get_zone_type(const u8 *origin, u8 *zt); ya_result zdb_zone_info_store_locked_zone(const u8 *origin); ya_result zdb_zone_info_background_store_zone(const u8 *origin); ya_result zdb_zone_info_background_store_zone_and_wait_for_serial(const u8 *origin, u32 minimum_serial); /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/dynupdate.h0000644000077100007710000000012412650131756023065 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.234344 30 ctime=1454597651.989344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/dynupdate.h0000664000077100007710000000715112650131756022676 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbupdate Dynamic update functions * @ingroup dnsdb * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef _ZDB_DYNUPDATE_H #define _ZDB_DYNUPDATE_H /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include #include #include #ifdef __cplusplus extern "C" { #endif #define DYNUPDATE_UPDATE_DRYRUN TRUE #define DYNUPDATE_UPDATE_RUN FALSE /* * HOWTO : * * Get the query, and determine it's a dynupdate * Call dynupdate_check_prerequisites to verify the update is allowed * If OK Call dynupdate_update on dryrun mode to verify the update should run * smoothly * if OK Save the query on a permanent storage to recover it in case of crash * Answer to the querier * Call dynupdate_update on run mode (dryrun = FALSE) * * The result is * * either the number of bytes read from the buffer * either an encapsulated server error code retrievable with SERVER_ERROR_GETCODE(error) * */ ya_result dynupdate_check_prerequisites(zdb_zone* zone, packet_unpack_reader_data *reader, u16 count); /* * At the run, each added/removed field should trigger the schedule a NSEC/NSEC3 update. * * If the zone is not NSEC3, the NSEC3 records should be discarded * */ ya_result dynupdate_update(zdb_zone* zone, packet_unpack_reader_data *reader, u16 count, bool dryrun); /* * Call this before an update. */ ya_result dynupdate_icmtlhook_enable(u8* origin, output_stream* os_remove, output_stream* os_add); ya_result dynupdate_icmtlhook_enable_wait(u8* origin, output_stream* os_remove, output_stream* os_add); ya_result dynupdate_icmtlhook_disable(const u8* origin); #ifdef __cplusplus } #endif #endif /* _ZDB_DYNUPDATE_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3_load.h0000644000077100007710000000012412650131756023102 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.180344 30 ctime=1454597652.061344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3_load.h0000664000077100007710000000555112650131756022715 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NSEC3_LOAD_H #define _NSEC3_LOAD_H #include #ifdef __cplusplus extern "C" { #endif ya_result nsec3_load_init(nsec3_load_context* context, zdb_zone* zone); void nsec3_load_destroy(nsec3_load_context* context); ya_result nsec3_load_add_nsec3param(nsec3_load_context* context, const u8* entry_rdata, u16 entry_rdata_size); ya_result nsec3_load_add_nsec3(nsec3_load_context* context, const u8* entry_name, u32 entry_ttl, const u8* entry_rdata, u16 entry_rdata_size); ya_result nsec3_load_add_rrsig(nsec3_load_context* context, const u8* entry_name, u32 entry_ttl, const u8* entry_rdata, u16 entry_rdata_size); ya_result nsec3_load_compile(nsec3_load_context* context); bool nsec3_load_is_context_empty(nsec3_load_context* ctx); #ifdef __cplusplus } #endif #endif /* _NSEC3_LOAD_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_zone_label.h0000644000077100007710000000012412650131756024041 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.242344 30 ctime=1454597652.194344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_zone_label.h0000664000077100007710000001261512650131756023653 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Internal functions for the database: zoned resource records label. * * Internal functions for the database: zoned resource records label. * * The ZONE LABEL is a label that can: * * _ contains a zone cut * _ contains a cached label * * They should only be used as the top holding structure of the database * * @{ */ #ifndef _ZONE_LABEL_H #define _ZONE_LABEL_H #include #ifdef __cplusplus extern "C" { #endif #define ZDB_ZONELABEL_TAG 0x4c424c4e5a42445a /* "ZDBZNLBL" */ #if 0 /* fix */ #else /** * @brief TRUE if the zone_label contains information (records, zone or a set of labels), else FALSE */ /* 2 USES */ #define ZONE_LABEL_RELEVANT(zone_label) ((zone_label)->zone!=NULL||dictionary_notempty(&(zone_label)->sub)) /** * @brief FALSE if the zone_label contains information (records, zone or a set of labels), else TRUE */ /* 4 USES */ #define ZONE_LABEL_IRRELEVANT(zone_label) ((zone_label)->zone==NULL&&dictionary_isempty(&(zone_label)->sub)) #endif /** * @brief Search for the label of a zone in the database * * Search for the label of a zone in the database * * @param[in] db the database to explore * @param[in] name the dnsname_vector mapping the label * * @return a pointer to the label or NULL if it does not exists in the database. * */ /* 3 USES */ zdb_zone_label* zdb_zone_label_find(zdb* db, dnsname_vector* name); zdb_zone_label* zdb_zone_label_find_from_name(zdb* db, const char* name); zdb_zone_label* zdb_zone_label_find_from_dnsname(zdb* db, const u8* dns_name); zdb_zone_label* zdb_zone_label_find_from_dnsname_nolock(zdb* db, const u8* dns_name); zdb_zone_label* zdb_zone_label_find_nolock(zdb *db, dnsname_vector* origin); zdb_zone_label* zdb_zone_label_add_nolock(zdb *db, dnsname_vector* origin); /** * @brief Destroys a label and its collections. * * Destroys a label and its collections. * Most likely irrelevant outside of zdb. * * @param[in] zone_labelp a pointer to a pointer to the label to destroy. * */ /* 1 USE */ void zdb_zone_label_destroy(zdb_zone_label **zone_labelp); /** * @brief Gets pointers to all the zone labels along the path of a name. * * Gets pointers to all the zone labels along the path of a name. * * @param[in] db a pointer to the database * @param[in] name a pointer to the dns name * @param[in] zone_label_vector a pointer to the vector that will hold the labels pointers * * @return the top of the vector (-1 = empty) */ /* 1 USE */ s32 zdb_zone_label_match(zdb* db, const dnsname_vector *name, zdb_zone_label_pointer_array zone_label_vector); #if OBSOLETE /** * @brief Retrieve the zone label origin, adds it in the database if needed. * * Retrieve the zone label origin, adds it in the database if needed. * * @param[in] db a pointer to the database * @param[in] origin a pointer to the dns name * * @return a pointer to the label */ /* 2 USES */ zdb_zone_label* zdb_zone_label_add(zdb* db, dnsname_vector* origin); #endif /** * @brief Destroys a zone label and all its collections * * Destroys a zone label and all its collections * * @parm[in] db a pointer to the database * @parm[in] name a pointer to the name * * @return an error code */ /* 2 USES */ ya_result zdb_zone_label_delete(zdb* db, dnsname_vector* name); #ifdef DEBUG /** * DEBUG: prints the label content */ void zdb_zone_label_print_indented(zdb_zone_label* zone_label, output_stream *os, int indent); void zdb_zone_label_print(zdb_zone_label* zone_label, output_stream *os); #endif #ifdef __cplusplus } #endif #endif /* _ZONE_LABEL_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/rrsig.h0000644000077100007710000000012412650131756022216 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.228344 30 ctime=1454597652.103344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/rrsig.h0000664000077100007710000002527112650131756022032 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup rrsig RRSIG functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _RRSIG_H #define _RRSIG_H #include #include #include #include #include #include #if ZDB_HAS_NSEC3_SUPPORT != 0 #include #endif #define RRSIG_TTLRDATA_TAG 0x52544749535252 /* RRSIGTR */ #define DNSSEC_KEY_SLL_TAG 0x59454b43455344 /* DSECKEY */ #define DNSSEC_DEBUGLEVEL 0 #define DNSSEC_DUMPSIGNCOUNT 0 #ifndef DEBUG #define SIGNER_THREAD_COUNT 2 #else #define SIGNER_THREAD_COUNT 1 /* EASIER FOR DEBUGGING */ #endif #define SIGNATURES_COUNT 1000 #define QUEUE_MAX_SIZE 65536 #define MAX_ENGINE_PRESET_COUNT 128 /** The label is not signed */ #define RRSIG_VERIFIER_RESULT_LABELNOTSIGNED 4 /** The type is not signed */ #define RRSIG_VERIFIER_RESULT_NOTSIGNED 3 /** The signature has not been verified */ #define RRSIG_VERIFIER_RESULT_BADSIGNATURE 2 /** The parameters of the RRSIG does not match the context */ #define RRSIG_VERIFIER_RESULT_BADRECORD 1 /** The signature has been verified */ #define RRSIG_VERIFIER_RESULT_OK 0 #define RRSIG_VERIFIER_RESULT_MAXVALUE 4 #define NO_SIGNATURES 0 #define HAD_SIGNATURES 1 #define UPDATED_SIGNATURES 2 #define RRSIG_DEFAULT_VALIDITY_DURATION (86400*31) /* * Extract fields from a packed record */ #define RRSIG_TYPE_COVERED(x__) (GET_U16_AT((x__)->rdata_start[0])) /** @todo : NATIVETYPE */ #define RRSIG_ALGORITHM(x__) ((x__)->rdata_start[2]) #define RRSIG_LABELS(x__) ((x__)->rdata_start[3]) #define RRSIG_ORIGINAL_TTL(x__) (ntohl(GET_U32_AT((x__)->rdata_start[4]))) #define RRSIG_VALID_UNTIL(x__) (ntohl(GET_U32_AT((x__)->rdata_start[8]))) #define RRSIG_VALID_SINCE(x__) (ntohl(GET_U32_AT((x__)->rdata_start[12]))) #define RRSIG_KEY_TAG(x__) (ntohs(GET_U16_AT((x__)->rdata_start[16]))) /** @todo : NATIVETAG (LOOK FOR ALL OF THEM) */ #define RRSIG_KEY_NATIVETAG(x__) (GET_U16_AT((x__)->rdata_start[16])) #define RRSIG_SIGNER_NAME(x__) (&(x__)->rdata_start[18]) #define RRSIG_RDATA_TO_TYPE_COVERED(x__) GET_U16_AT(x__) #define RRSIG_CONTEXT_NSEC 1 #define RRSIG_CONTEXT_NSEC3 2 #define RRSIG_CONTEXT_NSEC3_OPTOUT 3 #ifdef __cplusplus extern "C" { #endif typedef struct rrsig_context_s rrsig_context_s; struct rrsig_context_s { ENGINE *engine; dnssec_key_sll *key_sll; /* * Current rrsig_sll (ZALLOC) */ zdb_packed_ttlrdata *rrsig_sll; /* * New rrsig_ssl (MALLOC) */ zdb_packed_ttlrdata *added_rrsig_sll; /* * Expired/invalid rrsig_ssl (MALLOC) */ zdb_packed_ttlrdata *removed_rrsig_sll; zdb_packed_ttlrdata *canonised_rrset; dnssec_task_s *task; /* Used for RR canonization */ ptr_vector rrs; u8 *origin; /* Origin of the zone. The rrsig has to match * this. */ smp_int *loose_quota; // each signature will decrease this by 1 // since signatures are made by label, this // is a best effort deal and this value will // most likely drop below zero /**/ u32 rr_dnsname_len; u32 origin_len; /* dnsname_len(origin) */ u32 original_ttl; u32 min_ttl; /**/ u32 valid_from; /* epoch */ /**/ u32 sig_validity_regeneration_seconds; u32 sig_validity_interval_seconds; u32 sig_jitter_seconds; u32 sig_invalid_first; /**/ u32 expired_signatures; u32 soon_expired_signatures; /**/ u32 wrong_signatures; u32 good_signatures; /**/ u32 rrsig_header_length; u32 record_header_label_type_class_ttl_length; /**/ u32 canonized_rr_type_offset; u16 zclass; u8 label_depth; u8 flags; u8 nsec_flags; bool do_verify_signatures; // once the signatures are in, there is no point doing it again // if we do them, they are right // if the master do them, he is right // the only time they should be verified is at load time /**/ /* * Owner of the RR * * STACK! */ dnsname_stack rr_dnsname; bool rr_dnsname_processing_apex; /* * Will contain the label + type + class + ttl * Common for all the records of the same label/type * The type will be edited in order to avoid computing it for * other records of the same label * * Candidate for the context */ u8 record_header_label_type_class_ttl[MAX_DOMAIN_LENGTH + 1 + 2 + 2]; /* * Will contain the type + alg + labels + orgttl + from + to + tag + name * Common for all the records of the same label * The type will be edited in order to avoid computing it for * other records of the same label * * Candidate for the context */ u8 rrsig_header[2+1+1+4+4+4+2+MAX_DOMAIN_LENGTH]; }; #define ZDB_RRSIGUPQ_TAG 0x5150554749535252 /* RRSIGUPQ */ struct rrsig_update_item_s { /// The zone being updated zdb_zone* zone; /// The label being processed zdb_rr_label* label; /// An rrset of records (mallocated) to add in the label zdb_packed_ttlrdata* added_rrsig_sll; /// An rrset of records (mallocated) to remove (and free) from the label zdb_packed_ttlrdata* removed_rrsig_sll; // The fqdn of the label dnsname_stack path; }; typedef struct rrsig_update_item_s rrsig_update_item_s; #if ZDB_HAS_NSEC3_SUPPORT != 0 struct nsec3_rrsig_update_item_s { zdb_zone* zone; nsec3_zone_item* item; nsec3_zone_item* next; /* * New rrsig (MALLOC) */ zdb_packed_ttlrdata* added_rrsig_sll; /* * Expired/invalid rrsig (MALLOC) */ zdb_packed_ttlrdata* removed_rrsig_sll; }; typedef struct nsec3_rrsig_update_item_s nsec3_rrsig_update_item_s; #endif ya_result rrsig_context_initialize(rrsig_context_s *context, const zdb_zone *zone, const char *engine_name, u32 sign_from, smp_int *quota); void rrsig_context_destroy(rrsig_context_s *context); static inline void rrsig_context_update_quota(rrsig_context_s *context, s32 sig_count) { if((sig_count > 0) && (context->loose_quota != NULL)) { smp_int_sub(context->loose_quota, sig_count); } } static inline s32 rrsig_context_get_quota(rrsig_context_s *context) { if(context->loose_quota != NULL) { s32 quota = smp_int_get(context->loose_quota); return quota; } else { return MAX_S32; } } void rrsig_context_set_key(rrsig_context_s *context, dnssec_key* key); /* * Adds/Removes a label in the path in order to process it */ void rrsig_context_push_name_rrsigsll(rrsig_context_s *context, u8* name, zdb_packed_ttlrdata* rrsig_sll); /* Calls rrsig_update_context_push_name_rrsigsll using the label's fields */ void rrsig_context_push_label(rrsig_context_s *context, zdb_rr_label* label); void rrsig_context_pop_label(rrsig_context_s *context); /** @todo: check is it a dup of rrsig_update_records ? */ ya_result rrsig_update_label_rrset(rrsig_context_s *context, zdb_rr_label* label, u16 type); ya_result rrsig_update_records(rrsig_context_s *context, dnssec_key* key, zdb_packed_ttlrdata* rr_sll, u16 type, bool do_update); ya_result rrsig_update_label(rrsig_context_s *context, zdb_rr_label* label); /* * Takes the result of an update and commits it to the label */ void rrsig_update_commit(zdb_packed_ttlrdata* removed_rrsig_sll, zdb_packed_ttlrdata* added_rrsig_sll, zdb_rr_label* label, zdb_zone* zone, dnsname_stack* name); /** * * Returns the first RRSIG record that applies to the give type. * * @param label the label where to do the search * @param covered_type the type covered by the RRSIG * * @return the first RRSIG covering the type or NULL */ zdb_packed_ttlrdata* rrsig_find_first(const zdb_rr_label* label, u16 covered_type); /** * * Returns the next RRSIG record that applies to the give type. * * @param rrsig the previous RRSIG covering the type * @param covered_type the type covered by the RRSIG * * @return covered_type the next RRSIG covering the type or NULL */ zdb_packed_ttlrdata* rrsig_find_next(const zdb_packed_ttlrdata* rrsig, u16 covered_type); /** * * Removes all the RRSIG covering the type * * @param dname the fqdn of the label * @param label the label * @param covered_type the type covered by the RRSIG */ void rrsig_delete(const zdb_zone *zone, const u8 *dname, zdb_rr_label* label, u16 covered_type); #ifdef __cplusplus } #endif #endif /* _RRSIGN_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3_owner.h0000644000077100007710000000012412650131756023315 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.189344 30 ctime=1454597652.072344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3_owner.h0000664000077100007710000000725612650131756023134 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NSEC3_OWNER_H #define _NSEC3_OWNER_H #include #include #ifdef __cplusplus extern "C" { #endif bool nsec3_owned_by(const nsec3_zone_item* item, const zdb_rr_label* owner); /* * Adds an owner to the NSEC3 item */ void nsec3_add_owner(nsec3_zone_item* item, const zdb_rr_label* owner); /* * Removes an owner from the NSEC3 item * * The entry MUST have been set before */ void nsec3_remove_owner(nsec3_zone_item* item, zdb_rr_label* owner); /* * Removes all owners from the NSEC3 item * * The entry MUST have been set before */ void nsec3_remove_all_owners(nsec3_zone_item* item); zdb_rr_label* nsec3_owner_get(nsec3_zone_item* item, u16 n); static inline u16 nsec3_owner_count(nsec3_zone_item* item) { return item->rc; } /* * Adds a "star" to the NSEC3 item */ void nsec3_add_star(nsec3_zone_item* item, const zdb_rr_label* owner); /* * Removes a star from the NSEC3 item * * The entry MUST have been set before */ void nsec3_remove_star(nsec3_zone_item* item, zdb_rr_label* owner); /* * Removes all stars from the NSEC3 item * * The entry MUST have been set before */ void nsec3_remove_all_star(nsec3_zone_item* item); /* * Moves all stars from one NSEC3 item to another. * * This is used when an NSEC3 item is removed: All its NSEC3 must be moved * to his predecessor. */ void nsec3_move_all_star(nsec3_zone_item* src, nsec3_zone_item* dst); zdb_rr_label* nsec3_star_get(const nsec3_zone_item* item, u16 n); static inline u16 nsec3_star_count(nsec3_zone_item* item) { return item->sc; } #ifdef __cplusplus } #endif #endif /* _NSEC3_OWNER_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_zone.h0000644000077100007710000000012412650131756022702 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.203344 30 ctime=1454597652.156344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_zone.h0000664000077100007710000002120112650131756022503 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #ifndef _ZDB_ZONE_H #define _ZDB_ZONE_H #include #include #include #include #include #include #include "nsec3_types.h" #ifdef __cplusplus extern "C" { #endif #define ZDB_ZONETAG 0x454e4f5a52445a /* "ZDBZONE" */ /** * @brief Get the zone with the given name * * Get the zone with the given name * * @param[in] db a pointer to the database * @param[in] exact_match_origin the name of the zone * * @return a pointer to zone or NULL if the zone is not in the database * */ /* 2 USES */ zdb_zone *zdb_zone_find(zdb *db, dnsname_vector* exact_match_origin); /** * @brief Get the zone with the given name * * Get the zone with the given name * * @param[in] db a pointer to the database * @param[in] name the name of the zone (dotted c-string) * * @return a pointer to zone or NULL if the zone is not in the database * */ zdb_zone *zdb_zone_find_from_name(zdb *db, const char* name); /** * @brief Adds a record to a zone * * Adds a record to a zone. * * @param[in] zone the zone * @param[in] labels the stack of labels of the dns name * @param[in] labels_top the index of the top of the stack (the level) * @param[in] type the type of the record * @param[in] ttlrdata the ttl and rdata of the record. NOTE: the zone becomes its new owner !!! */ /* 2 USES */ void zdb_zone_record_add(zdb_zone* zone, dnslabel_vector_reference labels, s32 labels_top, u16 type, zdb_packed_ttlrdata* ttlrdata); /* class is implicit */ /** * @brief Removes a record from a zone * * Removes a record from a zone * * @param[in] zone the zone * @param[in] labels the stack of labels of the dns name * @param[in] labels_top the index of the top of the stack (the level) * @param[in] type the type of the record * @param[in] ttlrdata the ttl and rdata of the record. NOTE: the caller stays the owner * * @return an error code */ ya_result zdb_zone_record_delete(zdb_zone* zone, dnslabel_vector_reference labels, s32 labels_top, u16 type, zdb_packed_ttlrdata* ttlrdata); /* class is implicit */ /** * @brief Search for a record in a zone * * Search for a record in a zone * * @param[in] zone the zone * @param[in] labels the stack of labels of the dns name * @param[in] labels_top the index of the top of the stack (the level) * @param[in] type the type of the record */ /* 4 USES */ zdb_packed_ttlrdata* zdb_zone_record_find(zdb_zone *zone, dnslabel_vector_reference labels, s32 labels_top, u16 type); /** * @brief Creates a zone * * Creates a zone * * @param[in] zone a pointer to the zone */ /* 2 USES */ zdb_zone *zdb_zone_create(const u8 *origin); /* * Sets a zone as invalid. * This will put the (content of the) zone in a garbage to be freed at some point in the future (when nolonger used) * Also an invalid zone ... the .axfr and journal files should probably be trashed * */ void zdb_zone_invalidate(zdb_zone *zone); void zdb_zone_truncate_invalidate(zdb_zone *zone); /** * @brief Destroys a zone and all its content * * Destroys a zone and all its content * * @param[in] zone a pointer to the zone */ /* 10 USES */ void zdb_zone_destroy(zdb_zone *zone); /** * @brief Copies the soa of a zone to an soa_rdata structure. * * Copies the soa of a zone to an soa_rdata structure. * No memory is allocated for the soa_rdata. If the zone is destroyed, * the soa_rdata becomes invalid. * * @param[in] zone a pointer to the zone * @param[out] soa_out a pointer to an soa_rdata structure */ ya_result zdb_zone_getsoa(const zdb_zone *zone, soa_rdata *soa_out); ya_result zdb_zone_getsoa_ttl_rdata(const zdb_zone* zone, u32 *ttl, u16 *rdata_size, const u8 **rdata); /** * @brief Retrieve the serial of a zone * * Retrieve the serial of a zone * * @param[in] zone a pointer to the zone * @param[out] serial a pointer to an u32 that will get the serial */ ya_result zdb_zone_getserial(const zdb_zone* zone, u32 *serial); /** * @brief Retrieve the minttl of a zone * * Retrieve the serial of a zone * * @param[in] zone a pointer to the zone * @param[out] serial a pointer to an u32 that will get the minttl */ static inline ya_result zdb_zone_getminttl(const zdb_zone *zone, u32 *minttl) { *minttl = zone->min_ttl; return SUCCESS; } #if ZDB_RECORDS_MAX_CLASS == 1 static inline u16 zdb_zone_getclass(const zdb_zone *zone) { return CLASS_IN; } #else static inline u16 zdb_zone_getclass(const zdb_zone *zone) { return zone->zclass; } #endif /** * @brief Updates a zone from an IXFR input stream * * Loads a zone from an IXFR input stream * * The function does not closes the input stream * * If the IXFR is wrong, the zone will be messed up. * Please check that the general structure of the stream is right * before calling this. * * SOA x+n * SOA x+0 * ... * SOA x+1 * ... * * SOA x+1 * ... * SOA x+2 * ... * SOA x+n * * @param[in] db a pointer to the database * @param[in] is a pointer to an input stream containing the IXFR * * @return an error code */ ya_result zdb_zone_update_ixfr(zdb *db, input_stream *is); ya_result zdb_zone_store_axfr(zdb_zone *zone, output_stream* os); const zdb_packed_ttlrdata* zdb_zone_get_dnskey_rrset(zdb_zone *zone); static inline bool zdb_zone_is_nsec3(const zdb_zone* zone) { #if ZDB_HAS_NSEC3_SUPPORT != 0 return (zone->apex->flags & ZDB_RR_LABEL_NSEC3) != 0; #else return FALSE; #endif } static inline bool zdb_zone_is_nsec3_optout(const zdb_zone* zone) { return ((zone->apex->flags & ZDB_RR_LABEL_NSEC3_OPTOUT) != 0); } static inline bool zdb_zone_is_nsec3_optin(const zdb_zone* zone) { return ((zone->apex->flags & ZDB_RR_LABEL_NSEC3_OPTOUT) == 0); } static inline nsec3_zone* zdb_zone_get_nsec3chain(const zdb_zone* zone, s8 idx) { #if ZDB_HAS_NSEC3_SUPPORT != 0 nsec3_zone *n3 = zone->nsec.nsec3;; while(n3 != NULL && --idx >= 0) { n3 = n3->next; } return n3; #else return NULL; #endif } static inline bool zdb_zone_is_nsec(const zdb_zone *zone) { #if ZDB_HAS_NSEC_SUPPORT != 0 return (zone->apex->flags & ZDB_RR_LABEL_NSEC) != 0; #else return FALSE; #endif } static inline bool zdb_zone_is_dnssec(const zdb_zone *zone) { #if ZDB_HAS_DNSSEC_SUPPORT != 0 return (zone->apex->flags & (ZDB_RR_LABEL_NSEC | ZDB_RR_LABEL_NSEC3)) != 0; #else return FALSE; #endif } bool zdb_zone_isinvalid(zdb_zone *zone); static inline bool zdb_zone_isvalid(zdb_zone *zone) { return !zdb_zone_isinvalid(zone); } #ifdef DEBUG /** * DEBUG */ void zdb_zone_print_indented(zdb_zone* zone, output_stream *os, int indent); void zdb_zone_print(zdb_zone *zone, output_stream *os); #endif #ifdef __cplusplus } #endif #endif /* _ZDB_ZONE_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb-zone-lock.h0000644000077100007710000000012412650131756023546 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.182344 30 ctime=1454597652.179344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb-zone-lock.h0000664000077100007710000001222012650131756023350 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #pragma once #include #ifdef __cplusplus extern "C" { #endif /** * Zone locking * * Sets the owner of a zone. * * The owner id has a format: the msb is reserved to say that the access is * exclusive to only one instance of the owner. * The remaining bits are the id. * * Mostly used for the simple reader and various writers. * * A new feature needs to be added: being able to pre-lock for an owner. * * Explanation: I want to lock for the signing process. But that process * is done in two or three phases. The first phase is read-only (thus allowing * the server to work normally). But I don't want sombody else, say, a dynamic * update, to lock the zone in the mean time. (Which would happen when the lock * is transferred from the reader to the signer (at the commit phase). * So I'll add a secondary owner, meant to tell "I lock as a reader BUT I also * reserve the right for myself later". And later a transfer can be done to * the secondary as soon as the last reader unlocks. * * zdb_zone_double_lock(zone, owner, secondary owner) * zdb_zone_try_double_lock(zone, owner, secondary owner) * zdb_zone_transfer_lock(zone, secondary owner) * * The parameter would need to be repeated to detect inconsistencies (bugs) * * This should have no effect on the normal locking mechanism, thus ensuring * no loss of speed. The only goal is to avoid a race changing the owner. * * Having only zdb_zone_transfer_lock(zone, old owner, new owner) cannot work * because nothing prevents two soon-to-be writers to lock and work in tandem. * */ void zdb_zone_lock(zdb_zone *zone, u8 owner); bool zdb_zone_trylock(zdb_zone *zone, u8 owner); void zdb_zone_unlock(zdb_zone *zone, u8 owner); /** * Reserves the secondary owner and to locks for the owner * * @param zone * @param owner * @param secondary_owner */ void zdb_zone_double_lock(zdb_zone *zone, u8 owner, u8 secondary_owner); /** * Tries to reserve the secondary owner and to lock for the owner * * @param zone * @param owner * @param secondary_owner */ bool zdb_zone_try_double_lock(zdb_zone *zone, u8 owner, u8 secondary_owner); /** * * Unlocks one owner and sets the secondary owner to nobody * * @param zone * @param owner * @param secondary_owner */ void zdb_zone_double_unlock(zdb_zone *zone, u8 owner, u8 secondary_owner); /** * * Puts the secondary lock in place of the lock when the locker count reaches 1 * Followed by a zdb_zone_unlock * * @param zone * @param owner * @param secondary_owner */ void zdb_zone_transfer_lock(zdb_zone *zone, u8 owner, u8 secondary_owner); /** * * Puts the secondary lock in place of the lock when the locker count reaches 1 * Followed by a zdb_zone_unlock * * @param zone * @param owner * @param secondary_owner */ bool zdb_zone_try_transfer_lock(zdb_zone *zone, u8 owner, u8 secondary_owner); /** * * Exchange the primary and secondary locks when the locker count reaches 1 * Followed by a zdb_zone_unlock * * @param zone * @param owner * @param secondary_owner */ void zdb_zone_exchange_locks(zdb_zone *zone, u8 owner, u8 secondary_owner); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT void zdb_zone_lock_set_monitor(); #endif /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/dnssec_keystore.h0000644000077100007710000000012412650131756024274 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.239344 30 ctime=1454597651.981344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/dnssec_keystore.h0000664000077100007710000001010412650131756024075 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnskey DNSSEC keys functions * @ingroup dnsdbdnssec * @brief * * @{ */ /*----------------------------------------------------------------------------*/ #ifndef _DNSSEC_KEYSTORE_H #define _DNSSEC_KEYSTORE_H /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include #include #include #include #if ZDB_HAS_DNSSEC_SUPPORT == 0 #error "Please do not include dnssec_keystore.h if ZDB_HAS_DNSSEC_SUPPORT is 0 (Not NSEC3 nor NSEC)" #endif #ifdef __cplusplus extern "C" { #endif /** * Notes about the keyring: * * It can handle keys from multiple domains. * It is not designed to hold thousands of keys. * Keys are referenced by their TAG, grouped in lists. * */ typedef btree dnssec_keystore; void dnssec_keystore_resetpath(); const char* dnssec_keystore_getpath(); void dnssec_keystore_setpath(const char* path); ya_result dnssec_keystore_add(dnssec_key* key); dnssec_key* dnssec_keystore_get(u8 algorithm,u16 tag,u16 flags,const char *origin); dnssec_key* dnssec_keystore_remove(u8 algorithm,u16 tag,u16 flags,const char *origin); void dnssec_keystore_destroy(); bool dnssec_key_equals(dnssec_key* a,dnssec_key* b); /** Generates a private key, store in the keystore */ ya_result dnssec_key_createnew(u8 algorithm,u32 size,u16 flags,const char *origin, dnssec_key **out_key); /** Removes the key from the keystore, then deletes it */ void dnssec_key_free(dnssec_key* key); /** Load a public key from the rdata, then return it */ ya_result dnskey_load_public(const u8 *rdata, u16 rdata_size, const char* origin, dnssec_key **out_key); /** * Load a private key from the disk or the keystore, then return it. * NOTE: If the key already existed as a public-only key, the public version is destroyed. */ ya_result dnssec_key_load_private(u8 algorithm, u16 tag,u16 flags,const char* origin, dnssec_key **out_key); ya_result dnssec_key_store_private(dnssec_key* key); ya_result dnssec_key_store_dnskey(dnssec_key* key); void dnssec_key_addrecord(zdb_zone* zone, dnssec_key* key); #ifdef __cplusplus } #endif #endif /* _DNSSEC_KEYSTORE_H */ /* ------------------------------------------------------------ */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb-zone-find.h0000644000077100007710000000012412650131756023536 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.197344 30 ctime=1454597652.167344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb-zone-find.h0000664000077100007710000000560712650131756023353 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #pragma once #include #include /** * Returns true if the zone exists in the LOCKED database * * @param[in] db a pointer to the database * @param[in] exact_match_origin the name of the zone * * @return TRUE if the zone is in the database * */ /* 2 USES */ bool zdb_zone_exists(zdb *db, dnsname_vector* exact_match_origin); /** * Returns true if the zone exists in the LOCKED database * * @param[in] db a pointer to the database * @param[in] name the name of the zone (dotted c-string) * * @return TRUE if the zone is in the database * */ bool zdb_zone_exists_from_name(zdb *db, const char* name); /** * Returns true if the zone exists in the LOCKED database * * @param[in] db a pointer to the database * @param[in] name the name of the zone (dns name) * * @return TRUE if the zone is in the database * */ bool zdb_zone_exists_from_dnsname(zdb *db, const u8* dns_name); /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3_collection.h0000644000077100007710000000012412650131756024316 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.192344 30 ctime=1454597652.046344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3_collection.h0000664000077100007710000001364312650131756024132 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * This is the collection that holds the NSEC3 chain for one NSEC3PARAM * * @{ */ #pragma once #include #ifdef __cplusplus extern "C" { #endif /* * A digest is stored prefixed with its length ([1;255]) */ /* * A structure to hold both children with direct access */ typedef struct nsec3_node nsec3_node; struct nsec3_children { struct nsec3_node* left; struct nsec3_node* right; }; /* * An union to have access to the children with direct or indexed access */ typedef union nsec3_children_union nsec3_children_union; union nsec3_children_union { struct nsec3_children lr; struct nsec3_node * child[2]; }; typedef union nsec3_label_pointer_array nsec3_label_pointer_array; union nsec3_label_pointer_array { zdb_rr_label* owner; zdb_rr_label** owners; }; /* * The node structure CANNOT have a varying size on a given collection * This means that the digest size is a constant in the whole tree */ struct nsec3_node { union nsec3_children_union children; /**/ struct nsec3_node* parent; /**/ /* 64 bits aligned */ s8 balance; /* PAYLOAD BEYOND THIS POINT */ u8 flags; /* opt-out */ u16 type_bit_maps_size; u16 rc; /* label RC */ u16 sc; /* *.label RC */ /* 64 bits aligned */ zdb_packed_ttlrdata* rrsig; /**/ nsec3_label_pointer_array label; nsec3_label_pointer_array star_label; u8 *type_bit_maps; /* MUST be a ptr */ u8 digest[1]; /* 7*4 7*8 * 3*2 3*2 * 1*1 1*1 * * 35 63 * * +21 * *56 (56) 84 (88) * * For the 3M records of EU: * * 168MB 240MB * * To this, 2+1 ptrs must be added * by record * * The remaining overhead happens * if there are many references * for the same label, this should * be fairly negligible. * * 36MB 72MB * * => * * 204MB 312MB * */ }; #define NSEC3_NODE_SIZE_FOR_DIGEST(node,digest) ((sizeof(nsec3_node)-1)+digest[0]) #define NSEC3_NODE_DIGEST_SIZE(node) (node->digest[0]) #define NSEC3_NODE_DIGEST_PTR(node) (&node->digest[1]) #define NSEC3_NODE_SIZE(node) ((sizeof(nsec3_node)-1)+NSEC3_NODE_DIGEST_SIZE(node)) /* * AVL definition part begins here */ /* * The maximum depth of a tree. * 40 is enough for storing 433494436 items (worst case) * * Depth 0 is one node. * * Worst case : N is enough for sum[n = 0,N](Fn) where F is Fibonacci * Best case : N is enough for (2^(N+1))-1 */ #define AVL_MAX_DEPTH 40 /* 64 */ /* * The previx that will be put in front of each function name */ #define AVL_PREFIX nsec3_ /* * The type that hold the node */ #define AVL_NODE_TYPE nsec3_node /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_TREE_TYPE AVL_NODE_TYPE* /* * The type that hold the tree (should be AVL_NODE_TYPE*) */ #define AVL_CONST_TREE_TYPE AVL_NODE_TYPE* const /* * How to find the root in the tree */ #define AVL_TREE_ROOT(__tree__) (*(__tree__)) /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE u8* #define AVL_REFERENCE_IS_CONST FALSE #define AVL_REFERENCE_IS_POINTER TRUE /* * The node has got a pointer to its parent * * 0 : disable * !=0 : enable */ #define AVL_HAS_PARENT_POINTER 1 #ifdef __cplusplus } #endif #include #ifdef __cplusplus extern "C" { #endif AVL_NODE_TYPE* AVL_PREFIXED(avl_find_interval_start)(AVL_TREE_TYPE* tree, AVL_REFERENCE_TYPE obj_hash); /* * I recommand setting a define to identify the C part of the template * So it can be used to undefine what is not required anymore for every * C file but that one. * */ #ifndef _NSEC3_COLLECTION_C #undef AVL_MAX_DEPTH #undef AVL_PREFIX #undef AVL_NODE_TYPE #undef AVL_TREE_TYPE #undef AVL_CONST_TREE_TYPE #undef AVL_TREE_ROOT #undef AVL_REFERENCE_TYPE #undef AVL_HAS_PARENT_POINTER #undef AVL_REFERENCE_IS_CONST #undef AVL_REFERENCE_IS_POINTER #undef _AVL_H_INC #endif /* _NSEC3_COLLECTION_C */ #ifdef __cplusplus } #endif /* * AVL definition part ends here */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb-lock.h0000644000077100007710000000012412650131756022575 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.173344 30 ctime=1454597652.160344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb-lock.h0000664000077100007710000000566012650131756022411 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdb Zone database * @brief The zone database * * Implementation of structures and functions for the database * * Memory usage approxymation: * * let: * * "digest" the size of a digest * "n3pc" the number of nsec3param * "r" the number of records * * Memory usage =~ (233.3333 + ((446.666+digest) * n3pc) * r * * Or, if the digest size is different for each n3p: * * With "digest(n)" being the size of the digest for the n-th nsec3param * * =~ (233.3333 + SUM[n=1..n3pc](446.666+digest(n))) * r * * @{ */ #pragma once #include static inline void zdb_lock(zdb *db, u8 owner) { group_mutex_lock(&db->mutex, owner); } static inline void zdb_unlock(zdb *db, u8 owner) { group_mutex_unlock(&db->mutex, owner); } static inline bool zdb_islocked(zdb *db) { mutex_lock(&db->mutex.mutex); bool r = db->mutex.owner != 0; mutex_unlock(&db->mutex.mutex); return r; } static inline bool zdb_islocked_by(zdb *db, u8 owner) { mutex_lock(&db->mutex.mutex); bool r = (db->mutex.owner == (owner & 0x7f)); mutex_unlock(&db->mutex.mutex); return r; } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/journal-cjf-idxt.h0000644000077100007710000000012412650131756024250 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.204344 30 ctime=1454597652.023344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/journal-cjf-idxt.h0000664000077100007710000000753612650131756024070 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once #include "dnsdb/journal-cjf-page.h" void journal_cjf_idxt_flush(journal_cjf *jnl); /** * * Returns the last serial number value at index in the IDXT * * @param jnl * @param index * @return */ u32 journal_cjf_idxt_get_last_serial(journal_cjf *jnl, s16 index); /** * * Returns the file offset value at index in the current IDXT * * @param jnl * @param index * @return */ u32 journal_cjf_idxt_get_file_offset(journal_cjf *jnl, s16 index); /** * Appends an PAGE table after the current one * @todo edf update the current PAGE next pointer * * @param jcs * @param size_hint */ //void journal_cjf_idxt_append_page_nogrow(struct journal_cjf *jnl); /** * Appends an PAGE after this one * * @param jnl */ void journal_cjf_idxt_append_page(journal_cjf *jnl); /** * Updates the value of the last serial at current position in the PAGE * * @param jnl * @param last_serial */ void journal_cjf_idxt_update_last_serial(journal_cjf *jnl, u32 last_serial); /** * * Flushes the IDXT to disk if needed, then destroys the structure content. * * @param jnl */ void journal_cjf_idxt_destroy(journal_cjf *jnl); /** * Creates an empty table of indexes (IDXT) for the journal, with a minimum number of entries. * Nothing is written to disk. * * @param jnl * @param entries */ void journal_cjf_idxt_create(journal_cjf *jnl, s16 entries); /** * Loads (or rebuilds) the table of indexes (IDXT) * * @param jnl */ void journal_cjf_idxt_load(journal_cjf *jnl); u32 journal_cjf_idxt_get_last_file_offset(journal_cjf *jnl); ya_result journal_cjf_idxt_get_page_serial_from_index(journal_cjf *jnl, int idx); ya_result journal_cjf_idxt_get_page_offset_from_serial(journal_cjf *jnl, u32 serial, u32 *file_offset); ya_result journal_cjf_idxt_get_page_index_from_serial(journal_cjf *jnl, u32 serial); ya_result journal_cjf_idxt_get_page_serial_to(journal_cjf *jnl, int idx); u32 journal_cjf_idxt_get_page_offset(journal_cjf *jnl, int idx); static inline u32 journal_cjf_idxt_get_page_count(journal_cjf *jnl) { return jnl->idxt.count; } yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3_name_error.h0000644000077100007710000000012412650131756024314 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.226344 30 ctime=1454597652.065344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3_name_error.h0000664000077100007710000000633712650131756024132 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NSEC3_NAME_ERROR_H #define _NSEC3_NAME_ERROR_H #include #ifdef __cplusplus extern "C" { #endif /** * Z-Allocates and creates an NSEC3 record from an nsec3_zone_item * * This record is temporary. * * The function is supposed to be called by nsec3_name_error & nsec3_nodata_error * Said functions are called by the query function * * The record is supposed to be destroyed after usage (ie: at destroy query answer) * */ void nsec3_name_error(const zdb_zone *zone, const dnsname_vector *qname, u32 apex_index, u8 * restrict * pool, u8 **out_next_closer_nsec3_owner_p, zdb_packed_ttlrdata** out_encloser_nsec3, const zdb_packed_ttlrdata** out_encloser_nsec3_rrsig, u8 **out_closest_encloser_nsec3_owner_p, zdb_packed_ttlrdata** out_closest_encloser_nsec3, const zdb_packed_ttlrdata** out_closest_encloser_nsec3_rrsig, u8 **out_wild_closest_encloser_nsec3_owner_p, zdb_packed_ttlrdata** out_wild_closest_encloser_nsec3, const zdb_packed_ttlrdata** out_wild_closest_encloser_nsec3_rrsig ); #ifdef __cplusplus } #endif #endif /* _NSEC3_NAME_ERROR_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/journal-cjf-page-cache.h0000644000077100007710000000012412650131756025255 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.207344 30 ctime=1454597652.030344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/journal-cjf-page-cache.h0000664000077100007710000000747312650131756025075 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once #include #if !JOURNAL_CJF_BASE #error "internal include for the CJF journal, don't use include it" #endif #ifdef __cplusplus extern "C" { #endif #define CJF_SECTION_INDEX_SLOT_HEAD 16 #define CJF_SECTION_INDEX_SLOT_SIZE 8 #define CJF_SECTION_INDEX_SLOT_COUNT 510 #define CJF_SECTION_INDEX_SIZE (CJF_SECTION_INDEX_SLOT_HEAD + CJF_SECTION_INDEX_SLOT_SIZE * CJF_SECTION_INDEX_SLOT_COUNT) // 4KB #define CJF_PAGE_SIZE_IN_BYTE (CJF_SECTION_INDEX_SLOT_HEAD + (CJF_SECTION_INDEX_SLOT_COUNT * CJF_SECTION_INDEX_SLOT_SIZE)) #define CJF_PAGE_ARBITRARY_UPDATE_SIZE 512 struct journal_cjf_page_tbl_header { u32 magic; u32 next_page_offset; u16 count; u16 size; u32 stream_end_offset; u8 __end_of_struct__; }; typedef struct journal_cjf_page_tbl_header journal_cjf_page_tbl_header; #define JOURNAL_CJF_PAGE_HEADER_SIZE offsetof(journal_cjf_page_tbl_header,__end_of_struct__) struct journal_cjf_page_tbl_item { u32 ends_with_serial; // the last SOA on the stream for this item has this serial u32 stream_file_offset; /// @todo THIS MUST BE EXACTLY 8 BYTES LONG ! }; typedef struct journal_cjf_page_tbl_item journal_cjf_page_tbl_item; #define JOURNAL_CJF_PAGE_ITEM_SIZE 8 void journal_cjf_page_cache_init(); void journal_cjf_page_cache_flush(int fd); void journal_cjf_page_cache_close(int fd); void journal_cjf_page_cache_write_item(int fd, u64 file_offset, s16 offset, const journal_cjf_page_tbl_item *value); void journal_cjf_page_cache_read_item(int fd, u64 file_offset, s16 offset, journal_cjf_page_tbl_item *value); void journal_cjf_page_cache_write_new_header(int fd, u64 file_offset); void journal_cjf_page_cache_write_header(int fd, u64 file_offset, const journal_cjf_page_tbl_header *value); void journal_cjf_page_cache_read_header(int fd, u64 file_offset, journal_cjf_page_tbl_header *value); void journal_cjf_page_cache_flush_page(int fd, u64 file_offset); void journal_cjf_page_cache_clear(int fd, u64 file_offset); #ifdef __cplusplus } #endif /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb-zone-answer-ixfr.h0000644000077100007710000000012412650131756025063 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.162344 30 ctime=1454597652.186344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb-zone-answer-ixfr.h0000664000077100007710000000501612650131756024672 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbdnssec DNSSEC functions * @ingroup dnsdb * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #pragma once #include #include #include /** * * @param zone * @param mesg * @param tp * @param max_packet_size * @param max_record_by_packet * @param compress_packets */ void zdb_zone_answer_ixfr(zdb_zone *zone, message_data *mesg, struct thread_pool_s *network_tp, struct thread_pool_s *disk_tp, u16 max_packet_size, u16 max_record_by_packet, bool compress_packets); /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec3_nodata_error.h0000644000077100007710000000012412650131756024642 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.217344 30 ctime=1454597652.069344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec3_nodata_error.h0000664000077100007710000000723112650131756024452 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NSEC3_NODATA_ERROR_H #define _NSEC3_NODATA_ERROR_H #include #ifdef __cplusplus extern "C" { #endif void nsec3_nodata_error(const zdb_zone *zone, const zdb_rr_label* owner, const dnsname_vector *qname, s32 apex_index, u8 * restrict * pool, u8 **out_owner_nsec3_owner_p, zdb_packed_ttlrdata** out_owner_nsec3, const zdb_packed_ttlrdata** out_owner_nsec3_rrsig, u8 **out_closest_encloser_nsec3_owner_p, zdb_packed_ttlrdata** out_closest_encloser_nsec3, const zdb_packed_ttlrdata** out_closest_encloser_nsec3_rrsig); void nsec3_wild_nodata_error(const zdb_zone* zone, const zdb_rr_label* owner, const dnsname_vector *qname, u32 apex_index, u8 * restrict * pool, u8 **out_next_closer_nsec3_owner_p, zdb_packed_ttlrdata** out_encloser_nsec3, const zdb_packed_ttlrdata** out_encloser_nsec3_rrsig, u8 **out_closest_encloser_nsec3_owner_p, zdb_packed_ttlrdata** out_closest_encloser_nsec3, const zdb_packed_ttlrdata** out_closest_encloser_nsec3_rrsig, u8 **out_wild_closest_encloser_nsec3_owner_p, zdb_packed_ttlrdata** out_wild_closest_encloser_nsec3, const zdb_packed_ttlrdata** out_wild_closest_encloser_nsec3_rrsig ); #ifdef __cplusplus } #endif #endif /* _NSEC3_NODATA_ERROR_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb_zone_write.h0000644000077100007710000000012412650131756024114 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.225344 30 ctime=1454597652.221344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb_zone_write.h0000664000077100007710000000505012650131756023721 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _ZDB_WRITE_ZONE_H #define _ZDB_WRITE_ZONE_H #include #include #ifdef __cplusplus extern "C" { #endif ya_result zdb_zone_write_text(const zdb_zone* zone, output_stream *fos, bool force_label); ya_result zdb_zone_write_text_file(const zdb_zone* zone, const char* output_file, bool force_label); ya_result zdb_zone_write_unbound(const zdb_zone* zone, const char* output_file); #ifdef __cplusplus } #endif #endif /* _ZDB_WRITE_ZONE_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/zdb-zone-answer-axfr.h0000644000077100007710000000012412650131756025053 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.246344 30 ctime=1454597652.183344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/zdb-zone-answer-axfr.h0000664000077100007710000000502612650131756024663 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbdnssec DNSSEC functions * @ingroup dnsdb * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #pragma once #include #include #include /** * * @param zone * @param mesg * @param tp * @param max_packet_size * @param max_record_by_packet * @param compress_packets */ void zdb_zone_answer_axfr(zdb_zone *zone, message_data *mesg, struct thread_pool_s *network_tp, struct thread_pool_s *disk_tp, u16 max_packet_size, u16 max_record_by_packet, bool compress_packets); /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/nsec_common.h0000644000077100007710000000012412650131756023370 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.209344 30 ctime=1454597652.095344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/nsec_common.h0000664000077100007710000000467212650131756023206 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec NSEC functions * @ingroup dnsdbdnssec * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #ifndef _NSEC_COMMON_H #define _NSEC_COMMON_H #include #include #include #include #ifdef __cplusplus extern "C" { #endif u32 type_bit_maps_initialize(type_bit_maps_context* context, zdb_rr_label* label, bool force_nsec, bool force_rrsig); #ifdef __cplusplus } #endif #endif /* _NSEC_COMMON_H */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/xfr_copy.h0000644000077100007710000000012412650131756022721 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.232344 30 ctime=1454597652.110344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/xfr_copy.h0000664000077100007710000000605312650131756022532 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup dnscore * @brief * * @{ */ #ifndef XFR_H #define XFR_H #include #include #include #ifdef __cplusplus extern "C" { #endif #define XFR_FULL_FILE_MODE 0600 #ifndef _DIRENT_HAVE_D_TYPE #ifndef DT_UNKNOWN #define DT_UNKNOWN 0 #endif #ifndef DT_REG #define DT_REG 8 #endif #endif /** * Fixes an issue with the dirent not always set as expected. * * The type can be set to DT_UNKNOWN instead of file or directory. * In that case the function will call stats to get the type. */ u8 dirent_get_file_type(const char* folder, struct dirent *entry); /** * * Deletes the AXFR wire dumps of a zone. Hashed folders are not removed. * * @param origin * @param base_data_path where to remove the file from (and its hashed folders) * @return */ ya_result xfr_delete_axfr(const u8 *origin); /** * * Copies an AXFR stream from an XFR (xfr_input_stream) into a wire dump (.axfr) * * @param xis the xfr_input_stream * @param base_data_path where to put the file (and its hashed folder) * * @return an error code */ ya_result xfr_copy(input_stream *xis, const char *base_data_path); #ifdef __cplusplus } #endif #endif /* XFR_H */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/PaxHeaders.8028/dictionary-node.h0000644000077100007710000000012412650131756024160 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.230344 30 ctime=1454597651.962344534 yadifa-2.1.6-5826/lib/dnsdb/include/dnsdb/dictionary-node.h0000664000077100007710000000513612650131756023772 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Hash-based collection designed to change it's structure to improve speed. * * Hash-based collection designed to change it's structure to improve speed. * * @{ */ #pragma once #include #include #if DICTIONARY_NODE_MODE == 0 /** * @brief All dictionary object/data/nodes MUST and will begin with/like this. * * All dictionary object/data/nodes MUST and will begin with/like this. * The first sizeof(void*) bytes are used for a single-linked list "next" pointer. * */ struct dictionary_node { dictionary_node* next; }; #else union dictionary_node { dictionary_node *next; zdb_rr_label *rr_label; zdb_zone_label *zone_label; }; #endif /** @} */ yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/aclocal.m40000644000077100007710000000013212654662623020047 xustar000000000000000030 mtime=1454597523.398344535 30 atime=1454597523.398344535 30 ctime=1454597651.940344534 yadifa-2.1.6-5826/lib/dnsdb/aclocal.m40000664000077100007710000012636712654662623017674 0ustar00yadifayadifa00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_AR([ACT-IF-FAIL]) # ------------------------- # Try to determine the archiver interface, and trigger the ar-lib wrapper # if it is needed. If the detection of archiver interface fails, run # ACT-IF-FAIL (default is to abort configure with a proper error message). AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], [AC_LANG_PUSH([C]) am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a ]) AC_LANG_POP([C])]) case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) m4_default([$1], [AC_MSG_ERROR([could not determine $AR interface])]) ;; esac AC_SUBST([AR])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file 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. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/ltmain.sh0000644000077100007710000000013012473714653020025 xustar000000000000000029 mtime=1424988587.71705841 29 atime=1424988587.71705841 30 ctime=1454597652.279344534 yadifa-2.1.6-5826/lib/dnsdb/ltmain.sh0000644000077100007710000117077112473714653017651 0ustar00yadifayadifa00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.6 package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # 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 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # 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 "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # 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 3 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --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 --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message 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. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # 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= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE 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. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # 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 () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` 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 "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # 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. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # 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 func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # 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= pie_flag= 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) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append 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,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append 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. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; 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 no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock 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 yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; 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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [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: $progname [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 -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler 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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [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 -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -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 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -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 -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -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] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) 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: $progname [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." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" 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 -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # 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 else 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 else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" 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" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; 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. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append 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 -e "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. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_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 test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append 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 func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_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 func_basename "$file" destfile=$func_basename_result 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 func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "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) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # 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/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) 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*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; 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 "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # 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. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd 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 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac 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_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= 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 func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result 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 func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_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've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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. sed_quote_subst='$sed_quote_subst' # Be 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 variables: generated_by_libtool_version='$macro_version' 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 file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ 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 "\ # 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 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # 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 \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} 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 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #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 # define FOPEN_WB "wb" # 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 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ 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]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); 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 = (size_t) (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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } 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 (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" 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 func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" 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 # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir 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 func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework 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*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # 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-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext 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 ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" 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. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'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\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. 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 $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; 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 $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append 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 notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; 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 .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # 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 yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else 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 use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # 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 func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" 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. func_append dlprefiles " $lib $dependency_libs" else func_append 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 func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && 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 func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || 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 *"$absdir:"*) ;; *) func_append 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && 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 built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; 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 lib = "$linkmode" && test yes = "$hardcode_into_libs"; 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 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* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' 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 prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; 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 (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; 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 elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; 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 yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; 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 [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; 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 prog = "$linkmode"; 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 unsupported != "$hardcode_direct"; 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 yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; 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 cannot 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 yes = "$module"; 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 no = "$build_old_libs"; 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 lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # 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 "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=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 "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # 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 func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; 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 test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # 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=$1 number_minor=$2 number_revision=$3 # # 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 # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; esac ;; no) current=$1 revision=$2 age=$3 ;; 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]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" 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 func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result 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 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; 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 no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; 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 | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "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 func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; 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 "*) ;; *) func_append 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 "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-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 yes = "$build_libtool_need_lc"; then func_append 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. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi 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 "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append 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 func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; 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 ;; esac ;; 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 with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; 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 no = "$build_old_libs"; 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 no = "$allow_undefined"; 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 no = "$build_old_libs"; 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 # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append 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 yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append 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 "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append 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 relink = "$opt_mode" || 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 shift realname=$1 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 func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "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" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && 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 : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # 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 func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result 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~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "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 $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } 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\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && 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 fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( 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 relink = "$opt_mode"; then $opt_dry_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 func_show_eval '${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 func_show_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 yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_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= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${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" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append 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 "*) ;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append 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 yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } 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 func_append 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 func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result 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 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # 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 func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$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 eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$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= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; 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 "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; 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) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_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 no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false 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) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; 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 $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where 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 build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/VERSION0000644000077100007710000000012412652141712017245 xustar000000000000000027 mtime=1453900746.981001 27 atime=1454597464.249344 30 ctime=1454597651.943344534 yadifa-2.1.6-5826/lib/dnsdb/VERSION0000664000077100007710000000000612652141712017046 0ustar00yadifayadifa000000000000002.1.6 yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/configure.ac0000644000077100007710000000013212654662532020474 xustar000000000000000030 mtime=1454597466.823344534 30 atime=1454597466.822344534 30 ctime=1454597651.936344534 yadifa-2.1.6-5826/lib/dnsdb/configure.ac0000664000077100007710000001236012654662532020304 0ustar00yadifayadifa00000000000000dnl ############################################################################ dnl dnl Copyright (c) 2011-2016, EURid. All rights reserved. dnl The YADIFA TM software product is provided under the BSD 3-clause license: dnl dnl Redistribution and use in source and binary forms, with or without dnl modification, are permitted provided that the following conditions dnl are met: dnl dnl * Redistributions of source code must retain the above copyright dnl notice, this list of conditions and the following disclaimer. dnl * Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in dnl the documentation and/or other materials provided with the dnl distribution. dnl * Neither the name of EURid nor the names of its contributors may be dnl used to endorse or promote products derived from this software dnl without specific prior written permission. dnl dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN dnl CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE dnl POSSIBILITY OF SUCH DAMAGE. dnl dnl ############################################################################## AC_PREREQ(2.61) AC_REVISION([$Revision: 5826 $]) AC_INIT([dnsdb],m4_esyscmd([svn info 2> /dev/null | grep 'Last Changed Rev: ' | sed -re 's/.*: (.*)/Revision: \1 $/' -e 's/^/$/' >> revision.txt;echo $(cat VERSION)-$(grep \$Revision: * | sed -e 's/^.*\$Revision: *//' -e 's/\$.*//' -e 's/ *//' | sort -n | /usr/bin/tail -1 | tr -d '\n') | tr -d '\n']),[bugreport@yadifa.eu]) echo echo echo "DNSDB START" echo "-----------" echo echo m4_include([../../m4/eurid.m4]) m4_include([../../m4/yadifa.m4]) AC_CONFIG_AUX_DIR([.]) AM_INIT_AUTOMAKE([subdir-objects -Wall -Werror tar-pax]) AC_CONFIG_HEADER([include/dnsdb/dnsdb-config.h]) AC_CONFIG_MACRO_DIR([m4]) dnl AC_DEFUN([SYSCONF], [/$prefix/PACKAGE/PACKAGE.conf]) AC_CANONICAL_BUILD dnl Checks for programs. dnl m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AM_PROG_AR AC_PROG_CC AM_PROG_CC_C_O LT_INIT([disable-shared]) AC_DARWIN_LIBTOOL AC_PROG_LIBTOOL dnl Checks for libraries. AC_CHECK_LIB([c], [printf]) AC_CHECK_LIB([pthread], [pthread_mutex_init]) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h]) dnl Check for Darwin or Linux AC_CHECK_HEADERS([linux/limits.h i386/limits.h ppc/limits.h]) dnl Check for Darwin or Linux AC_CHECK_HEADERS([sys/types.h i386/types.h]) dnl AC_CHECK_HEADERS([sys/socket.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_BIGENDIAN AC_TYPE_MODE_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_STRUCT_TM dnl AC_PROG_RANLIB AC_CHECK_TYPES(uint64_t) AC_CHECK_TYPES(int64_t) AC_CHECK_TYPES(long long) AC_CHECK_TYPES(u_char) AC_SYS_LARGEFILE AC_COMPILER_CHECK AC_PTHREAD_SPINLOCK_CHECK AC_PTHREAD_SETNAME_NP_CHECK AC_YADIFA_FEATURES AC_YADIFA_ENABLE_DNSCORE AC_YADIFA_ADD_LIBS AC_CHECK_LTO CPPFLAGS="$CPPFLAGS -DDNSDB_BUILD" dnl option: DEFAULT_ASSUMED_CPU_COUNT 2 dnl Checks for library functions. AC_FUNC_FORK dnl AC_FUNC_MALLOC does weird things: dnl http://sources.redhat.com/ml/automake/2003-05/msg00023.html dnl http://www.mail-archive.com/autoconf@gnu.org/msg08935.html dnl AC_FUNC_MALLOC goals: dnl malloc(0) will not return NULL dnl realloc(NULL,x) will not crash (occurs on rare systems) dnl dnl AC_FUNC_MALLOC AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_FUNC_STAT AC_CHECK_FUNCS([bzero memset select socket]) AC_CONFIG_FILES([Makefile]) dnl AC_YADIFA_SUMMARY AC_OUTPUT dnl ---------------------------------------------------------------------------- AC_MAKE_BUILDINFO echo echo "SUMMARY for DNSDB:" echo "------------------" echo echo "CC .................................. : $CC" echo "LD .................................. : $LD" echo "AR .................................. : $AR" echo "CFLAGS .............................. : $CFLAGS" echo "CPPFLAGS ............................ : $CPPFLAGS" echo "LDFLAGS ............................. : $LDFLAGS" echo "LIBS ................................ : $LIBS" if [[ ! "${OPENSSL}" = "" ]] then echo "Using OpenSLL from .................. : ${OPENSSL}" fi echo echo "Install prefix ...................... : $prefix" echo "Install sysconf ..................... : $sysconfdir" echo "NSEC ................................ : $enable_nsec" echo "NSEC3 ............................... : $enable_nsec3" echo "TSIG ................................ : $enable_tsig" echo "caching ............................. : $enable_caching" echo echo echo "DNSDB DONE" echo "----------" echo echo yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/config.sub0000644000077100007710000000013212473710127020157 xustar000000000000000030 mtime=1424986199.159058409 30 atime=1424986199.159058409 30 ctime=1454597652.267344534 yadifa-2.1.6-5826/lib/dnsdb/config.sub0000755000077100007710000010622312473710127017772 0ustar00yadifayadifa00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-12-03' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/m40000644000077100007710000000013212654663023016445 xustar000000000000000030 mtime=1454597651.932344534 30 atime=1454597651.901344534 30 ctime=1454597651.932344534 yadifa-2.1.6-5826/lib/dnsdb/m4/0000775000077100007710000000000012654663023016330 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnsdb/m4/PaxHeaders.8028/ltsugar.m40000644000077100007710000000013012473714653020450 xustar000000000000000029 mtime=1424988587.49005841 29 atime=1424988587.49005841 30 ctime=1454597651.924344534 yadifa-2.1.6-5826/lib/dnsdb/m4/ltsugar.m40000644000077100007710000001044012473714653020255 0ustar00yadifayadifa00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) yadifa-2.1.6-5826/lib/dnsdb/m4/PaxHeaders.8028/ltversion.m40000644000077100007710000000013012473714653021014 xustar000000000000000029 mtime=1424988587.51105841 29 atime=1424988587.51105841 30 ctime=1454597651.928344534 yadifa-2.1.6-5826/lib/dnsdb/m4/ltversion.m40000644000077100007710000000127312473714653020625 0ustar00yadifayadifa00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file 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. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) yadifa-2.1.6-5826/lib/dnsdb/m4/PaxHeaders.8028/libtool.m40000644000077100007710000000013012473714653020433 xustar000000000000000029 mtime=1424988587.40405841 29 atime=1424988587.40305841 30 ctime=1454597651.916344534 yadifa-2.1.6-5826/lib/dnsdb/m4/libtool.m40000644000077100007710000112507312473714653020252 0ustar00yadifayadifa00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS yadifa-2.1.6-5826/lib/dnsdb/m4/PaxHeaders.8028/ltoptions.m40000644000077100007710000000013012473714653021022 xustar000000000000000029 mtime=1424988587.46805841 29 atime=1424988587.46805841 30 ctime=1454597651.920344534 yadifa-2.1.6-5826/lib/dnsdb/m4/ltoptions.m40000644000077100007710000003426212473714653020637 0ustar00yadifayadifa00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) yadifa-2.1.6-5826/lib/dnsdb/m4/PaxHeaders.8028/lt~obsolete.m40000644000077100007710000000013012473714653021341 xustar000000000000000029 mtime=1424988587.53205841 29 atime=1424988587.53205841 30 ctime=1454597651.932344534 yadifa-2.1.6-5826/lib/dnsdb/m4/lt~obsolete.m40000644000077100007710000001377412473714653021163 0ustar00yadifayadifa00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/install-sh0000644000077100007710000000013212473710127020200 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597652.274344534 yadifa-2.1.6-5826/lib/dnsdb/install-sh0000755000077100007710000003452312473710127020016 0ustar00yadifayadifa00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # 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. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # 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_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 is_target_a_directory=possibly 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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi 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 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac 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 if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 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 problematic for 'test' and other utilities. 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 # 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 "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` 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-writable 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 oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && 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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/NEWS0000644000077100007710000000012412610121331016661 xustar000000000000000027 mtime=1444979417.160777 27 atime=1454597464.476344 30 ctime=1454597652.247344534 yadifa-2.1.6-5826/lib/dnsdb/NEWS0000664000077100007710000000001312610121331016460 0ustar00yadifayadifa00000000000000see README yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/src0000644000077100007710000000013212654663024016715 xustar000000000000000030 mtime=1454597652.557344534 30 atime=1454597651.901344534 30 ctime=1454597652.557344534 yadifa-2.1.6-5826/lib/dnsdb/src/0000775000077100007710000000000012654663024016600 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_zone_update_ixfr.c0000644000077100007710000000012412650131756023341 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.355344 30 ctime=1454597652.466344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_zone_update_ixfr.c0000664000077100007710000004211512650131756023151 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include "dnsdb/zdb.h" #include "dnsdb/zdb_types.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_zone_label.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb-zone-arc.h" #include #if ZDB_HAS_NSEC3_SUPPORT!=0 #include "dnsdb/nsec3_icmtl.h" #include "dnsdb/nsec3_load.h" #endif #include #define DUMP_ICMTL_UPDATE 0 #if DUMP_ICMTL_UPDATE != 0 #include #endif /** * @brief Updates a zone from an IXFR input stream * * Updates a zone from an IXFR input stream * * The function does not closes the input stream * * If the IXFR is wrong, the zone will be messed up. * Please check that the general structure of the stream is right * before calling this. * * SOA x+n * SOA x+0 * ... * SOA x+1 * ... * * SOA x+1 * ... * SOA x+2 * ... * SOA x+n * * * * @param[in] db a pointer to the database * @param[in] is a pointer to an input stream containing the IXFR * * @return an error code */ ya_result zdb_zone_update_ixfr(zdb *db, input_stream *is) // mutex checked { u8 rname[MAX_DOMAIN_LENGTH]; u16 rtype; u16 rclass; u32 rttl; u16 rdata_size; u8* rdata; zdb_packed_ttlrdata* soa_ttlrdata; zdb_packed_ttlrdata* tmp_ttlrdata; zdb_packed_ttlrdata* ttlrdata; dnsname_vector name; dnsname_vector entry_name; ya_result err; /* Get the first SOA */ if(FAIL(err = input_stream_read_rr_header(is, rname, sizeof (rname), &rtype, &rclass, &rttl, &rdata_size))) { return err; } if(rtype != TYPE_SOA) { return ZDB_ERROR_GENERAL; } DEBUG_RESET_dnsname(name); dnsname_to_dnsname_vector(rname, &name); ZDB_RECORD_ZALLOC_EMPTY(soa_ttlrdata, rttl, rdata_size); if(FAIL(err = input_stream_read_fully(is, ZDB_PACKEDRECORD_PTR_RDATAPTR(soa_ttlrdata), rdata_size))) { ZDB_RECORD_ZFREE(soa_ttlrdata); return err; } #ifdef DEBUG #if DUMP_ICMTL_UPDATE != 0 if(err != 0) { format("zdb_zone_update_ixfr H: %{dnsname} %d %{dnsclass} %{dnstype} ", rname, rttl, &rclass, &rtype); print_rdata(rtype, ZDB_PACKEDRECORD_PTR_RDATAPTR(soa_ttlrdata), rdata_size); println(""); } #endif #endif u32 serial_first; if(FAIL(err = rr_soa_get_serial(soa_ttlrdata->rdata_start, soa_ttlrdata->rdata_size, &serial_first))) { ZDB_RECORD_ZFREE(soa_ttlrdata); return err; } #if 0 /* fix */ #else zdb_zone *zone = zdb_acquire_zone_read(db, &name); if(zone == NULL) { /* Not loaded */ ZDB_RECORD_ZFREE(soa_ttlrdata); return ZDB_ERROR_GENERAL; } #endif u32 serial_current; if(FAIL(err = zdb_zone_getserial(zone, &serial_current))) { ZDB_RECORD_ZFREE(soa_ttlrdata); return err; } #if ZDB_HAS_NSEC3_SUPPORT != 0 nsec3_load_context nsec3_context; nsec3_load_init(&nsec3_context, zone); #endif MALLOC_OR_DIE(zdb_packed_ttlrdata*, tmp_ttlrdata, sizeof (zdb_ttlrdata) + RDATA_MAX_LENGTH, ZDB_RDATABUF_TAG); /* We do not need tmp_ttlrdata and rdata at the same time, let's spare memory */ rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(tmp_ttlrdata); /* Read the next SOA (sub or end) */ if(FAIL(err = input_stream_read_rr_header(is, rname, sizeof (rname), &rtype, &rclass, &rttl, &rdata_size))) { zdb_zone_release(zone); ZDB_RECORD_ZFREE(soa_ttlrdata); free(tmp_ttlrdata); return err; } if(rtype != TYPE_SOA) { zdb_zone_release(zone); ZDB_RECORD_ZFREE(soa_ttlrdata); free(tmp_ttlrdata); return ZDB_ERROR_GENERAL; } for(;;) { if(FAIL(err = input_stream_read_fully(is, rdata, rdata_size))) { break; } #ifdef DEBUG #if DUMP_ICMTL_UPDATE != 0 if(err != 0) { format("zdb_zone_update_ixfr F: %{dnsname} %d %{dnsclass} %{dnstype} ", rname, rttl, &rclass, &rtype); print_rdata(rtype, rdata, rdata_size); println(""); } #endif #endif /* The SOA serial is supposed to match our current one or the first one * * If it's the first one, then the task is done * * If it's the current one, we are moving forward * * If it's something else, there is an error * */ u32 serial_from; if(FAIL(err = rr_soa_get_serial(rdata, rdata_size, &serial_from))) { break; } /* Check the serial */ if(serial_from != serial_current) { if(serial_from == serial_first) { /* IXFR done */ err = SUCCESS; break; } /* Serial sequence is not right */ err = ZDB_ERROR_GENERAL; break; } tmp_ttlrdata->ttl = rttl; tmp_ttlrdata->rdata_size = rdata_size; zdb_zone_record_delete(zone, NULL, -1, TYPE_SOA, tmp_ttlrdata); for(;;) { /* Load the next record without the data (sub) */ if(FAIL(err = input_stream_read_rr_header(is, rname, sizeof (rname), &rtype, &rclass, &rttl, &rdata_size))) { break; } /* If we got an SOA, it's the one that starts the "add" sequence */ if(rtype == TYPE_SOA) { break; } /* Load the data */ if(FAIL(err = input_stream_read_fully(is, rdata, rdata_size))) { break; } #ifdef DEBUG #if DUMP_ICMTL_UPDATE != 0 if(err != 0) { format("zdb_zone_update_ixfr R: %{dnsname} %d %{dnsclass} %{dnstype} ", rname, rttl, &rclass, &rtype); print_rdata(rtype, rdata, rdata_size); println(""); } #endif #endif tmp_ttlrdata->ttl = rttl; tmp_ttlrdata->rdata_size = rdata_size; /* The vector is not always required, but it's so much easier to * read putting it here */ DEBUG_RESET_dnsname(entry_name); dnsname_to_dnsname_vector(rname, &entry_name); #if ZDB_HAS_NSEC3_SUPPORT != 0 if(rtype == TYPE_NSEC3PARAM) { /* Remove it from the zone */ zdb_zone_record_delete(zone, name.labels, (entry_name.size - name.size) - 1, rtype, tmp_ttlrdata); /* Destroy the whole NSEC3 collection associated to the NSEC3PARAM */ nsec3_remove_nsec3param_by_record(zone, tmp_ttlrdata); continue; } if(rtype == TYPE_NSEC3) { /* Remove the NSEC3 label (and its signature) * * The previous record will have its signature changed, no doubt. * But I cannot edit the previous one about this. * Since we are in an IXFR, the previous NSEC3 is supposed to be * removed too, until one of the previous is also added in the * next section (soa add) * * zdb_zone_record_delete is not the right call, it's * * nsec3_... * */ nsec3_remove_nsec3(zone, tmp_ttlrdata); continue; } if(rtype == TYPE_RRSIG) { if((GET_U16_AT(*rdata)) == TYPE_NSEC3) /** @note : NATIVETYPE */ { /* Remove the RRSIG from the NSEC3 label * * zdb_zone_record_delete is not the right call, it's * * nsec3_... * */ nsec3_remove_rrsig(zone, tmp_ttlrdata); continue; } } #endif /* Remove from the zone */ zdb_zone_record_delete(zone, name.labels, (entry_name.size - name.size) - 1, rtype, tmp_ttlrdata); } /* Remove records */ /* The current header is the "ADD" SOA */ if(FAIL(err = input_stream_read_fully(is, rdata, rdata_size))) { break; } #ifdef DEBUG #if DUMP_ICMTL_UPDATE != 0 if(err != 0) { format("zdb_zone_update_ixfr T: %{dnsname} %d %{dnsclass} %{dnstype} ", rname, rttl, &rclass, &rtype); print_rdata(rtype, rdata, rdata_size); println(""); } #endif #endif /* The SOA serial is supposed to be bigger than the previous one */ u32 serial_to; if(FAIL(err = rr_soa_get_serial(rdata, rdata_size, &serial_to))) { break; } /* * After the "add" sequence is done, serial_current will be serial_to */ do { /* Load the record without the data (add) */ if(FAIL(err = input_stream_read_rr_header(is, rname, sizeof (rname), &rtype, &rclass, &rttl, &rdata_size))) { break; } #if ZDB_HAS_NSEC3_SUPPORT != 0 if(rtype == TYPE_NSEC3PARAM) { /* Load the data */ if(FAIL(err = input_stream_read_fully(is, rdata, rdata_size))) { break; } #ifdef DEBUG #if DUMP_ICMTL_UPDATE != 0 if(err != 0) { format("zdb_zone_update_ixfr A: %{dnsname} %d %{dnsclass} %{dnstype} ", rname, rttl, &rclass, &rtype); print_rdata(rtype, rdata, rdata_size); println(""); } #endif #endif /* Add it to the nsec3 context */ nsec3_load_add_nsec3param(&nsec3_context, rdata, rdata_size); /* Add it to the zone */ DEBUG_RESET_dnsname(entry_name); dnsname_to_dnsname_vector(rname, &entry_name); ZDB_RECORD_ZALLOC(ttlrdata, rttl, rdata_size, rdata); zdb_zone_record_add(zone, entry_name.labels, (entry_name.size - name.size) - 1, rtype, ttlrdata); } else if(rtype == TYPE_NSEC3) { /* Load the data */ if(FAIL(err = input_stream_read_fully(is, rdata, rdata_size))) { break; } #ifdef DEBUG #if DUMP_ICMTL_UPDATE != 0 if(err != 0) { format("zdb_zone_update_ixfr A: %{dnsname} %d %{dnsclass} %{dnstype} ", rname, rttl, &rclass, &rtype); print_rdata(rtype, rdata, rdata_size); println(""); } #endif #endif /* Add it to the nsec3 context */ if(FAIL(err = nsec3_load_add_nsec3(&nsec3_context, rname, rttl, rdata, rdata_size))) { break; } } else if(rtype == TYPE_RRSIG) { /* Load the data */ if(FAIL(err = input_stream_read_fully(is, rdata, rdata_size))) { break; } #if DUMP_ICMTL_UPDATE != 0 if(err != 0) { format("zdb_zone_update_ixfr A: %{dnsname} %d %{dnsclass} %{dnstype} ", rname, rttl, &rclass, &rtype); print_rdata(rtype, rdata, rdata_size); println(""); } #endif if((GET_U16_AT(*rdata)) == TYPE_NSEC3) /** @note : NATIVETYPE */ { /* Add it to the nsec3 context */ if(FAIL(err = nsec3_load_add_rrsig(&nsec3_context, rname, rttl, rdata, rdata_size))) { break; } } else { /* Add it to the zone */ DEBUG_RESET_dnsname(entry_name); dnsname_to_dnsname_vector(rname, &entry_name); ZDB_RECORD_ZALLOC(ttlrdata, rttl, rdata_size, rdata); zdb_zone_record_add(zone, entry_name.labels, (entry_name.size - name.size) - 1, rtype, ttlrdata); } } else { #endif /* Add it to the zone */ ZDB_RECORD_ZALLOC_EMPTY(ttlrdata, rttl, rdata_size); if(FAIL(err = input_stream_read_fully(is, ZDB_PACKEDRECORD_PTR_RDATAPTR(ttlrdata), rdata_size))) { break; } #ifdef DEBUG #if DUMP_ICMTL_UPDATE != 0 if(err != 0) { format("zdb_zone_update_ixfr A: %{dnsname} %d %{dnsclass} %{dnstype} ", rname, rttl, &rclass, &rtype); print_rdata(rtype, ttlrdata->rdata_start, rdata_size); println(termout, ""); } #endif #endif DEBUG_RESET_dnsname(entry_name); dnsname_to_dnsname_vector(rname, &entry_name); zdb_zone_record_add(zone, entry_name.labels, (entry_name.size - name.size) - 1, rtype, ttlrdata); /* class is implicit */ #if ZDB_HAS_NSEC3_SUPPORT != 0 } #endif } while(rtype != TYPE_SOA); /* * The record is either the first of another SOA pair (sub, add) * Either the final one. */ /* Update the current serial */ serial_current = serial_to; break; } free(tmp_ttlrdata); if(ISOK(err)) { /* * soa_ttlrdata is the new SOA */ zdb_zone_record_add(zone, NULL, -1, TYPE_SOA, soa_ttlrdata); #if ZDB_HAS_NSEC3_SUPPORT != 0 /** * Check if there is both NSEC & NSEC3. Reject if yes. * compile NSEC if any * compile NSEC3 if any * * @todo: I'm only doing NSEC3 here. Do NSEC as well. */ err = nsec3_load_compile(&nsec3_context); if((nsec3_context.nsec3_rejected > 0)||(nsec3_context.nsec3_discarded > 0)) { err = DNSSEC_ERROR_NSEC3_INVALIDZONESTATE; } if(ISOK(err)) { zdb_zone_release(zone); nsec3_load_destroy(&nsec3_context); #endif /// @todo edf 20141008 -- why is this done here ? The zone comes from the label already : zone_label->zone = zone; return err; #if ZDB_HAS_NSEC3_SUPPORT != 0 } #endif } zdb_zone_release(zone); #if ZDB_HAS_NSEC3_SUPPORT != 0 nsec3_load_destroy(&nsec3_context); #endif /** * @note : do NOT use these to unload a zone. * zdb_zone_label_delete(db, &name, zone->zclass); * zdb_zone_destroy(zone); */ // zdb_zone_getclass(zone) zdb_zone *old_zone = zdb_remove_zone(db, &name); if(old_zone != NULL) { zdb_zone_release(old_zone); } return err; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_zone_load.c0000644000077100007710000000012412650131756021746 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.387344 30 ctime=1454597652.447344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_zone_load.c0000664000077100007710000010522112650131756021554 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #if ZDB_HAS_DNSSEC_SUPPORT #include #endif #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_zone_label.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_icmtl.h" #include "dnsdb/zdb_sanitize.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_zone_write.h" #include "dnsdb/zdb_zone_label_iterator.h" #include "dnsdb/zdb-zone-find.h" #if ZDB_HAS_DNSSEC_SUPPORT #include "dnsdb/dnssec_keystore.h" #include "dnsdb/dnssec.h" #endif #if ZDB_HAS_NSEC3_SUPPORT #include "dnsdb/nsec3.h" #endif #if ZDB_HAS_NSEC_SUPPORT #include "dnsdb/nsec.h" #endif #include "dnsdb/zdb_zone_load.h" extern logger_handle *g_database_logger; #define MODULE_MSG_HANDLE g_database_logger void resource_record_init(resource_record* entry) { entry->next = NULL; entry->ttl = 0; entry->type = 0; entry->class = 0; entry->rdata_size = 0; entry->name[0] = 0; entry->name[1] = 0; } void resource_record_freecontent(resource_record* entry) { yassert(entry != NULL); } void resource_record_resetcontent(resource_record* entry) { yassert(entry != NULL); /* Resets the RDATA output stream so we can fill it again */ entry->rdata_size = 0; } s32 resource_record_size(resource_record* entry) { return entry->rdata_size + 10 + dnsname_len(entry->name); } /** * @brief Load a zone in the database. * * Load a zone in the database. * * @param[in] db a pointer to the database * @param[in] zone_data a pointer to an opened zone_reader * @param[out] zone_pointer_out will contains a pointer to the loaded zone if the call is successful * * @return an error code. * */ ya_result zdb_zone_load(zdb *db, zone_reader *zr, zdb_zone **zone_pointer_out, const u8 *expected_origin, u16 flags) { u8* rdata; size_t rdata_len; ya_result return_code; resource_record entry; u32 soa_min_ttl = 0; u32 soa_serial = 0; #if ZDB_HAS_DNSSEC_SUPPORT u32 has_optout = 0; u32 has_optin = 0; u64 wire_size = 0; bool nsec3_keys = FALSE; bool nsec_keys = FALSE; bool has_nsec3 = FALSE; bool has_nsec = FALSE; bool has_nsec3param = FALSE; bool has_dnskey = FALSE; bool has_rrsig = FALSE; #endif bool dynupdate_forbidden = FALSE; //bool modified = FALSE; #if ZDB_HAS_NSEC3_SUPPORT nsec3_load_context nsec3_context; #endif char origin_ascii[MAX_DOMAIN_TEXT_LENGTH + 1]; if(zone_pointer_out == NULL) { return INVALID_ARGUMENT_ERROR; } *zone_pointer_out = NULL; /* ------------------------------------------------------------ */ resource_record_init(&entry); if(FAIL(return_code = zone_reader_read_record(zr, &entry))) { resource_record_freecontent(&entry); /* destroys */ const char *message = zone_reader_get_last_error_message(zr); if(message == NULL) { log_err("zone load: reading zone %{dnsname}: %r", expected_origin, return_code); } else { log_err("zone load: reading zone %{dnsname}: %s: %r", expected_origin, message, return_code); } return return_code; } if(entry.type != TYPE_SOA) { /* bad */ resource_record_freecontent(&entry); /* destroys */ log_err("zone load: first record expected to be an SOA"); return ZDB_READER_FIRST_RECORD_NOT_SOA; } if(!(dnsname_locase_verify_charspace(entry.name) && dnsname_equals(entry.name, expected_origin))) { resource_record_freecontent(&entry); /* destroys */ log_err("zone load: zone is for domain %{dnsname} but %{dnsname} was expected", entry.name, expected_origin); return ZDB_READER_ANOTHER_DOMAIN_WAS_EXPECTED; } /* ------------------------------------------------------------ */ dnsname_vector name; DEBUG_RESET_dnsname(name); u16 zclass = entry.class; dnsname_to_dnsname_vector(entry.name, &name); /* ------------------------------------------------------------ */ /* A Create a non-existing label */ /* B insert new zone */ /* C load file into the new zone */ /* A */ if(((flags & ZDB_ZONE_MOUNT_ON_LOAD) != 0) && zdb_zone_exists(db, &name)) { /* Already loaded */ log_err("zone load: zone %{dnsnamevector} already loaded ", &name); resource_record_freecontent(&entry); /** destroys */ return ZDB_READER_ALREADY_LOADED; } rr_soa_get_minimumttl(zone_reader_rdata(entry), zone_reader_rdata_size(entry), &soa_min_ttl); rr_soa_get_serial(zone_reader_rdata(entry), zone_reader_rdata_size(entry), &soa_serial); dnsname_to_cstr(origin_ascii, entry.name); dynupdate_forbidden = FALSE; #if ZDB_HAS_DNSSEC_SUPPORT has_dnskey = FALSE; has_nsec3 = FALSE; has_nsec = FALSE; nsec3_keys = FALSE; nsec_keys = FALSE; has_nsec3param = FALSE; has_optout = 0; has_optin = 0; #endif /* B */ zdb_zone* zone; zone = zdb_zone_create(entry.name); // comes with an RC = 1, not locked if(zone == NULL) { log_err("zone load: unable to load zone %{dnsname} %{dnsclass}", entry.name, &zclass); return ZDB_ERROR_NOSUCHCLASS; } zdb_zone_lock(zone, ZDB_ZONE_MUTEX_LOAD); zone->min_ttl = soa_min_ttl; zone->axfr_serial = soa_serial - 1; /* ensure that the axfr on disk is not automatically taken in account later */ dnsname_to_dnsname_vector(zone->origin, &name); /*rr_entry_freecontent(&entry);*/ /* C */ #if ZDB_HAS_NSEC3_SUPPORT nsec3_load_init(&nsec3_context, zone); #endif zone->apex->flags |= ZDB_RR_APEX_LABEL_LOADING; zdb_packed_ttlrdata* ttlrdata; u32 loop_count; for(loop_count = 1;; loop_count++) { /* Add the entry */ if(dnscore_shuttingdown()) { return_code = STOPPED_BY_APPLICATION_SHUTDOWN; break; } dnsname_vector entry_name; DEBUG_RESET_dnsname(entry_name); dnsname_to_dnsname_vector(entry.name, &entry_name); s32 a_i, b_i; if((a_i = name.size) > (b_i = entry_name.size)) { // error return_code = ZDB_READER_WRONGNAMEFORZONE; log_err("zone load: domain name %{dnsnamestack} is too big", &entry_name); break; } /* ZONE ENTRY CHECK */ while(a_i >= 0) { const u8* a = name.labels[a_i--]; const u8* b = entry_name.labels[b_i--]; if(!dnslabel_equals(a, b)) { log_warn("zone load: bad domain name %{dnsnamestack} for zone %{dnsnamestack}", &entry_name, &name); //rr_entry_freecontent(&entry); goto zdb_zone_load_loop; } } if(FAIL(return_code)) { break; } rdata_len = zone_reader_rdata_size(entry); rdata = zone_reader_rdata(entry); #if ZDB_HAS_NSEC3_SUPPORT /* * SPECIAL NSEC3 support !!! * * If the record is an RRSIG(NSEC3), an NSEC3, or an NSEC3PARAM then * it cannot be handled the same way as the others. * */ if(entry.type == TYPE_NSEC3PARAM) { if(FAIL(return_code = nsec3_load_add_nsec3param(&nsec3_context, rdata, rdata_len))) { break; } ZDB_RECORD_ZALLOC(ttlrdata, /*entry.ttl*/0, rdata_len, rdata); zdb_zone_record_add(zone, entry_name.labels, (entry_name.size - name.size) - 1, entry.type, ttlrdata); has_nsec3param = TRUE; } else if(entry.type == TYPE_NSEC3) { bool rdata_optout = NSEC3_RDATA_IS_OPTOUT(rdata); if(rdata_optout) { has_optout++; } else { has_optin++; } if(FAIL(return_code = nsec3_load_add_nsec3(&nsec3_context, entry.name, entry.ttl, rdata, rdata_len))) { break; } has_nsec3 = TRUE; } else if(entry.type == TYPE_RRSIG && ((GET_U16_AT(*rdata)) == TYPE_NSEC3)) /** @note : NATIVETYPE */ { if(FAIL(return_code = nsec3_load_add_rrsig(&nsec3_context, entry.name, /*entry.ttl*/soa_min_ttl, rdata, rdata_len))) { break; } } else { #endif /* * This is the general case * It happen with NSEC3 support if the type is neither NSEC3PARAM, NSEC3 nor RRSIG(NSEC3) */ switch(entry.type) { case TYPE_DNSKEY: { #if ZDB_HAS_DNSSEC_SUPPORT /* * Check if we have access to the private part of the key */ u16 tag = dnskey_get_key_tag_from_rdata(rdata, rdata_len); u16 key_flags = GET_U16_AT(rdata[0]); u8 algorithm = rdata[3]; switch(algorithm) { case DNSKEY_ALGORITHM_DSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA256_NSEC3: case DNSKEY_ALGORITHM_RSASHA512_NSEC3: { nsec3_keys = TRUE; break; } case DNSKEY_ALGORITHM_DSASHA1: case DNSKEY_ALGORITHM_RSASHA1: { nsec_keys = TRUE; break; } default: { log_info("zone load: unknown key algorithm for K%{dnsname}+%03d+%05hd", zone->origin, algorithm, tag); break; } } dnssec_key *key = NULL; if((flags & ZDB_ZONE_IS_SLAVE) == 0) { /* @TODO use defines */ if(ISOK(return_code = dnssec_key_load_private(algorithm, tag, key_flags, origin_ascii, &key))) { log_info("zone load: loaded private key K%{dnsname}+%03d+%05hd", zone->origin, algorithm, tag); has_dnskey = TRUE; } else { log_warn("zone load: unable to load the private key K%{dnsname}+%03d+%05hd: %r", zone->origin, algorithm, tag, return_code); } } if(key == NULL) { /* * Either: * * _ The private key is not available (error) * _ The private key should not be loaded (slave) * * Get the public key for signature verifications. */ if(ISOK(return_code = dnskey_load_public(rdata, rdata_len, origin_ascii, &key))) { log_info("zone load: loaded public key K%{dnsname}+%03d+%05hd", zone->origin, algorithm, tag); has_dnskey = TRUE; } else { /* the key is wrong */ log_warn("zone load: unable to load public key K%{dnsname}+%03d+%05hd: %r", zone->origin, algorithm, tag, return_code); } } #else /* DNSKEY not supported */ #endif ZDB_RECORD_ZALLOC(ttlrdata, entry.ttl, rdata_len, rdata); zdb_zone_record_add(zone, entry_name.labels, (entry_name.size - name.size) - 1, entry.type, ttlrdata); /* class is implicit */ break; } #if ZDB_HAS_NSEC_SUPPORT case TYPE_NSEC: { has_nsec = TRUE; ZDB_RECORD_ZALLOC(ttlrdata, entry.ttl, rdata_len, rdata); zdb_zone_record_add(zone, entry_name.labels, (entry_name.size - name.size) - 1, entry.type, ttlrdata); /* class is implicit */ break; } #endif case TYPE_RRSIG: { #if ZDB_HAS_DNSSEC_SUPPORT == 0 if(!has_rrsig) { log_warn("zone load: type %{dnstype} is not supported", &entry.type); } #else has_rrsig = TRUE; #endif if((GET_U16_AT(*rdata)) == TYPE_NSEC3PARAM) // RRSIG covered type { entry.ttl = 0; } /* falltrough */ } default: { ZDB_RECORD_ZALLOC(ttlrdata, entry.ttl, rdata_len, rdata); zdb_zone_record_add(zone, entry_name.labels, (entry_name.size - name.size) - 1, entry.type, ttlrdata); /* class is implicit */ break; } #if !ZDB_HAS_NSEC3_SUPPORT case TYPE_NSEC3PARAM: { if(!has_nsec3param) { log_warn("zone load: type %{dnstype} is not supported", &entry.type); } has_nsec3param = TRUE; break; } case TYPE_NSEC3: { if(!has_nsec3) { log_warn("zone load: type %{dnstype} is not supported", &entry.type); } has_nsec3 = TRUE; break; } #endif #if !ZDB_HAS_NSEC_SUPPORT case TYPE_NSEC: { if(!has_nsec) { log_warn("zone load: type %{dnstype} is not supported", &entry.type); } has_nsec = TRUE; break; } #endif } #if ZDB_HAS_NSEC3_SUPPORT } #endif zdb_zone_load_loop: wire_size += resource_record_size(&entry); resource_record_resetcontent(&entry); /* "next" */ /** * Note : Return can be * * OK: got a record * 1: end of zone file * error code: failure */ if(OK != (return_code = zone_reader_read_record(zr, &entry))) { if(FAIL(return_code)) { if(return_code == ERROR) { return_code = UNEXPECTED_EOF; } const char *message = zone_reader_get_last_error_message(zr); if(message == NULL) { log_err("zone load: reading record #%d of zone %{dnsname}: %r", loop_count, zone->origin, return_code); } else { log_err("zone load: reading record #%d of zone %{dnsname}: %s: %r", loop_count, zone->origin, message, return_code); } } break; } if(!dnsname_locase_verify_charspace(entry.name)) { /** @todo handle this issue*/ log_warn("zone load: DNS character space error on '%{dnsname}'", entry.name); } } resource_record_freecontent(&entry); /* destroys, not "next" */ #if ZDB_HAS_DNSSEC_SUPPORT log_debug7("zone load: has_rrsig=%i has_dnskey=%i", has_rrsig, has_dnskey); #endif zone->apex->flags &= ~ZDB_RR_APEX_LABEL_LOADING; if(dynupdate_forbidden) { log_info("zone load: freezing zone %{dnsname}", zone->origin); zone->apex->flags |= ZDB_RR_APEX_LABEL_FROZEN; } if(ISOK(return_code)) { log_info("zone load: sanity check for %{dnsname}", zone->origin); if(FAIL(return_code = zdb_sanitize_zone(zone))) { log_err("zone load: impossible to sanitise %{dnsname}, dropping zone", zone->origin); } else { log_info("zone load: sanity check for %{dnsname} done", zone->origin); } } #if ZDB_HAS_DNSSEC_SUPPORT if(ISOK(return_code)) { if(has_nsec3 & !has_nsec3param) { log_err("zone load: zone %{dnsname} has NSEC3 but no NSEC3PARAM", zone->origin); return_code = ZDB_READER_NSEC3WITHOUTNSEC3PARAM; } if(has_nsec3param & !has_nsec3) { log_warn("zone load: zone %{dnsname} has NSEC3PARAM but no NSEC3", zone->origin); /* force it for generation */ if((flags & ZDB_ZONE_IS_SLAVE) == 0) { has_nsec3 = true; } else { log_err("zone load: slave zone %{dnsname} has NSEC3PARAM but no NSEC3", zone->origin); return_code = ZDB_READER_NSEC3PARAMWITHOUTNSEC3; } } if(has_nsec && has_nsec3) { log_err("zone load: zone %{dnsname} has both NSEC and NSEC3 records !", zone->origin); return_code = ZDB_READER_MIXED_DNSSEC_VERSIONS; /** * * @todo DROP NSEC (?) * */ } if((flags & ZDB_ZONE_IS_SLAVE) == 0) { if(has_nsec3 && !nsec3_keys) { log_warn("zone load: zone %{dnsname} is NSEC3 but there are no NSEC3 keys available", zone->origin); } if(has_nsec && !nsec_keys) { log_warn("zone load: zone %{dnsname} is NSEC but there are no NSEC keys available", zone->origin); } } } if(ISOK(return_code)) { if(!(has_nsec || has_nsec3)) { switch(flags & ZDB_ZONE_DNSSEC_MASK) { case ZDB_ZONE_NSEC: { log_warn("zone load: zone is configured as NSEC but no NSEC records have been found"); if((flags & ZDB_ZONE_IS_SLAVE) == 0) { has_nsec = TRUE; } break; } case ZDB_ZONE_NSEC3: case ZDB_ZONE_NSEC3_OPTOUT: { log_warn("zone load: zone is configured as NSEC3 but no NSEC3 records have been found"); if((flags & ZDB_ZONE_IS_SLAVE) == 0) { has_nsec3 = TRUE; } break; } default: { break; } } } if(has_nsec3) { #if ZDB_HAS_NSEC3_SUPPORT /** * @todo Check if there is both NSEC & NSEC3. Reject if yes. (LATER On hold until NSEC is back in) * compile NSEC if any * compile NSEC3 if any * * I'm only doing NSEC3 here. */ if((flags & ZDB_ZONE_DNSSEC_MASK) == ZDB_ZONE_NSEC) { log_warn("zone load: zone %{dnsname} was set to NSEC but is NSEC3", zone->origin); } if(has_optin > 0) { if(has_optout > 0) { log_warn("zone load: zone %{dnsname} has got both OPT-OUT and OPT-IN records (%u and %u)", zone->origin, has_optout, has_optin); } nsec3_context.opt_out = FALSE; if((flags & ZDB_ZONE_DNSSEC_MASK) == ZDB_ZONE_NSEC3_OPTOUT) { log_warn("zone load: zone %{dnsname} was set to OPT-OUT but is OPT-IN", zone->origin); } } else if(has_optout > 0) { /* has_optin is false and has_optout is true */ if((flags & ZDB_ZONE_DNSSEC_MASK) == ZDB_ZONE_NSEC3) { log_warn("zone load: zone %{dnsname} was set to OPT-IN but is OPT-OUT (%u)", zone->origin, has_optout); } } else /* use the configuration */ { nsec3_context.opt_out = ((flags & ZDB_ZONE_DNSSEC_MASK) == ZDB_ZONE_NSEC3_OPTOUT)?TRUE:FALSE; } log_info("zone load: zone %{dnsname} is %s", zone->origin, (nsec3_context.opt_out)?"OPT-OUT":"OPT-IN"); /* If there is something in the NSEC3 context ... */ if( (has_nsec3param & ((flags & ZDB_ZONE_IS_SLAVE) == 0)) || // MASTER with NSEC3PARAM !nsec3_load_is_context_empty(&nsec3_context) // SLAVE with NSEC3 ) { /* ... do it. */ log_debug("zone load: zone %{dnsname}: NSEC3 post-processing.", zone->origin); return_code = nsec3_load_compile(&nsec3_context); if(((flags & ZDB_ZONE_IS_SLAVE) != 0) && (nsec3_context.nsec3_rejected > 0)) { return_code = DNSSEC_ERROR_NSEC3_INVALIDZONESTATE; } if(ISOK(return_code)) { log_debug("zone load: zone %{dnsname}: NSEC3 post-processing done", zone->origin); } else { log_debug("zone load: zone %{dnsname}: error %r: NSEC3 post-processing failed", zone->origin, return_code); } } else { log_debug("zone load: zone %{dnsname}: NSEC3 context is empty", zone->origin); has_nsec3 = FALSE; } #ifdef DEBUG if(ISOK(return_code)) { nsec3_check(zone); /* this is an euristic check */ } #endif #else // ZDB_HAS_NSEC3_SUPPORT is 0 log_err("zone load: zone %{dnsname} has NSEC3* record(s) but the server has been compiled without NSEC support", zone->origin); #endif } else if(has_nsec) { /** * @TODO build the nsec chain */ if((flags & ZDB_ZONE_DNSSEC_MASK) >= ZDB_ZONE_NSEC3) { log_warn("zone load: zone %{dnsname} was set to NSEC3 but is NSEC", zone->origin); } #if ZDB_HAS_NSEC_SUPPORT log_debug("zone load: zone %{dnsname}: NSEC post-processing.", zone->origin); if(ISOK(return_code = nsec_update_zone(zone, (flags & ZDB_ZONE_IS_SLAVE) != 0))) { } #else log_err("zone load: zone %{dnsname} has NSEC record(s) but the server has been compiled without NSEC support", zone->origin); #endif } } #endif #if ZDB_HAS_NSEC3_SUPPORT nsec3_load_destroy(&nsec3_context); #endif if(ISOK(return_code)) { log_info("zone load: zone %{dnsname} has been loaded (%d record(s) parsed)", zone->origin, loop_count); log_debug("zone load: zone %{dnsname} wire size: %i", zone->origin, wire_size); zone->wire_size = wire_size; *zone_pointer_out = zone; if((flags & ZDB_ZONE_MOUNT_ON_LOAD) != 0) { log_info("zone load: zone %{dnsname} has been mounted", zone->origin); zdb_zone *old_zone = zdb_set_zone(db, zone); yassert(old_zone == NULL); (void)old_zone; } } else { log_err("zone load: zone %{dnsname}: error %r (%d record(s) parsed)", zone->origin, return_code, loop_count); *zone_pointer_out = NULL; } if(ISOK(return_code) && ((flags & ZDB_ZONE_REPLAY_JOURNAL) != 0)) { /* * The zone file has been read. * NSEC structures have been created * * At this point, the incremental journal should be replayed. * */ #ifdef DEBUG log_debug("zone load: replaying changes from journal"); #endif zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_LOAD); return_code = zdb_icmtl_replay(zone); zdb_zone_lock(zone, ZDB_ZONE_MUTEX_LOAD); if(FAIL(return_code)) { log_err("zone load: journal replay returned %r", return_code); } else { if(return_code > 0) { log_info("zone load: replayed %d changes from journal", return_code); //modified = TRUE; } #ifdef DEBUG log_debug("zone load: post-replay sanity check for %{dnsname}", zone->origin); #endif if(FAIL(return_code = zdb_sanitize_zone(zone))) { log_err("zone load: impossible to sanitise %{dnsname}, dropping zone", zone->origin); } else { log_info("zone load: post-replay sanity check for %{dnsname} done", zone->origin); // zdb_update_zone_signatures(zone, MAX_S32); /// @todo instead clear the signatures without keys } } /* * End of the incremental replay */ } #ifdef DEBUG if(ISOK(return_code)) { if(has_nsec3) { /* Check the AVL collection */ nsec3_zone *n3 = zone->nsec.nsec3; while(n3 != NULL) { int depth; if((depth = nsec3_avl_check(&n3->items)) < 0) { log_err("nsec3_avl_check failure"); logger_flush(); abort(); } n3 = n3->next; } /* Check the correlations between the two databases (zone + zone.nsec3) */ nsec3_check(zone); /* Check there are no left alone domains that should have been linked to the nsec3 collections */ { u32 issues_count = 0; zdb_rr_label *label; u8 fqdn[MAX_DOMAIN_LENGTH]; zdb_zone_label_iterator iter; zdb_zone_label_iterator_init(zone, &iter); while(zdb_zone_label_iterator_hasnext(&iter)) { zdb_zone_label_iterator_nextname(&iter, fqdn); label = zdb_zone_label_iterator_next(&iter); u16 flags = label->flags; u32 last_issues_count = issues_count; if((flags & ZDB_RR_LABEL_UNDERDELEGATION) == 0) /** @todo !zdb_rr_label_is_glue(label) */ { /* APEX or NS+DS */ if( ((flags & ZDB_RR_LABEL_APEX) != 0) || (((flags & ZDB_RR_LABEL_DELEGATION) != 0) && (zdb_record_find(&label->resource_record_set, TYPE_DS) != NULL) ) ) { /* should be linked */ if(label->nsec.nsec3 != NULL) { if(label->nsec.nsec3->self == NULL) { log_debug2("zone load: HEURISTIC DEBUG NOTE: NSEC3: expected self '%{dnsname}'", fqdn); issues_count++; } if(label->nsec.nsec3->star == NULL) { log_debug2("zone load: HEURISTIC DEBUG NOTE: NSEC3: expected star '%{dnsname}'", fqdn); issues_count++; } } else { log_debug2("zone load: HEURISTIC DEBUG NOTE: NSEC3: expected link '%{dnsname}'", fqdn); issues_count++; } } else { if(label->nsec.nsec3 != NULL) { if(label->nsec.nsec3->self != NULL && label->nsec.nsec3->star != NULL) { log_debug2("zone load: HEURISTIC DEBUG NOTE: NSEC3: not expected! '%{dnsname}'", fqdn); } else if(label->nsec.nsec3->self == NULL && label->nsec.nsec3->star == NULL) { log_debug2("zone load: HEURISTIC DEBUG NOTE: NSEC3: needs removal '%{dnsname}'", fqdn); } else { log_debug("zone load: database loading HEURISTIC DEBUG NOTE: NSEC3: is unclean '%{dnsname}'", fqdn); } issues_count++; } } } else { if(label->nsec.nsec3 != NULL) { if(label->nsec.nsec3->self != NULL && label->nsec.nsec3->star != NULL) { log_debug2("zone load: HEURISTIC DEBUG NOTE: NSEC3: not expected! '%{dnsname}'", fqdn); } else if(label->nsec.nsec3->self == NULL && label->nsec.nsec3->star == NULL) { log_debug2("zone load: HEURISTIC DEBUG NOTE: NSEC3: needs removal '%{dnsname}'", fqdn); } else { log_debug("zone load: database loading HEURISTIC DEBUG NOTE: NSEC3: is unclean '%{dnsname}'", fqdn); } issues_count++; } } if(last_issues_count != issues_count) { nsec3_zone *n3 = zone->nsec.nsec3; while(n3 != NULL) { u8 digest[MAX_DIGEST_LENGTH]; nsec3_compute_digest_from_fqdn_with_len(n3, fqdn, dnsname_len(fqdn), digest, FALSE); log_debug2("zone load: HEURISTIC DEBUG NOTE: NSEC3: check %{digest32h}", digest); n3 = n3->next; } } } } } // has nsec3 } #endif // zdb_zone_write_text_file(zone, "/tmp/ars.txt", FALSE); if(zone != NULL) { zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_LOAD); if(FAIL(return_code)) { zdb_zone_release(zone); *zone_pointer_out = NULL; //zdb_zone_destroy(zone); } } return return_code; } /** * @brief Load the zone SOA. * * Load the zone SOA record * This is meant mainly for the slave that could choose between, ie: zone file or axfr zone file * The SOA MUST BE the first record * * @param[in] db a pointer to the database * @param[in] zone_data a pointer to an opened zone_reader at its start * @param[out] zone_pointer_out will contains a pointer to the loaded zone if the call is successful * * @return an error code. * */ ya_result zdb_zone_get_soa(zone_reader *zone_data, u16 *rdata_size, u8 *rdata) { ya_result return_value; resource_record entry; resource_record_init(&entry); if(ISOK(return_value = zone_reader_read_record(zone_data, &entry))) { if(entry.type == TYPE_SOA) { s32 soa_rdata_len = zone_reader_rdata_size(entry); u8 *soa_rdata = zone_reader_rdata(entry); if(soa_rdata_len < MAX_SOA_RDATA_LENGTH) { memcpy(rdata, soa_rdata, soa_rdata_len); *rdata_size = soa_rdata_len; } else { return_value = ERROR; } } else { return_value = ERROR; } } return return_value; } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/icmtl_input_stream.c0000644000077100007710000000012412650131756023037 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.404344 30 ctime=1454597652.328344534 yadifa-2.1.6-5826/lib/dnsdb/src/icmtl_input_stream.c0000664000077100007710000002444712650131756022657 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup dnsdb * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include "dnsdb/zdb_icmtl.h" #include #include #include #include #include /* * */ #define ICMTL_INPUT_STREAM_TAG 0x53494c544d4349 /* ICMTLIS */ #define ICMTL_IS_STATUS_PREFIX 0 #define ICMTL_IS_STATUS_OLDSOA 1 #define ICMTL_IS_STATUS_REMOVING 2 #define ICMTL_IS_STATUS_NEWSOA 3 #define ICMTL_IS_STATUS_ADDING 4 #define ICMTL_IS_STATUS_SUFFIX 5 #define ICMTL_IS_STATUS_DONE 6 #define ICMTL_IS_STATUS_EOF 7 #define ICMTL_BUFFER_SIZE 4096 static u32 icmtl_read = 0; static u32 icmtl_copied = 0; typedef struct zdb_icmtl_input_stream_data zdb_icmtl_input_stream_data; struct zdb_icmtl_input_stream_data { input_stream icmtls_bis; input_stream icmtla_bis; input_stream icmtlr_bis; u32 from; u32 to; u32 buffer_size; u32 buffer_offset; u8 status; bool skip_first_and_last; char folder[1024]; u8 origin[MAX_DOMAIN_LENGTH]; u8 buffer[MAX_DOMAIN_LENGTH + 10 + 65536]; }; static ya_result zdb_icmtl_input_stream_next_record(input_stream* is, zdb_icmtl_input_stream_data* data) { ya_result ret; u32 size = 0; u16 rtype = 0; if(FAIL(ret = input_stream_read_dnsname(is, data->buffer))) { return ret; } if(ret > 0) { size += ret; if(FAIL(ret = input_stream_read(is, &data->buffer[size], 10))) { return ret; } rtype = (GET_U16_AT(data->buffer[size])); /** @note : NATIVETYPE */ u16 rdata_size = ntohs(GET_U16_AT(data->buffer[size + 8])); size += ret; yassert(ret == 10); if(FAIL(ret = input_stream_read(is, &data->buffer[size], rdata_size))) { return ret; } yassert(ret == rdata_size); size += ret; } data->buffer_size = size; data->buffer_offset = 0; return rtype; } static ya_result zdb_icmtl_input_stream_reset_icmtls(zdb_icmtl_input_stream_data* data) { char name[1024]; ya_result err; output_stream_close(&data->icmtls_bis); snformat(name, sizeof (name), ICMTL_SUMMARY_FILE_FORMAT, data->folder, data->origin, data->from, data->to); input_stream icmtls_is; if(ISOK(err = file_input_stream_open(name, &icmtls_is))) { buffer_input_stream_init(&icmtls_is, &data->icmtls_bis, ICMTL_BUFFER_SIZE); } return err; } static ya_result zdb_icmtl_input_stream_fillbuffer(zdb_icmtl_input_stream_data* data) { ya_result err = ZDB_ERROR_ICMTL_STATUS_INVALID; switch(data->status) { case ICMTL_IS_STATUS_PREFIX: data->status = ICMTL_IS_STATUS_OLDSOA; case ICMTL_IS_STATUS_OLDSOA: { /* reset the stream */ if(ISOK(err = zdb_icmtl_input_stream_reset_icmtls(data))) { if(ISOK(err = zdb_icmtl_input_stream_next_record(&data->icmtls_bis, data))) { data->status = ICMTL_IS_STATUS_REMOVING; } } break; } case ICMTL_IS_STATUS_REMOVING: { err = zdb_icmtl_input_stream_next_record(&data->icmtlr_bis, data); /* 0 => found a record type or an error occurred */ if(err != 0) { break; } data->status = ICMTL_IS_STATUS_NEWSOA; /* Falltrough */ } case ICMTL_IS_STATUS_NEWSOA: { if(ISOK(err = zdb_icmtl_input_stream_next_record(&data->icmtls_bis, data))) { data->status = ICMTL_IS_STATUS_ADDING; } break; } case ICMTL_IS_STATUS_ADDING: { err = zdb_icmtl_input_stream_next_record(&data->icmtla_bis, data); /* 0 => found a record type or an error occurred */ if(err != 0) { break; } data->status = ICMTL_IS_STATUS_SUFFIX; err = SUCCESS; data->buffer_size = 0; data->buffer_offset = 0; break; } case ICMTL_IS_STATUS_SUFFIX: data->status = ICMTL_IS_STATUS_DONE; case ICMTL_IS_STATUS_DONE: { err = SUCCESS; data->buffer_size = 0; data->buffer_offset = 0; break; } default: { break; } } return err; } static ya_result zdb_icmtl_input_stream_read(input_stream* stream, u8* buffer_start, u32 len) { zdb_icmtl_input_stream_data* data = (zdb_icmtl_input_stream_data*)stream->data; u8* buffer = buffer_start; ya_result err; while(len > 0) { if(data->buffer_offset >= data->buffer_size) { /* refill */ if(FAIL(err = zdb_icmtl_input_stream_fillbuffer(data))) { return err; } icmtl_read += data->buffer_size; } u32 n = MIN(len, data->buffer_size - data->buffer_offset); if(n == 0) { break; } icmtl_copied += n; MEMCOPY(buffer, &data->buffer[data->buffer_offset], n); len -= n; data->buffer_offset += n; buffer += n; } return buffer - buffer_start; } static ya_result zdb_icmtl_input_stream_skip(input_stream* stream, u32 len) { return input_stream_skip(stream, len); } static void zdb_icmtl_input_stream_close(input_stream* stream) { zdb_icmtl_input_stream_data* data = (zdb_icmtl_input_stream_data*)stream->data; input_stream_close(&data->icmtls_bis); input_stream_close(&data->icmtlr_bis); input_stream_close(&data->icmtla_bis); free(data); stream->data = NULL; stream->vtbl = NULL; } static input_stream_vtbl zdb_icmtl_input_stream_vtbl ={ zdb_icmtl_input_stream_read, zdb_icmtl_input_stream_skip, zdb_icmtl_input_stream_close, "zdb_icmtl_input_stream" }; ya_result icmtl_input_stream_open(u8* origin, u32 from, u32 to, input_stream* out_is, const char* folder) { char name[1024]; ya_result err; size_t folder_len = strlen(folder) + 1; if(folder_len > 1024) { return ZDB_ERROR_ICMTL_FOLDERPATHTOOLONG; } zdb_icmtl_input_stream_data* data; MALLOC_OR_DIE(zdb_icmtl_input_stream_data*, data, sizeof (zdb_icmtl_input_stream_data), ICMTL_INPUT_STREAM_TAG); snformat(name, sizeof (name), ICMTL_SUMMARY_FILE_FORMAT, folder, origin, from, to); input_stream icmtls_is; /* I could use the same temp var for the 3 input_streams but I think it's cleared this way */ if(FAIL(err = file_input_stream_open(name, &icmtls_is))) { free(data); return err; } buffer_input_stream_init(&icmtls_is, &data->icmtls_bis, ICMTL_BUFFER_SIZE); snformat(name, sizeof (name), ICMTL_ADD_FILE_FORMAT, folder, origin, from, to); input_stream icmtla_is; /* I could use the same temp var for the 3 input_streams but I think it's cleared this way */ if(FAIL(err = file_input_stream_open(name, &icmtla_is))) { output_stream_close(&data->icmtls_bis); free(data); return err; } buffer_input_stream_init(&icmtla_is, &data->icmtla_bis, ICMTL_BUFFER_SIZE); snformat(name, sizeof (name), ICMTL_REMOVE_FILE_FORMAT, folder, origin, from, to); input_stream icmtlr_is; /* I could use the same temp var for the 3 input_streams but I think it's cleared this way */ if(FAIL(err = file_input_stream_open(name, &icmtlr_is))) { output_stream_close(&data->icmtla_bis); output_stream_close(&data->icmtls_bis); free(data); return err; } buffer_input_stream_init(&icmtlr_is, &data->icmtlr_bis, ICMTL_BUFFER_SIZE); data->from = from; data->to = to; data->buffer_size = 0; data->buffer_offset = 0; data->status = ICMTL_IS_STATUS_PREFIX; memcpy(data->folder, folder, folder_len); dnsname_copy(data->origin, origin); data->skip_first_and_last = FALSE; out_is->data = data; out_is->vtbl = &zdb_icmtl_input_stream_vtbl; return SUCCESS; } void icmtl_input_stream_skip_headtail(input_stream* stream) { zdb_icmtl_input_stream_data* data = (zdb_icmtl_input_stream_data*)stream->data; data->skip_first_and_last = TRUE; } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec3_load.c0000644000077100007710000000012412650131756021147 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.261344 30 ctime=1454597652.527344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec3_load.c0000664000077100007710000005353712650131756020771 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #define DEBUG_LEVEL 0 #include #include "dnsdb/dnssec.h" #include "dnsdb/nsec3_load.h" #include "dnsdb/nsec3_zone.h" #include "dnsdb/nsec3_update.h" #include "dnsdb/zdb_zone.h" #include #include #define N3CHNCTX_TAG 0x5854434e4843334e #define N3PRDATA_TAG 0x415441445250334e #define MODULE_MSG_HANDLE g_dnssec_logger extern logger_handle *g_dnssec_logger; /****************************************************************************** * * NSEC3 - load (ie: from zone file / axfr / ...) * *****************************************************************************/ typedef struct nsec3_context_record nsec3_context_record; struct nsec3_context_record { u8* digest; u8* rdata; u32 ttl; u16 rdata_size; }; /* * Converts the label of an NSEC3 or an RRSIG(NSEC3) record to a digest. * returns a mallocated digest * * Exclusively used by nsec3_load_add_collection * */ static u8* nsec3_label_to_digest(nsec3_load_context *context, const u8 *entry_name) { /* * The first label is BASE32HEX encoded and MUST be of a size & 3 == 0 */ u8 base32hex_len = entry_name[0]; if((base32hex_len & 3) != 0) { return NULL; } dnsname_vector origin; dnsname_vector name; dnsname_to_dnsname_vector(context->zone->origin, &origin); dnsname_to_dnsname_vector(entry_name, &name); /* * There MUST be exactly one level of depth between the origin and the name */ if(name.size - origin.size != 1) { return NULL; } /* * Both path MUST match */ u8** origin_labelsp = &origin.labels[0]; u8** name_labelsp = &name.labels[1]; while(name.size-- > 0) { if(!dnslabel_equals(*origin_labelsp++, *name_labelsp++)) { return NULL; } } u8 bin_len = (base32hex_len >> 3) * 5; /* n<<2 + n */ u8* digest; MALLOC_OR_DIE(u8*, digest, bin_len + 1, NSEC3_DIGEST_TAG); if(FAIL(base32hex_decode((char*)& name.labels[0][1], base32hex_len, &digest[1]))) { free(digest); return NULL; } digest[0] = bin_len; return digest; } static ya_result nsec3_load_add_collection(nsec3_load_context *context, const u8 *entry_name, u32 entry_ttl, const u8 *entry_rdata, u16 entry_rdata_size, ptr_vector *collection) { /* * NOTE: I use MALLOC instead of ZALLOC. * ZALLOC is typically for persistent or recurrent memory * I don't know if this bloc size will be highly re-used */ u8 *digest = nsec3_label_to_digest(context, entry_name); if(digest == NULL) { return DNSSEC_ERROR_NSEC3_LABELTODIGESTFAILED; } nsec3_context_record *cr; MALLOC_OR_DIE(nsec3_context_record*, cr, sizeof (nsec3_context_record), NSEC3_CONTEXT_RECORD_TAG); cr->digest = digest; MALLOC_OR_DIE(u8*, cr->rdata, entry_rdata_size, NSEC3_RDATA_TAG); MEMCOPY(cr->rdata, entry_rdata, entry_rdata_size); cr->ttl = entry_ttl; cr->rdata_size = entry_rdata_size; ptr_vector_append(collection, cr); return SUCCESS; } /* * Used exclusively by nsec3_load_compile */ static nsec3_zone_item* nsec3_label_search(zdb_zone* zone, u8* digest, nsec3_zone** out_n3) { nsec3_zone* n3 = zone->nsec.nsec3; for(;;) { nsec3_zone_item* items = n3->items; nsec3_zone_item* item = nsec3_avl_find(&items, digest); if(item != NULL) { /* * We found the NSEC3 label */ if(out_n3 != NULL) { *out_n3 = n3; } return item; } /* * This item does not exists in the current chain, * try the next NSEC3PARAM chain */ n3 = n3->next; if(n3 == NULL) { /* skip/ignore this signature */ return NULL; } } } /* * Context Chain */ static nsec3_chain_context* nsec3_load_chain_init(const u8 *rdata, u16 rdata_size) { nsec3_chain_context *ctx; MALLOC_OR_DIE(nsec3_chain_context*, ctx, sizeof(nsec3_chain_context), N3CHNCTX_TAG); ctx->next = NULL; MALLOC_OR_DIE(u8*, ctx->nsec3param_rdata, rdata_size, N3PRDATA_TAG); memcpy(ctx->nsec3param_rdata, rdata, rdata_size); ctx->nsec3param_rdata_size = rdata_size; return ctx; } static void nsec3_load_chain_destroy(nsec3_chain_context* ctx) { while(ctx != NULL) { nsec3_chain_context *ctx_next = ctx->next; ctx->next = NULL; free(ctx->nsec3param_rdata); ctx = ctx_next; } } static bool nsec3_load_chain_match(nsec3_chain_context *ctx, const u8 *rdata, u16 rdata_size) { if(rdata_size >= NSEC3PARAM_MINIMUM_LENGTH) { if(ctx->nsec3param_rdata_size == rdata_size) { if(ctx->nsec3param_rdata[0] == rdata[0]) { return memcmp(&ctx->nsec3param_rdata[2], &rdata[2], rdata_size - 2) == 0; } } } return FALSE; } ya_result nsec3_load_init(nsec3_load_context *context, zdb_zone* zone) { if(zone->nsec.nsec3 != NULL) { /* * The zone already contains an nsec record. This is highly unexpexted. */ return DNSSEC_ERROR_NSEC3_INVALIDZONESTATE; } ZEROMEMORY(context, sizeof(nsec3_load_context)); ptr_vector_init(&context->nsec3); ptr_vector_init(&context->rrsig); context->zone = zone; context->opt_out = TRUE; return SUCCESS; } /* * */ static void nsec3_load_destroy_free(void* ptr) { free(ptr); } void nsec3_load_destroy(nsec3_load_context *context) { ptr_vector_free_empties(&context->nsec3, nsec3_load_destroy_free); ptr_vector_destroy(&context->nsec3); ptr_vector_free_empties(&context->rrsig, nsec3_load_destroy_free); ptr_vector_destroy(&context->rrsig); nsec3_load_chain_destroy(context->chain); context->zone = NULL; } ya_result nsec3_load_add_nsec3param(nsec3_load_context *context, const u8 *entry_rdata, u16 entry_rdata_size) { if((entry_rdata_size < 5) || (NSEC3_RDATA_ALGORITHM(entry_rdata) != DNSSEC_DIGEST_TYPE_SHA1)) { return DNSSEC_ERROR_UNSUPPORTEDDIGESTALGORITHM; } nsec3_chain_context **ctxp = &context->chain; while(*ctxp != NULL) { if(nsec3_load_chain_match(*ctxp, entry_rdata, entry_rdata_size)) { /* ignore */ return SUCCESS; } ctxp = &(*ctxp)->next; } nsec3_zone_add_from_rdata(context->zone, entry_rdata_size, entry_rdata); *ctxp = nsec3_load_chain_init(entry_rdata, entry_rdata_size); return SUCCESS; } ya_result nsec3_load_add_nsec3(nsec3_load_context *context, const u8 *entry_name, u32 entry_ttl, const u8 *entry_rdata, u16 entry_rdata_size) { /* * Get the right chain from the rdata * Add the record to the chain */ if((entry_rdata_size < 5) || (NSEC3_RDATA_ALGORITHM(entry_rdata) != DNSSEC_DIGEST_TYPE_SHA1)) { return DNSSEC_ERROR_UNSUPPORTEDDIGESTALGORITHM; } return nsec3_load_add_collection(context, entry_name, entry_ttl, entry_rdata, entry_rdata_size, &context->nsec3); } ya_result nsec3_load_add_rrsig(nsec3_load_context *context, const u8 *entry_name, u32 entry_ttl, const u8 *entry_rdata, u16 entry_rdata_size) { /* * Find a chain that already contains */ return nsec3_load_add_collection(context, entry_name, entry_ttl, entry_rdata, entry_rdata_size, &context->rrsig); } /* * Use this to add the NSEC3 information from the context to the zone */ ya_result nsec3_load_compile(nsec3_load_context *context) { /* * Note: All the nsec3param have already been initialized * * 1) * * Compute the nsec3 for all available nsec3param * * 2) * * Add all loaded rrsig records in the relevant nsec3 record, ignore the dups. * * 3) * * Check that all loaded nsec3 record is a perfect match of the computed nsec3 * record. Destroy the signature of the failed NSEC3 records (issue a warning ?) * * When everything is done, we need to expect an update of the signatures * */ zdb_zone* zone = context->zone; s32 i; /* * NOTE: should I enable the NSEC3 flag here already ? */ u32 nsec3_read = context->nsec3.offset; u32 rrsig_read = context->rrsig.offset; if(context->chain == NULL) { return DNSSEC_ERROR_NSEC3_INVALIDZONESTATE; } /* 1) */ if(context->opt_out) { context->zone->apex->flags |= ZDB_RR_LABEL_NSEC3_OPTOUT; } else { context->zone->apex->flags &= ~ZDB_RR_LABEL_NSEC3_OPTOUT; } nsec3_update_zone(context->zone); //nsec3_check(context->zone); /* 2) */ u32 rrsig_added = 0; u32 rrsig_ignored = 0; u32 rrsig_discarded = 0; ptr_vector* rrsigs = &context->rrsig; s32 rrsig_count = rrsigs->offset + 1; u16 shutdown_test_countdown = 1000; for(i = 0; i < rrsig_count; i++) { if(--shutdown_test_countdown == 0) { if(dnscore_shuttingdown()) { /* Yes, it means there will be a "leak" but the app is shutting down anyway ... */ return STOPPED_BY_APPLICATION_SHUTDOWN; } shutdown_test_countdown = 1000; } nsec3_context_record* cr = (nsec3_context_record*)rrsigs->data[i]; /* NSEC3 Label: cr->digest */ nsec3_zone_item* item = nsec3_label_search(zone, cr->digest, NULL); if(item != NULL) { /* * We found the NSEC3 label * * Build a copy of the ttl/rdata, ignore dups */ bool dup = FALSE; zdb_packed_ttlrdata **rrsigp = &item->rrsig; while(*rrsigp != NULL) { if((*rrsigp)->rdata_size == cr->rdata_size) { if(memcmp((*rrsigp)->rdata_start, cr->rdata, cr->rdata_size) == 0) { dup = TRUE; rrsig_ignored++; break; } } rrsigp = &(*rrsigp)->next; } if(!dup) { ZDB_RECORD_ZALLOC(*rrsigp, cr->ttl, cr->rdata_size, cr->rdata); (*rrsigp)->next = NULL; rrsig_added++; } } else { rrsig_discarded++; } /* Destroy the rrsig */ free(cr->digest); free(cr->rdata); free(cr); rrsigs->data[i] = NULL; } log_debug("nsec3: rrsig: add: %u ignore: %u discard: %u (had %u nsec3 and %u rrsigs)", rrsig_added, rrsig_ignored, rrsig_discarded, nsec3_read, rrsig_read); /* 3) */ ptr_vector* nsec3s = &context->nsec3; u32 nsec3_accepted = 0; u32 nsec3_rejected = 0; u32 nsec3_discarded = 0; s32 nsec3_count = nsec3s->offset + 1; u32 min_ttl = 900; zdb_zone_getminttl(zone, &min_ttl); shutdown_test_countdown = 1000; for(i = 0; i < nsec3_count; i++) { if(--shutdown_test_countdown == 0) { if(dnscore_shuttingdown()) { /* Yes, it means there will be a "leak" but the app is shutting down anyway ... */ return STOPPED_BY_APPLICATION_SHUTDOWN; } shutdown_test_countdown = 1000; } nsec3_context_record* cr = (nsec3_context_record*)nsec3s->data[i]; /* NSEC3 Label: cr->digest */ nsec3_zone* n3; nsec3_zone_item* item = nsec3_label_search(zone, cr->digest, &n3); if(item != NULL) { /* * We found the NSEC3 label, we have to compare it to the one * it was supposed to be */ if(!nsec3_zone_item_equals_rdata(n3, item, cr->rdata_size, cr->rdata)) { /* * Didn't matched: The signature, if any, will be wrong */ #if 1 /* * This code will print what NSEC3 was computed by YADIFA and what NSEC3 was provided by the zone file. * * The rejects are NSEC3 records whose names where expected but with a different content. * Typically it's because there is an unexpected record from the zone in the NSEC3 chain that implies a different "next" value in previous rdata. * That happened when a bug in named generated a NSEC3 record for '.' when it was not expected (the named code was fixed in a following release) * But if it was the case, the "discarded" count would be > 0. * What remains is an issue with the types bit mask for the covered domain, or maybe an OPT-OUT/OPT-IN mix that would give a bad reaction (but unlikely). * Since .de has more records types than .eu, the bitmask is most probable cause. * * The output will be on the debug channel. */ rdata_desc nsec3_desc = {TYPE_NSEC3, cr->rdata_size, cr->rdata}; log_warn("nsec3: %{digest32h} %{typerdatadesc} rejected (do not agree with rdata value).", item->digest, &nsec3_desc); zdb_packed_ttlrdata *nsec3_ttlrdata; const zdb_packed_ttlrdata *nsec3_ttlrdata_rrsig; u8 *owner; u8 *pool; u8 pool_buffer[NSEC3_ZONE_ITEM_TO_NEW_ZDB_PACKED_TTLRDATA_SIZE]; pool = pool_buffer; nsec3_zone_item_to_new_zdb_packed_ttlrdata_parm nsec3_parms = { n3, item, zone->origin, &pool, min_ttl }; nsec3_zone_item_to_new_zdb_packed_ttlrdata(&nsec3_parms, &owner, &nsec3_ttlrdata, &nsec3_ttlrdata_rrsig); if(nsec3_ttlrdata != NULL) { rdata_desc nsec3_desc = {TYPE_NSEC3, nsec3_ttlrdata->rdata_size, &nsec3_ttlrdata->rdata_start[0]}; log_warn("nsec3: computed: %{dnsname} %{typerdatadesc}", owner, &nsec3_desc); nsec3_desc.len = cr->rdata_size; nsec3_desc.rdata = cr->rdata; log_warn("nsec3: received: %{dnsname} %{typerdatadesc}", owner, &nsec3_desc); } #endif nsec3_rejected++; nsec3_zone_item_rrsig_delete_all(item); } else { nsec3_accepted++; } } else { #if 1 /* * Threre are no discarded NSEC3 records in the investigated issue, but in case the issue evolves, this information may help. */ rdata_desc nsec3_desc = {TYPE_NSEC3, cr->rdata_size, cr->rdata}; log_warn("nsec3: discarded: %{digest32h} %{typerdatadesc}", cr->digest, &nsec3_desc); #endif nsec3_discarded++; } /* Destroy the rrsig */ free(cr->digest); free(cr->rdata); free(cr); nsec3s->data[i] = NULL; } log_info("nsec3: accept: %u reject: %u discard: %u", nsec3_accepted, nsec3_rejected, nsec3_discarded); /* * The caller needs to destroy the context * A signature update should be called too */ context->rrsig_added = rrsig_added; context->rrsig_ignored = rrsig_ignored; context->rrsig_discarded = rrsig_discarded; context->nsec3_accepted = nsec3_accepted; context->nsec3_rejected = nsec3_rejected; context->nsec3_discarded = nsec3_discarded; return SUCCESS; } /* * A slave cannot choose what is right or not */ ya_result nsec3_load_forced(nsec3_load_context *context) { /* * Note: All the nsec3param have already been initialized * * 1) * * Compute the nsec3 for all available nsec3param * * 2) * * Add all loaded rrsig records in the relevant nsec3 record, ignore the dups. * * 3) * * Check that all loaded nsec3 record is a perfect match of the computed nsec3 * record. Destroy the signature of the failed NSEC3 records (issue a warning ?) * * When everything is done, we need to expect an update of the signatures * */ zdb_zone* zone = context->zone; u32 min_ttl = 900; zdb_zone_getminttl(zone, &min_ttl); s32 i; /* * NOTE: should I enable the NSEC3 flag here already ? */ /* 1) */ nsec3_update_zone(context->zone); /* 2) */ u32 rrsig_added = 0; u32 rrsig_ignored = 0; u32 rrsig_discarded = 0; ptr_vector* rrsigs = &context->rrsig; s32 rrsig_count = rrsigs->offset + 1; for(i = 0; i < rrsig_count; i++) { nsec3_context_record* cr = (nsec3_context_record*)rrsigs->data[i]; /* NSEC3 Label: cr->digest */ nsec3_zone_item* item = nsec3_label_search(zone, cr->digest, NULL); if(item != NULL) { /* * We found the NSEC3 label */ if(item->rrsig == NULL) { /* * Build a copy of the ttl/rdata, ignore dups * The macro does not sets the next pointer. * This is why I have to set it to NULL. */ ZDB_RECORD_ZALLOC(item->rrsig, cr->ttl, cr->rdata_size, cr->rdata); item->rrsig->next = NULL; rrsig_added++; } else { rrsig_ignored++; } } else { rrsig_discarded++; } /* Destroy the rrsig */ free(cr->digest); free(cr->rdata); free(cr); rrsigs->data[i] = NULL; } log_debug("nsec3: rrsig: add: %u ignore: %u discard: %u", rrsig_added, rrsig_ignored, rrsig_discarded); /* 3) */ ptr_vector* nsec3s = &context->nsec3; u32 nsec3_accepted = 0; u32 nsec3_rejected = 0; u32 nsec3_discarded = 0; s32 nsec3_count = nsec3s->offset + 1; for(i = 0; i < nsec3_count; i++) { nsec3_context_record* cr = (nsec3_context_record*)nsec3s->data[i]; /* NSEC3 Label: cr->digest */ nsec3_zone* n3; nsec3_zone_item* item = nsec3_label_search(zone, cr->digest, &n3); if(item != NULL) { /* * We found the NSEC3 label, we have to compare it to the one * it was supposed to be */ if(!nsec3_zone_item_equals_rdata(n3, item, cr->rdata_size, cr->rdata)) { /* * Didn't matched: The signature, if any, will be wrong */ log_debug("nsec3: %{digest32h} rejected.", item->digest); #if 1 nsec3_zone_item_equals_rdata(n3, item, cr->rdata_size, cr->rdata); #endif nsec3_rejected++; nsec3_zone_item_rrsig_delete_all(item); } else { nsec3_accepted++; } } else { nsec3_discarded++; } /* Destroy the rrsig */ free(cr->digest); free(cr->rdata); free(cr); nsec3s->data[i] = NULL; } log_debug("nsec3: nsec3: accept: %u reject: %u discard: %u", nsec3_accepted, nsec3_rejected, nsec3_discarded); /* * The caller needs to destroy the context * A signature update should be called too */ return SUCCESS; } bool nsec3_load_is_context_empty(nsec3_load_context* ctx) { return (ctx->zone == NULL) || ((ctx->nsec3.offset < 0) && (ctx->rrsig.offset < 0)); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/dynupdate_update.c0000644000077100007710000000012412650131756022474 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.340344 30 ctime=1454597652.309344534 yadifa-2.1.6-5826/lib/dnsdb/src/dynupdate_update.c0000664000077100007710000016600512650131756022311 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbupdate Dynamic update functions * @ingroup dnsdb * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include #include #include "dnsdb/zdb_types.h" #include "dnsdb/dynupdate.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_sanitize.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_listener.h" #include extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #if ZDB_HAS_DNSSEC_SUPPORT != 0 #include "dnsdb/dnssec.h" #include "dnsdb/rrsig_updater.h" #if ZDB_HAS_NSEC_SUPPORT != 0 #include "dnsdb/nsec.h" #include "dnsdb/nsec_collection.h" #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 #include "dnsdb/nsec3_rrsig_updater.h" #endif /* * The dynamic update is made in the main thread (so it can write) */ #endif #define ZDB_RRSIGUPQ_TAG 0x5150554749535252 /* RRSIGUPQ @TODO put the tags in a centralised place */ /** * IXFR is prepared here. * Update query => IXFR * * The catch is in "=>" * * +X +Y +Z -Y => +X +Z * * So I have to get all modified records in a collection that gets the adds and * subs and then use this collection to generate the IXFR * * If a sub succeeded: add the record in "-" mode, merge previous mode * If a sub failed: do nothing * If an add succeeded: add the record in "+" mode, merge previous mode * * -+ => NOP * +- => NOP * -- => - * ++ => + * + => + * - => - * * @todo check remove NSEC3PARAM */ #define MAX_HANDLED_UPDATES_RECORDS 5956 typedef struct label_update_status label_update_status; /* At most 5956 entries */ struct label_update_status { zdb_rr_label *label; u8 *dname; u16 rtype; bool remove; bool inversed; }; #if ZDB_HAS_DNSSEC_SUPPORT != 0 static ya_result dynupdate_update_rrsig_body(zdb_zone *zone, ptr_set *lus_set) { ya_result return_code; dnsname_stack path; rrsig_updater_parms parms; ZEROMEMORY(&parms, sizeof(rrsig_updater_parms)); rrsig_updater_init(&parms, zone); //rrsig_updater_process_zone(&parms); // with only the required labels if(FAIL(return_code = dnssec_process_begin(&parms.task))) { return return_code; } ptr_set_avl_iterator lus_iter; ptr_set_avl_iterator_init(lus_set, &lus_iter); while(ptr_set_avl_iterator_hasnext(&lus_iter)) { ptr_node *lus_node = ptr_set_avl_iterator_next_node(&lus_iter); label_update_status *lus = (label_update_status *)lus_node->value; if(!lus->inversed) { dnsname_to_dnsname_stack(lus->dname, &path); } else { /* the only difference is the order of the map */ dnsname_to_dnsname_vector(lus->dname, (dnsname_vector*)&path); } /* * If the label is marked as "updating" and contains records ... */ if(((lus->label->flags & ZDB_RR_LABEL_UPDATING) != 0) && LABEL_HAS_RECORDS(lus->label)) { lus->label->flags &= ~ZDB_RR_LABEL_UPDATING; rrsig_update_item_s *query; MALLOC_OR_DIE(rrsig_update_item_s*, query, sizeof(rrsig_update_item_s), ZDB_RRSIGUPQ_TAG); query->label = lus->label; MEMCOPY(&query->path.labels[0], &path.labels[0], (path.size + 1) * sizeof (u8*)); query->path.size = path.size; query->added_rrsig_sll = NULL; query->removed_rrsig_sll = NULL; query->zone = zone; /* * The label from root TLD and the zone cut have one thing in common: * The label (relative path from the previous node) has got a size of 0 */ if(lus->label->name[0] != 0) { bool delegation = (zdb_record_find(&lus->label->resource_record_set, TYPE_NS) != NULL); if(delegation) { lus->label->flags |= ZDB_RR_LABEL_DELEGATION; } } #ifdef DEBUG log_debug("dynupdate_update_rrsig_body: queuing %{dnsnamestack}", &path); #endif threaded_queue_enqueue(&parms.task.dnssec_task_query_queue, query); } } dnssec_process_end(&parms.task); rrsig_updater_commit(&parms); rrsig_updater_finalize(&parms); return SUCCESS; } #if ZDB_HAS_NSEC3_SUPPORT != 0 static inline void dynupdate_update_nsec3_body_postdel(zdb_zone *zone, ptr_vector *candidates, ptr_set *nsec3_del, zdb_rr_label *label, u8 *dname) { if(!RR_LABEL_HASSUBORREC(label)) { ptr_vector_append(candidates, dnsname_dup(dname)); if(!ZDB_LABEL_ISAPEX(label)) { /* * Now maybe a parent has got the same issue. So .. * for all parents of label * if the parent only exists because of ONE sub and the dnssec, then * add its NSEC3 to the del list and * add its name to this array */ dnslabel_vector name_path; s32 path_index = dnsname_to_dnslabel_stack(dname, name_path); zdb_rr_label *label_path[128]; int index = zone->origin_vector.size; zdb_rr_label *rr_label = zone->apex; label_path[index++] = rr_label; while(index < path_index) { const u8* dns_label = name_path[index]; rr_label = zdb_rr_label_find_child(rr_label, dns_label); if(rr_label == NULL) { break; } label_path[index++] = rr_label; } for(index = path_index - 1; index > zone->origin_vector.size; index--) { dname += *dname + 1; zdb_rr_label *rr_label = label_path[index]; if(btree_notempty(rr_label->resource_record_set)) { break; } if(dictionary_size(&rr_label->sub) > 1) { break; } // no records and only one child that is about to be removed if(rr_label->nsec.nsec3 != NULL) { ptr_set_avl_insert(nsec3_del, rr_label->nsec.nsec3->self)->value = rr_label; } ptr_vector_append(candidates, dnsname_dup(dname)); } } } } static inline void dynupdate_update_nsec_body_postdel(zdb_zone *zone, ptr_vector *candidates, ptr_set *nsec_del, zdb_rr_label *label, u8 *dname) { if(!RR_LABEL_HASSUBORREC(label)) { if(label->nsec.nsec.node != NULL) { ptr_set_avl_insert(nsec_del, label->nsec.nsec.node)->value = label; } ptr_vector_append(candidates, dnsname_dup(dname)); if(!ZDB_LABEL_ISAPEX(label)) { /* * Now maybe a parent has got the same issue. So .. * for all parents of label * if the parent only exists because of ONE sub and the dnssec, then * add its NSEC3 to the del list and * add its name to this array */ dnslabel_vector name_path; s32 path_index = dnsname_to_dnslabel_stack(dname, name_path); zdb_rr_label *label_path[128]; int index = zone->origin_vector.size; zdb_rr_label *rr_label = zone->apex; label_path[index++] = rr_label; while(index < path_index) { const u8* dns_label = name_path[index]; rr_label = zdb_rr_label_find_child(rr_label, dns_label); if(rr_label == NULL) { break; } label_path[index++] = rr_label; } for(index = path_index - 1; index > zone->origin_vector.size; index--) { dname += *dname + 1; zdb_rr_label *rr_label = label_path[index]; if(btree_notempty(rr_label->resource_record_set)) { break; } if(dictionary_size(&rr_label->sub) > 1) { break; } // no records and only one child that is about to be removed if(rr_label->nsec.nsec.node != NULL) { ptr_set_avl_insert(nsec_del, rr_label->nsec.nsec.node)->value = rr_label; } ptr_vector_append(candidates, dnsname_dup(dname)); } } } } static ya_result dynupdate_update_nsec3_body(zdb_zone *zone, ptr_set *lus_set) { #if DEBUG log_debug1("update: %{dnsname} updating NSEC3 body", zone->origin); #endif bool opt_out = ((zone->apex->flags & ZDB_RR_LABEL_NSEC3_OPTOUT) != 0); ptr_set nsec3_del = PTR_SET_EMPTY; ptr_set nsec3_upd = PTR_SET_EMPTY; ptr_vector label_del = EMPTY_PTR_VECTOR; dnsname_stack path; ya_result return_code; ptr_set_avl_iterator lus_iter; ptr_set_avl_iterator_init(lus_set, &lus_iter); while(ptr_set_avl_iterator_hasnext(&lus_iter)) { ptr_node *lus_node = ptr_set_avl_iterator_next_node(&lus_iter); label_update_status *lus = (label_update_status *)lus_node->value; #if DEBUG log_debug1("update: %{dnsname} updating NSEC3 body: %{dnsname}", zone->origin, lus->dname); #endif dnsname_to_dnsname_stack(lus->dname, &path); zdb_rr_label *label = lus->label; /* dnssec_process_rr_label(lus->label, task); */ if(((label->flags & ZDB_RR_LABEL_UPDATING) != 0)) { label->flags &= ~ZDB_RR_LABEL_UPDATING; if(LABEL_HAS_RECORDS(label)) { /* * Check if the label needs nsec * If it does, update it if needed then request for a signature * If it does not, delete it if needed along with its signature */ /* bool has_ds = zdb_record_find(&label->resource_record_set, TYPE_DS) != NULL; bool has_no_ns = zdb_record_find(&label->resource_record_set, TYPE_NS) == NULL; bool nsec_covered = (zone->apex == label) || has_ds || has_no_ns; */ #if DEBUG log_debug2("update: %{dnsname} updating NSEC3 body: %{dnsname}: is label covered", zone->origin, lus->dname); #endif bool nsec_covered = nsec3_is_label_covered(label, opt_out); if(nsec_covered) { dnslabel_vector labels; s32 labels_top = dnsname_to_dnslabel_vector(lus->dname, labels); bool new_one = label->nsec.nsec3 == NULL; #if DEBUG log_debug2("update: %{dnsname} updating NSEC3 body: %{dnsname}: update label", zone->origin, lus->dname); #endif if(nsec3_update_label(zone, label, labels, labels_top)) { ptr_set_avl_insert(&nsec3_upd, label->nsec.nsec3->self)->value = label; if(new_one) /* if it's a new insert, the previous nsec3 will have to be updated */ { nsec3_zone_item *pred = nsec3_avl_node_mod_prev(label->nsec.nsec3->self); yassert(pred != NULL); ptr_set_avl_insert(&nsec3_upd, pred)->value = label; nsec3_zone* n3 = nsec3_zone_from_item(zone, pred); zdb_listener_notify_remove_nsec3(zone, pred, n3, 0); } /* The item has already been updated, it cannot be notified here (its image is already the new one) nsec3_zone* n3 = nsec3_zone_from_item(zone, label->nsec.nsec3->self); if(!new_one) { zdb_listener_notify_remove_nsec3(zone, label->nsec.nsec3->self, n3, 0); } */ } #if DEBUG log_debug2("update: %{dnsname} updating NSEC3 body: %{dnsname}: update label done", zone->origin, lus->dname); #endif // else the NSEC3 record didn't changed } else { /* @TODO remove nsec3 for label * The previous NSEC3 will have to be processed for re-signature */ #if DEBUG log_debug2("update: %{dnsname} updating NSEC3 body: %{dnsname}: add to delete set", zone->origin, lus->dname); #endif if(label->nsec.nsec3 != NULL) { ptr_set_avl_insert(&nsec3_del, label->nsec.nsec3->self)->value = label; } /* check if the label will need to be destroyed after the NSEC3 is removed */ dynupdate_update_nsec3_body_postdel(zone, &label_del, &nsec3_del, label, lus->dname); #if DEBUG log_debug2("update: %{dnsname} updating NSEC3 body: %{dnsname}: add to delete set done", zone->origin, lus->dname); #endif } } else { /* remove nsec3, update the pred */ #if DEBUG log_debug2("update: %{dnsname} updating NSEC3 body: %{dnsname}: add to delete set 2", zone->origin, lus->dname); #endif if(label->nsec.nsec3 != NULL) { ptr_set_avl_insert(&nsec3_del, label->nsec.nsec3->self)->value = label; } dynupdate_update_nsec3_body_postdel(zone, &label_del, &nsec3_del, label, lus->dname); #if DEBUG log_debug2("update: %{dnsname} updating NSEC3 body: %{dnsname}: add to delete set done 2", zone->origin, lus->dname); #endif } } } /* * The treeset does not contain any dup and is sorted already */ /* * Remove the nsec3 of the del set from the upd set and from the db */ #if DEBUG log_debug1("update: %{dnsname} NSEC3 body: removing deleted set from the db", zone->origin); #endif ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&nsec3_del, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); nsec3_zone_item *nsec3_item = (nsec3_zone_item*)node->key; zdb_rr_label *label = (zdb_rr_label*)node->value; nsec3_zone_item *pred = nsec3_avl_node_mod_prev(nsec3_item); /* Add the del's pred to the 'to update' */ ptr_set_avl_insert(&nsec3_upd, pred); nsec3_zone* n3 = nsec3_zone_from_item(zone, nsec3_item); zdb_listener_notify_remove_nsec3(zone, pred, n3, 0); zdb_listener_notify_remove_nsec3(zone, nsec3_item, n3, 0); /* Remove the del from the 'to update' */ ptr_set_avl_delete(&nsec3_upd, nsec3_item); nsec3_remove_label(zone, label); } /* * All nsec3 candidates to be resigned are in nsec3_upd */ #if DEBUG log_debug1("update: %{dnsname} NSEC3 body: nsec3 resigning candidates", zone->origin); #endif nsec3_rrsig_updater_parms parms; ZEROMEMORY(&parms, sizeof(nsec3_rrsig_updater_parms)); nsec3_rrsig_updater_init(&parms, zone); if(FAIL(return_code = dnssec_process_begin(&parms.task))) { return return_code; } ptr_set_avl_iterator_init(&nsec3_upd, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); nsec3_zone_item *nsec3_item = (nsec3_zone_item*)node->key; /*zdb_rr_label *label = (zdb_rr_label*)node->value;*/ /* dnssec_process_rr_label(lus->label, task); */ nsec3_zone* n3 = nsec3_zone_from_item(zone, nsec3_item); zdb_listener_notify_add_nsec3(zone, nsec3_item, n3, 0); nsec3_rrsig_update_item_s* query; MALLOC_OR_DIE(nsec3_rrsig_update_item_s*, query, sizeof (nsec3_rrsig_update_item_s), ZDB_RRSIGUPQ_TAG); query->zone = zone; query->item = nsec3_item; query->next = nsec3_avl_node_mod_next(nsec3_item); query->added_rrsig_sll = NULL; query->removed_rrsig_sll = NULL; threaded_queue_enqueue(&parms.task.dnssec_task_query_queue, query); } dnssec_process_end(&parms.task); nsec3_rrsig_updater_commit(&parms); nsec3_rrsig_updater_finalize(&parms); #if DEBUG log_debug1("update: %{dnsname} NSEC3 body: deleting records from zone", zone->origin); #endif ptr_set_avl_destroy(&nsec3_upd); ptr_set_avl_destroy(&nsec3_del); for(s32 i = 0; i <= label_del.offset; i++) { u8 *qname = (u8*)label_del.data[i]; /* delete qname */ dnslabel_vector name_path; s32 path_index = dnsname_to_dnslabel_stack(qname, name_path); zdb_rr_label_delete_record(zone, name_path, (path_index - zone->origin_vector.size) - 1, TYPE_ANY); free(qname); } #if DEBUG log_debug1("update: %{dnsname} NSEC3 body updated", zone->origin); #endif return SUCCESS; } #endif #if ZDB_HAS_NSEC_SUPPORT != 0 /** * * For each label * If the label needs an NSEC node * If the label has no NSEC record/node * Add the node, not the record * Else * It's for later * Fi * * Add in the "update" set * Else * Add in the "delete" set * Fi * Rof * * For each "deletion" (preferably in reverse order) * Remove the node & record & signature & "update" set * Add the pred in the "update" set * Rof * * For each "addition" * Update the node & record * Rof * * @param zone * @param lus_set * @return */ /** * * Returns true if the tree contains only RRSIG and NSEC records * * @TODO rewrite in a more compact form after debugging * * @param tree * @return */ static bool dynupdate_update_is_empty_nsec(zdb_rr_collection tree) { btree_node *node = tree; if(node != NULL) { if(node->hash == TYPE_RRSIG) { if(node->children.lr.left == NULL) { if(node->children.lr.right != NULL) { if(node->children.lr.right->hash == TYPE_NSEC) { if(node->children.lr.right->children.lr.left == NULL) { if(node->children.lr.right->children.lr.right == NULL) { return TRUE; } } } } } } else if(node->hash == TYPE_NSEC) { if(node->children.lr.left == NULL) { if(node->children.lr.right == NULL) { return TRUE; } } } } return FALSE; } static ya_result dynupdate_update_nsec(zdb_zone* zone, ptr_set *lus_set) { dnsname_stack dname_stack; ptr_set nsec_del = PTR_SET_EMPTY; ptr_set nsec_upd = PTR_SET_EMPTY; ptr_vector label_del = EMPTY_PTR_VECTOR; ptr_set_avl_iterator lus_iter; ptr_set_avl_iterator_init(lus_set, &lus_iter); while(ptr_set_avl_iterator_hasnext(&lus_iter)) { ptr_node *lus_node = ptr_set_avl_iterator_next_node(&lus_iter); label_update_status *lus = (label_update_status *)lus_node->value; dnsname_to_dnsname_stack(lus->dname, &dname_stack); zdb_rr_label* label = lus->label; if((label->flags & ZDB_RR_LABEL_UPDATING) != 0) { label->flags &= ~ZDB_RR_LABEL_UPDATING; if(LABEL_HAS_RECORDS(label)) { #ifdef DEBUG log_debug("dynupdate_update_nsec: pre-processing %{dnsname}", lus->dname); #endif bool hasonlynsec = dynupdate_update_is_empty_nsec(label->resource_record_set); bool nsec_covered = !zdb_rr_label_is_glue(label) && !hasonlynsec; if(nsec_covered) { dnslabel_vector labels; s32 labels_top = dnsname_to_dnslabel_vector(lus->dname, labels); bool new_one = label->nsec.nsec.node == NULL; nsec_update_label_node(zone, label, labels, labels_top); #ifdef DEBUG log_debug("dynupdate_update_nsec: marking for update %{dnsname}", lus->dname); #endif ptr_set_avl_insert(&nsec_upd, label->nsec.nsec.node); /* I only need the label, I don't set the data */ if(new_one) { ptr_set_avl_insert(&nsec_upd, nsec_avl_node_mod_prev(label->nsec.nsec.node)); } } else { /* @TODO remove nsec for label * The previous NSEC will have to be processed for re-signature */ if(lus->label->nsec.nsec.node != NULL) { /* I only need the label, I don't set the data */ #ifdef DEBUG log_debug("dynupdate_update_nsec: marking for delete %{dnslabel}", label->name); #endif ptr_set_avl_insert(&nsec_del, label->nsec.nsec.node); /* * If I do it now, it is possible that an insert is made after * => said insert will itself require the pred to be done. Good for me. * If I do it now, it is possible that a delete remove it (I don't care) * => said delete will itself require the update of a pred * => A B C D, del C-> up B, del B -> up A * => A B C D, del B -> up A, del C -> up B * * So I can schedule the pred for update here */ nsec_node *pred = nsec_avl_node_mod_prev(label->nsec.nsec.node); yassert(pred != NULL); /* * I don't care about collisions because content is not allocated */ if(pred != label->nsec.nsec.node) { #ifdef DEBUG log_debug("dynupdate_update_nsec: marking for update %{dnslabel} (pred del)", pred->label->name); #endif ptr_set_avl_insert(&nsec_upd, pred); /* I only need the label, I don't set the data */ } } } } else if(!RR_LABEL_HASSUB(label)) { /* No recs nor subs */ if(label->nsec.nsec.node != NULL) { dynupdate_update_nsec_body_postdel(zone, &label_del, &nsec_del, label, lus->dname); } } } } ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&nsec_del, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); nsec_node *nsec_item = (nsec_node*)node->key; // Remove the record & signature & "update" set & node zdb_rr_label *label = nsec_item->label; u8 tmp_name[MAX_DOMAIN_LENGTH]; nsec_inverse_name(tmp_name, nsec_item->inverse_relative_name); zdb_packed_ttlrdata *nsec_record = zdb_record_find(&label->resource_record_set, TYPE_NSEC); while(nsec_record != NULL) { zdb_ttlrdata unpacked_ttlrdata; unpacked_ttlrdata.ttl = nsec_record->ttl; unpacked_ttlrdata.rdata_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(nsec_record); unpacked_ttlrdata.rdata_pointer = ZDB_PACKEDRECORD_PTR_RDATAPTR(nsec_record); zdb_listener_notify_remove_record(zone, tmp_name, TYPE_NSEC, &unpacked_ttlrdata); nsec_record = nsec_record->next; } zdb_record_delete(&label->resource_record_set, TYPE_NSEC); rrsig_delete(zone, tmp_name, label, TYPE_NSEC); /* Empty-terminal issue ? */ nsec_node *pred = nsec_avl_node_mod_prev(nsec_item); if(pred != nsec_item) { ptr_set_avl_insert(&nsec_upd, pred); /* I only need the label, I don't set the data */ ptr_set_avl_delete(&nsec_upd, nsec_item); } if(label->resource_record_set == NULL) { /* remove the label from the db */ dnslabel_vector name_path; s32 path_index = dnsname_to_dnslabel_stack(nsec_item->inverse_relative_name, name_path); label->nsec.nsec.node = NULL; zdb_rr_label_delete_record(zone, name_path, (path_index - zone->origin_vector.size) - 1, TYPE_ANY); /* remove LABEL from the lus */ ptr_node *lus_node = ptr_set_avl_find(lus_set, label); if(lus_node != NULL) { ZFREE(lus_node->value, label_update_status); ptr_set_avl_delete(lus_set, label); } } nsec_avl_delete(&zone->nsec.nsec, nsec_item->inverse_relative_name); } /* * All nsec candidates to be resigned are in nsec_upd */ ptr_set_avl_iterator_init(&nsec_upd, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); nsec_node *nsec_item = (nsec_node*)node->key; nsec_node *next_nsec_item = nsec_avl_node_mod_next(nsec_item); u8 name[MAX_DOMAIN_LENGTH]; nsec_inverse_name(name, nsec_item->inverse_relative_name); if(nsec_update_label_record(zone, nsec_item->label, nsec_item, next_nsec_item, name)) { /* * NSEC are signed the same way as any record, do a simple signature here * * So I could just ask for an update of the labels instead */ #ifdef DEBUG log_debug("dynupdate_update_nsec: %{dnsname} changed: scheduling", nsec_item->inverse_relative_name); #endif nsec_item->label->flags |= ZDB_RR_LABEL_UPDATING; ptr_node *lus_node = ptr_set_avl_insert(lus_set, nsec_item->label); if(lus_node->value == NULL) { label_update_status *lus; ZALLOC_OR_DIE(label_update_status*,lus,label_update_status,GENERIC_TAG); lus->label = nsec_item->label; lus->dname = nsec_item->inverse_relative_name; lus->rtype = TYPE_NSEC; lus->remove = FALSE; lus->inversed = TRUE; lus_node->value = lus; } } else { #ifdef DEBUG log_debug("dynupdate_update_nsec: %{dnsname} didn't changed", nsec_item->inverse_relative_name); #endif } } ptr_set_avl_destroy(&nsec_upd); ptr_set_avl_destroy(&nsec_del); for(s32 i = 0; i <= label_del.offset; i++) { u8 *qname = (u8*)label_del.data[i]; /* delete qname */ dnslabel_vector name_path; s32 path_index = dnsname_to_dnslabel_stack(qname, name_path); zdb_rr_label_delete_record(zone, name_path, (path_index - zone->origin_vector.size) - 1, TYPE_ANY); free(qname); } return SUCCESS; } #endif #endif static void label_update_status_destroy(ptr_set* lus_setp) { ptr_set_avl_iterator lus_iter; ptr_set_avl_iterator_init(lus_setp, &lus_iter); while(ptr_set_avl_iterator_hasnext(&lus_iter)) { ptr_node *lus_node = ptr_set_avl_iterator_next_node(&lus_iter); label_update_status *lus = (label_update_status *)lus_node->value; ZFREE(lus,label_update_status); } ptr_set_avl_destroy(lus_setp); } /** * * The zone has already been acquired by the caller (not async) * * @param zone * @param reader * @param count * @param dryrun * @return */ ya_result dynupdate_update(zdb_zone *zone, packet_unpack_reader_data *reader, u16 count, bool dryrun) { if(ZDB_ZONE_INVALID(zone)) { return ZDB_ERROR_ZONE_INVALID; } if(count == 0) { return SUCCESS; } dnsname_vector origin_path; dnsname_vector name_path; #ifdef DEBUG memset(&origin_path, 0xff, sizeof(origin_path)); memset(&name_path, 0xff, sizeof(name_path)); #endif ptr_vector nsec3param_rrset; u8* rname; u8* rdata; u32 rname_size; u32 rttl; u16 rtype; u16 rclass; u16 rdata_size; u8 wire[MAX_DOMAIN_LENGTH + 10 + 65535]; #ifdef DEBUG rdata = (u8*)~0; // DEBUG rname_size = ~0; // DEBUG rttl = ~0; // DEBUG rtype = ~0; // DEBUG rclass = ~0; // DEBUG rdata_size = ~0; // DEBUG #endif ya_result edit_status; bool changes_occurred = FALSE; #if ZDB_HAS_DNSSEC_SUPPORT bool dnssec_zone = (zone->apex->nsec.dnssec != NULL); if(dnssec_zone) { ya_result return_code = SUCCESS; /* ensure all the private keys are available or servfail */ const zdb_packed_ttlrdata *dnskey = zdb_zone_get_dnskey_rrset(zone); int ksk_count = 0; int zsk_count = 0; if(dnskey != NULL) { char origin[MAX_DOMAIN_LENGTH]; dnsname_to_cstr(origin, zone->origin); do { u16 flags = DNSKEY_FLAGS(*dnskey); //u8 protocol = DNSKEY_PROTOCOL(*dnskey); u8 algorithm = DNSKEY_ALGORITHM(*dnskey); u16 tag = DNSKEY_TAG(*dnskey); // note: expensive dnssec_key *key = NULL; if(FAIL(return_code = dnssec_key_load_private(algorithm, tag, flags, origin, &key))) { log_warn("update: unable to load the private key 'K%{dnsname}+%03d+%05d': %r", zone->origin, algorithm, tag, return_code); } if(flags == DNSKEY_FLAGS_KSK) { ++ksk_count; } else if(flags == DNSKEY_FLAGS_ZSK) { ++zsk_count; } dnskey = dnskey->next; } while(dnskey != NULL); } else { log_warn("update: there are no private keys in the zone %{dnsname}", zone->origin); return_code = DNSSEC_ERROR_RRSIG_NOZONEKEYS; } if(FAIL(return_code)) { return return_code; } } #endif ptr_set lus_set = PTR_SET_EMPTY; ptr_set_avl_iterator lus_iter; #ifdef DEBUG memset(&lus_iter, 0xff, sizeof(lus_iter)); #endif #if ZDB_HAS_DNSSEC_SUPPORT != 0 // generates an array of the current nsec3param in the zone ptr_vector_init(&nsec3param_rrset); zdb_packed_ttlrdata *n3prrset = zdb_record_find(&zone->apex->resource_record_set, TYPE_NSEC3PARAM); while(n3prrset != NULL) { ptr_vector_append(&nsec3param_rrset, n3prrset); n3prrset = n3prrset->next; } #endif dnsname_to_dnsname_vector(zone->origin, &origin_path); do { ya_result return_value; if(FAIL(return_value = packet_reader_read_record(reader, wire, sizeof(wire)))) { /* if the return code says that the record was invalid, then the buffer has been filled up and including rdata_size */ switch(return_value) { case INVALID_RECORD: case INCORRECT_IPADDRESS: case UNSUPPORTED_RECORD: { rname = wire; rname_size = dnsname_len(wire); rtype = ntohs(GET_U16_AT(wire[rname_size])); log_err("update: %{dnsname} bogus %{dnstype} record: %r", rname, &rtype, return_value); break; } default: { log_err("update: reading update for zone %{dnsname}: %r", zone->origin, return_value); break; } } label_update_status_destroy(&lus_set); ptr_vector_destroy(&nsec3param_rrset); return SERVER_ERROR_CODE(RCODE_FORMERR); } rname = wire; rname_size = dnsname_len(wire); rtype = GET_U16_AT(wire[rname_size]); rclass = GET_U16_AT(wire[rname_size + 2]); rttl = ntohl(GET_U32_AT(wire[rname_size + 4])); rdata_size = ntohs(GET_U16_AT(wire[rname_size + 8])); rdata = &wire[rname_size + 10]; /* * Simple consistency test: */ if((rdata_size == 0) && (rclass != CLASS_ANY)) { label_update_status_destroy(&lus_set); ptr_vector_destroy(&nsec3param_rrset); return SERVER_ERROR_CODE(RCODE_FORMERR); } dnsname_to_dnsname_vector(rname, &name_path); s32 idx; for(idx = 0; idx < origin_path.size; idx++) { if(!dnslabel_equals(origin_path.labels[origin_path.size - idx], name_path.labels[name_path.size - idx])) { log_err("update: %{dnsname} manual add/del of %{dnstype} records refused", rname, &rtype); label_update_status_destroy(&lus_set); ptr_vector_destroy(&nsec3param_rrset); return SERVER_ERROR_CODE(RCODE_NOTZONE); } } if((rtype == TYPE_NSEC) || (rtype == TYPE_NSEC3)) { // reject any dynupdate operation on a dnssec-maintained record. log_err("update: %{dnsname} manual add/del of %{dnstype} records refused", rname, &rtype); label_update_status_destroy(&lus_set); ptr_vector_destroy(&nsec3param_rrset); return SERVER_ERROR_CODE(RCODE_REFUSED); } #if ZDB_HAS_DNSSEC_SUPPORT // If the record is an NSEC3PARAM at the APEX if((rtype == TYPE_NSEC3PARAM) && dnsname_equals_ignorecase(zone->origin, rname)) { /// @note edf 20150915 -- the first NSEC3PARAM is the one used for queries. The other NSEC3PARAM chain must /// be complete before removing this one. /// And this tells the way to do this properly. /// When an NSEC3PARAM is added, all the required processing should be computed in the /// background. The NSEC3PARAM has to be added only at the end. /// When an NSEC3PARAM is removed (can be) it should only be removed at the end. /// All the changes must be written in the journal and should be visible in the DB. /// Deducing than an NSEC3PARAM is missing should be deduced from the NSEC3 without a chain. /// I may have to prevent YADIFA to accept an update when one is already on the way. /// This limitation may be removed later. /// @note edf 20150916 -- the zone needs to be marked as generating an NSEC3 chain. /// the zone needs to be marked as deleting an NSEC3 chain (which one) /// the program may be stopped while doing it so I need a way to tell what I'm doing /// in the journal. if(!ZONE_HAS_NSEC3PARAM(zone)) { // don't add/del NSEC3PARAM on a zone that is not already NSEC3 (it works if the zone is not secure // but only if the zone has keys already. So for now : disabled log_err("update: %{dnsname} NSEC3PARAM add/del refused on an non-dnssec3 zone", rname); label_update_status_destroy(&lus_set); ptr_vector_destroy(&nsec3param_rrset); return SERVER_ERROR_CODE(RCODE_REFUSED); } else { if(NSEC3_RDATA_ALGORITHM(rdata) != DNSSEC_DIGEST_TYPE_SHA1) { // don't touch an unsupported digest log_err("update: %{dnsname} NSEC3PARAM with unsupported digest algorithm", rname); label_update_status_destroy(&lus_set); ptr_vector_destroy(&nsec3param_rrset); return SERVER_ERROR_CODE(RCODE_REFUSED); } if(rclass == CLASS_ANY) { // don't remove all NSEC3PARAMs from an NSEC3 zone log_err("update: %{dnsname} cannot remove all NSEC3PARAM of an NSEC3 zone", rname); label_update_status_destroy(&lus_set); ptr_vector_destroy(&nsec3param_rrset); return SERVER_ERROR_CODE(RCODE_REFUSED); } else if(rclass == CLASS_NONE) { for(s32 i = 0; i <= nsec3param_rrset.offset; i++) { zdb_packed_ttlrdata *n3prrset = (zdb_packed_ttlrdata*)nsec3param_rrset.data[i]; if( rdata_size == ZDB_PACKEDRECORD_PTR_RDATASIZE(n3prrset) ) { if(memcmp(rdata , ZDB_PACKEDRECORD_PTR_RDATAPTR(n3prrset), rdata_size) == 0) { nsec3param_rrset.data[i] = nsec3param_rrset.data[nsec3param_rrset.offset]; nsec3param_rrset.data[nsec3param_rrset.offset] = NULL; nsec3param_rrset.offset--; /// @todo edf 20150915 -- the NSEC3PARAM chain has to be removed too ... } } } if(nsec3param_rrset.offset < 0) { // don't remove the first NSEC3PARAM from an NSEC3 zone log_err("update: %{dnsname} cannot remove the last NSEC3PARAM of an NSEC3 zone", rname); label_update_status_destroy(&lus_set); ptr_vector_destroy(&nsec3param_rrset); return SERVER_ERROR_CODE(RCODE_REFUSED); } } } } #endif if(rclass == CLASS_NONE) { /* delete from an rrset */ if(rttl != 0) { label_update_status_destroy(&lus_set); ptr_vector_destroy(&nsec3param_rrset); return SERVER_ERROR_CODE(RCODE_FORMERR); } if(name_path.size <= origin_path.size) { if((rtype == TYPE_SOA) || (rtype == TYPE_ANY)) { // refused return SERVER_ERROR_CODE(RCODE_REFUSED); } } if(!dryrun) { #ifdef DEBUG log_debug("update: delete %{dnsname} %{dnstype} ...", rname, &rtype); #endif zdb_rr_label* label = zdb_rr_label_find_exact(zone->apex, name_path.labels, (name_path.size - origin_path.size) - 1); if(label != NULL) { zdb_ttlrdata ttlrdata_tmp; ttlrdata_tmp.ttl = 0; ttlrdata_tmp.rdata_size = rdata_size; ttlrdata_tmp.rdata_pointer = rdata; /* * Check if we are about to remove the label. Add an NSEC/NSEC3 pre-processing here. * NSEC is not a problem but with NSEC3 it's possible that we removed everything */ if(ISOK(edit_status = zdb_rr_label_delete_record_exact(zone, name_path.labels, (name_path.size - origin_path.size) - 1, rtype, &ttlrdata_tmp))) { changes_occurred = TRUE; /* * Don't update IXFR: It has already been done in zdb_rr_label_delete_record_exact */ if(edit_status < ZDB_RR_LABEL_DELETE_NODE) /* node was not deleted */ { if(rtype != TYPE_ANY) { #if ZDB_HAS_DNSSEC_SUPPORT rrsig_delete(zone, rname, label, rtype); #endif if(RR_LABEL_RELEVANT(label)) /* Empty-termninal issue ! */ { label->flags |= ZDB_RR_LABEL_UPDATING; ptr_node *lus_node = ptr_set_avl_insert(&lus_set, label); if(lus_node->value == NULL) { label_update_status *lus; ZALLOC_OR_DIE(label_update_status*, lus, label_update_status, GENERIC_TAG); lus->label = label; lus->dname = rname; lus->rtype = rtype; lus->remove = TRUE; lus->inversed = FALSE; lus_node->value = lus; } } else { /* remove node */ zdb_rr_label_delete_record(zone, name_path.labels, (name_path.size - origin_path.size) - 1, TYPE_ANY); } } /* @TODO if only the dnssec remains, delete */ } else { ptr_node *lus_node = ptr_set_avl_find(&lus_set, label); if(lus_node != NULL) { ZFREE(lus_node->value, label_update_status); ptr_set_avl_delete(&lus_set, label); } } } } } } else if(rclass == CLASS_ANY) { if((rttl != 0) || (rdata_size != 0)) { label_update_status_destroy(&lus_set); ptr_vector_destroy(&nsec3param_rrset); return SERVER_ERROR_CODE(RCODE_FORMERR); } if(name_path.size <= origin_path.size) { if((rtype == TYPE_SOA) || (rtype == TYPE_ANY)) { // refused return SERVER_ERROR_CODE(RCODE_REFUSED); } } if(!dryrun) { #ifdef DEBUG log_debug("update: delete %{dnsname} %{dnstype} ...", rname, &rtype); #endif zdb_rr_label* label = zdb_rr_label_find_exact(zone->apex, name_path.labels, (name_path.size - origin_path.size) - 1); if(label != NULL) { /* * Don't update IXFR (remove rrset): Will be done in zdb_rr_label_delete_record */ if(ISOK(edit_status = zdb_rr_label_delete_record(zone, name_path.labels, (name_path.size - origin_path.size) - 1, rtype))) { changes_occurred = TRUE; /* * NSEC, NSEC3, RRSIG */ if(edit_status < ZDB_RR_LABEL_DELETE_NODE) { #if ZDB_HAS_DNSSEC_SUPPORT rrsig_delete(zone, rname, label, rtype); #endif /* * The label may only be there because it contains NSEC/NSEC3 records. * In this case, delete has to be asked again after dnssec fields have been detached and placed on a dummy. * */ if(RR_LABEL_RELEVANT(label)) /* Empty-terminal issue ! */ //if( (dictionary_notempty(&(label)->sub))||(btree_notempty((label)->resource_record_set)) ) { // something remains in the label label->flags |= ZDB_RR_LABEL_UPDATING; ptr_node *lus_node = ptr_set_avl_insert(&lus_set, label); if(lus_node->value == NULL) { label_update_status *lus; ZALLOC_OR_DIE(label_update_status*,lus,label_update_status,GENERIC_TAG); lus->label = label; lus->dname = rname; lus->rtype = rtype; lus->remove = TRUE; lus->inversed = FALSE; lus_node->value = lus; } } else { /* remove node */ zdb_rr_label_delete_record(zone, name_path.labels, (name_path.size - origin_path.size) - 1, TYPE_ANY); } /* @TODO if only the dnssec remains, delete */ } else { ptr_node *lus_node = ptr_set_avl_find(&lus_set, label); if(lus_node != NULL) { ZFREE(lus_node->value, label_update_status); ptr_set_avl_delete(&lus_set, label); } } } } } } else { /* add to an rrset */ if(!dryrun) { zdb_rr_label *label = zdb_rr_label_add(zone, name_path.labels, (name_path.size - origin_path.size) - 1); #ifdef DEBUG log_debug("update: add %{dnsname} %{dnstype} ...", rname, &rtype); #endif u16 flag_mask = 0; /** @todo there is potential for wrongness here ... * why don't I store directly in the label ? * test dynamic updates around CNAME */ bool record_accepted = TRUE; switch(rtype) { case TYPE_CNAME: { if((label->flags & ZDB_RR_LABEL_DROPCNAME) != 0) { log_err("update: add %{dnsname} CNAME: ignoring CNAME add on non-CNAME", zone->origin); record_accepted = FALSE; } else { flag_mask = ZDB_RR_LABEL_HASCNAME; } break; } case TYPE_RRSIG: case TYPE_NSEC: break; case TYPE_NS: if( (label->flags & ZDB_RR_LABEL_APEX) == 0) { label->flags |= ZDB_RR_LABEL_DELEGATION; } /* falltrough */ default: { if( (label->flags & ZDB_RR_LABEL_HASCNAME) != 0) { log_err("update: add %{dnsname} %{dnstype}: ignoring non-CNAME add on CNAME", zone->origin, &rtype); record_accepted = FALSE; } else { flag_mask = ZDB_RR_LABEL_DROPCNAME; if(rtype == TYPE_SOA) { /* * Ensure there are no other SOA */ zdb_record_delete(&label->resource_record_set, TYPE_SOA); rr_soa_get_minimumttl(rdata, rdata_size, &zone->min_ttl); } } break; } } label->flags |= flag_mask; /** @TODO : check */ if(record_accepted) { zdb_packed_ttlrdata* record; ZDB_RECORD_ZALLOC(record, rttl, rdata_size, rdata); if(zdb_record_insert_checked(&label->resource_record_set, rtype, record)) /* FB done (THIS IS A BOOLEAN !!!) */ { changes_occurred = TRUE; #if ZDB_HAS_DNSSEC_SUPPORT != 0 rrsig_delete(zone, rname, label, rtype); /* No empty-termninal issue */ #endif if((rtype == TYPE_NS) && ((label->flags & ZDB_RR_LABEL_APEX) == 0)) { label->flags |= ZDB_RR_LABEL_DELEGATION; } #if ZDB_HAS_DNSSEC_SUPPORT != 0 if(dnssec_zone) { label->flags |= ZDB_RR_LABEL_UPDATING; } #endif ptr_node *lus_node = ptr_set_avl_insert(&lus_set, label); if(lus_node->value == NULL) { label_update_status *lus; ZALLOC_OR_DIE(label_update_status*,lus,label_update_status,GENERIC_TAG); lus->label = label; lus->dname = rname; lus->rtype = rtype; lus->remove = FALSE; lus->inversed = FALSE; lus_node->value = lus; } /* * Add the label to the post-processing queue (NSEC, NSEC3, RRSIG) */ #if ZDB_CHANGE_FEEDBACK_SUPPORT != 0 /* * Update IXFR. * * NOTE: the zdb_rr_label set of functions are zdb_listener-aware but the zdb_record ones are not. * That's why this one needs a call to the listener. * */ if(rtype != TYPE_SOA) { zdb_ttlrdata unpacked_ttlrdata; unpacked_ttlrdata.rdata_pointer = &record->rdata_start[0]; unpacked_ttlrdata.rdata_size = record->rdata_size; unpacked_ttlrdata.ttl = record->ttl; zdb_listener_notify_add_record(zone, name_path.labels, name_path.size, rtype, &unpacked_ttlrdata); } #endif } else { ZDB_RECORD_ZFREE(record); } } } } } while(--count > 0); if(!dryrun) { ya_result return_value; dnsname_stack name_stack; ptr_set_avl_iterator_init(&lus_set, &lus_iter); while(ptr_set_avl_iterator_hasnext(&lus_iter)) { ptr_node *lus_node = ptr_set_avl_iterator_next_node(&lus_iter); label_update_status *lus = (label_update_status *)lus_node->value; #ifdef DEBUG memset(&name_stack, 0xff, sizeof(name_stack)); #endif dnsname_to_dnsname_stack(lus->dname, &name_stack); #ifdef DEBUG log_debug("update: sanitise %{dnsnamestack}", &name_stack); #endif if(((return_value = zdb_sanitize_rr_label_with_parent(zone, lus->label, &name_stack)) & SANITY_MUSTDROPZONE) != 0) { /** * Something bad happened. * * What do I do ? I can't really rollback because I already destroyed sets of records. * On another hand AFAIK only multiple SOAs can do this ... * */ log_err("update: sanitise reports that the zone should be dropped: %r", return_value); } } if(changes_occurred) { zdb_packed_ttlrdata* soa = zdb_record_find(&zone->apex->resource_record_set, TYPE_SOA); if(soa != NULL) { rr_soa_increase_serial(&soa->rdata_start[0], soa->rdata_size, 1); #if ZDB_HAS_DNSSEC_SUPPORT rrsig_delete(zone, zone->origin, zone->apex, TYPE_SOA); #endif } } } ya_result return_value = SUCCESS; #if ZDB_HAS_DNSSEC_SUPPORT != 0 if( !dryrun && (zone->apex->nsec.dnssec != NULL) && changes_occurred ) { /* * @TODO * * Actually all I should need to do here is build the list of labels to process with their full path * Then initialize a dnssec task, process the list using the right (to be written) callback on * dnssec_process_task and using the 'update' task * * Then I wait that all the tasks are done and from that point the zone should be ok. * * All text beyond this should be more or less obsolete (I made the callback system a few minutes ago) * */ ptr_node *lus_node = ptr_set_avl_insert(&lus_set, zone->apex); if(lus_node->value == NULL) { label_update_status *lus; ZALLOC_OR_DIE(label_update_status*, lus, label_update_status, GENERIC_TAG); lus->label = zone->apex; lus->dname = zone->origin; lus->rtype = TYPE_SOA; lus->remove = TRUE; lus->inversed = FALSE; lus_node->value = lus; } #if ZDB_HAS_NSEC_SUPPORT != 0 if((zone->apex->flags & ZDB_RR_LABEL_NSEC) != 0) { ptr_set_avl_iterator_init(&lus_set, &lus_iter); while(ptr_set_avl_iterator_hasnext(&lus_iter)) { ptr_node *lus_node = ptr_set_avl_iterator_next_node(&lus_iter); label_update_status *lus = (label_update_status *)lus_node->value; lus->label->flags |= ZDB_RR_LABEL_UPDATING; } /* * Will increase the lus_set content */ zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_DYNUPDATE); /** @todo : "give" the mutex instead of this */ dynupdate_update_nsec(zone, &lus_set); zdb_zone_lock(zone, ZDB_ZONE_MUTEX_DYNUPDATE); /** @todo : "give" the mutex instead of this */ } #endif dynupdate_update_rrsig_body(zone, &lus_set); #if ZDB_HAS_NSEC3_SUPPORT != 0 if(ISOK(return_value) && ((zone->apex->flags & ZDB_RR_LABEL_NSEC3) != 0)) { ptr_set_avl_iterator_init(&lus_set, &lus_iter); while(ptr_set_avl_iterator_hasnext(&lus_iter)) { ptr_node *lus_node = ptr_set_avl_iterator_next_node(&lus_iter); label_update_status *lus = (label_update_status *)lus_node->value; lus->label->flags |= ZDB_RR_LABEL_UPDATING; } dynupdate_update_nsec3_body(zone, &lus_set); } #endif } #endif label_update_status_destroy(&lus_set); ptr_vector_destroy(&nsec3param_rrset); return return_value; } /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_update_signatures.c0000644000077100007710000000012412650131756023522 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.427344 30 ctime=1454597652.504344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_update_signatures.c0000664000077100007710000002336612650131756023341 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnsdb * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include "dnsdb/zdb_types.h" #include "dnsdb/zdb_icmtl.h" #include "dnsdb/dnssec_keystore.h" #include "dnsdb/dnssec.h" #include "dnsdb/dnssec_task.h" #include "dnsdb/rrsig_updater.h" #include "dnsdb/nsec3_rrsig_updater.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_zone.h" #define UZSARGS_TAG 0x53475241535a55 extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger typedef struct zdb_update_zone_signatures_thread_args zdb_update_zone_signatures_thread_args; struct zdb_update_zone_signatures_thread_args { zdb_zone* zone; }; static const char *dnssec_xfr_path = NULL; void dnssec_set_xfr_path(const char* xfr_path) { dnssec_xfr_path = xfr_path; } ya_result zdb_update_zone_signatures(zdb_zone* zone, u32 signature_count_loose_limit, bool present_signatures_are_verified) { log_debug("zdb_update_zone_signatures(%p) %{dnsname} [lock=%x]", zone, zone->origin, zone->lock_owner); if(dnssec_xfr_path == NULL) { log_err("zdb_update_zone_signatures: dnssec_xfr_path not set"); return ERROR; } if(!zdb_zone_is_dnssec(zone)) { log_debug("zdb_update_zone_signatures(%p) %{dnsname} [lock=%x]: not dnssec", zone, zone->origin, zone->lock_owner); return ZDB_ERROR_ZONE_IS_NOT_DNSSEC; /* @TODO set a new code for "zone is neither NSEC nor NSEC3" */ } /** * Locks the zone, prevents from being locked twice by this mechanism. * */ if(!zdb_zone_try_double_lock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_RRSIG_UPDATER)) { log_debug("zdb_update_zone_signatures(%p) %{dnsname} [lock=%x]: already locked", zone, zone->origin, zone->lock_owner); return ZDB_ERROR_ZONE_IS_ALREADY_BEING_SIGNED; } u64 start_time = timeus(); rrsig_updater_parms parms; ZEROMEMORY(&parms, sizeof(rrsig_updater_parms)); parms.quota = signature_count_loose_limit; parms.signatures_are_verified = present_signatures_are_verified; rrsig_updater_init(&parms, zone); // ensure that at least one ZDK DNSKEY private key is present, else no point // going further /// @todo 20140526 edf -- these checks must be replaced to their "smart signing" homologue mechanism bool has_zsk = FALSE; zdb_packed_ttlrdata *dnskey_rrset = zdb_record_find(&zone->apex->resource_record_set, TYPE_DNSKEY); ya_result return_code = ZDB_ERROR_ZONE_NO_ZSK_PRIVATE_KEY_FILE; zdb_icmtl icmtl; char origin_ascii[MAX_DOMAIN_LENGTH]; dnsname_to_cstr(origin_ascii, zone->origin); while(dnskey_rrset != NULL) { const u8 *rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(dnskey_rrset); const u16 rdata_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(dnskey_rrset); u16 tag = dnskey_get_key_tag_from_rdata(rdata, rdata_size); u16 key_flags = DNSKEY_FLAGS_FROM_RDATA(rdata); // native u8 algorithm = rdata[3]; switch(algorithm) { case DNSKEY_ALGORITHM_DSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA256_NSEC3: case DNSKEY_ALGORITHM_RSASHA512_NSEC3: case DNSKEY_ALGORITHM_DSASHA1: case DNSKEY_ALGORITHM_RSASHA1: { if(key_flags == DNSKEY_FLAGS_ZSK) { dnssec_key *key; if(ISOK(dnssec_key_load_private(algorithm, tag, key_flags, origin_ascii, &key))) { // good to go has_zsk = TRUE; } } break; } default: { return_code = DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; break; } } dnskey_rrset = dnskey_rrset->next; } if(has_zsk && ISOK(return_code = zdb_icmtl_begin(&icmtl, zone))) { // zone should be locked for readers if(ISOK(return_code = rrsig_updater_process_zone(&parms))) { u32 sig_count = return_code; if(sig_count > 0) { zdb_zone_exchange_locks(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_RRSIG_UPDATER); log_debug("zdb_update_zone_signatures(%p) %{dnsname} [lock=%x] done", zone, zone->origin, zone->lock_owner); rrsig_updater_commit(&parms); zdb_zone_exchange_locks(zone, ZDB_ZONE_MUTEX_RRSIG_UPDATER, ZDB_ZONE_MUTEX_SIMPLEREADER); } else { if(zdb_zone_is_nsec3(zone)) { // no normal signatures anymore, do the nsec3 signatures nsec3_rrsig_updater_parms parms; ZEROMEMORY(&parms, sizeof(nsec3_rrsig_updater_parms)); parms.quota = signature_count_loose_limit; parms.signatures_are_verified = TRUE; // no need to verify again nsec3_rrsig_updater_init(&parms, zone); if(ISOK(sig_count = nsec3_rrsig_updater_process_zone(&parms))) { zdb_zone_exchange_locks(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_RRSIG_UPDATER); nsec3_rrsig_updater_commit(&parms); zdb_zone_exchange_locks(zone, ZDB_ZONE_MUTEX_RRSIG_UPDATER, ZDB_ZONE_MUTEX_SIMPLEREADER); } nsec3_rrsig_updater_finalize(&parms); } } zdb_icmtl_end(&icmtl); zdb_zone_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_RRSIG_UPDATER); /* release */ u64 time_frame = 1000000; // 1 secs worth of job u64 stop_time = timeus(); u64 duration = stop_time - start_time; // 1000000 = 1s u64 new_quota = sig_count; // if signatures have been made, update the quota if(sig_count != 0) { new_quota *= time_frame; new_quota /= MAX(duration, 1); // if it lasted less than 1us, say it did // (and still-impossible div0 are avoided) new_quota = BOUND(512, new_quota, 8192); zone->sig_quota = (s32)new_quota; } //zone->sig_quota = 4096; double dt = duration; dt /= 1000000.0; log_debug("zdb_update_zone_signatures(%p) %{dnsname} ~%u signatures in %.6fs, new quota is %u", zone, zone->origin, sig_count, dt, zone->sig_quota); return_code = sig_count; } else { zdb_icmtl_cancel(&icmtl); zdb_zone_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_RRSIG_UPDATER); log_err("zdb_update_zone_signatures(%p) %{dnsname} [lock=%x] failed at signing: %r", zone, zone->origin, zone->lock_owner, return_code); } } else { zdb_zone_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_RRSIG_UPDATER); log_debug("zdb_update_zone_signatures(%p) %{dnsname} [lock=%x] failed at journaling: %r", zone, zone->origin, zone->lock_owner, return_code); } rrsig_updater_finalize(&parms); return return_code; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/dynupdate_icmtlhook.c0000644000077100007710000000012412650131756023203 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.375344 30 ctime=1454597652.305344534 yadifa-2.1.6-5826/lib/dnsdb/src/dynupdate_icmtlhook.c0000664000077100007710000006144212650131756023017 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbupdate Dynamic update functions * @ingroup dnsdb * @brief Generates "IXFR" (ICMTL) streams by registering as a listener to the changes in the database * * Generates "IXFR" (ICMTL) streams by registering as a listener to the changes in the database * This is part of the dynupdate/icmtl * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include "dnsdb/zdb_utils.h" #include #include #include #include "dnsdb/zdb_listener.h" #if ZDB_HAS_NSEC3_SUPPORT!=0 #include "dnsdb/nsec3_types.h" #include "dnsdb/nsec3_item.h" #include "dnsdb/nsec3_collection.h" #endif #include #include "dnsdb/zdb_record.h" #include "dnsdb/dynupdate.h" #include extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #define DEBUG_ICMTL_RECORDS 0 #define USE_SET_FOR_OUTPUT 1 typedef struct icmtl_dnssec_listener icmtl_dnssec_listener; typedef struct icmtl_dnssec_listener icmtl_zdb_listener; struct icmtl_dnssec_listener { /* matches the dnssec_listener struct */ zdb_listener_on_remove_type_callback* on_remove_record_type; zdb_listener_on_add_record_callback* on_add_record; zdb_listener_on_remove_record_callback* on_remove_record; zdb_listener_has_changes_callback* has_changes; #if ZDB_HAS_NSEC3_SUPPORT!=0 zdb_listener_on_add_nsec3_callback* on_add_nsec3; zdb_listener_on_remove_nsec3_callback* on_remove_nsec3; zdb_listener_on_update_nsec3rrsig_callback* on_update_nsec3rrsig; #endif #if ZDB_HAS_DNSSEC_SUPPORT!=0 zdb_listener_on_update_rrsig_callback* on_update_rrsig; #endif zdb_listener* next; /* Proprietary */ #if !USE_SET_FOR_OUTPUT output_stream os_remove; output_stream os_add; #else output_stream ostream_remove; output_stream ostream_add; output_stream rr_tmp_stream; ptr_set rr_remove; ptr_set rr_add; #endif u8* origin; u32 origin_len; }; /** * This function puts a zallocated copy of the rr_tmp_stream in the listener in the set for removal * * @param listener */ static void icmtl_push_stream_record_to_remove(icmtl_zdb_listener* listener) { u32 size = bytearray_output_stream_size(&listener->rr_tmp_stream); u8* buffer = bytearray_output_stream_buffer(&listener->rr_tmp_stream); if(!ptr_set_avl_find(&listener->rr_remove, buffer)) { u8 *rr; ZALLOC_ARRAY_OR_DIE(u8*, rr, size, GENERIC_TAG); memcpy(rr, buffer, size); #ifdef DEBUG log_debug1("icmtl: will remove %u@%p", size, rr); #endif ptr_set_avl_insert(&listener->rr_remove, rr)->value = rr; } bytearray_output_stream_reset(&listener->rr_tmp_stream); } /** * This function puts a zallocated copy of the rr_tmp_stream in the listener in the set for adding * * @param listener */ static void icmtl_push_stream_record_to_add(icmtl_zdb_listener* listener) { // T049JP0TTR6PEQMFNFIK0OUIMD4F62PS u32 size = bytearray_output_stream_size(&listener->rr_tmp_stream); u8* buffer = bytearray_output_stream_buffer(&listener->rr_tmp_stream); if(!ptr_set_avl_find(&listener->rr_add, buffer)) { u8 *rr; ZALLOC_ARRAY_OR_DIE(u8*, rr, size, GENERIC_TAG); memcpy(rr, buffer, size); #ifdef DEBUG log_debug1("icmtl: will add %u@%p", size, rr); #endif ptr_set_avl_insert(&listener->rr_add, rr)->value = rr; } bytearray_output_stream_reset(&listener->rr_tmp_stream); } static void output_stream_write_wire(output_stream* os, dnslabel_vector_reference labels, s32 top, u16 type, zdb_ttlrdata* record) { output_stream_write_dnslabel_vector(os, labels, top); output_stream_write_u16(os, type); /** @note NATIVETYPE */ output_stream_write_u16(os, CLASS_IN); /** @note NATIVECLASS */ output_stream_write_nu32(os, record->ttl); output_stream_write_nu16(os, record->rdata_size); output_stream_write(os, record->rdata_pointer, record->rdata_size); } static void output_stream_write_wire_dnsname(output_stream* os, const u8 *dnsname, u16 type, zdb_ttlrdata* record) { output_stream_write_dnsname(os, dnsname); output_stream_write_u16(os, type); /** @note NATIVETYPE */ output_stream_write_u16(os, CLASS_IN); /** @note NATIVECLASS */ output_stream_write_nu32(os, record->ttl); output_stream_write_nu16(os, record->rdata_size); output_stream_write(os, record->rdata_pointer, record->rdata_size); } static bool icmtl_is_my_zone(icmtl_zdb_listener *listener, const zdb_zone *zone) { bool ret = memcmp(zone->origin, listener->origin, listener->origin_len) == 0; return ret; } static void icmtl_on_remove_record_type_callback(zdb_listener *base_listener, const zdb_zone *zone, const u8* dnsname, zdb_rr_collection* recordssets, u16 type) { icmtl_zdb_listener *listener = (icmtl_zdb_listener*)base_listener; if(!icmtl_is_my_zone(listener, zone)) { return; } if(type != TYPE_ANY) { zdb_packed_ttlrdata* rr_sll = zdb_record_find(recordssets, type); while(rr_sll != NULL) { zdb_ttlrdata ttlrdata; ttlrdata.rdata_pointer = &rr_sll->rdata_start[0]; ttlrdata.rdata_size = rr_sll->rdata_size; ttlrdata.ttl = rr_sll->ttl; #if USE_SET_FOR_OUTPUT output_stream_write_wire_dnsname(&listener->rr_tmp_stream, dnsname, type, &ttlrdata); icmtl_push_stream_record_to_remove(listener); #else output_stream_write_wire_dnsname(&listener->os_remove, dnsname, type, &ttlrdata); #endif rr_sll = rr_sll->next; } } else { btree_iterator iter; btree_iterator_init(*recordssets, &iter); while(btree_iterator_hasnext(&iter)) { btree_node* node = btree_iterator_next_node(&iter); u16 node_type = (u16)node->hash; zdb_packed_ttlrdata* rr_sll = zdb_record_find(recordssets, node_type); while(rr_sll != NULL) { zdb_ttlrdata ttlrdata; ttlrdata.rdata_pointer = &rr_sll->rdata_start[0]; ttlrdata.rdata_size = rr_sll->rdata_size; ttlrdata.ttl = rr_sll->ttl; #if USE_SET_FOR_OUTPUT output_stream_write_wire_dnsname(&listener->rr_tmp_stream, dnsname, node_type, &ttlrdata); icmtl_push_stream_record_to_remove(listener); #else output_stream_write_wire_dnsname(&listener->os_remove, dnsname, node_type, &ttlrdata); #endif rr_sll = rr_sll->next; } } } } static void icmtl_on_add_record_callback(zdb_listener *base_listener, const zdb_zone *zone, dnslabel_vector_reference labels, s32 top, u16 type, zdb_ttlrdata* record) { icmtl_zdb_listener* listener = (icmtl_zdb_listener*)base_listener; if(!icmtl_is_my_zone(listener, zone)) { return; } #if DEBUG_ICMTL_RECORDS rdata_desc rdatadesc = {type, record->rdata_size, record->rdata_pointer}; u8 label[MAX_DOMAIN_LENGTH + 1]; dnslabel_vector_to_dnsname(labels, top, label); log_debug("icmtl: add %{dnsname} %d IN %{typerdatadesc}", label, record->ttl, &rdatadesc); #endif #if USE_SET_FOR_OUTPUT output_stream_write_wire(&listener->rr_tmp_stream, labels, top, type, record); icmtl_push_stream_record_to_add(listener); #else output_stream_write_wire(&listener->os_add, labels, top, type, record); #endif } static void icmtl_on_remove_record_callback(zdb_listener *base_listener, const zdb_zone *zone, const u8* dnsname, u16 type, zdb_ttlrdata* record) { icmtl_zdb_listener* listener = (icmtl_zdb_listener*)base_listener; if(!icmtl_is_my_zone(listener, zone)) { return; } #if DEBUG_ICMTL_RECORDS rdata_desc rdatadesc = {type, record->rdata_size, record->rdata_pointer}; log_debug("icmtl: del %{dnsname} %d IN %{typerdatadesc}", dnsname, record->ttl, &rdatadesc); #endif #if USE_SET_FOR_OUTPUT output_stream_write_wire_dnsname(&listener->rr_tmp_stream, dnsname, type, record); icmtl_push_stream_record_to_remove(listener); #else output_stream_write_wire_dnsname(&listener->os_remove, dnsname, type, record); #endif } static bool icmtl_has_changes_callback(zdb_listener *base_listener, const zdb_zone *zone) { icmtl_zdb_listener* listener = (icmtl_zdb_listener*)base_listener; if(!icmtl_is_my_zone(listener, zone)) { return FALSE; } return !(ptr_set_avl_isempty(&listener->rr_add) && ptr_set_avl_isempty(&listener->rr_remove)); } #if !USE_SET_FOR_OUTPUT static void output_stream_write_rrsig_list_wire(output_stream* os, u8* label, u32 label_len, u8* origin, u32 origin_len, zdb_packed_ttlrdata* sig_sll) { while(sig_sll != NULL) { output_stream_write(os, label, label_len); output_stream_write(os, origin, origin_len); output_stream_write_u16(os, TYPE_RRSIG); /** @note NATIVETYPE */ output_stream_write_u16(os, CLASS_IN); /** @note NATIVECLASS */ output_stream_write_nu32(os, sig_sll->ttl); output_stream_write_nu16(os, sig_sll->rdata_size); output_stream_write(os, &sig_sll->rdata_start[0], sig_sll->rdata_size); #if DEBUG_ICMTL_RECORDS rdata_desc rdatadesc = {TYPE_RRSIG, sig_sll->rdata_size, &sig_sll->rdata_start[0]}; if(origin != NULL) { log_debug("icmtl: %{dnslabel}%{dnsname} %d IN %{typerdatadesc}", label, origin, sig_sll->ttl, &rdatadesc); } else { log_debug("icmtl: %{dnsname} %d IN %{typerdatadesc}", label, sig_sll->ttl, &rdatadesc); } #endif sig_sll = sig_sll->next; } } #else static void output_stream_write_rrsig_wire(output_stream* os, u8* label, u32 label_len, u8* origin, u32 origin_len, zdb_packed_ttlrdata* sig_sll) { if(sig_sll != NULL) { output_stream_write(os, label, label_len); output_stream_write(os, origin, origin_len); output_stream_write_u16(os, TYPE_RRSIG); /** @note NATIVETYPE */ output_stream_write_u16(os, CLASS_IN); /** @note NATIVECLASS */ output_stream_write_nu32(os, sig_sll->ttl); output_stream_write_nu16(os, sig_sll->rdata_size); output_stream_write(os, &sig_sll->rdata_start[0], sig_sll->rdata_size); #if DEBUG_ICMTL_RECORDS rdata_desc rdatadesc = {TYPE_RRSIG, sig_sll->rdata_size, &sig_sll->rdata_start[0]}; if(origin != NULL) { log_debug("icmtl: %{dnslabel}%{dnsname} %d IN %{typerdatadesc}", label, origin, sig_sll->ttl, &rdatadesc); } else { log_debug("icmtl: %{dnsname} %d IN %{typerdatadesc}", label, sig_sll->ttl, &rdatadesc); } #endif } } #endif #if ZDB_HAS_NSEC3_SUPPORT!=0 static void icmtl_on_add_nsec3_callback(zdb_listener *base_listener, const zdb_zone *zone, nsec3_zone_item* nsec3_item, nsec3_zone* n3, u32 ttl) { #if DEBUG_ICMTL_RECORDS log_debug("icmtl: add NSEC3"); #endif icmtl_zdb_listener* listener = (icmtl_zdb_listener*)base_listener; if(!icmtl_is_my_zone(listener, zone)) { return; } #if USE_SET_FOR_OUTPUT nsec3_zone_item_to_output_stream(&listener->rr_tmp_stream, n3, nsec3_item, listener->origin, ttl); icmtl_push_stream_record_to_add(listener); #else nsec3_zone_item_to_output_stream(&listener->os_add, n3, nsec3_item, listener->origin, ttl); #endif } static void icmtl_on_remove_nsec3_callback(zdb_listener *base_listener, const zdb_zone *zone, nsec3_zone_item* nsec3_item, nsec3_zone* n3, u32 ttl) { #if DEBUG_ICMTL_RECORDS log_debug("icmtl: del NSEC3"); #endif icmtl_zdb_listener* listener = (icmtl_zdb_listener*)base_listener; if(!icmtl_is_my_zone(listener, zone)) { return; } #if USE_SET_FOR_OUTPUT nsec3_zone_item_to_output_stream(&listener->rr_tmp_stream, n3, nsec3_item, listener->origin, ttl); icmtl_push_stream_record_to_remove(listener); #else nsec3_zone_item_to_output_stream(&listener->os_remove, n3, nsec3_item, listener->origin, ttl); #endif } static void icmtl_on_update_nsec3rrsig_callback(zdb_listener *base_listener, const zdb_zone *zone, zdb_packed_ttlrdata* removed_rrsig_sll, zdb_packed_ttlrdata* added_rrsig_sll, nsec3_zone_item* item) { u8 label[MAX_DOMAIN_LENGTH]; icmtl_zdb_listener* listener = (icmtl_zdb_listener*)base_listener; if(!icmtl_is_my_zone(listener, zone)) { return; } u32 label_len = nsec3_zone_item_get_label(item, label, sizeof (label)); #if DEBUG_ICMTL_RECORDS log_debug("icmtl: del RRSIG: (NSEC3)"); #endif #if USE_SET_FOR_OUTPUT while(removed_rrsig_sll != NULL) { output_stream_write_rrsig_wire(&listener->rr_tmp_stream, label, label_len, listener->origin, listener->origin_len, removed_rrsig_sll); icmtl_push_stream_record_to_remove(listener); removed_rrsig_sll = removed_rrsig_sll->next; } #else output_stream_write_rrsig_list_wire(&listener->os_remove, label, label_len, listener->origin, listener->origin_len, removed_rrsig_sll); #endif #if DEBUG_ICMTL_RECORDS log_debug("icmtl: add RRSIG: (NSEC3)"); #endif #if USE_SET_FOR_OUTPUT while(added_rrsig_sll != NULL) { output_stream_write_rrsig_wire(&listener->rr_tmp_stream, label, label_len, listener->origin, listener->origin_len, added_rrsig_sll); icmtl_push_stream_record_to_add(listener); added_rrsig_sll = added_rrsig_sll->next; } #else output_stream_write_rrsig_list_wire(&listener->os_add, label, label_len, listener->origin, listener->origin_len, added_rrsig_sll); #endif } #endif static void icmtl_on_update_rrsig_callback(zdb_listener *base_listener, const zdb_zone *zone, zdb_packed_ttlrdata* removed_rrsig_sll, zdb_packed_ttlrdata* added_rrsig_sll, zdb_rr_label* label, dnsname_stack* name) { u8 fqdn[MAX_DOMAIN_LENGTH]; icmtl_zdb_listener* listener = (icmtl_zdb_listener*)base_listener; if(!icmtl_is_my_zone(listener, zone)) { return; } u32 fqdn_len = dnsname_stack_to_dnsname(name, fqdn); #if DEBUG_ICMTL_RECORDS log_debug("icmtl: del RRSIG:"); #endif #if USE_SET_FOR_OUTPUT while(removed_rrsig_sll != NULL) { output_stream_write_rrsig_wire(&listener->rr_tmp_stream, fqdn, fqdn_len, NULL, 0, removed_rrsig_sll); icmtl_push_stream_record_to_remove(listener); removed_rrsig_sll = removed_rrsig_sll->next; } #else output_stream_write_rrsig_list_wire(&listener->os_remove, fqdn, fqdn_len, NULL, 0, removed_rrsig_sll); #endif #if DEBUG_ICMTL_RECORDS log_debug("icmtl: add RRSIG:"); #endif #if USE_SET_FOR_OUTPUT while(added_rrsig_sll != NULL) { output_stream_write_rrsig_wire(&listener->rr_tmp_stream, fqdn, fqdn_len, NULL, 0, added_rrsig_sll); icmtl_push_stream_record_to_add(listener); added_rrsig_sll = added_rrsig_sll->next; } #else output_stream_write_rrsig_list_wire(&listener->os_add, fqdn, fqdn_len, NULL, 0, added_rrsig_sll); #endif } static mutex_t icmtl_listener_mtx = MUTEX_INITIALIZER; static ptr_set icmtl_listener_set = PTR_SET_DNSNAME_EMPTY; static struct icmtl_dnssec_listener icmtl_listener = { icmtl_on_remove_record_type_callback, icmtl_on_add_record_callback, icmtl_on_remove_record_callback, icmtl_has_changes_callback, #if ZDB_HAS_NSEC3_SUPPORT != 0 icmtl_on_add_nsec3_callback, icmtl_on_remove_nsec3_callback, icmtl_on_update_nsec3rrsig_callback, #endif #if ZDB_HAS_DNSSEC_SUPPORT != 0 icmtl_on_update_rrsig_callback, #endif NULL, #if !USE_SET_FOR_OUTPUT {NULL,NULL}, {NULL,NULL}, #else {NULL,NULL}, {NULL,NULL}, {NULL,NULL}, {NULL,NULL}, {NULL,NULL}, #endif NULL, 0 }; /* * Initializes and hook the spy that will build the icmtl */ static int dynupdate_icmtlhook_ptr_set_rr_wire_size(const u8 *wire) { int fqdn_len = dnsname_len(wire); struct type_class_ttl_rdlen* tctr = (struct type_class_ttl_rdlen*)&wire[fqdn_len]; return fqdn_len + 10 + ntohs(tctr->rdlen); } static int dynupdate_icmtlhook_ptr_set_rr_wire_compare(const void *node_a, const void *node_b) { const u8 *rr_a = (const u8 *)node_a; const u8 *rr_b = (const u8 *)node_b; int rr_a_size = dynupdate_icmtlhook_ptr_set_rr_wire_size(rr_a); int rr_b_size = dynupdate_icmtlhook_ptr_set_rr_wire_size(rr_b); if(rr_a_size != rr_b_size) { return rr_a_size - rr_b_size; } int ret = memcmp(rr_a, rr_b, rr_a_size); return ret; } ya_result dynupdate_icmtlhook_enable(u8* origin, output_stream* os_remove, output_stream* os_add) { yassert(icmtl_listener.next == NULL); #ifdef DEBUG log_debug("icmtl: enabled %{dnsname} for updates", origin); #endif icmtl_dnssec_listener* listener; mutex_lock(&icmtl_listener_mtx); ptr_node *node = ptr_set_avl_insert(&icmtl_listener_set, origin); if(node->value != NULL) { mutex_unlock(&icmtl_listener_mtx); return ERROR; // already set } ZALLOC_OR_DIE(icmtl_dnssec_listener*, listener, icmtl_dnssec_listener, GENERIC_TAG); memcpy(listener, &icmtl_listener, sizeof(icmtl_dnssec_listener)); #if !USE_SET_FOR_OUTPUT listener->os_remove.data = os_remove->data; listener->os_remove.vtbl = os_remove->vtbl; listener->os_add.data = os_add->data; listener->os_add.vtbl = os_add->vtbl; #else bytearray_output_stream_init_ex(&listener->rr_tmp_stream, NULL, 2048, BYTEARRAY_DYNAMIC); listener->rr_remove.root = NULL; listener->rr_remove.compare = dynupdate_icmtlhook_ptr_set_rr_wire_compare; listener->rr_add.root = NULL; listener->rr_add.compare = dynupdate_icmtlhook_ptr_set_rr_wire_compare; #endif listener->origin = origin; listener->origin_len = dnsname_len(origin); zdb_listener_chain((zdb_listener*)listener); node->value = listener; mutex_unlock(&icmtl_listener_mtx); return SUCCESS; } ya_result dynupdate_icmtlhook_enable_wait(u8* origin, output_stream* os_remove, output_stream* os_add) { yassert(icmtl_listener.next == NULL); #ifdef DEBUG log_debug("icmtl: enabling %{dnsname} for updates", origin); #endif icmtl_dnssec_listener* listener; ptr_node *node; for(;;) { mutex_lock(&icmtl_listener_mtx); node = ptr_set_avl_insert(&icmtl_listener_set, origin); if(node->value == NULL) { break; } mutex_unlock(&icmtl_listener_mtx); node = NULL; sleep(1); } ZALLOC_OR_DIE(icmtl_dnssec_listener*, listener, icmtl_dnssec_listener, GENERIC_TAG); // This sets the "vtbl". This is done a bit differently than the streams. // The original reason was to patch the listener calls in some cases (for speed). memcpy(listener, &icmtl_listener, sizeof(icmtl_dnssec_listener)); #if !USE_SET_FOR_OUTPUT listener->os_remove.data = os_remove->data; listener->os_remove.vtbl = os_remove->vtbl; listener->os_add.data = os_add->data; listener->os_add.vtbl = os_add->vtbl; #else listener->ostream_remove.data = os_remove->data; listener->ostream_remove.vtbl = os_remove->vtbl; listener->ostream_add.data = os_add->data; listener->ostream_add.vtbl = os_add->vtbl; bytearray_output_stream_init_ex(&listener->rr_tmp_stream, NULL, 2048, BYTEARRAY_DYNAMIC); listener->rr_remove.root = NULL; listener->rr_remove.compare = dynupdate_icmtlhook_ptr_set_rr_wire_compare; listener->rr_add.root = NULL; listener->rr_add.compare = dynupdate_icmtlhook_ptr_set_rr_wire_compare; #endif listener->origin = origin; listener->origin_len = dnsname_len(origin); zdb_listener_chain((zdb_listener*)listener); node->value = listener; mutex_unlock(&icmtl_listener_mtx); return SUCCESS; } ya_result dynupdate_icmtlhook_disable(const u8 *origin) { icmtl_dnssec_listener* listener = NULL; mutex_lock(&icmtl_listener_mtx); ptr_node *node = ptr_set_avl_find(&icmtl_listener_set, origin); listener = (icmtl_dnssec_listener*)node->value; ptr_set_avl_delete(&icmtl_listener_set, origin); mutex_unlock(&icmtl_listener_mtx); zdb_listener_unchain((zdb_listener*)listener); output_stream_close(&listener->rr_tmp_stream); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&listener->rr_remove, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); int size = dynupdate_icmtlhook_ptr_set_rr_wire_size(node->key); #ifdef DEBUG log_debug1("icmtl: removing %u@%p", size, node->key); #endif #if USE_SET_FOR_OUTPUT output_stream_write(&listener->ostream_remove, node->key, size); ZFREE_ARRAY(node->key, size); #else output_stream_write(&listener->os_remove, node->key, size); ZFREE_ARRAY(node->key, size); #endif } ptr_set_avl_destroy(&listener->rr_remove); ptr_set_avl_iterator_init(&listener->rr_add, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); int size = dynupdate_icmtlhook_ptr_set_rr_wire_size(node->key); #ifdef DEBUG log_debug1("icmtl: adding %u@%p", size, node->key); #endif #if USE_SET_FOR_OUTPUT output_stream_write(&listener->ostream_add, node->key, size); ZFREE_ARRAY(node->key, size); #else output_stream_write(&listener->os_add, node->key, size); ZFREE_ARRAY(node->key, size); #endif } ptr_set_avl_destroy(&listener->rr_add); ZFREE(listener, icmtl_dnssec_listener); #ifdef DEBUG log_debug("icmtl: disabled %{dnsname} for updates", origin); #endif return SUCCESS; } /* ------------------------------------------------------------ */ /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec_collection.c0000644000077100007710000000012412650131756022300 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.440344 30 ctime=1454597652.557344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec_collection.c0000664000077100007710000001473012650131756022112 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec NSEC functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #define _NSEC_COLLECTION_C #define DEBUG_LEVEL 0 #include #include "dnsdb/nsec_collection.h" /* * The following macros are defining relevant fields in the node */ /* * Access to the field that points to the left child */ #define AVL_LEFT_CHILD(node) ((node)->children.lr.left) /* * Access to the field that points to the right child */ #define AVL_RIGHT_CHILD(node) ((node)->children.lr.right) /* * Access to the field that points to one of the children (0: left, 1: right) */ #define AVL_CHILD(node,id) ((node)->children.child[(id)]) /* * OPTIONAL : Access to the field that points the parent of the node. * * This field is optional but is mandatory if AVL_HAS_PARENT_POINTER is not 0 */ #define AVL_PARENT(node) ((node)->parent) /* * Access to the field that keeps the balance (a signed byte) */ #define AVL_BALANCE(node) ((node)->balance) /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE u8* /* * */ #define AVL_REFERENCE_FORMAT_STRING "%{dnsname}" #define AVL_REFERENCE_FORMAT(reference) reference /* * A macro to initialize a node and setting the reference */ #define AVL_INIT_NODE(node,reference) (node)->inverse_relative_name=dnsname_zdup(reference) /* * A macro to allocate a new node */ #define AVL_ALLOC_NODE(node,reference) \ ZALLOC_ARRAY_OR_DIE(AVL_NODE_TYPE*, node, (sizeof(AVL_NODE_TYPE)), AVL_NODE_TAG); \ ZEROMEMORY(node,sizeof(AVL_NODE_TYPE)) /* * A macro to free a node allocated by ALLOC_NODE */ static void nsec_free_node(AVL_NODE_TYPE* node) { ZFREE_ARRAY(node, sizeof (AVL_NODE_TYPE)); } #define AVL_FREE_NODE(node) nsec_free_node(node) /* * A macro to print the node */ #define AVL_DUMP_NODE(node) format("node@%p",(node)); /* * A macro that returns the reference field of the node. * It must be of type REFERENCE_TYPE */ #define AVL_REFERENCE(node) (node)->inverse_relative_name /* * A macro to compare two references * Returns TRUE if and only if the references are equal. */ #define AVL_ISEQUAL(reference_a,reference_b) dnsname_equals((reference_a),(reference_b)) /* * A macro to compare two references * Returns TRUE if and only if the first one is bigger than the second one. */ #define AVL_ISBIGGER(reference_a,reference_b) (dnsname_compare((reference_a),(reference_b))>0) /* * Copies the payload of a node * It MUST NOT copy the "proprietary" node fields : children, parent, balance */ #define AVL_COPY_PAYLOAD(node_trg,node_src) (node_trg)->inverse_relative_name=(node_src)->inverse_relative_name /* * A macro to preprocess a node before it is preprocessed for a delete (detach) * If there was anything to do BEFORE deleting a node, we would do it here * After this macro is exectuted, the node * _ is detached, then deleted with FREE_NODE * _ has got its content overwritten by the one of another node, then the other * node is deleted with FREE_NODE */ #define AVL_NODE_DELETE_CALLBACK(node) ZFREE_STRING((node)->inverse_relative_name); #include AVL_NODE_TYPE* AVL_PREFIXED(avl_find_interval_start)(AVL_CONST_TREE_TYPE* root, AVL_REFERENCE_TYPE obj_hash) { const AVL_NODE_TYPE* node = *root; const AVL_NODE_TYPE* lower_bound = NULL; AVL_REFERENCE_TYPE h; yassert(node != NULL); /* This is one of the parts I could try to optimize * I've checked the assembly, and it sucks ... */ /* Both the double-test while/ternary and the current one * are producing the same assembly code. */ while(node != NULL) { h = AVL_REFERENCE(node); /* * [0] is the length of the obj_hash * * The obj_hashs starts at [1] * */ int cmp = dnsname_compare(obj_hash, h); /* equals */ if(cmp == 0) { return (AVL_NODE_TYPE*)node; } /* bigger */ if(cmp > 0) { lower_bound = node; node = AVL_CHILD(node, DIR_RIGHT); } else { node = AVL_CHILD(node, DIR_LEFT); } } if(lower_bound == NULL) { lower_bound = *root; yassert(lower_bound != NULL); while((node = AVL_CHILD(lower_bound, DIR_RIGHT)) != NULL) { lower_bound = node; } } return (AVL_NODE_TYPE*)lower_bound; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb.c0000644000077100007710000000012412650131756017714 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.310344 30 ctime=1454597652.363344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb.c0000664000077100007710000004176012650131756017531 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdb Zone database * @brief The zone dataBase * * @{ */ #define ZDB_JOURNAL_CODE 1 #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include #include extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #include "dnsdb/zdb.h" #if ZDB_HAS_DNSSEC_SUPPORT != 0 #include "dnsdb/dnssec_keystore.h" #endif #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_zone_label.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/dictionary.h" #include "dnsdb/journal.h" #include "dnsdb/zdb-zone-garbage.h" #if ZDB_OPENSSL_SUPPORT!=0 #include #include /* * Required to handle openssl with multiple threads */ #define ZDB_SSLMUTEX_TAG 0x584554554d4c5353 #ifndef __DATE__ #define __DATE__ "date?" #endif #ifndef __TIME__ #define __TIME__ "time?" #endif #ifdef DEBUG const char *dnsdb_lib = "dnsdb " __DATE__ " " __TIME__ " debug"; #else const char *dnsdb_lib = "dnsdb " __DATE__ " " __TIME__ " release"; #endif static pthread_mutex_t *ssl_mutex = NULL; static int ssl_mutex_count = 0; static void ssl_lock(int mode, int type, const char* file, int line) { if((mode & CRYPTO_LOCK) != 0) { /* lock */ pthread_mutex_lock(&ssl_mutex[type]); } else { /* unlock */ pthread_mutex_unlock(&ssl_mutex[type]); } } static unsigned long ssl_thread_id() { return (unsigned long)pthread_self(); } #endif logger_handle* g_database_logger = NULL; /** @brief Initializes the database internals. * * Checks the architecture settings of the binary. * Initializes the database internals. * Multiple calls is a NOP. * * This is not thread safe. * */ static volatile bool zdb_init_done = FALSE; dnslib_fingerprint dnsdb_getfingerprint() { dnslib_fingerprint ret = (dnslib_fingerprint)(0 #if ZDB_HAS_TSIG_SUPPORT | DNSLIB_TSIG #endif #if ZDB_HAS_ACL_SUPPORT != 0 | DNSLIB_ACL #endif #if ZDB_HAS_NSEC_SUPPORT != 0 | DNSLIB_NSEC #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 | DNSLIB_NSEC3 #endif ); return ret; } u32 dnsdb_fingerprint_mask() { return DNSLIB_TSIG|DNSLIB_ACL|DNSLIB_NSEC|DNSLIB_NSEC3; } int zalloc_init(); void zdb_init_ex(u32 thread_pool_count) { (void)thread_pool_count; if(zdb_init_done) { return; } /* DO or DIE */ if(dnscore_getfingerprint() != (dnsdb_getfingerprint() & dnscore_fingerprint_mask())) { osformatln(termerr, "mismatched fingerprints: %08x != (%08x = %08x & %08x)", dnscore_getfingerprint(), dnsdb_getfingerprint() & dnscore_fingerprint_mask(), dnsdb_getfingerprint() , dnscore_fingerprint_mask()); flusherr(); exit(-1); } zdb_init_done = TRUE; /* Init the dns core */ dnscore_init(); zalloc_init(); zdb_zone_garbage_init(); /* Init the error table */ zdb_register_errors(); /* Init the hash tables */ hash_init(); #if ZDB_OPENSSL_SUPPORT!=0 /* Init openssl */ ENGINE_load_openssl(); ENGINE_load_builtin_engines(); SSL_load_error_strings(); ssl_mutex_count = CRYPTO_num_locks(); MALLOC_OR_DIE(pthread_mutex_t*, ssl_mutex, ssl_mutex_count * sizeof (pthread_mutex_t), ZDB_SSLMUTEX_TAG); int i; for(i = 0; i < ssl_mutex_count; i++) { pthread_mutex_init(&ssl_mutex[i], NULL); } CRYPTO_set_id_callback(ssl_thread_id); CRYPTO_set_locking_callback(ssl_lock); #endif journal_init(0); // uses the default mru size (512) logger_start(); } void zdb_init() { u32 thread_pool_count = sys_get_cpu_count() + 2; zdb_init_ex(thread_pool_count); } void zdb_finalize() { if(!zdb_init_done) { return; } zdb_init_done = FALSE; zdb_zone_garbage_finalize(); journal_finalise(); #if ZDB_HAS_DNSSEC_SUPPORT != 0 dnssec_keystore_destroy(); dnssec_keystore_resetpath(); #endif #if ZDB_OPENSSL_SUPPORT!=0 ERR_remove_state(0); /* Init openssl */ CRYPTO_set_locking_callback(NULL); CRYPTO_set_id_callback(NULL); int i; for(i = 0; i < ssl_mutex_count; i++) { pthread_mutex_destroy(&ssl_mutex[i]); } ssl_mutex_count = 0; free(ssl_mutex); ENGINE_cleanup(); #endif } /** @brief Initializes a database. * * Initializes a database. * * @param[in] db a pointer to the zdb structure that will be initialized. * */ void zdb_create(zdb* db) { zdb_zone_label* zone_label; ZALLOC_OR_DIE(zdb_zone_label*, zone_label, zdb_zone_label, ZDB_ZONELABEL_TAG); ZEROMEMORY(zone_label, sizeof (zdb_zone_label)); zone_label->name = dnslabel_zdup(ROOT_LABEL); /* . */ dictionary_init(&zone_label->sub); db->root = zone_label; /* native order */ db->alarm_handle = alarm_open((const u8*)"\010database"); /** @todo change this (uppercase?) */ group_mutex_init(&db->mutex); } zdb_zone * zdb_set_zone(zdb *db, zdb_zone* zone) { yassert(zone != NULL); zdb_lock(db, ZDB_MUTEX_WRITER); zdb_zone_label *label = zdb_zone_label_add_nolock(db, &zone->origin_vector); // zdb_set_zone zdb_zone *old_zone = label->zone; zdb_zone_acquire(zone); label->zone = zone; #ifdef DEBUG log_debug("zdb: added zone %{dnsname}@%p", zone->origin, zone); #endif zdb_unlock(db, ZDB_MUTEX_WRITER); return old_zone; } zdb_zone * zdb_remove_zone(zdb *db, dnsname_vector *name) { yassert(db != NULL && name != NULL); zdb_lock(db, ZDB_MUTEX_WRITER); zdb_zone_label *label = zdb_zone_label_find(db, name); // zdb_detach_zone zdb_zone *old_zone = NULL; if(label != NULL) { old_zone = label->zone; label->zone = NULL; #ifdef DEBUG log_debug("zdb: removed zone %{dnsnamevector}@%p", name, old_zone); #endif if(ZONE_LABEL_IRRELEVANT(label)) { // removes the label from the database // if the label had been relevant (sub domains) // the zones below would be released and destroyed in due time zdb_zone_label_delete(db, name); } } zdb_unlock(db, ZDB_MUTEX_WRITER); return old_zone; } zdb_zone * zdb_remove_zone_from_dnsname(zdb *db, const u8 *fqdn) { dnsname_vector origin; dnsname_to_dnsname_vector(fqdn, &origin); zdb_zone *zone = zdb_remove_zone(db, &origin); return zone; } /** @brief Search for a match in the database * * Search for a match in the database. * Only the most relevant match will be returned. * * @param[in] db the database * @param[in] dnsname_name the name dnsname to search for * @param[in] class the class to match * @param[in] type the type to match * @param[out] ttl_rdara_out a pointer to a pointer set of results (single linked list) * * @return SUCCESS in case of success. */ ya_result zdb_query(zdb* db, const u8 *name_, u16 type, zdb_packed_ttlrdata** ttlrdata_out) { yassert(ttlrdata_out != NULL); #ifdef HAS_DYNAMIC_PROVISIONING zdb_lock(db, ZDB_MUTEX_READER); // zdb_query #endif dnsname_vector name; DEBUG_RESET_dnsname(name); dnsname_to_dnsname_vector(name_, &name); /* Find closest matching label * Should return a stack of zones */ zdb_zone_label_pointer_array zone_label_stack; s32 top = zdb_zone_label_match(db, &name, zone_label_stack); s32 sp = top; /* Got a stack of zone labels with and without zone cuts */ /* Search the label on the zone files */ while(sp >= 0) { zdb_zone_label* zone_label = zone_label_stack[sp]; if(zone_label->zone != NULL) { if((*ttlrdata_out = zdb_zone_record_find(zone_label->zone, name.labels, name.size - sp, type)) != NULL) { /* *ttlrdata_out for the answer */ /* zone_label->zone for the authority section */ /* subsequent searchs for the additional */ #ifdef HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); // zdb_query #endif return SUCCESS; } } sp--; } #ifdef HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); // zdb_query #endif return ZDB_ERROR_KEY_NOTFOUND; } /** @brief Search for a match in the database * * Search for a match in the database. * Only the most relevant match will be returned. * * @param[in] db the database * @param[in] dnsname_name the name dnsname to search for * @param[in] type the type to match * @param[out] ttl_rdara_out a pointer to a pointer set of results (single linked list) * * @return SUCCESS in case of success. */ ya_result zdb_query_ip_records(zdb* db, const u8* name_, zdb_packed_ttlrdata* * restrict ttlrdata_out_a, zdb_packed_ttlrdata* * restrict ttlrdata_out_aaaa) // mutex checked { yassert(ttlrdata_out_a != NULL && ttlrdata_out_aaaa != NULL); dnsname_vector name; dnsname_to_dnsname_vector(name_, &name); /* Find closest matching label * Should return a stack of zones */ #ifdef HAS_DYNAMIC_PROVISIONING zdb_lock(db, ZDB_MUTEX_READER); // zdb_query_ip_records #endif zdb_zone_label_pointer_array zone_label_stack; s32 top = zdb_zone_label_match(db, &name, zone_label_stack); s32 sp = top; /* Got a stack of zone labels with and without zone cuts */ /* Search the label on the zone files */ while(sp >= 0) { zdb_zone_label* zone_label = zone_label_stack[sp]; if(zone_label->zone != NULL) { /* Get the label, instead of the type in the label */ zdb_rr_label* rr_label = zdb_rr_label_find_exact(zone_label->zone->apex, name.labels, name.size - sp); if(rr_label != NULL) { zdb_packed_ttlrdata* a = zdb_record_find(&rr_label->resource_record_set, TYPE_A); zdb_packed_ttlrdata* aaaa = zdb_record_find(&rr_label->resource_record_set, TYPE_AAAA); if(a != NULL || aaaa != NULL) { *ttlrdata_out_a = a; *ttlrdata_out_aaaa = aaaa; #ifdef HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); // zdb_query_ip_records (success) #endif return SUCCESS; } } } sp--; } #ifdef HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); // zdb_query_ip_records (failure) #endif return ZDB_ERROR_KEY_NOTFOUND; } /** * * Appends all A and AAAA records found in the database for the given fqdn * Given the nature of the list, what is returned is a copy. * The call locks the database for reading, then each involved zone for reading. * Locks are released before the function returns. * * @param db database * @param name_ fqdn * @param target_list list * @return */ ya_result zdb_append_ip_records(zdb* db, const u8* name_, host_address *target_list) { yassert(target_list != NULL); dnsname_vector name; dnsname_to_dnsname_vector(name_, &name); /* Find closest matching label * Should return a stack of zones */ #ifdef HAS_DYNAMIC_PROVISIONING zdb_lock(db, ZDB_MUTEX_READER); // zdb_query_ip_records #endif zdb_zone_label_pointer_array zone_label_stack; s32 top = zdb_zone_label_match(db, &name, zone_label_stack); s32 sp = top; /* Got a stack of zone labels with and without zone cuts */ /* Search the label on the zone files */ while(sp >= 0) { zdb_zone_label* zone_label = zone_label_stack[sp]; if(zone_label->zone != NULL) { zdb_zone_lock(zone_label->zone, ZDB_ZONE_MUTEX_SIMPLEREADER); /* Get the label, instead of the type in the label */ zdb_rr_label* rr_label = zdb_rr_label_find_exact(zone_label->zone->apex, name.labels, name.size - sp); if(rr_label != NULL) { ya_result ret = 0; zdb_packed_ttlrdata* rrset; rrset = zdb_record_find(&rr_label->resource_record_set, TYPE_A); while(rrset != NULL) { host_address_append_ipv4(target_list, ZDB_PACKEDRECORD_PTR_RDATAPTR(rrset), NU16(DNS_DEFAULT_PORT)); ++ret; rrset = rrset->next; } rrset = zdb_record_find(&rr_label->resource_record_set, TYPE_AAAA); while(rrset != NULL) { host_address_append_ipv6(target_list, ZDB_PACKEDRECORD_PTR_RDATAPTR(rrset), NU16(DNS_DEFAULT_PORT)); ++ret; rrset = rrset->next; } zdb_zone_unlock(zone_label->zone, ZDB_ZONE_MUTEX_SIMPLEREADER); zdb_unlock(db, ZDB_MUTEX_READER); // zdb_query_ip_records (success) return ret; } zdb_zone_unlock(zone_label->zone, ZDB_ZONE_MUTEX_SIMPLEREADER); } sp--; } #ifdef HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); // zdb_query_ip_records (failure) #endif return ZDB_ERROR_KEY_NOTFOUND; } /** @brief Destroys the database * * Destroys a database. (Empties it) * * @param[in] db the database to destroy * */ void zdb_destroy(zdb* db) // mutex checked { zdb_lock(db, ZDB_MUTEX_WRITER); // zdb_destroy alarm_close(db->alarm_handle); db->alarm_handle = ALARM_HANDLE_INVALID; zdb_zone_label_destroy(&db->root); /* native order */ zdb_unlock(db, ZDB_MUTEX_WRITER); // zdb_destroy group_mutex_destroy(&db->mutex); } static void zdb_signature_check_one(const char* name, int should, int is) { if(is != should) { printf("critical: zdb: '%s' should be of size %i but is of size %i\n", name, is, should); fflush(stdout); abort(); } } void zdb_signature_check(int so_zdb, int so_zdb_zone, int so_zdb_zone_label, int so_zdb_rr_label, int so_mutex_t) { DNSCORE_API_CHECK(); zdb_signature_check_one("zdb", sizeof(zdb), so_zdb); zdb_signature_check_one("zdb_zone", sizeof(zdb_zone), so_zdb_zone); zdb_signature_check_one("zdb_zone_label", sizeof(zdb_zone_label), so_zdb_zone_label); zdb_signature_check_one("zdb_rr_label", sizeof(zdb_rr_label), so_zdb_rr_label); zdb_signature_check_one("mutex_t", sizeof(mutex_t), so_mutex_t); } #ifdef DEBUG /** @brief DEBUG: Prints the content of the database. * * DEBUG: Prints the content of the database. * * @param[in] db the database to print * */ void zdb_print(zdb* db, output_stream *os) // mutex checked { osformatln(os, "zdb@%p\n", (void*)db); if(db != NULL) { zdb_lock(db, ZDB_MUTEX_READER); // for print db osformatln(os, "zdb@%p class=%{dnsclass}\n", (void*)db, &db->zclass); zdb_zone_label_print_indented(db->root, os, 1); /* native order */ zdb_unlock(db, ZDB_MUTEX_READER); // for print db } } #endif /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/dictionary_htbt.c0000644000077100007710000000012412650131756022323 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.428344 30 ctime=1454597652.298344534 yadifa-2.1.6-5826/lib/dnsdb/src/dictionary_htbt.c0000664000077100007710000003072612650131756022140 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Dictionary module based on an hash table of binary trees * * Dictionary module based on an hash table of binary trees * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #include #include "dnsdb/zdb_error.h" #include "dnsdb/dictionary.h" #include "dnsdb/dictionary-node.h" /* * */ void dictionary_htbt_init(dictionary* dico); void dictionary_htbt_destroy(dictionary* dico, dictionary_destroy_record_function destroy); void dictionary_htbt_destroy_ex(dictionary* dico, dictionary_destroy_ex_record_function destroy, void* arg); dictionary_node* dictionary_htbt_add(dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare, dictionary_data_record_create_function create); dictionary_node* dictionary_htbt_find(const dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare); dictionary_node** dictionary_htbt_findp(const dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare); dictionary_node* dictionary_htbt_remove(dictionary* dico, hashcode key, void* record_match_data, dictionary_data_record_compare_function compare); ya_result dictionary_htbt_process(dictionary* dico, hashcode key, void* record_match_data, dictionary_process_record_function compare); void dictionary_htbt_iterator_init(const dictionary* dico, dictionary_iterator* iter); bool dictionary_htbt_iterator_hasnext(dictionary_iterator* dico); void** dictionary_htbt_iterator_next(dictionary_iterator* dico); void dictionary_htbt_iterator_init_from(const dictionary* dico, dictionary_iterator* iter, hashcode key); void dictionary_htbt_empties(dictionary* dico, void* bucket, dictionary_bucket_record_function destroy); void dictionary_htbt_fills(dictionary* dico, hashcode key, dictionary_node* node); static const struct dictionary_vtbl dictionary_htbt_vtbl = { /*dictionary_htbt_init,*/ dictionary_htbt_destroy, dictionary_htbt_add, dictionary_htbt_find, dictionary_htbt_findp, dictionary_htbt_remove, dictionary_htbt_process, dictionary_htbt_destroy_ex, dictionary_htbt_iterator_init, dictionary_htbt_iterator_init_from, dictionary_htbt_empties, dictionary_htbt_fills, "HTBT" }; const static struct dictionary_iterator_vtbl dictionary_iterator_htbt_vtbl = { dictionary_htbt_iterator_hasnext, dictionary_htbt_iterator_next }; void dictionary_htbt_init(dictionary* dico) { htbt_init(&(dico->ct.htbt_collection)); dico->vtbl = &dictionary_htbt_vtbl; dico->count = 0; dico->threshold = ~0; } void dictionary_htbt_destroy(dictionary* dico, dictionary_destroy_record_function destroy) { yassert(dico != NULL); if(dico->ct.htbt_collection != NULL) { htbt_iterator iter; htbt_iterator_init(dico->ct.htbt_collection, &iter); while(htbt_iterator_hasnext(&iter)) { dictionary_node** node_sll_p = (dictionary_node**)htbt_iterator_next(&iter); dictionary_node* node = *node_sll_p; *node_sll_p = NULL; while(node != NULL) { dictionary_node* tmp = node; node = node->next; tmp->next = NULL; destroy(tmp); } } htbt_destroy(&dico->ct.htbt_collection); dico->count = 0; } } void dictionary_htbt_destroy_ex(dictionary* dico, dictionary_destroy_ex_record_function destroyex, void* arg) { yassert(dico != NULL); if(dico->ct.htbt_collection != NULL) { htbt_iterator iter; htbt_iterator_init(dico->ct.htbt_collection, &iter); while(htbt_iterator_hasnext(&iter)) { dictionary_node** node_sll_p = (dictionary_node**)htbt_iterator_next(&iter); dictionary_node* node = *node_sll_p; *node_sll_p = NULL; while(node != NULL) { dictionary_node* tmp = node; node = node->next; tmp->next = NULL; destroyex(tmp, arg); } } htbt_destroy(&dico->ct.htbt_collection); dico->count = 0; } } dictionary_node* dictionary_htbt_add(dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare, dictionary_data_record_create_function create) { dictionary_node** node_sll_p = (dictionary_node**)htbt_insert(dico->ct.htbt_collection, key); dictionary_node* node = *node_sll_p; while(node != NULL) { if(compare(record_match_data, node)) { return node; } node = node->next; } node = create(record_match_data); node->next = (*node_sll_p); (*node_sll_p) = node; dico->count++; return node; } dictionary_node* dictionary_htbt_find(const dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare) { dictionary_node* node = (dictionary_node*)htbt_find(dico->ct.htbt_collection, key); while(node != NULL) { if(compare(record_match_data, node)) { return node; } node = node->next; } return NULL; } dictionary_node** dictionary_htbt_findp(const dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare) { dictionary_node** node_sll_p = (dictionary_node**)htbt_findp(dico->ct.htbt_collection, key); if(node_sll_p != NULL) { while(*node_sll_p != NULL) { if(compare(record_match_data, *node_sll_p)) { return node_sll_p; } node_sll_p = &(*node_sll_p)->next; } } return NULL; } dictionary_node* dictionary_htbt_remove(dictionary* dico, hashcode key, void* record_match_data, dictionary_data_record_compare_function compare) { dictionary_node** node_sll_p = (dictionary_node**)htbt_findp(dico->ct.htbt_collection, key); dictionary_node* node = *node_sll_p; while(node != NULL) { if(compare(record_match_data, node)) { /* remove sll node * * I could have to remove the tree node too */ dico->count--; /* detach */ if(node->next == NULL) { /* remove tree node for the (now empty) sll */ htbt_delete(dico->ct.htbt_collection, key); } else { *node_sll_p = node->next; node->next = NULL; } return node; } node_sll_p = &(node->next); node = node->next; } return NULL; } ya_result dictionary_htbt_process(dictionary* dico, hashcode key, void* record_match_data, dictionary_process_record_function process) { dictionary_node** node_sll_p = (dictionary_node**)htbt_findp(dico->ct.htbt_collection, key); if(node_sll_p == NULL) { return ZDB_ERROR_KEY_NOTFOUND; /* NOT FOUND */ } const dictionary_node** node_sll_head_p = (const dictionary_node**)node_sll_p; dictionary_node* node = *node_sll_p; while(node != NULL) { /* To allow to destroy the node inside, I should ... * dictionary_node* node_next=node->next; */ dictionary_node* node_next = node->next; int op = process(record_match_data, node); switch(op) { case COLLECTION_PROCESS_NEXT: { node_sll_p = &(node->next); node = node_next; continue; } case COLLECTION_PROCESS_DELETENODE: { /* remove sll node * * I could have to remove the tree node too */ dico->count--; *node_sll_p = node_next; /* detach */ if(*node_sll_head_p == NULL) { /* remove tree node for the (now empty) sll */ htbt_delete(dico->ct.htbt_collection, key); } /* fall trough ... return op */ } default: { return op; } } } return COLLECTION_PROCESS_NEXT; } void dictionary_htbt_iterator_init(const dictionary* dico, dictionary_iterator* iter) { iter->vtbl = &dictionary_iterator_htbt_vtbl; iter->sll = NULL; htbt_iterator_init(dico->ct.htbt_collection, &(iter->ct.as_htbt)); } void dictionary_htbt_iterator_init_from(const dictionary* dico, dictionary_iterator* iter, hashcode key) { iter->vtbl = &dictionary_iterator_htbt_vtbl; iter->sll = NULL; htbt_iterator_init_from(dico->ct.htbt_collection, &(iter->ct.as_htbt), key); } bool dictionary_htbt_iterator_hasnext(dictionary_iterator* iter) { return (iter->sll != NULL && iter->sll->next != NULL) ? TRUE : htbt_iterator_hasnext(&iter->ct.as_htbt) ; } void** dictionary_htbt_iterator_next(dictionary_iterator* iter) { void* vpp; if(iter->sll != NULL && iter->sll->next != NULL) { /* pointer is into a sll node */ vpp = &iter->sll->next; iter->sll = iter->sll->next; return vpp; } /* pointer is into a tree node */ vpp = htbt_iterator_next(&iter->ct.as_htbt); iter->sll = ((dictionary_node*)vpp)->next; return vpp; } void dictionary_htbt_empties(dictionary* dico, void* bucket_data, dictionary_bucket_record_function bucket) { yassert(dico != NULL); if(dico->ct.htbt_collection != NULL) { htbt_iterator iter; htbt_iterator_init(dico->ct.htbt_collection, &iter); while(htbt_iterator_hasnext(&iter)) { htbt_node* hnode = htbt_iterator_next_node(&iter); hashcode key = hnode->hash; dictionary_node* node = (dictionary_node*)hnode->data; while(node != NULL) { dictionary_node* tmp = node; node = node->next; tmp->next = NULL; bucket(bucket_data, key, tmp); /* free, if any, is made here */ } } htbt_destroy(&dico->ct.htbt_collection); dico->count = 0; } } void dictionary_htbt_fills(dictionary* dico, hashcode key, dictionary_node* node) { dictionary_node** node_sll_p = (dictionary_node**)htbt_insert(dico->ct.htbt_collection, key); node->next = (*node_sll_p); *node_sll_p = node; dico->count++; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_zone_label_iterator.c0000644000077100007710000000012412650131756024017 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.457344 30 ctime=1454597652.443344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_zone_label_iterator.c0000664000077100007710000002433412650131756023632 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to iterate through the labels of a zone * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #include "dnsdb/zdb_types.h" #include "dnsdb/zdb_zone_label_iterator.h" #include "dnsdb/zdb_rr_label.h" extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger /** * @brief Initializes a zone label iterator * * Initializes a zone label iterator (iterates zdb_rr_label) * * @param[in] zone The zone to explore * @param[in] iter a pointer to the iterator to initialize * */ #define ZLI_DEBUG 0 void zdb_zone_label_iterator_init(const zdb_zone* zone, zdb_zone_label_iterator* iter) { #ifdef DEBUG memset(iter, 0xff, sizeof(zdb_zone_label_iterator)); #endif s32 top; if(*zone->origin != '\0') { top = dnsname_to_dnslabel_stack(zone->origin, iter->dnslabels); // sets an empty iterator for the labels in the path of the zone for(s32 i = 0; i < top; i++) { dictionary_empty_iterator_init(&iter->stack[i]); } dictionary_iterator_init(&zone->apex->sub, &iter->stack[top]); iter->top = top; iter->current_label = zone->apex; iter->zone = zone; iter->prev_top = -1; // prev_top is used to skip children of the current label iter->current_top = top; } else { dictionary_iterator_init(&zone->apex->sub, &iter->stack[0]); iter->dnslabels[0] = zone->apex->name; iter->top = 0; iter->current_label = zone->apex; iter->zone = zone; iter->prev_top = -1; // prev_top is used to skip children of the current label iter->current_top = 0; } } void zdb_zone_label_iterator_init_from(const zdb_zone* zone, zdb_zone_label_iterator* iter, const u8 *from_name) { #ifdef DEBUG memset(iter, 0xff, sizeof(zdb_zone_label_iterator)); #endif dnslabel_stack from_name_stack; if(from_name == NULL) { zdb_zone_label_iterator_init(zone, iter); return; } s32 top = dnsname_to_dnslabel_stack(zone->origin, iter->dnslabels); s32 real_top = dnsname_to_dnslabel_stack(from_name, from_name_stack); if(real_top <= top) { zdb_zone_label_iterator_init(zone, iter); return; } for(s32 i = 0; i < top; i++) { if(!dnslabel_equals(iter->dnslabels[i], from_name_stack[i])) { zdb_zone_label_iterator_init(zone, iter); return; } } // sets an empty iterator for the labels in the path of the zone for(s32 i = 0; i < top; i++) { dictionary_empty_iterator_init(&iter->stack[i]); } // while there are labels in from_name // find if the next level exists // if yes, initialise the iterator from it // initialise an iterator for the next level // note: real_top > top zdb_rr_label *parent = zone->apex; do { zdb_rr_label *child = zdb_rr_label_find_child(parent, from_name_stack[top + 1]); if(child == NULL) { break; } iter->dnslabels[top + 1] = child->name; hashcode key = hash_dnslabel(child->name); dictionary_iterator_init_from(&parent->sub, &iter->stack[top], key); parent = child; } while( ++top < real_top); dictionary_iterator_init(&parent->sub, &iter->stack[top]); iter->top = top; iter->current_label = parent; iter->zone = zone; iter->prev_top = top - 1; // prev_top is used to skip children of the current label iter->current_top = top; if(zdb_zone_label_iterator_hasnext(iter)) { zdb_zone_label_iterator_next(iter); } } /** * @brief Checks if there is still data available from an iterator * * Checks if there is still data available from an iterator * * @param[in] iter a pointer to the iterator * * @return TRUE if data is available, FALSE otherwise. * */ bool zdb_zone_label_iterator_hasnext(zdb_zone_label_iterator* iter) { return iter->current_label != NULL; } /** * @brief Copies the full name of the next label returned by the "next" call. * * Copies the full name of the next label returned by the "next" call. * * @param[in] iter a pointer to the iterator * @param[in] buffer256 a pointer to a buffer that will hold the full dns name * * @return the size of the dns name * */ u32 zdb_zone_label_iterator_nextname_to_cstr(zdb_zone_label_iterator* iter, char* buffer256) { u32 ret = dnslabel_stack_to_cstr(iter->dnslabels, iter->top, buffer256); #if ZLI_DEBUG zdb_rr_label *label = iter->current_label; if(label != NULL) { log_debug1("zli: %{dnsname}+%{dnslabel} nextname=%s (%u)", iter->zone->origin, label->name, buffer256, ret); } else { log_debug1("zli: %{dnsname}%NULL nextname=%s (%u)", iter->zone->origin, buffer256, ret); } u32 real_len = strlen(buffer256); if(real_len != ret) { log_err("zli: %d != %d", real_len, ret); } #endif return ret; } u32 zdb_zone_label_iterator_nextname(zdb_zone_label_iterator* iter, u8* buffer256) { /* TOP-DOWN stack */ u32 ret = dnslabel_stack_to_dnsname(iter->dnslabels, iter->top, buffer256); if(*iter->zone->origin == 0) { --ret; } #if ZLI_DEBUG zdb_rr_label *label = iter->current_label; if(label != NULL) { log_debug1("zli: %{dnsname}+%{dnslabel} nextname=%{dnsname} (%u)", iter->zone->origin, label->name, buffer256, ret); } else { log_debug1("zli: %{dnsname}%NULL nextname=%{dnsname} (%u)", iter->zone->origin, buffer256, ret); } u32 real_len = dnsname_len(buffer256); if(real_len != ret) { log_err("zli: %d != %d", real_len, ret); } #endif return ret; } /** * @brief Returns the next data available from an iterator * * Returns the next data available from an iterator * * @param[in] iter a pointer to the iterator * * @return a pointer the the next label * */ zdb_rr_label* zdb_zone_label_iterator_next(zdb_zone_label_iterator* iter) { zdb_rr_label* ret = iter->current_label; iter->prev_top = iter->current_top; #if 1 iter->current_label = NULL; while(iter->top >= 0) { if(dictionary_iterator_hasnext(&iter->stack[iter->top])) { iter->current_label = *(zdb_rr_label**)dictionary_iterator_next(&iter->stack[iter->top]); iter->current_top = iter->top + 1; dictionary_iterator_init(&iter->current_label->sub, &iter->stack[++iter->top]); iter->dnslabels[iter->top] = iter->current_label->name; break; } iter->top--; } #if ZLI_DEBUG if(ret != NULL) { log_debug1("zli: %{dnsname} nextlabel=%{dnslabel}@%p", iter->zone->origin, ret->name, ret); } else { log_debug1("zli: %{dnsname} nextlabel=NULL", iter->zone->origin); } #endif #else do { if(dictionary_iterator_hasnext(iter->current_label)) { iter->current_label = *(zdb_rr_label**)dictionary_iterator_next(&iter->stack[iter->top]); iter->current_top = iter->top + 1; dictionary_iterator_init(&iter->current_label->sub, &iter->stack[++iter->top]); iter->dnslabels[iter->top] = iter->current_label->name; break; } if(iter->top <= 0) { iter->current_label = NULL; break; } } while(--iter->top >= 0); #endif return ret; } /** * @brief Skips the children * * Skips the children * * @return * */ void zdb_zone_label_skip_children(zdb_zone_label_iterator* iter) { /* * If we are on a brother or on a parent there is nothing to do. */ if(iter->prev_top >= iter->current_top) { return; } iter->current_label = NULL; iter->top = iter->current_top - 2; while(iter->top >= 0) { if(dictionary_iterator_hasnext(&iter->stack[iter->top])) { iter->current_label = *(zdb_rr_label**)dictionary_iterator_next(&iter->stack[iter->top]); iter->current_top = iter->top + 1; dictionary_iterator_init(&iter->current_label->sub, &iter->stack[++iter->top]); iter->dnslabels[iter->top] = iter->current_label->name; break; } iter->top--; } } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_record.c0000644000077100007710000000012412650131756021252 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.293344 30 ctime=1454597652.386344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_record.c0000664000077100007710000004017512650131756021066 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup records Internal functions for the database: resource records. * @ingroup dnsdb * @brief Internal functions for the database: resource records. * * Internal functions for the database: resource records. * * Handling of the the class->type->ttl+rdata list. * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_error.h" #include "dnsdb/btree.h" #define TTLRDATA_TAG 0x41544144524c5454 #define ZDBRDATA_TAG 0x415441445242445a /** @brief Frees a resource record * * Inserts a ttl-rdata record into the rtl-rdata collection * * @param[in] record the ttl-rdata to free */ static void zdb_record_free(zdb_packed_ttlrdata* record) { /** MEMORY CANNOT BE TRASHED WHEN USING ZALLOC BECAUSE rdata_size IS USED TO FREE THE MEMORY ! */ /** DO NOT DO THIS : memset(record,0x8f,sizeof(zdb_packed_ttlrdata)+record->rdata_size-1); */ ZDB_RECORD_ZFREE(record); } /** @brief Inserts a resource record into the resource collection, assume no dups * * Assume there are no dups. * Inserts a ttl-rdata record into the rtl-rdata collection * The caller loses the property of the record. * * @param[in] collection the collection * @param[in] class_ the class of the resource record * @param[in] type the type of the resource record * @param[in] ttl the ttl of the resource record * @param[in] rdata_size the size of the rdata of the resource record * @param[in] rdata a pointer to the rdata of the resource record * * @return OK in case of success. */ void zdb_record_insert(zdb_rr_collection* collection, u16 type, zdb_packed_ttlrdata* record) { zdb_packed_ttlrdata** record_sll = (zdb_packed_ttlrdata**)btree_insert(collection, type); record->next = *record_sll; *record_sll = record; } /** @brief Inserts a resource record into the resource collection, checks for dups * * Do not assume anything. * Inserts a ttl-rdata record into the rtl-rdata collection * The caller loses the property of the record. * If the record is a dup, it is destroyed. * * @param[in] collection the collection * @param[in] class_ the class of the resource record * @param[in] type the type of the resource record * @param[in] ttl the ttl of the resource record * @param[in] rdata_size the size of the rdata of the resource record * @param[in] rdata a pointer to the rdata of the resource record * * @return TRUE in case of success. */ bool zdb_record_insert_checked(zdb_rr_collection* collection, u16 type, zdb_packed_ttlrdata* record) { zdb_packed_ttlrdata** record_sll = (zdb_packed_ttlrdata**)btree_insert(collection, type); if(type != TYPE_CNAME) { u32 ttl = record->ttl; zdb_packed_ttlrdata* next = *record_sll; while(next != NULL) { next->ttl = ttl; if(next->rdata_size == record->rdata_size) { if(memcmp(next->rdata_start, record->rdata_start, record->rdata_size) == 0) /* dup */ { next = next->next; while(next != NULL) { next->ttl = ttl; next = next->next; } return FALSE; } } next = next->next; } record->next = *record_sll; *record_sll = record; } else { ZDB_RECORD_SAFE_ZFREE(*record_sll); record->next = NULL; *record_sll = record; } return TRUE; } /** @brief Finds and return all the a resource record matching the class and type * * Finds and returns all the a resource record matching the class and type * * @param[in] collection the collection * @param[in] class_ the class of the resource record to match * @param[in] type the type of the resource record to match * * @return the first record, or NULL of none has been found. */ zdb_packed_ttlrdata* zdb_record_find(const zdb_rr_collection* collection, u16 type) { zdb_packed_ttlrdata* record_list = (zdb_packed_ttlrdata*)btree_find(collection, type); return record_list; } /** @brief Finds and return a pointer to the list of all the a resource record matching the class and type * * Finds and returns a pointer to the list of all the a resource record matching the class and type * * @param[in] collection the collection * @param[in] class_ the class of the resource record to match * @param[in] type the type of the resource record to match * * @return the first record, or NULL of none has been found. */ zdb_packed_ttlrdata** zdb_record_findp(const zdb_rr_collection* collection, u16 type) { zdb_packed_ttlrdata** record_list = (zdb_packed_ttlrdata**)btree_findp(collection, type); return record_list; } /** @brief Finds and return all the a resource record matching the class and type * Create the node if no such resource exists * * Finds and returl all the a resource record matching the class and type * Create the node if no such resource exists * * @param[in] collection the collection * @param[in] class_ the class of the resource record to match * @param[in] type the type of the resource record to match * * @return the first record, or NULL of none has been found. */ zdb_packed_ttlrdata** zdb_record_find_insert(zdb_rr_collection* collection, u16 type) { yassert(collection != NULL); zdb_packed_ttlrdata** record_list = (zdb_packed_ttlrdata**)btree_insert(collection, type); return record_list; } /** @brief Deletes all the a resource record matching the class and type * * Deletes and return all the a resource record matching the class and type * * @param[in] collection the collection * @param[in] class_ the class of the resource record to match * @param[in] type the type of the resource record to match * * @return OK in case of success. ERROR if no record were deleted. */ ya_result zdb_record_delete(zdb_rr_collection* collection, u16 type) { yassert(collection != NULL); if(type != TYPE_ANY) { zdb_packed_ttlrdata* record_list = (zdb_packed_ttlrdata*)btree_delete(collection, type); if(record_list != NULL) { /* We have the data of the node that has just been deleted */ do { zdb_packed_ttlrdata* tmp = record_list; record_list = record_list->next; zdb_record_free(tmp); } while(record_list != NULL); return SUCCESS; } return ZDB_ERROR_KEY_NOTFOUND; } else { zdb_record_destroy(collection); /* FB: This should be handled by the caller */ return SUCCESS; } } /** @brief Checks if two records are equal. * * Checks if two records are equal. * * @return TRUE if the records are equal, FALSE otherwise. */ bool zdb_record_equals_unpacked(const zdb_packed_ttlrdata* a, const zdb_ttlrdata* b) { int len; bool ret = FALSE; /* The TTL is irrelevant for matches */ if((len = ZDB_PACKEDRECORD_PTR_RDATASIZE(a)) == ZDB_RECORD_PTR_RDATASIZE(b)) { if(memcmp(ZDB_PACKEDRECORD_PTR_RDATAPTR(a), ZDB_RECORD_PTR_RDATAPTR(b), len) == 0) { ret = TRUE; } } return ret; } /** @brief Checks if two records are equal. * * Checks if two records are equal. * * @return TRUE if the records are equal, FALSE otherwise. */ bool zdb_record_equals(const zdb_packed_ttlrdata *a, const zdb_packed_ttlrdata *b) { int len; bool ret = FALSE; /* The TTL is irrelevant for matches */ if((len = ZDB_PACKEDRECORD_PTR_RDATASIZE(a)) == ZDB_PACKEDRECORD_PTR_RDATASIZE(b)) { if(memcmp(ZDB_PACKEDRECORD_PTR_RDATAPTR(a), ZDB_PACKEDRECORD_PTR_RDATAPTR(b), len) == 0) { ret = TRUE; } } return ret; } /** @brief Deletes the a resource record matching the class, type, ttl, rdata * * Deletes the a resource record matching the class, type, ttl, rdata * * @param[in] collection the collection * @param[in] type the type of the resource record to match * @param[in] ttl the ttl of the resource record to match * @param[in] rdata_size the size of the rdata of the resource record to match * @param[in] rdata a pointer to the rdata of the resource record to match * * @return SUCCESS if we removed the last record of this type. * >SUCCESS if we removed the record but other of this type are still available. * ERROR if no record were deleted. */ ya_result zdb_record_delete_exact(zdb_rr_collection* collection, u16 type, const zdb_ttlrdata* ttlrdata) { yassert((collection != NULL) && (type != TYPE_ANY)); zdb_packed_ttlrdata** record_listp = (zdb_packed_ttlrdata**)btree_findp(collection, type); if(record_listp != NULL) { /* We got all the records of the same type */ zdb_packed_ttlrdata* prev = NULL; zdb_packed_ttlrdata* record_list = *record_listp; while(record_list != NULL) { if(zdb_record_equals_unpacked(record_list, ttlrdata)) { /* got it */ /* first one of the list ? */ if(prev == NULL) /* head */ { /* assign NEXT then check for emptyness */ ya_result ret = SUCCESS_STILL_RECORDS; /* We destroyed the last record of this type */ if((*record_listp = record_list->next) == NULL) { /* delete the tree entry */ btree_delete(collection, type); ret = SUCCESS_LAST_RECORD; /* There is still at least one record of this type available */ } zdb_record_free(record_list); return ret; } prev->next = record_list->next; zdb_record_free(record_list); return SUCCESS_STILL_RECORDS; /* There is still at least one record of this type available */ } prev = record_list; record_list = record_list->next; } } return ZDB_ERROR_KEY_NOTFOUND; } static void zdb_record_destroy_callback(void* record_list_) { zdb_packed_ttlrdata* record_list = (zdb_packed_ttlrdata*)record_list_; while(record_list != NULL) { zdb_packed_ttlrdata* tmp = record_list; record_list = record_list->next; zdb_record_free(tmp); } } /** @brief Destroys all the a resource record of the collection * * Destroys all the a resource record of the collection * * @param[in] collection the collection to destroy */ void zdb_record_destroy(zdb_rr_collection* collection) { yassert(collection != NULL); btree_callback_and_destroy(*collection, zdb_record_destroy_callback); *collection = NULL; } /** @brief Checks if a collection is empty * * Checks if a collection is empty * * @return TRUE if the collection is empty, FALSE otherwise. */ bool zdb_record_isempty(const zdb_rr_collection* collection) { yassert(collection != NULL); return *collection == NULL; } /** * @brief Copies the soa rdata to an soa_rdata native structure. * * Copies the soa of a zone to an soa_rdata structure. * No memory is allocated for the soa_rdata. If the zone is destroyed, * the soa_rdata becomes invalid. * * @param[in] zone a pointer to the zone * @param[out] soa_out a pointer to an soa_rdata structure */ ya_result zdb_record_getsoa(const zdb_packed_ttlrdata* soa, soa_rdata* soa_out) { s32 soa_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(soa); const u8* soa_start = soa->rdata_start; soa_out->mname = soa_start; u32 len = dnsname_len(soa_start); soa_size -= len; if(soa_size <= 0) { return ZDB_ERROR_CORRUPTEDSOA; } soa_start += len; soa_out->rname = soa_start; len = dnsname_len(soa_start); soa_size -= len; if(soa_size != 5 * 4) /* Only the 5 32 bits (should) remain */ { return ZDB_ERROR_CORRUPTEDSOA; } soa_start += len; soa_out->serial = ntohl(GET_U32_AT(*soa_start)); soa_start += 4; soa_out->refresh = ntohl(GET_U32_AT(*soa_start)); soa_start += 4; soa_out->retry = ntohl(GET_U32_AT(*soa_start)); soa_start += 4; soa_out->expire = ntohl(GET_U32_AT(*soa_start)); soa_start += 4; soa_out->minimum = ntohl(GET_U32_AT(*soa_start)); //soa_start += 4; return SUCCESS; } /** * @brief Allocated and duplicates the content of the source */ zdb_ttlrdata* zdb_ttlrdata_clone(const zdb_ttlrdata* source) { zdb_ttlrdata *rec; MALLOC_OR_DIE(zdb_ttlrdata*, rec, sizeof(zdb_ttlrdata), TTLRDATA_TAG); /// @todo edf 20141001 -- maybe merge the two allocs into one rec->next = NULL; rec->ttl = source->ttl; rec->rdata_size = source->rdata_size; MALLOC_OR_DIE(u8*, rec->rdata_pointer, rec->rdata_size, ZDBRDATA_TAG); memcpy(rec->rdata_pointer, source->rdata_pointer, rec->rdata_size); return rec; } /** * @brief Frees the content of the source */ void zdb_ttlrdata_delete(zdb_ttlrdata* record) { free(record->rdata_pointer); free(record); } #ifdef DEBUG /** * DEBUG */ void zdb_record_print_indented(zdb_rr_collection collection, output_stream *os, int indent) { btree_iterator iter; btree_iterator_init(collection, &iter); while(btree_iterator_hasnext(&iter)) { btree_node* node = btree_iterator_next_node(&iter); u16 type = node->hash; zdb_packed_ttlrdata* ttlrdata_sll = (zdb_packed_ttlrdata*)node->data; if(ttlrdata_sll == NULL) { osformatln(os, "%t[%{dnstype}] EMPTY TYPE", indent, &type); continue; } do { osformat(os, "%t[%{dnstype} %9d] ", indent, &type, ttlrdata_sll->ttl); osprint_rdata(os, type, ZDB_PACKEDRECORD_PTR_RDATAPTR(ttlrdata_sll), ZDB_PACKEDRECORD_PTR_RDATASIZE(ttlrdata_sll)); osprintln(os, ""); ttlrdata_sll = ttlrdata_sll->next; } while(ttlrdata_sll != NULL); } } void zdb_record_print(zdb_rr_collection collection, output_stream *os) { zdb_record_print_indented(collection, os, 0); } #endif /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/journal-cjf-page-output-stream.c0000644000077100007710000000012412650131756025110 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.390344 30 ctime=1454597652.355344534 yadifa-2.1.6-5826/lib/dnsdb/src/journal-cjf-page-output-stream.c0000664000077100007710000003327312650131756024725 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #define JOURNAL_CJF_BASE 1 #include "dnsdb/dnsdb-config.h" #include #include #include "dnsdb/journal-cjf-page.h" #include "dnsdb/journal-cjf-idxt.h" #include "dnsdb/journal-cjf-page-cache.h" #include "dnsdb/zdb_utils.h" struct journal_cjf_page_output_stream_data { output_stream filtered; journal_cjf *jnl; u32 serial_from; u32 serial_to; u32 soa_to_offset; u32 start_offset; u32 size; u8 flags; }; static ya_result journal_cjf_page_output_stream_write(output_stream* stream, const u8* buffer, u32 len); static ya_result journal_cjf_page_output_stream_flush(output_stream* stream); static void journal_cjf_page_output_stream_close(output_stream *stream); static const output_stream_vtbl journal_cjf_page_output_stream_vtbl = { journal_cjf_page_output_stream_write, journal_cjf_page_output_stream_flush, journal_cjf_page_output_stream_close, "journal_cjf_page_output_stream", }; typedef struct journal_cjf_page_output_stream_data journal_cjf_page_output_stream_data; static ya_result journal_cjf_page_output_stream_write(output_stream* stream, const u8* buffer, u32 len) { journal_cjf_page_output_stream_data* data = (journal_cjf_page_output_stream_data*)stream->data; ya_result ret = output_stream_write(&data->filtered, buffer, len); if(ISOK(ret)) { data->size += ret; } return ret; } static ya_result journal_cjf_page_output_stream_flush(output_stream* stream) { journal_cjf_page_output_stream_data* data = (journal_cjf_page_output_stream_data*)stream->data; ya_result ret = output_stream_flush(&data->filtered); return ret; } /** * * * * @param jnl the journal * @param os the current output for the records (SOA --- SOA +++) * @param size amount of bytes taken by the records * @param last_serial (the one of the SOA+++) */ void journal_cjf_page_output_stream_next(output_stream *stream) { journal_cjf_page_output_stream_data* data = (journal_cjf_page_output_stream_data*)stream->data; journal_cjf *jnl = data->jnl; // if the stream is not empty if(data->size > 0) { yassert(data->flags == 7); log_debug2("cjf: updating PAGE stream of size %u, ending at position %u (%08x), with serial %u", data->size, jnl->last_page.records_limit + data->size, jnl->last_page.records_limit + data->size, data->serial_to); journal_cjf_page_tbl_item item; journal_cjf_page_tbl_header head; item.ends_with_serial = data->serial_to; item.stream_file_offset = jnl->last_page.records_limit; // CFJ_PAGE_CACHE -> log_debug3("cjf: updating PAGE item at %u[(1 + %u) * 8])", jnl->last_page.file_offset, jnl->last_page.count); journal_cjf_page_cache_read_header(jnl->fd, jnl->last_page.file_offset, &head); head.stream_end_offset = item.stream_file_offset + data->size; head.count = jnl->last_page.count + 1; journal_cjf_page_cache_write_header(jnl->fd, jnl->last_page.file_offset, &head); journal_cjf_page_cache_write_item(jnl->fd, jnl->last_page.file_offset, jnl->last_page.count, &item); // CFJ_PAGE_CACHE <- if(jnl->last_page.count == 0) { jnl->last_page.serial_start = data->serial_from; } jnl->last_page.serial_end = data->serial_to; journal_cjf_idxt_update_last_serial(jnl, data->serial_to); jnl->serial_end = data->serial_to; jnl->last_page.records_limit += data->size; jnl->last_page.count = head.count; jnl->last_soa_offset = data->soa_to_offset; if(journal_cjf_is_empty(jnl)) { jnl->serial_begin = data->serial_from; } jnl->serial_end = data->serial_to; journal_cjf_set_dirty(jnl); journal_cjf_clear_empty(jnl); // reset the stream data data->start_offset += data->size; data->size = 0; data->serial_from = data->serial_to; data->soa_to_offset = 0; data->flags = 1; log_debug_jnl(jnl, "cjf: journal_cjf_page_next_output_stream: AFTER"); } else { log_debug2("cjf: PAGE stream is emtpy"); } } /** * * * * @param jnl the journal * @param os the current output for the records (SOA --- SOA +++) * @param size amount of bytes taken by the records * @param last_serial (the one of the SOA+++) */ static void journal_cjf_page_output_stream_close(output_stream *stream) { journal_cjf_page_output_stream_data* data = (journal_cjf_page_output_stream_data*)stream->data; log_debug2("cjf: finishing PAGE stream"); if(stream->vtbl == &journal_cjf_page_output_stream_vtbl) { // the stream must be empty (else we are losing stuff) yassert(data->size == 0); journal_cjf *jnl = data->jnl; if(is_buffer_output_stream(&data->filtered)) { log_debug3("cjf: flushing PAGE item"); journal_cjf_page_output_stream_flush(stream); fd_output_stream_detach(buffer_output_stream_get_filtered(&data->filtered)); output_stream_close(&data->filtered); } else { log_debug3("cjf: no PAGE item to flush"); } journal_cjf_page_cache_flush(jnl->fd); log_debug3("cjf: closing PAGE item"); ZFREE(data, journal_cjf_page_output_stream_data); output_stream_set_void(stream); } else { log_debug3("cjf: there are no opened PAGE stream to close"); } } /** * * Closes the stream and do not update the current PAGE * * @param jnl * @param os */ void journal_cjf_page_output_stream_cancel(output_stream *stream) { journal_cjf_page_output_stream_data* data = (journal_cjf_page_output_stream_data*)stream->data; if(stream->vtbl == &journal_cjf_page_output_stream_vtbl) { log_debug2("cjf: cancelling PAGE stream, ending at position %u (%08x)", data->jnl->last_page.records_limit, data->jnl->last_page.records_limit); journal_cjf_page_output_stream_flush(stream); fd_output_stream_detach(buffer_output_stream_get_filtered(&data->filtered)); output_stream_close(&data->filtered); output_stream_set_void(&data->filtered); data->size = 0; data->serial_from = 0; data->serial_to = 0; data->soa_to_offset = 0; data->flags = 0; log_debug3("cjf: cancelling PAGE item"); log_debug_jnl(data->jnl, "cjf: journal_cjf_page_cancel_output_stream: AFTER"); } else { log_debug3("cjf: there are no opened PAGE stream to cancel"); } } void journal_cjf_page_output_stream_set_serial_from(output_stream *stream, u32 serial) { journal_cjf_page_output_stream_data* data = (journal_cjf_page_output_stream_data*)stream->data; data->serial_from = serial; data->flags |= 1; } void journal_cjf_page_output_stream_set_serial_to(output_stream *stream, u32 serial) { journal_cjf_page_output_stream_data* data = (journal_cjf_page_output_stream_data*)stream->data; data->serial_to = serial; data->flags |= 2; } void journal_cjf_page_output_stream_set_soa_to_offset(output_stream *stream, u32 offset) { journal_cjf_page_output_stream_data* data = (journal_cjf_page_output_stream_data*)stream->data; data->soa_to_offset = offset; data->flags |= 4; } ya_result journal_cfj_page_output_stream_write_resource_record(output_stream *stream, dns_resource_record *rr) { journal_cjf_page_output_stream_data* data = (journal_cjf_page_output_stream_data*)stream->data; yassert(dnsname_is_subdomain(rr->name, data->jnl->zone->origin)); ya_result ret; if(rr->tctr.qtype == TYPE_SOA) { u32 serial; if(FAIL(ret = rr_soa_get_serial(rr->rdata, rr->rdata_size, &serial))) { return ret; } if(data->size == 0) { if((data->flags & 1) == 1) { // test that it matches the from } journal_cjf_page_output_stream_set_serial_from(stream, serial); } else { yassert((data->flags & 2) == 0); journal_cjf_page_output_stream_set_serial_to(stream, serial); journal_cjf_page_output_stream_set_soa_to_offset(stream, data->start_offset + data->size); } } ret = dns_resource_record_write(rr, stream); return ret; } u32 journal_cjf_page_output_stream_reopen(output_stream *out_os, journal_cjf *jnl) { // get the current page if((jnl->last_page.count == 0) && (jnl->last_page.file_offset == CJF_HEADER_SIZE) && (jnl->first_page_offset == CJF_HEADER_SIZE)) { // first PAGE jnl_ensure_file_opened(jnl, TRUE); // CFJ_PAGE_CACHE -> journal_cjf_page_cache_write_new_header(jnl->fd, jnl->last_page.file_offset); // CFJ_PAGE_CACHE <- log_debug_jnl(jnl, "journal_cjf_page_open_next_output_stream: INIT"); } if(out_os->vtbl == &journal_cjf_page_output_stream_vtbl) { if(journal_cjf_page_is_full(jnl)) { // if there no room left, append a new page, it becomes the current pag // flush the stream journal_cjf_page_output_stream_flush(out_os); journal_cjf_idxt_append_page(jnl); // reposition the stream if(lseek(jnl->fd, jnl->last_page.records_limit, SEEK_SET) < 0) { log_err("cannot move into journal: %r", ERRNO_ERROR); logger_flush(); abort(); return 0; } } log_debug2("cjf: continuing next PAGE stream at position %u (%08x)", jnl->last_page.records_limit, jnl->last_page.records_limit); #if DEBUG journal_cjf_page_output_stream_data *data = (journal_cjf_page_output_stream_data*)out_os->data; yassert(data->size == 0); #endif // DEBUG } else { if(journal_cjf_page_is_full(jnl)) { // if there no room left, append a new page, it becomes the current pag journal_cjf_idxt_append_page(jnl); } log_debug2("cjf: opening next PAGE stream at position %u (%08x)", jnl->last_page.records_limit, jnl->last_page.records_limit); if(lseek(jnl->fd, jnl->last_page.records_limit, SEEK_SET) < 0) { log_err("cannot move into journal: %r", ERRNO_ERROR); logger_flush(); abort(); return 0; } journal_cjf_page_output_stream_data *data; ZALLOC_OR_DIE(journal_cjf_page_output_stream_data*, data, journal_cjf_page_output_stream_data, GENERIC_TAG); ZEROMEMORY(data, sizeof(journal_cjf_page_output_stream_data)); // false positive: data cannot be NULL fd_output_stream_attach(&data->filtered, jnl->fd); buffer_output_stream_init(&data->filtered, &data->filtered, 512); data->jnl = jnl; data->start_offset = jnl->last_page.records_limit; out_os->data = data; out_os->vtbl = &journal_cjf_page_output_stream_vtbl; } return jnl->last_page.records_limit; } u32 journal_cfj_page_output_stream_get_size(output_stream *stream) { journal_cjf_page_output_stream_data* data = (journal_cjf_page_output_stream_data*)stream->data; return data->size; } u32 journal_cfj_page_output_stream_get_start_offset(output_stream *stream) { journal_cjf_page_output_stream_data* data = (journal_cjf_page_output_stream_data*)stream->data; return data->start_offset; } u32 journal_cfj_page_output_stream_get_current_offset(output_stream *stream) { journal_cjf_page_output_stream_data* data = (journal_cjf_page_output_stream_data*)stream->data; return data->start_offset + data->size; } yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/journal.c0000644000077100007710000000012412650131756020607 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.410344 30 ctime=1454597652.332344534 yadifa-2.1.6-5826/lib/dnsdb/src/journal.c0000664000077100007710000004325612650131756020426 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ /*------------------------------------------------------------------------------ * STATIC PROTOTYPES */ /*------------------------------------------------------------------------------ * FUNCTIONS */ /** @brief Function ... * * ... * * @param ... * * @retval OK * @retval NOK */ #define ZDB_JOURNAL_CODE 1 #include "dnsdb/dnsdb-config.h" #include #include #include "dnsdb/journal.h" #include "dnsdb/journal_ix.h" #include "dnsdb/journal-cjf.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/xfr_copy.h" #include "dnsdb/zdb-zone-path-provider.h" extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger //#define journal_default_open journal_ix_open #define journal_default_open journal_cjf_open static mutex_t journal_mutex = MUTEX_INITIALIZER; static journal *journal_mru_first = NULL; static journal *journal_mru_last = NULL; static u32 journal_mru_count = 0; static u32 journal_mru_size = 0; static u32 journal_count = 0; static bool journal_initialised = FALSE; static bool journal_mru_remove(journal *jh); /** * * Removes a journal from the MRU (INTERNAL) * * A journal removed from the MRU is to be closed * * @param jh * @return TRUE if the journal was removed, FALSE if it was not in the MRU */ static bool journal_mru_remove(journal *jh) { #ifdef DEBUG u8 fqdn[MAX_DOMAIN_LENGTH]; fqdn[0] = 0; jh->vtbl->get_domain(jh, fqdn); log_debug("journal: MRU: removing journal for %{dnsname}@%p", fqdn, jh); #endif if(jh->mru) { if(jh->prev != NULL) { jh->prev->next = jh->next; } else { // == NULL journal_mru_first = (journal*)jh->next; } if(jh->next != NULL) { jh->next->prev = jh->prev; } else { // == NULL journal_mru_last = (journal*)jh->prev; } jh->prev = NULL; jh->next = NULL; jh->mru = FALSE; --journal_mru_count; return TRUE; } #ifdef DEBUG else { if((jh->next != NULL) || (jh->prev != NULL)) { log_err("journal: MRU: %{dnsname}@%p not in MRU but kept link(s) to it!", fqdn, jh); logger_flush(); // then abort() abort(); } log_debug("journal: MRU: %{dnsname}@%p not in MRU", fqdn, jh); } #endif // was not in the MRU return FALSE; } /** * * Puts the given journal at the head of the MRU list. * Clears out the least recently used journal if needed and possible. * * @param jh */ static void journal_mru_add(journal *jh) { // if jh is first already, stop #ifdef DEBUG u8 fqdn[MAX_DOMAIN_LENGTH]; fqdn[0] = 0; jh->vtbl->get_domain(jh, fqdn); #endif if(journal_mru_first == jh) { #ifdef DEBUG log_debug("journal: MRU: adding %{dnsname}@%p : already first", fqdn, jh); #endif return; } // detach from the MRU bool was_in_mru = journal_mru_remove(jh); // insert at the head of the MRU jh->prev = NULL; jh->next = journal_mru_first; // if there is a first, link it to the new first if(journal_mru_count != 0) { journal_mru_first->prev = jh; } else { journal_mru_last = jh; } journal_mru_first = jh; // mark as being in the MRU jh->mru = TRUE; // ++journal_mru_count; if(!was_in_mru) { // new reference, so increase the count // slots available ? if(journal_mru_count < journal_mru_size) { // yes #ifdef DEBUG log_debug("journal: MRU: %{dnsname}@%p : added at the head (count = %u/%u)", fqdn, jh, journal_mru_count, journal_mru_size); #endif } else { #ifdef DEBUG u8 lru_fqdn[MAX_DOMAIN_LENGTH]; lru_fqdn[0] = 0; journal_mru_last->vtbl->get_domain(journal_mru_last, lru_fqdn); log_debug("journal: MRU: %{dnsname}@%p : added at the head (count = %u/%u), removing %{dnsname}@%p", fqdn, jh, journal_mru_count, journal_mru_size, lru_fqdn, journal_mru_last); #endif // no, remove the last one of the MRU journal_mru_remove(journal_mru_last); } } #ifdef DEBUG else { log_debug("journal: MRU: %{dnsname}@%p moved at the head of the MRU (count = %u/%u)", fqdn, jh, journal_mru_count, journal_mru_size); } #endif } ya_result journal_init(u32 mru_size) { log_debug("journal: initialising with an MRU of %i slots", mru_size); if(!journal_initialised) { // initialises journal open/close access mutex (avoid creation/destruction races) // will be responsible for the journal file-descriptor resources allocation (closes least recently used journal when no more FDs are available) mutex_init_recursive(&journal_mutex); if(mru_size == 0) { mru_size = ZDB_JOURNAL_FD_DEFAULT; } journal_mru_size = MAX(MIN(mru_size, ZDB_JOURNAL_FD_MAX), ZDB_JOURNAL_FD_MIN); log_debug("journal: intialised with an MRU of %i slots", journal_mru_size); journal_initialised = TRUE; } else { log_debug("journal: already initialised with an MRU of %i slots", journal_mru_size); if(mru_size == 0) { mru_size = ZDB_JOURNAL_FD_DEFAULT; } else { mru_size = MAX(MIN(mru_size, ZDB_JOURNAL_FD_MAX), ZDB_JOURNAL_FD_MIN); } if(journal_mru_size != mru_size) { log_err("journal: the journal MRU size was already set to %u but %u is now requested", journal_mru_size, mru_size); return ERROR; } } return SUCCESS; } void journal_finalise() { log_debug("journal: finalising"); if(journal_initialised) { mutex_lock(&journal_mutex); if(journal_mru_count > 0) { log_warn("journal: there are still %u journals in the MRU", journal_mru_count); } int coundown = 30; // 3 seconds (30 * 0.1s) while((journal_mru_count > 0) && (--coundown > 0)) { mutex_unlock(&journal_mutex); usleep(100000); // 0.1s mutex_lock(&journal_mutex); } mutex_unlock(&journal_mutex); if(journal_mru_count == 0) { mutex_destroy(&journal_mutex); journal_initialised = FALSE; log_debug("journal: finalised"); } else { log_err("journal: giving up on waiting for MRU"); #if DEBUG logger_flush(); #endif } } } /** * * Opens the journal for a zone * * Binds the journal to the zone (?) * * Increments the reference count to the journal * * @param jhp * @param zone * @param workingdir * @param create * @return */ ya_result journal_open(journal **jhp, zdb_zone *zone, bool create) { journal *jh = NULL; ya_result return_value = SUCCESS; char data_path[PATH_MAX]; yassert((jhp != NULL) && (zone != NULL)); // DO NOT zdb_zone_acquire(zone); log_debug("journal: opening journal for zone %{dnsname}@%p", zone->origin, zone); mutex_lock(&journal_mutex); // get the journal jh = zone->journal; if(jh == NULL) { // The zone has no journal linked yet #ifdef DEBUG log_debug("journal_open(%p,%p,%i) getting journal path (%{dnsname})", jhp, zone, create, zone->origin); #endif // it does not exist, so create a new one (using the default format) /// @todo edf 20141128 -- get rid of the hashing function here : this has to be pushed to the journal file format /// but first, the journal must be able to know where the zone file is (so it could put the journal next to it) u32 path_flags = ZDB_ZONE_PATH_PROVIDER_ZONE_PATH; if(create) { path_flags |= ZDB_ZONE_PATH_PROVIDER_MKDIR; } if(FAIL(return_value = zdb_zone_path_get_provider()(zone->origin, data_path, sizeof(data_path), path_flags))) { mutex_unlock(&journal_mutex); *jhp = NULL; return return_value; } #ifdef DEBUG log_debug("journal_open(%p,%p,%i) opening journal (%{dnsname}) in '%s'", jhp, zone, create, zone->origin, data_path); #endif // open the journal if(FAIL(return_value = journal_default_open(&jh, zone->origin, data_path, create))) // followed by a link zone { mutex_unlock(&journal_mutex); *jhp = NULL; // DO NOT zdb_zone_release(zone); return return_value; } // if the journal was successfully opened, link it to the zone /// @note this link is weak, there is no reference count increase for it ++journal_count; journal_link_zone(jh, zone); } #ifdef DEBUG else { log_debug("journal_open(%p,%p,%i) referencing journal (%{dnsname})", jhp, zone, create, zone->origin); // DO NOT zdb_zone_release(zone); } #endif // from here jh is not NULL mutex_unlock(&journal_mutex); *jhp = jh; return return_value; } /** * Closes the journal * * @param jh */ void journal_close(journal *jh) { if(jh != NULL) { if(jh->zone != NULL) { log_debug("journal: closing journal %p for zone %{dnsname}@%p", jh, jh->zone->origin, jh->zone); } else { log_debug("journal: closing journal %p", jh); } mutex_lock(&journal_mutex); journal_mru_remove(jh); jh->vtbl->close(jh); // allowed close //jh->vtbl->destroy(jh); mutex_unlock(&journal_mutex); } else { //log_debug("journal: close called on a NULL journal"); } } /** * * Returns the last serial stored in a file. * * Opens the journal file based on the fqdn. * Reads the serial. * Closes the journal. * * @param origin * @param workingdir * @param serialp * @return */ ya_result journal_last_serial(const u8 *origin, const char *workingdir, u32 *serialp) { journal *jh = NULL; ya_result return_value; char data_path[PATH_MAX]; if(origin == NULL) { return ZDB_JOURNAL_WRONG_PARAMETERS; } if(FAIL(return_value = zdb_zone_path_get_provider()(origin, data_path, sizeof(data_path), ZDB_ZONE_PATH_PROVIDER_ZONE_PATH))) { return return_value; } workingdir = data_path; if(ISOK(return_value = journal_default_open(&jh, origin, workingdir, FALSE))) // open/close { bool close_it = (jh->zone == NULL); return_value = journal_get_last_serial(jh, serialp); if(close_it) { journal_close(jh); } } return return_value; } /** * * Reduces the size of the journal to 0. * * Opens the journal file based on the fqdn. * Truncates the journal * Closes the journal. * * Opens the journal file based on the fqdn. * Reads the serial. * Closes the journal. * * @param origin * @param workingdir * @return */ ya_result journal_truncate(const u8 *origin) { journal *jh = NULL; ya_result return_value; char data_path[PATH_MAX]; if(origin == NULL) { return ZDB_JOURNAL_WRONG_PARAMETERS; } if(FAIL(return_value = zdb_zone_path_get_provider()(origin, data_path, sizeof(data_path), ZDB_ZONE_PATH_PROVIDER_ZONE_PATH))) { return return_value; } if(ISOK(return_value = journal_default_open(&jh, origin, data_path, TRUE))) // no link ! { return_value = journal_truncate_to_size(jh, 0); } return return_value; } /** * * Returns the last SOA TTL + RDATA * * Opens the journal file based on the fqdn. * Reads the SOA. * Closes the journal. * * @param origin * @param workingdir * @param serial * @param ttl * @param last_soa_rdata * @param last_soa_rdata_size * @return */ ya_result journal_last_soa(const u8 *origin, const char *workingdir, u32 *serial, u32 *ttl, u8 *last_soa_rdata, u16 *last_soa_rdata_size) { journal *jh = NULL; ya_result return_value; char data_path[PATH_MAX]; /* check preconditions */ if((origin == NULL) || /* mandatory */ (workingdir == NULL) || /* mandatory */ ( ((last_soa_rdata == NULL) == (last_soa_rdata_size == NULL)) && /* at least one of them mandatory */ (ttl == NULL) && (serial == NULL) ) ) { return ZDB_JOURNAL_WRONG_PARAMETERS; } /* translate path */ if(FAIL(return_value = zdb_zone_path_get_provider()(origin, data_path, sizeof(data_path), ZDB_ZONE_PATH_PROVIDER_ZONE_PATH))) { return return_value; } workingdir = data_path; /* open a new instance of the journal */ if(ISOK(return_value = journal_default_open(&jh, origin, workingdir, FALSE))) // no link ? { bool close_it = (jh->zone == NULL); input_stream is; dns_resource_record rr; u32 first_serial = 0; u32 last_serial = 0; journal_get_first_serial(jh, &first_serial); journal_get_last_serial(jh, &last_serial); if(first_serial != last_serial) { dns_resource_record_init(&rr); if(ISOK(return_value = journal_get_ixfr_stream_at_serial(jh, first_serial, &is, &rr))) { journal_mru_add(jh); if(last_soa_rdata != NULL) /* one not NULL => both not NULL */ { if(*last_soa_rdata_size >= rr.rdata_size) { MEMCOPY(last_soa_rdata, rr.rdata, rr.rdata_size); *last_soa_rdata_size = rr.rdata_size; } } else { return_value = ERROR; } if(serial != NULL) { if(rr.rdata_size > 0) { return_value = rr_soa_get_serial(rr.rdata, rr.rdata_size, serial); } else { log_err("jnl: %{dnsname}: empty last SOA in journal [%u;%u]", origin, first_serial, last_serial); } } if(ttl != NULL) { *ttl = htonl(rr.tctr.ttl); } input_stream_close(&is); } dns_resource_record_clear(&rr); } if(close_it) { journal_close(jh); } } return return_value; } /** * * Prints the status of the journal (mostly the ones in the MRU) to the logger. * */ void journal_log_status() { mutex_lock(&journal_mutex); log_debug("journal: instances: %u, mru: %u/%u", journal_count, journal_mru_count, journal_mru_size); journal *jh = journal_mru_first; while(jh != NULL) { jh->vtbl->log_dump(jh); jh = (journal*)jh->next; } mutex_unlock(&journal_mutex); } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/dnssec_keystore.c0000644000077100007710000000012412650131756022341 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.440344 30 ctime=1454597652.481344534 yadifa-2.1.6-5826/lib/dnsdb/src/dnssec_keystore.c0000664000077100007710000004344212650131756022155 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnskey DNSSEC keys functions * @ingroup dnsdbdnssec * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include #include #include #include #include #include #include #include #include #include #include #include #include "dnsdb/zdb_error.h" #include "dnsdb/zdb_record.h" #include "dnsdb/dnssec.h" #include "dnsdb/dnssec_config.h" #include "dnsdb/dnssec_keystore.h" #include "dnsdb/zdb_listener.h" #define MODULE_MSG_HANDLE g_dnssec_logger extern logger_handle *g_dnssec_logger; #ifndef MAX_PATH #define MAX_PATH 4096 #endif #define ZDB_KEYSTORE_ORIGIN_TAG 0x4e494749524f534b #define OAT_PRIVATE_FORMAT "K%s+%03d+%05i.private" #define OAT_DNSKEY_FORMAT "K%s+%03d+%05i.key" static const char* g_keystore_path = DNSSEC_DEFAULT_KEYSTORE_PATH; static dnssec_keystore g_keystore = NULL; static pthread_mutex_t keystore_mutex = PTHREAD_MUTEX_INITIALIZER; #define KEY_HASH(key) ((((hashcode)key->tag)<<16)|key->flags|(key->algorithm<<1)) #define TAG_FLAGS_ALGORITHM_HASH(t_,f_,a_) ((((hashcode)t_)<<16)|(f_)|((a_)<<1)) // sanitises an origin static void origin_copy_sanitize(char* target, const char* origin) { if(origin == NULL) { target[0] = '.'; target[1] = '\0'; return; } int origin_len = strlen(origin); if(origin_len == 0) { target[0] = '.'; target[1] = '\0'; return; } if(origin[origin_len - 1] == '.') { origin_len++; MEMCOPY(target, origin, origin_len); } else { MEMCOPY(target, origin, origin_len); target[origin_len++] = '.'; target[origin_len] = '\0'; } } const char* dnssec_keystore_getpath() { return g_keystore_path; } static const char* dnssec_default_keystore_path = DNSSEC_DEFAULT_KEYSTORE_PATH; void dnssec_keystore_resetpath() { /* * cast to void to avoid the -Wstring-compare warning */ if(((void*)g_keystore_path) != ((void*)dnssec_default_keystore_path)) { free((void*)g_keystore_path); g_keystore_path = dnssec_default_keystore_path; } } void dnssec_keystore_setpath(const char* path) { dnssec_keystore_resetpath(); if(path != NULL) { g_keystore_path = strdup(path); } } ya_result dnssec_keystore_add(dnssec_key* key) { yassert(key != NULL); pthread_mutex_lock(&keystore_mutex); dnssec_key_get_tag(key); // update the tag field dnssec_key** head = (dnssec_key**)btree_insert(&g_keystore, KEY_HASH(key)); /* head will NEVER be NULL */ /* * Look for a dup */ dnssec_key* tmp = *head; while(tmp != NULL) { if(dnssec_key_equals(key, tmp)) { /* Already in ... */ #ifdef DEBUG formatln("dnssec_keystore_add: duplicate key %{dnsname} %u %u", key->owner_name, key->flags, key->tag); #endif pthread_mutex_unlock(&keystore_mutex); return (key == tmp) ? SUCCESS : DNSSEC_ERROR_DUPLICATEKEY; } tmp = tmp->next; } key->next = *head; *head = key; pthread_mutex_unlock(&keystore_mutex); return SUCCESS; } dnssec_key* dnssec_keystore_get(u8 algorithm, u16 tag, u16 flags, const char *origin) { pthread_mutex_lock(&keystore_mutex); dnssec_key* head = (dnssec_key*)btree_find(&g_keystore, TAG_FLAGS_ALGORITHM_HASH(tag, flags, algorithm)); if(head == NULL) { pthread_mutex_unlock(&keystore_mutex); return NULL; } char clean_origin[MAX_DOMAIN_LENGTH]; origin_copy_sanitize(clean_origin, origin); while(head != NULL) { if(strcmp(head->origin, clean_origin) == 0) { break; } head = head->next; } pthread_mutex_unlock(&keystore_mutex); return head; } dnssec_key* dnssec_keystore_remove(u8 algorithm, u16 tag, u16 flags, const char *origin) { hashcode hash = TAG_FLAGS_ALGORITHM_HASH(tag, flags, algorithm); pthread_mutex_lock(&keystore_mutex); dnssec_key** head = (dnssec_key**)btree_findp(&g_keystore, hash); if(head == NULL) { pthread_mutex_unlock(&keystore_mutex); return NULL; } dnssec_key* ret_sll = NULL; dnssec_key* tmp = *head; if(tmp != NULL) { dnssec_key* prev = NULL; char clean_origin[MAX_DOMAIN_LENGTH]; origin_copy_sanitize(clean_origin, origin); do { if(strcmp(tmp->origin, clean_origin) == 0) { /* MATCH : remove from the list, add in the return list */ if(prev == NULL) { *head = tmp->next; } else { prev->next = tmp->next; } tmp->next = ret_sll; ret_sll = tmp; tmp = tmp->next; continue; } prev = tmp; tmp = tmp->next; } while(tmp != NULL); } if(*head == NULL) { /* Delete the node */ btree_delete(&g_keystore, hash); } pthread_mutex_unlock(&keystore_mutex); return ret_sll; } static void dnssec_keystore_destroy_callback(void* data) { dnssec_key *key = (dnssec_key*)data; while(key != NULL) { dnssec_key *next = key->next; key->next = NULL; dnskey_free(key); key = next; } } void dnssec_keystore_destroy() { pthread_mutex_lock(&keystore_mutex); btree_callback_and_destroy(g_keystore, dnssec_keystore_destroy_callback); g_keystore = NULL; pthread_mutex_unlock(&keystore_mutex); } /** Generates a private key, store in the keystore * The caller is supposed to create a resource record with this key and add * it to the owner. */ ya_result dnssec_key_createnew(u8 algorithm, u32 size, u16 flags, const char *origin, dnssec_key **out_key) { ya_result return_value; dnssec_key* key = NULL; char clean_origin[MAX_DOMAIN_LENGTH]; /* sanitise the origin name */ origin_copy_sanitize(clean_origin, origin); /** * @note if 65536 keys exist then this function will loop forever */ for(;;) { switch(algorithm) { case DNSKEY_ALGORITHM_RSASHA1: case DNSKEY_ALGORITHM_RSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA256_NSEC3: case DNSKEY_ALGORITHM_RSASHA512_NSEC3: { if(FAIL(return_value = rsa_newinstance(size, algorithm, flags, clean_origin, &key))) { return return_value; } break; } case DNSKEY_ALGORITHM_DSASHA1: case DNSKEY_ALGORITHM_DSASHA1_NSEC3: { if(FAIL(return_value = dsa_newinstance(size, algorithm, flags, clean_origin, &key))) { return return_value; } break; } default: { return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; } } dnssec_key* same_tag_key; if(ISOK(return_value = dnssec_key_load_private(algorithm, key->tag, flags, clean_origin, &same_tag_key))) { dnssec_keystore_add(key); break; } /** * @note The error here should be the one derived from errno : file not found */ ZFREE_STRING(key->owner_name); ZFREE_STRING(key->origin); key->vtbl->dnskey_key_free(key); ZFREE(key, dnssec_key); } *out_key = key; return SUCCESS; } void dnssec_key_free(dnssec_key* key) { if(key != NULL) { dnssec_keystore_remove(key->algorithm, key->tag, key->flags, key->origin); ZFREE_STRING(key->owner_name); ZFREE_STRING(key->origin); key->vtbl->dnskey_key_free(key); ZFREE(key, dnssec_key); } } ya_result dnskey_load_public(const u8 *rdata, u16 rdata_size, const char *origin, dnssec_key **out_key) { u16 flags = ntohs(GET_U16_AT(rdata[0])); u8 algorithm = rdata[3]; u16 tag = dnskey_getkeytag(rdata, rdata_size); ya_result return_value = SUCCESS; dnssec_key* key = dnssec_keystore_get(algorithm, tag, flags, origin); if(key == NULL) { if(ISOK(return_value = dnskey_new_from_rdata(rdata, rdata_size, origin, &key))) { dnssec_keystore_add(key); } } *out_key = key; return return_value; } /** Load a private key from the disk or the keystore, then return it */ ya_result dnssec_key_load_private(u8 algorithm, u16 tag, u16 flags, const char* origin, dnssec_key **out_key) { dnssec_key* key = dnssec_keystore_get(algorithm, tag, flags, origin); ya_result return_value = ERROR; bool has_public_key = FALSE; *out_key = NULL; if(key != NULL && !dnssec_key_is_private(key)) { has_public_key = TRUE; key = NULL; } if(key == NULL) { char clean_origin[MAX_DOMAIN_LENGTH]; origin_copy_sanitize(clean_origin, origin); /* Load from the disk, add to the keystore */ char path[MAX_PATH]; if(snprintf(path, MAX_PATH, "%s/" OAT_PRIVATE_FORMAT, g_keystore_path, clean_origin, algorithm, tag) >= MAX_PATH) { /* Path bigger than MAX_PATH */ return BIGGER_THAN_MAX_PATH; } log_debug("dnssec_key_load_private: opening file %s", path); FILE *f; if((f = fopen(path, "rb")) == NULL) { return ERRNO_ERROR; } switch(algorithm) { case DNSKEY_ALGORITHM_RSASHA1: case DNSKEY_ALGORITHM_RSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA256_NSEC3: case DNSKEY_ALGORITHM_RSASHA512_NSEC3: { return_value = rsa_loadprivate(f, algorithm, flags, clean_origin, &key); break; } case DNSKEY_ALGORITHM_DSASHA1: case DNSKEY_ALGORITHM_DSASHA1_NSEC3: { return_value = dsa_loadprivate(f, algorithm, flags, clean_origin, &key); break; } default: { return_value = DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; } } fclose(f); if(ISOK(return_value)) { if(has_public_key) { /* * remove the old (public) version */ dnssec_keystore_remove(algorithm, tag, flags, origin); } if(FAIL(return_value = dnssec_keystore_add(key))) { dnskey_free(key); // something is wrong here ... key = NULL; } *out_key = key; } } else { *out_key = key; return_value = SUCCESS; } return return_value; } ya_result dnssec_key_store_private(dnssec_key* key) { char path[MAX_PATH]; if(key == NULL || key->key.any == NULL || key->origin == NULL || !dnssec_key_is_private(key)) { return DNSSEC_ERROR_INCOMPLETEKEY; } if(snprintf(path, MAX_PATH, "%s/" OAT_PRIVATE_FORMAT, g_keystore_path, key->origin, key->algorithm, key->tag) >= MAX_PATH) { /* Path bigger than MAX_PATH */ return DNSSEC_ERROR_KEYSTOREPATHISTOOLONG; } switch(key->algorithm) { case DNSKEY_ALGORITHM_RSASHA1: case DNSKEY_ALGORITHM_RSASHA1_NSEC3: case DNSKEY_ALGORITHM_RSASHA256_NSEC3: case DNSKEY_ALGORITHM_RSASHA512_NSEC3: case DNSKEY_ALGORITHM_DSASHA1: case DNSKEY_ALGORITHM_DSASHA1_NSEC3: { break; } default: { return DNSSEC_ERROR_UNSUPPORTEDKEYALGORITHM; } } FILE* f; if((f = fopen(path, "w+b")) == NULL) { return DNSSEC_ERROR_UNABLETOCREATEKEYFILES; } u8 tmp_in[DNSSEC_MAXIMUM_KEY_SIZE_BYTES]; char tmp_out[BASE64_ENCODED_SIZE(DNSSEC_MAXIMUM_KEY_SIZE_BYTES)]; void* base = key->key.any; /* Modulus */ fprintf(f, "Private-key-format: v1.2\nAlgorithm: %i (?)", key->algorithm); /// @todo 20140523 edf -- think about handling v1.3 const struct structdescriptor *sd = key->vtbl->dnssec_key_get_fields_descriptor(key); ya_result return_code = ERROR; while(sd->name != NULL) { fprintf(f, "%s: ", sd->name); BIGNUM **valuep = (BIGNUM**)&(((u8*)base)[sd->address]); //WRITE_BIGNUM_AS_BASE64(f, *valuep, tmp_in, tmp_out); if(FAIL(return_code = dnskey_write_bignum_as_base64(f, *valuep, tmp_in, sizeof(tmp_in), tmp_out, sizeof(tmp_out)))) { break; } fputs("\n", f); sd++; } fclose(f); return return_code; } ya_result dnssec_key_store_dnskey(dnssec_key* key) { char path[MAX_PATH]; if(snprintf(path, MAX_PATH, "%s/"OAT_DNSKEY_FORMAT, g_keystore_path, key->origin, key->algorithm, key->tag) >= MAX_PATH) { return DNSSEC_ERROR_KEYSTOREPATHISTOOLONG; } FILE* f; if((f = fopen(path, "w+b")) == NULL) { return DNSSEC_ERROR_UNABLETOCREATEKEYFILES; } u32 lc = 1; const char* p = key->origin; char c; while((c = *p) != '\0') { if(c == '.') { lc++; } p++; } fprintf(f, "%s IN DNSKEY %u %u %u ", key->origin, key->flags, lc, key->algorithm); u8* rdata; u32 rdata_size = key->vtbl->dnskey_key_rdatasize(key); MALLOC_OR_DIE(u8*, rdata, rdata_size, DNSKEY_RDATA_TAG); /* store the RDATA */ key->vtbl->dnskey_key_writerdata(key, rdata); char b64[64]; u8* ptr = rdata; while(rdata_size >= 48) { base64_encode(ptr, 48, b64); if(fwrite(b64, 64, 1, f) != 1) { fclose(f); return DNSSEC_ERROR_KEYWRITEERROR; } rdata_size -= 48; } if(rdata_size > 0) { u32 n = base64_encode(ptr, rdata_size, b64); if(fwrite(b64, n, 1, f) != 1) { fclose(f); return DNSSEC_ERROR_KEYWRITEERROR; } } free(rdata); fclose(f); return SUCCESS; } /* dnssec_key* dnskey_key_clone_container(dnssec_key* original_key) { dnssec_key* key; ZALLOC_OR_DIE(dnssec_key*, key, dnssec_key, ZDB_DNSKEY_TAG); MEMCOPY(key, original_key, sizeof (dnssec_key)); key->next = NULL; return key; } dnssec_key* dnskey_key_destroy_container(dnssec_key* key) { ZFREE(key, dnssec_key); } */ void dnssec_key_addrecord(zdb_zone* zone, dnssec_key* key) { zdb_packed_ttlrdata* dnskey; u32 rdata_size = key->vtbl->dnskey_key_rdatasize(key); ZDB_RECORD_ZALLOC_EMPTY(dnskey, 86400, rdata_size); u8* rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(dnskey); key->vtbl->dnskey_key_writerdata(key, rdata); /* * The DNSKEY record is done * Add it without dups */ if(!zdb_record_insert_checked(&zone->apex->resource_record_set, TYPE_DNSKEY, dnskey)) /* FB done */ { /* It's a dup */ ZDB_RECORD_ZFREE(dnskey); return; } #if ZDB_CHANGE_FEEDBACK_SUPPORT != 0 /* * Update ICMTL. * * NOTE: the zdb_rr_label set of functions are zdb_listener-aware but the zdb_record ones are not. * That's why this one needs a call to the listener. * */ zdb_ttlrdata unpacked_ttlrdata; unpacked_ttlrdata.rdata_pointer = &dnskey->rdata_start[0]; unpacked_ttlrdata.rdata_size = dnskey->rdata_size; unpacked_ttlrdata.ttl = dnskey->ttl; u8 * origin_vector[1] = {zone->origin}; zdb_listener_notify_add_record(zone, origin_vector, 0, TYPE_DNSKEY, &unpacked_ttlrdata); #endif } /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec3_name_error.c0000644000077100007710000000012412650131756022361 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.422344 30 ctime=1454597652.531344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec3_name_error.c0000664000077100007710000001647612650131756022204 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include "dnsdb/nsec3_types.h" #include "dnsdb/nsec3_item.h" #include "dnsdb/nsec3_name_error.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/rrsig.h" #define MODULE_MSG_HANDLE g_dnssec_logger extern logger_handle *g_dnssec_logger; /** * @note Name Error Responses * * Retrieve NSEC3 name error records * * To prove the nonexistence of QNAME, a closest encloser proof and an * NSEC3 RR covering the (nonexistent) wildcard RR at the closest * encloser MUST be included in the response. This collection of (up * to) three NSEC3 RRs proves both that QNAME does not exist and that a * wildcard that could have matched QNAME also does not exist. * * For example, if "gamma.example." is the closest provable encloser to * QNAME, then an NSEC3 RR covering "*.gamma.example." is included in * the authority section of the response. * * * * Z-Allocates and creates an NSEC3 record from an nsec3_zone_item * * This record is temporary. * * The function is supposed to be called by nsec3_name_error & nsec3_nodata_error * Said functions are called by the query function * * The record is supposed to be destroyed after usage (ie: at destroy query answer) * * @param zone * @param qname * @param apex_index * @param pool * @param out_next_closer_nsec3_owner_p * @param out_encloser_nsec3 * @param out_encloser_nsec3_rrsig * @param out_closest_encloser_nsec3_owner_p * @param out_closest_encloser_nsec3 * @param out_closest_encloser_nsec3_rrsig * @param out_wild_closest_encloser_nsec3_owner_p * @param out_wild_closest_encloser_nsec3 * @param out_wild_closest_encloser_nsec3_rrsig */ void nsec3_name_error(const zdb_zone* zone, const dnsname_vector *qname, u32 apex_index, u8 * restrict * pool, u8 **out_next_closer_nsec3_owner_p, zdb_packed_ttlrdata** out_encloser_nsec3, const zdb_packed_ttlrdata** out_encloser_nsec3_rrsig, u8 **out_closest_encloser_nsec3_owner_p, zdb_packed_ttlrdata** out_closest_encloser_nsec3, const zdb_packed_ttlrdata** out_closest_encloser_nsec3_rrsig, u8 **out_wild_closest_encloser_nsec3_owner_p, zdb_packed_ttlrdata** out_wild_closest_encloser_nsec3, const zdb_packed_ttlrdata** out_wild_closest_encloser_nsec3_rrsig ) { const nsec3_zone_item *encloser_nsec3; const nsec3_zone_item *closest_provable_encloser_nsec3; const nsec3_zone_item *wild_closest_provable_encloser_nsec3; yassert(out_next_closer_nsec3_owner_p != NULL && out_encloser_nsec3 != NULL && out_encloser_nsec3_rrsig != NULL); yassert(out_closest_encloser_nsec3_owner_p != NULL && out_closest_encloser_nsec3 != NULL && out_closest_encloser_nsec3_rrsig != NULL); yassert(out_wild_closest_encloser_nsec3_owner_p != NULL && out_wild_closest_encloser_nsec3 != NULL && out_wild_closest_encloser_nsec3_rrsig != NULL); *out_next_closer_nsec3_owner_p = NULL; *out_encloser_nsec3 = NULL; *out_encloser_nsec3_rrsig = NULL; *out_closest_encloser_nsec3_owner_p = NULL; *out_closest_encloser_nsec3 = NULL; *out_closest_encloser_nsec3_rrsig = NULL; *out_wild_closest_encloser_nsec3_owner_p = NULL; *out_wild_closest_encloser_nsec3 = NULL; *out_wild_closest_encloser_nsec3_rrsig = NULL; nsec3_closest_encloser_proof(zone, qname, apex_index, &encloser_nsec3, &closest_provable_encloser_nsec3, &wild_closest_provable_encloser_nsec3 ); /* Append all items + sig to the authority * Don't do dups */ nsec3_zone* n3 = zone->nsec.nsec3; u32 min_ttl = 900; zdb_zone_getminttl(zone, &min_ttl); nsec3_zone_item_to_new_zdb_packed_ttlrdata_parm nsec3_parms = { n3, encloser_nsec3, zone->origin, pool, min_ttl }; if(encloser_nsec3 != NULL) { nsec3_zone_item_to_new_zdb_packed_ttlrdata( &nsec3_parms, out_next_closer_nsec3_owner_p, out_encloser_nsec3, out_encloser_nsec3_rrsig); } *out_closest_encloser_nsec3 = NULL; if((closest_provable_encloser_nsec3 != encloser_nsec3) && (closest_provable_encloser_nsec3 != NULL)) { nsec3_parms.item = closest_provable_encloser_nsec3; nsec3_zone_item_to_new_zdb_packed_ttlrdata( &nsec3_parms, out_closest_encloser_nsec3_owner_p, out_closest_encloser_nsec3, out_closest_encloser_nsec3_rrsig); } *out_wild_closest_encloser_nsec3 = NULL; if((wild_closest_provable_encloser_nsec3 != encloser_nsec3) && (wild_closest_provable_encloser_nsec3 != closest_provable_encloser_nsec3)) { nsec3_parms.item = wild_closest_provable_encloser_nsec3; nsec3_zone_item_to_new_zdb_packed_ttlrdata( &nsec3_parms, out_wild_closest_encloser_nsec3_owner_p, out_wild_closest_encloser_nsec3, out_wild_closest_encloser_nsec3_rrsig); } } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec3_hash.c0000644000077100007710000000012412650131756021153 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.413344 30 ctime=1454597652.516344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec3_hash.c0000664000077100007710000001001112650131756020751 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include "dnsdb/zdb_error.h" #include "dnsdb/nsec3_hash.h" /****************************************************************************** * * Digest - related methods. * *****************************************************************************/ static u8 WILDCARD_PREFIX[2] = {1, '*'}; static ya_result unsupported_hash_function(const u8* name, u32 name_len, const u8* salt, u32 salt_len, u32 iterations, u8* digest, bool wild) { return DNSSEC_ERROR_UNSUPPORTEDDIGESTALGORITHM; } static ya_result sha1_hash_function(const u8* name, u32 name_len, const u8* salt, u32 salt_len, u32 iterations, u8* digest, bool wild) { SHA_CTX sha1; SHA1_Init(&sha1); if(wild) { SHA1_Update(&sha1, WILDCARD_PREFIX, 2); } SHA1_Update(&sha1, name, name_len); SHA1_Update(&sha1, salt, salt_len); SHA1_Final(digest, &sha1); for(; iterations > 0; iterations--) { SHA1_Init(&sha1); SHA1_Update(&sha1, digest, SHA_DIGEST_LENGTH); SHA1_Update(&sha1, salt, salt_len); SHA1_Final(digest, &sha1); } return SUCCESS; } /* * Returns the function associated with the algorithm * * A typical usage for this would be : * * get_nsec3_hash_function(NSEC3_ZONE_ALGORITHM(n3))(name, ...... ) * |_______________________________________________||_____________| * Get the digest function pointer Call the returned function * * I'd do a macro for this but ... * */ nsec3_hash_function* nsec3_hash_get_function(u8 algorithm) { switch(algorithm) { case 1: return &sha1_hash_function; default: return &unsupported_hash_function; } } u8 nsec3_hash_len(u8 algorithm) { switch(algorithm) { case 1: return SHA_DIGEST_LENGTH; default: return 0; } return 0; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_utils.c0000644000077100007710000000012412650131756021134 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.397344 30 ctime=1454597652.397344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_utils.c0000664000077100007710000001421312650131756020742 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnsdb * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include #if ZDB_HAS_DNSSEC_SUPPORT != 0 #include "dnsdb/dnssec.h" #endif #include "dnsdb/zdb_error.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_zone_label_iterator.h" /* * SOA */ ya_result rr_soa_get_serial(const u8* rdata, u16 rdata_size, u32* serial) { s32 soa_size = rdata_size; const u8* soa_start = rdata; u32 len = dnsname_len(soa_start); soa_size -= len; if(soa_size <= 0) { return ZDB_ERROR_CORRUPTEDSOA; } soa_start += len; len = dnsname_len(soa_start); soa_size -= len; if(soa_size != 5 * 4) /* Only the 5 32 bits (should) remain */ { return ZDB_ERROR_CORRUPTEDSOA; } soa_start += len; if(serial != NULL) { *serial = ntohl(GET_U32_AT(*soa_start)); } return SUCCESS; } ya_result rr_soa_increase_serial(u8* rdata, u16 rdata_size, u32 increment) { s32 soa_size = rdata_size; u8* soa_start = rdata; u32 len = dnsname_len(soa_start); soa_size -= len; if(soa_size <= 0) { return ZDB_ERROR_CORRUPTEDSOA; } soa_start += len; len = dnsname_len(soa_start); soa_size -= len; if(soa_size != 5 * 4) /* Only the 5 32 bits (should) remain */ { return ZDB_ERROR_CORRUPTEDSOA; } soa_start += len; SET_U32_AT(*soa_start, htonl(ntohl(GET_U32_AT(*soa_start)) + increment)); return SUCCESS; } ya_result rr_soa_get_minimumttl(const u8* rdata, u16 rdata_size, u32* minimum_ttl) { s32 soa_size = rdata_size; const u8* soa_start = rdata; u32 len = dnsname_len(soa_start); soa_size -= len; if(soa_size <= 0) { return ZDB_ERROR_CORRUPTEDSOA; } soa_start += len; len = dnsname_len(soa_start); soa_size -= len; if(soa_size != 5 * 4) /* Only the 5 32 bits (should) remain */ { return ZDB_ERROR_CORRUPTEDSOA; } soa_start += len + 16; *minimum_ttl = ntohl(GET_U32_AT(*soa_start)); return SUCCESS; } /* * */ ya_result log_rdata(logger_handle *hndl, int level, u16 type, u8* rdata_pointer, u16 rdata_size) { ya_result return_code; output_stream os; bytearray_output_stream_context os_context; char buffer[4096]; bytearray_output_stream_init_ex_static(&os, (u8*)buffer, sizeof (buffer), 0, &os_context); if(FAIL(return_code = osprint_rdata(&os, type, rdata_pointer, rdata_size))) { return return_code; } output_stream_write_u8(&os, 0); buffer[sizeof (buffer) - 1] = '\0'; /* If the buffer is full, this will ensure it is terminated. */ logger_handle_msg(hndl, level, "%s", bytearray_output_stream_buffer(&os)); output_stream_close(&os); return SUCCESS; } ya_result osprint_query_ex_section(output_stream* os, zdb_resourcerecord* section) { while(section != NULL) { osformat(os, "%{dnsname} %-6d %{dnsclass} %{dnstype} ", section->name, section->ttl_rdata->ttl, §ion->zclass, §ion->rtype); osprint_rdata(os, section->rtype, ZDB_PACKEDRECORD_PTR_RDATAPTR(section->ttl_rdata), ZDB_PACKEDRECORD_PTR_RDATASIZE(section->ttl_rdata)); osprintln(os, ""); section = section->next; } osprint_char(os, '\n'); return 0; } void print_query_ex_section(zdb_resourcerecord* section) { osprint_query_ex_section(termout, section); } void osprint_query_ex(output_stream* os, zdb_query_ex_answer* answer) { if(answer->answer != NULL) { osprint(os, ";; ANSWER SECTION:\n"); osprint_query_ex_section(os, answer->answer); } if(answer->authority != NULL) { osprint(os, ";; AUTHORITY SECTION:\n"); osprint_query_ex_section(os, answer->authority); } if(answer->additional != NULL) { osprint(os, ";; ADDITIONAL SECTION:\n"); osprint_query_ex_section(os, answer->additional); } } void print_query_ex(zdb_query_ex_answer* answer) { osprint_query_ex(termout, answer); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_cache.c0000644000077100007710000000012412650131756021037 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.347344 30 ctime=1454597652.401344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_cache.c0000664000077100007710000000442012650131756020644 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Internal functions for the database: zoned resource records label. * * Internal functions for the database: zoned resource records label. * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include "dnsdb/dictionary.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_zone_label.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_error.h" /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_zone_label.c0000644000077100007710000000012412650131756022106 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.447344 30 ctime=1454597652.439344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_zone_label.c0000664000077100007710000003706312650131756021724 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Internal functions for the database: zoned resource records label. * * Internal functions for the database: zoned resource records label. * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include "dnsdb/zdb.h" #include "dnsdb/dictionary.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_zone_label.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_error.h" extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger /** * @brief INTERNAL callback, tests for a match between a label and a node. */ static int zdb_zone_label_zlabel_match(const void *label, const dictionary_node * node) { const zdb_zone_label* zone_label = (const zdb_zone_label*)node; return dnslabel_equals(zone_label->name, label); } /** * @brief INTERNAL callback, creates a new node instance */ static dictionary_node * zdb_zone_label_create(const void *data) { zdb_zone_label* zone_label; ZALLOC_OR_DIE(zdb_zone_label*, zone_label, zdb_zone_label, ZDB_ZONELABEL_TAG); zone_label->next = NULL; dictionary_init(&zone_label->sub); zone_label->name = dnslabel_zdup(data); zone_label->zone = NULL; return (dictionary_node *)zone_label; } /** * @brief INTERNAL callback, destroys a node instance and its collections. */ static void zdb_zone_label_destroy_callback(dictionary_node * zone_label_record) { if(zone_label_record == NULL) { return; } zdb_zone_label* zone_label = (zdb_zone_label*)zone_label_record; /* detach is made by destroy */ dictionary_destroy(&zone_label->sub, zdb_zone_label_destroy_callback); dnslabel_zfree(zone_label->name); if(zone_label->zone != NULL) { zdb_zone_release(zone_label->zone); zone_label->zone = NULL; } ZFREE(zone_label_record, zdb_zone_label); } /** * @brief Search for the label of a zone in the database * * Search for the label of a zone in the database * * @param[in] db the database to explore * @param[in] origin the dnsname_vector mapping the label * * @return a pointer to the label or NULL if it does not exists in the database. * */ zdb_zone_label* zdb_zone_label_find(zdb * db, dnsname_vector* origin) // mutex checked { zdb_zone_label* zone_label; yassert(group_mutex_islocked(&db->mutex)); zone_label = db->root; /* the "." zone */ dnslabel_stack_reference sections = origin->labels; s32 index = origin->size; /* look into the sub level */ while(zone_label != NULL && index >= 0) { u8* label = sections[index]; hashcode hash = hash_dnslabel(label); zone_label = (zdb_zone_label*)dictionary_find(&zone_label->sub, hash, label, zdb_zone_label_zlabel_match); index--; } return zone_label; } /** * @brief Search for the label of a zone in the database * * Search for the label of a zone in the database * * @param[in] db the database to explore * @param[in] origin the dnsname_vector mapping the label * * @return a pointer to the label or NULL if it does not exists in the database. * */ zdb_zone_label* zdb_zone_label_find_nolock(zdb * db, dnsname_vector* origin) { zdb_zone_label* zone_label; zone_label = db->root; /* the "." zone */ dnslabel_stack_reference sections = origin->labels; s32 index = origin->size; /* look into the sub level */ while(zone_label != NULL && index >= 0) { u8* label = sections[index]; hashcode hash = hash_dnslabel(label); zone_label = (zdb_zone_label*)dictionary_find(&zone_label->sub, hash, label, zdb_zone_label_zlabel_match); index--; } return zone_label; } zdb_zone_label* zdb_zone_label_find_from_name(zdb* db, const char* name) // mutex checked { dnsname_vector origin; u8 dns_name[MAX_DOMAIN_LENGTH]; if(ISOK(cstr_to_dnsname(dns_name, name))) { dnsname_to_dnsname_vector(dns_name, &origin); zdb_zone_label *label = zdb_zone_label_find(db, &origin); // in zdb_zone_label_find_from_name return label; } return NULL; } zdb_zone_label* zdb_zone_label_find_from_dnsname(zdb* db, const u8* dns_name) // mutex checked { dnsname_vector origin; dnsname_to_dnsname_vector(dns_name, &origin); zdb_zone_label *label = zdb_zone_label_find(db, &origin); // in zdb_zone_label_find_from_dnsname return label; } zdb_zone_label* zdb_zone_label_find_from_dnsname_nolock(zdb* db, const u8* dns_name) { dnsname_vector origin; dnsname_to_dnsname_vector(dns_name, &origin); zdb_zone_label *label = zdb_zone_label_find_nolock(db, &origin); // in zdb_zone_label_find_from_dnsname_nolock return label; } /** * @brief Destroys a label and its collections. * * Destroys a label and its collections. * * @param[in] zone_labelp a pointer to a pointer to the label to destroy. * */ void zdb_zone_label_destroy(zdb_zone_label **zone_labelp) { yassert(zone_labelp != NULL); zdb_zone_label* zone_label = *zone_labelp; if(zone_label != NULL) { #ifdef DEBUG log_debug5("zdb_zone_label_destroy: %{dnslabel}", zone_label->name); #endif dictionary_destroy(&zone_label->sub, zdb_zone_label_destroy_callback); zdb_zone *zone = zone_label->zone; if(zone != NULL) { #ifdef DEBUG log_debug5("zdb_zone_label_destroy: %{dnsname}", zone->origin); #endif mutex_lock(&zone->lock_mutex); alarm_close(zone->alarm_handle); zone->alarm_handle = ALARM_HANDLE_INVALID; mutex_unlock(&zone->lock_mutex); zdb_zone_release(zone); zone_label->zone = NULL; } //zdb_zone_destroy(zone_label->zone); dnslabel_zfree(zone_label->name); ZFREE(zone_label, zdb_zone_label); *zone_labelp = NULL; } } /** * @brief Gets pointers to all the zone labels along the path of a name. * * Gets pointers to all the zone labels along the path of a name. * * @param[in] db a pointer to the database * @param[in] name a pointer to the dns name * @param[in] zone_label_stack a pointer to the stack that will hold the labels pointers * * @return the top of the stack (-1 = empty) */ s32 zdb_zone_label_match(zdb * db, const dnsname_vector* origin, // mutex checked zdb_zone_label_pointer_array zone_label_stack) { zdb_zone_label* zone_label; yassert(zdb_islocked_by(db, ZDB_MUTEX_READER)); zone_label = db->root; /* the "." zone */ const_dnslabel_stack_reference sections = origin->labels; s32 index = origin->size; s32 sp = 0; zone_label_stack[0] = zone_label; /* look into the sub level */ while(index >= 0) { u8* label = sections[index]; hashcode hash = hash_dnslabel(label); zone_label = (zdb_zone_label*)dictionary_find(&zone_label->sub, hash, label, zdb_zone_label_zlabel_match); if(zone_label == NULL) { break; } zone_label_stack[++sp] = zone_label; index--; } return sp; } #if OBSOLETE /** * @todo get rid of this * * @brief Retrieve the zone label origin, adds it in the database if needed. * * Retrieve the zone label origin, adds it in the database if needed. * * @param[in] db a pointer to the database * @param[in] origin a pointer to the dns name * * @return a pointer to the label */ zdb_zone_label* zdb_zone_label_add(zdb * db, dnsname_vector* origin) // mutex checked { zdb_zone_label* zone_label; zdb_lock(db, ZDB_MUTEX_WRITER); zone_label = db->root; /* the "." zone */ dnslabel_stack_reference sections = origin->labels; s32 index = origin->size; /* look into the sub level */ while(index >= 0) { u8* label = sections[index]; hashcode hash = hash_dnslabel(label); zone_label = (zdb_zone_label*)dictionary_add(&zone_label->sub, hash, label, zdb_zone_label_zlabel_match, zdb_zone_label_create); index--; } zdb_unlock(db, ZDB_MUTEX_WRITER); return zone_label; } #endif zdb_zone_label* zdb_zone_label_add_nolock(zdb * db, dnsname_vector* origin) // mutex checked { zdb_zone_label* zone_label; yassert(zdb_islocked(db)); zone_label = db->root; /* the "." zone */ dnslabel_stack_reference sections = origin->labels; s32 index = origin->size; /* look into the sub level */ while(index >= 0) { u8* label = sections[index]; hashcode hash = hash_dnslabel(label); zone_label = (zdb_zone_label*)dictionary_add(&zone_label->sub, hash, label, zdb_zone_label_zlabel_match, zdb_zone_label_create); index--; } return zone_label; } typedef struct zdb_zone_label_delete_process_callback_args zdb_zone_label_delete_process_callback_args; struct zdb_zone_label_delete_process_callback_args { dnslabel_stack_reference sections; s32 top; }; /** * @brief INTERNAL callback */ static ya_result zdb_zone_label_delete_process_callback(void *a, dictionary_node * node) { yassert(node != NULL); zdb_zone_label* zone_label = (zdb_zone_label*)node; zdb_zone_label_delete_process_callback_args *args = (zdb_zone_label_delete_process_callback_args *)a; /* * a points to a kind of dnsname and we are going in * * we go down and down each time calling the dictionnary process for the next level * * at the last level we return the "delete" code * * from there, the dictionnary processor will remove the entry * * at that point the calling dictionnary will know if he has to delete his node or not * * and so on and so forth ... * */ s32 top = args->top; u8* label = (u8*)args->sections[top]; if(!dnslabel_equals(zone_label->name, label)) { return COLLECTION_PROCESS_NEXT; } /* match */ if(top > 0) { /* go to the next level */ label = args->sections[--args->top]; hashcode hash = hash_dnslabel(label); ya_result err; if((err = dictionary_process(&zone_label->sub, hash, args, zdb_zone_label_delete_process_callback)) == COLLECTION_PROCESS_DELETENODE) { /* check the node for relevance, return "delete" if irrelevant */ if(ZONE_LABEL_IRRELEVANT(zone_label)) { /* Irrelevant means that only the name remains */ dictionary_destroy(&zone_label->sub, zdb_zone_label_destroy_callback); if(zone_label->zone != NULL) { zdb_zone_release(zone_label->zone); zone_label->zone = NULL; } dnslabel_zfree(zone_label->name); ZFREE(zone_label, zdb_zone_label); return COLLECTION_PROCESS_DELETENODE; } return COLLECTION_PROCESS_STOP; } /* or ... stop */ return err; } /* NOTE: the 'detach' is made by destroy : do not touch to the "next" field */ /* NOTE: the freee of the node is made by destroy : do not do it */ /* dictionary destroy will take every item in the dictionary and * iterate through it calling the passed function. */ dictionary_destroy(&zone_label->sub, zdb_zone_label_destroy_callback); if(zone_label->zone != NULL) { zdb_zone_release(zone_label->zone); zone_label->zone = NULL; } dnslabel_zfree(zone_label->name); ZFREE(zone_label, zdb_zone_label); return COLLECTION_PROCESS_DELETENODE; } /** * @brief Destroys a zone label and all its collections * * Destroys a zone label and all its collections * * @parm[in] db a pointer to the database * @parm[in] name a pointer to the name * * @return an error code */ ya_result zdb_zone_label_delete(zdb * db, dnsname_vector* name) // mutex checked { yassert(db != NULL && name != NULL && name->size >= 0); yassert(zdb_islocked(db)); zdb_zone_label* root_label; root_label = db->root; /* the "." zone */ if(root_label == NULL) { /* has already been destroyed */ return ZDB_ERROR_NOSUCHCLASS; } zdb_zone_label_delete_process_callback_args args; args.sections = name->labels; args.top = name->size; hashcode hash = hash_dnslabel(args.sections[args.top]); ya_result err = dictionary_process(&root_label->sub, hash, &args, zdb_zone_label_delete_process_callback); if(err == COLLECTION_PROCESS_DELETENODE) { err = COLLECTION_PROCESS_STOP; } return err; } #ifdef DEBUG /** * DEBUG */ void zdb_zone_label_print_indented(zdb_zone_label* zone_label, output_stream *os, int indented) { if(zone_label == NULL) { osformatln(os, "%tg: NULL", indented); return; } if(zone_label->zone != NULL) { zdb_zone_print_indented(zone_label->zone, os, indented + 1); } if(zone_label->name != NULL) { osformatln(os, "%tg: '%{dnslabel}'", indented, zone_label->name); } else { osformatln(os, "%tg: WRONG", indented); } dictionary_iterator iter; dictionary_iterator_init(&zone_label->sub, &iter); while(dictionary_iterator_hasnext(&iter)) { zdb_zone_label* *sub_labelp = (zdb_zone_label**)dictionary_iterator_next(&iter); zdb_zone_label_print_indented(*sub_labelp, os, indented + 1); } } void zdb_zone_label_print(zdb_zone_label* zone_label, output_stream *os) { zdb_zone_label_print_indented(zone_label, os, 0); } #endif /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_zone_write_unbound.c0000644000077100007710000000012412650131756023713 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.455344 30 ctime=1454597652.474344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_zone_write_unbound.c0000664000077100007710000002051612650131756023524 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include #include "dnsdb/zdb_error.h" #include "dnsdb/zdb_zone_label_iterator.h" #include "dnsdb/zdb_zone_write.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_zone.h" #if ZDB_HAS_NSEC3_SUPPORT!=0 #include "dnsdb/nsec3.h" #include "dnsdb/dnsrdata.h" #endif /* * Without buffering: * * zdb_write_zone_text: 1245933248000 -> 1245933499739 (251739) * * With buffering: * * zdb_write_zone_text: 1245933590000 -> 1245933597877 (7877) * */ ya_result zdb_zone_write_unbound(const zdb_zone* zone, const char* output_file) { output_stream bos; output_stream fos; ya_result ret; if(FAIL(ret = file_output_stream_create(output_file, 0644, &fos))) { return ret; } if(FAIL(ret = buffer_output_stream_init(&fos, &bos, 4096))) { return ret; } char label_cstr[MAX_DOMAIN_LENGTH]; osformat(&bos, "local-zone: \"%{dnsname}\" static\n", zone->origin); zdb_packed_ttlrdata* soa_ttlrdata = NULL; zdb_zone_label_iterator iter; btree_iterator records_iter; zdb_zone_label_iterator_init(zone, &iter); /* * Save each label, and its records. */ while(zdb_zone_label_iterator_hasnext(&iter)) { zdb_zone_label_iterator_nextname_to_cstr(&iter, label_cstr); zdb_rr_label* label = zdb_zone_label_iterator_next(&iter); soa_ttlrdata = zdb_record_find(&label->resource_record_set, TYPE_SOA); if(soa_ttlrdata != NULL) { u16 zclass = zdb_zone_getclass(zone); osformat(&bos, "local-data: \"%s %u %{dnsclass} SOA ", label_cstr, soa_ttlrdata->ttl, &zclass); ret = osprint_rdata(&bos, TYPE_SOA, ZDB_PACKEDRECORD_PTR_RDATAPTR(soa_ttlrdata), ZDB_PACKEDRECORD_PTR_RDATASIZE(soa_ttlrdata)); osprintln(&bos, "\""); if(FAIL(ret)) { osprintln(&bos, ";; ABOVE RECORD IS CORRUPTED"); } } btree_iterator_init(label->resource_record_set, &records_iter); while(btree_iterator_hasnext(&records_iter)) { btree_node* node = btree_iterator_next_node(&records_iter); u16 type = (u16)node->hash; if(type == TYPE_SOA) { continue; } zdb_packed_ttlrdata* ttlrdata_sll = (zdb_packed_ttlrdata*)node->data; while(ttlrdata_sll != NULL) { osformat(&bos, "local-data: \"%s %u %{dnstype} ", label_cstr, ttlrdata_sll->ttl, &type); ret = osprint_rdata(&bos, type, ZDB_PACKEDRECORD_PTR_RDATAPTR(ttlrdata_sll), ZDB_PACKEDRECORD_PTR_RDATASIZE(ttlrdata_sll)); osprintln(&bos, "\""); if(FAIL(ret)) { osprintln(&bos, ";; ABOVE RECORD IS CORRUPTED"); } ttlrdata_sll = ttlrdata_sll->next; } } } if(soa_ttlrdata == NULL) { return ZDB_ERROR_NOSOAATAPEX; } #if ZDB_HAS_NSEC3_SUPPORT != 0 /* * If the zone is NSEC3, print the nsec3 data */ if(zdb_record_find(&zone->apex->resource_record_set, TYPE_NSEC3PARAM) != NULL) { soa_rdata soa; zdb_record_getsoa(soa_ttlrdata, &soa); nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { u8 rdata[TYPE_BIT_MAPS_MAX_RDATA_SIZE]; u32 rdata_hash_offset = NSEC3_ZONE_RDATA_SIZE(n3); MEMCOPY(rdata, &n3->rdata[0], NSEC3_ZONE_RDATA_SIZE(n3)); nsec3_avl_iterator nsec3_items_iter; nsec3_avl_iterator_init(&n3->items, &nsec3_items_iter); if(nsec3_avl_iterator_hasnext(&nsec3_items_iter)) { nsec3_zone_item* first = nsec3_avl_iterator_next_node(&nsec3_items_iter); nsec3_zone_item* item = first; nsec3_zone_item* next_item; u8 digest_len = NSEC3_NODE_DIGEST_SIZE(first); do { if(nsec3_avl_iterator_hasnext(&nsec3_items_iter)) { next_item = nsec3_avl_iterator_next_node(&nsec3_items_iter); } else { next_item = first; } rdata[1] = item->flags; u32 rdata_size = rdata_hash_offset; MEMCOPY(&rdata[rdata_size], next_item->digest, digest_len + 1); rdata_size += digest_len + 1; MEMCOPY(&rdata[rdata_size], item->type_bit_maps, item->type_bit_maps_size); rdata_size += item->type_bit_maps_size; osprint(&bos, "local-data: \""); if(FAIL(ret = output_stream_write_base32hex(&bos, NSEC3_NODE_DIGEST_PTR(item), digest_len))) { return ret; } osformat(&bos, ".%{dnsname} %u NSEC3 ", zone->origin, soa.minimum); osprint_rdata(&bos, TYPE_NSEC3, rdata, rdata_size); osprintln(&bos, "\""); zdb_packed_ttlrdata* rrsig = item->rrsig; while(rrsig != NULL) { /*osformatln(&bos, ";; rrsig@%p", rrsig);*/ u16 type = TYPE_RRSIG; osformat(&bos, "local-data: \"%{dnsname} %u %{dnstype} ", zone->origin, rrsig->ttl, &type); /* ${} requires a pointer to the data */ osprint_rdata(&bos, type, ZDB_PACKEDRECORD_PTR_RDATAPTR(rrsig), ZDB_PACKEDRECORD_PTR_RDATASIZE(rrsig)); osprintln(&bos, "\""); rrsig = rrsig->next; } item = next_item; } while(next_item != first); } /* If there is a first item*/ n3 = n3->next; } /* while n3 != NULL */ } #endif /* The filter closes the filtered */ output_stream_close(&bos); return SUCCESS; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/dnssec.c0000644000077100007710000000012412650131756020414 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.414344 30 ctime=1454597652.478344534 yadifa-2.1.6-5826/lib/dnsdb/src/dnssec.c0000664000077100007710000001057512650131756020231 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbdnssec DNSSEC functions * @ingroup dnsdb * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #define _DNSSEC_C #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include "dnsdb/dnssec.h" #include "dnsdb/dnsrdata.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_error.h" #include #define MODULE_MSG_HANDLE g_dnssec_logger logger_handle *g_dnssec_logger = NULL; /* * NOTE: strtok_r CRASHES if the first parameter is on non-writable memory (ie: "openssl" instead of strdup("openssl") ) * In order to avoid this, I dup the string before processing it. */ ENGINE* dnssec_loadengine(const char *engine_name_const) { ENGINE *engine; char *token_pointer = NULL; char *engine_name = strdup(engine_name_const); char *token = strtok_r(engine_name, ENGINE_COMMAND_DELIMITER, &token_pointer); if(token == NULL) { engine = ENGINE_by_id(engine_name); } else { engine = ENGINE_by_id(token); token = strtok_r(NULL, ENGINE_COMMAND_DELIMITER, &token_pointer); } if(engine == NULL) { log_err("ENGINE %s not available", engine_name); DIE(DNSSEC_ERROR_NOENGINE); } while(token != NULL) { char *command_pointer; char *command = strtok_r(token, "=", &command_pointer); if(command == NULL) { log_err("bad command %s", command); DIE(DNSSEC_ERROR_INVALIDENGINE); } char *command_value = strtok_r(NULL, "=", &command_pointer); if(command_value == NULL) { log_err("bad command value %s", command_value); DIE(DNSSEC_ERROR_INVALIDENGINE); } ENGINE_ctrl_cmd((ENGINE*)engine, command, atoi(command_value), NULL, NULL, 0); token = strtok_r(NULL, ENGINE_COMMAND_DELIMITER, &token_pointer); } if(ENGINE_init((ENGINE*)engine) == 0) { log_err("ENGINE_init failed"); ENGINE_free((ENGINE*)engine); /* cfr: http://www.openssl.org/docs/crypto/engine.html */ DIE(DNSSEC_ERROR_INVALIDENGINE); } free(engine_name); return engine; } void dnssec_unloadengine(ENGINE *engine) { ENGINE_finish((ENGINE*)engine); ENGINE_free((ENGINE*)engine); } /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/dynupdate_check_prerequisites.c0000644000077100007710000000012412650131756025253 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.294344 30 ctime=1454597652.301344534 yadifa-2.1.6-5826/lib/dnsdb/src/dynupdate_check_prerequisites.c0000664000077100007710000002562012650131756025065 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbupdate Dynamic update functions * @ingroup dnsdb * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include "dnsdb/dynupdate.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_zone.h" /* * */ #define ZDB_DYNUPDATE_TAG 0x1111111111111111 typedef struct name_type_rdata name_type_rdata; struct name_type_rdata { u8* rname; u8* rdata; u16 rtype; u16 rdata_size; }; static int name_type_rdata_compare(const void* a, const void* b) { int cmp; name_type_rdata* ia = *(name_type_rdata**)a; name_type_rdata* ib = *(name_type_rdata**)b; /* strcmp is adequate for this test */ if((cmp = strcmp((char*)ia->rname, (char*)ib->rname)) != 0) { return cmp; } cmp = ia->rtype; cmp -= ib->rtype; return cmp; } static void name_type_rdata_free(void* a) { free(a); } static void free_rrsets(ptr_vector* rrsetsp) { ptr_vector_free_empties(rrsetsp, name_type_rdata_free); ptr_vector_destroy(rrsetsp); } /* * Input stream here is not a good idea because * * A) Like Gery said, the buffer is 64K max. * B) Using an input stream would require me to copy & allocate memory, * this way only requires it for the last case, and only a "token", * never a string. */ ya_result dynupdate_check_prerequisites(zdb_zone* zone, packet_unpack_reader_data *reader, u16 count) { if(ZDB_ZONE_INVALID(zone)) { return ZDB_ERROR_ZONE_INVALID; } if(count == 0) { return SUCCESS; } dnsname_vector origin_path; dnsname_vector name_path; ptr_vector rrsets; u8* rname; u8* rdata; u32 rname_size; //u32 rttl; u16 rtype; u16 rclass; u16 rdata_size; u8 wire[MAX_DOMAIN_LENGTH + 10 + 65536]; ptr_vector_init(&rrsets); dnsname_to_dnsname_vector(zone->origin, &origin_path); while(count-- > 0) { ya_result return_value; if(FAIL(return_value = packet_reader_read_record(reader, wire, sizeof(wire)))) { free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_FORMERR); } rname = wire; rname_size = dnsname_len(wire); rtype = GET_U16_AT(wire[rname_size]); rclass = GET_U16_AT(wire[rname_size + 2]); //rttl = ntohl(GET_U32_AT(wire[rname_size + 4])); rdata_size = ntohs(GET_U16_AT(wire[rname_size + 8])); rdata = &wire[rname_size + 10]; dnsname_to_dnsname_vector(rname, &name_path); s32 idx; for(idx = 0; idx < origin_path.size; idx++) { if(!dnslabel_equals(origin_path.labels[origin_path.size - idx], name_path.labels[name_path.size - idx])) { free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_NOTZONE); } } if(rclass == CLASS_ANY) { if(rdata_size != 0) { free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_FORMERR); } zdb_rr_label* label = zdb_rr_label_find_exact(zone->apex, name_path.labels, (name_path.size - origin_path.size) - 1); if(rtype == TYPE_ANY) { if(label == NULL) { free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_NXDOMAIN); } } else { if(label == NULL) { free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_NXRRSET); } if(zdb_record_find(&label->resource_record_set, rtype) == NULL) { free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_NXRRSET); } } } else if(rclass == CLASS_NONE) { if(rdata_size != 0) { free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_FORMERR); } zdb_rr_label* label = zdb_rr_label_find_exact(zone->apex, name_path.labels, (name_path.size - origin_path.size) - 1); if(rtype == TYPE_ANY) { if(label != NULL) { free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_YXDOMAIN); } } else { if(label != NULL) { if(zdb_record_find(&label->resource_record_set, rtype) != NULL) { free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_YXRRSET); } } } } else if(rclass == zdb_zone_getclass(zone)) { name_type_rdata* item; MALLOC_OR_DIE(name_type_rdata*, item, sizeof(name_type_rdata), ZDB_DYNUPDATE_TAG); item->rname = rname; item->rdata = rdata; item->rtype = rtype; item->rdata_size = rdata_size; ptr_vector_append(&rrsets, item); } else { free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_FORMERR); } } ptr_vector_qsort(&rrsets, name_type_rdata_compare); /* * Get the first name. * While the next records have this name ... * Get the first type * while the next records have this type ... * Test that the record has a match * Decrement the match count (dual record queries are an error) * */ if(ptr_vector_size(&rrsets) > 0) { zdb_rr_label* label = NULL; zdb_packed_ttlrdata* rr_sll = NULL; u8* last_name = (u8*)"\0377"; u16 last_type = 0; s32 required_matches = 0; name_type_rdata** itemp; s32 record_count = ptr_vector_last_index(&rrsets); itemp = (name_type_rdata**)rrsets.data; while(record_count-- >= 0) { name_type_rdata* item = *itemp++; if(!dnsname_equals(item->rname, last_name)) { if(required_matches != 0) { free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_NXRRSET); } last_name = item->rname; /* * It's a new name: get the rr_label */ dnsname_to_dnsname_vector(item->rname, &name_path); label = zdb_rr_label_find_exact(zone->apex, name_path.labels, (name_path.size - origin_path.size) - 1); last_type = 0; // forces the next test } if(last_type != item->rtype) { if(required_matches != 0) { free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_NXRRSET); } last_type = item->rtype; /* * get the type's rr list * compute the size of the list */ rr_sll = zdb_record_find(&label->resource_record_set, last_type); required_matches = 0; zdb_packed_ttlrdata* rr = rr_sll; while(rr != NULL) { required_matches++; rr = rr->next; } } /* * check that the rdata exists * * if not: break * * if yes: decrement the counter */ zdb_packed_ttlrdata* rr = rr_sll; while(rr != NULL) { if(rr->rdata_size == item->rdata_size) { /** * @todo: This should be done by a type-aware comparator. * Sometimes case (in)sensitivity is important. * * Do I have to assume that, as for the zone load, the RDATA are low-cased where allowed ? */ if(memcmp(&rr->rdata_start[0], item->rdata, item->rdata_size) == 0) { /* * match */ required_matches--; break; } } rr = rr->next; } if(rr == NULL) { /* * no match */ free_rrsets(&rrsets); return SERVER_ERROR_CODE(RCODE_NXRRSET); } } } free_rrsets(&rrsets); return reader->offset; } /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec3_rrsig_updater.c0000644000077100007710000000012412650131756023102 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.357344 30 ctime=1454597652.542344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec3_rrsig_updater.c0000664000077100007710000004153312650131756022715 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * Thread functions to sign the RRSIG records of the NSEC3 of a zone. * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include #include #include "dnsdb/zdb_types.h" #include "dnsdb/zdb_record.h" #include "dnsdb/dnssec.h" #include "dnsdb/rrsig.h" #include "dnsdb/nsec3.h" #include "dnsdb/rrsig_updater.h" #include "dnsdb/nsec3_rrsig_updater.h" #include "dnsdb/zdb_zone.h" #define MODULE_MSG_HANDLE g_dnssec_logger /***************************************************************************** ***************************************************************************** * * UPDATER * ***************************************************************************** *****************************************************************************/ #define NSEC3_RRSIG_TTLRDATA_TAG 0x5254474953334e /* RRSIGTR */ static ya_result nsec3_rrsig_updater_thread_init(dnssec_task_s *task) { u32 valid_from = time(NULL); rrsig_context_s dummy_context; ya_result return_code = rrsig_context_initialize(&dummy_context, task->zone, DEFAULT_ENGINE_NAME, valid_from, NULL); /* nsec3 */ rrsig_context_destroy(&dummy_context); return return_code; } static ya_result nsec3_rrsig_updater_thread_finalise(dnssec_task_s *task) { return SUCCESS; } /** * * @param task * @param processor ==0 = answer, >0 = query * @param ctxp * @return */ static ya_result nsec3_rrsig_updater_thread_create_context(dnssec_task_s *task, s32 processor, void **ctxp) { yassert((task != NULL) && (task->args != NULL) && (task->zone != NULL)); if(processor > 0) { rrsig_context_s *ctx; MALLOC_OR_DIE(rrsig_context_s*, ctx, sizeof(rrsig_context_s), GENERIC_TAG); u32 valid_from = time(NULL); nsec3_rrsig_updater_parms *parms = (nsec3_rrsig_updater_parms*)task->args; ya_result return_code = rrsig_context_initialize(ctx, task->zone, DEFAULT_ENGINE_NAME, valid_from, (parms->quota>0)?&parms->remaining_quota:NULL); if(ISOK(return_code)) { ctx->task = task; *ctxp = ctx; } else { free(ctx); ctx = NULL; } return return_code; } else { nsec3_rrsig_answer_context_s *ctx; MALLOC_OR_DIE(nsec3_rrsig_answer_context_s*, ctx, sizeof(nsec3_rrsig_answer_context_s), GENERIC_TAG); ctx->task = task; ctx->items = NULL; *ctxp = ctx; return SUCCESS; } } static void nsec3_rrsig_updater_thread_destroy_context(dnssec_task_s *task, s32 processor, void *ctx_) { (void)task; if(processor > 0) { rrsig_updater_parms *parms = (rrsig_updater_parms*)task->args; rrsig_context_s *ctx = (rrsig_context_s*)ctx_; parms->good_signatures += ctx->good_signatures; parms->expired_signatures += ctx->expired_signatures; parms->wrong_signatures += ctx->wrong_signatures; rrsig_context_destroy(ctx); free(ctx); } else { nsec3_rrsig_answer_context_s *ctx = (nsec3_rrsig_answer_context_s*)ctx_; ctx->task = NULL; free(ctx); } } /** * * Updates the signatures on the NSEC3 record of a label of a zone based on a signature context * * @param sig_context the signature context * @param query details about the nsec3 entry to sign * @param tmp_nsec3_ttlrdata a record of TMP_NSEC3_TTLRDATA_SIZE bytes for temporary work */ static void nsec3_rrsig_updater_update_nsec3(rrsig_context_s *sig_context, nsec3_rrsig_update_item_s *query, zdb_packed_ttlrdata *tmp_nsec3_ttlrdata) { u8 digest_len = NSEC3_NODE_DIGEST_SIZE(query->item); u8 digest_to_dnsname[MAX_DOMAIN_LENGTH + 1]; digest_to_dnsname[0] = BASE32HEX_ENCODED_LEN(digest_len); base32hex_encode(NSEC3_NODE_DIGEST_PTR(query->item), digest_len, (char*)& digest_to_dnsname[1]); #if DNSSEC_DEBUGLEVEL>3 { /* DEBUG */ log_debug("nsec3_rrsig_updater_thread(): processing records for '%{dnslabel}'", digest_to_dnsname); } #endif /* * The path to the label to sign is in the query. * * rrsig_update_context_add_label * rrsig_update_context_remove_label * */ nsec3_zone* n3 = query->zone->nsec.nsec3; nsec3_zone_item* item = query->item; nsec3_zone_item* next = query->next; rrsig_context_push_name_rrsigsll(sig_context, digest_to_dnsname, item->rrsig); dnssec_key_sll* key_sll; /* Build a temporary record into nsec3_ttlrdata */ tmp_nsec3_ttlrdata->next = NULL; tmp_nsec3_ttlrdata->ttl = sig_context->min_ttl; u32 n3_rdata_size = NSEC3_ZONE_RDATA_SIZE(n3); MEMCOPY(&tmp_nsec3_ttlrdata->rdata_start[0], &n3->rdata[0], n3_rdata_size); MEMCOPY(&tmp_nsec3_ttlrdata->rdata_start[n3_rdata_size], next->digest, digest_len + 1); n3_rdata_size += digest_len + 1; MEMCOPY(&tmp_nsec3_ttlrdata->rdata_start[n3_rdata_size], item->type_bit_maps, item->type_bit_maps_size); n3_rdata_size += item->type_bit_maps_size; tmp_nsec3_ttlrdata->rdata_size = n3_rdata_size; /* While we have signing keys ... */ s32 sig_count = 0; for(key_sll = sig_context->key_sll; key_sll != NULL; key_sll = key_sll->next) { /* Take the real key from the key container */ dnssec_key* key = key_sll->key; if(key->flags == (DNSKEY_FLAG_ZONEKEY | DNSKEY_FLAG_KEYSIGNINGKEY)) { /* KSK */ continue; } rrsig_context_set_key(sig_context, key); sig_count += rrsig_update_records(sig_context, key, tmp_nsec3_ttlrdata, TYPE_NSEC3, TRUE); } rrsig_context_update_quota(sig_context, sig_count); /* * Retrieve the old signatures (to be deleted) * Retrieve the new signatures (to be added) * * This has to be injected as an answer query. */ query->added_rrsig_sll = sig_context->added_rrsig_sll; query->removed_rrsig_sll = sig_context->removed_rrsig_sll; rrsig_context_pop_label(sig_context); } /* MULTIPLE INSTANCES */ static void* nsec3_rrsig_updater_thread(void* context_) { /* Initialization */ yassert(context_ != NULL); rrsig_context_s *sig_context = (rrsig_context_s*)context_; dnssec_task_s *task = sig_context->task; threaded_queue* dnssec_task_query_queue = &task->dnssec_task_query_queue; threaded_queue* dnssec_task_answer_queue = &task->dnssec_answer_query_queue; zdb_packed_ttlrdata* tmp_nsec3_ttlrdata; MALLOC_OR_DIE(zdb_packed_ttlrdata*, tmp_nsec3_ttlrdata, TMP_NSEC3_TTLRDATA_SIZE, NSEC3_RRSIG_TTLRDATA_TAG); #if DNSSEC_DEBUGLEVEL>0 int id = context->id; log_debug("nsec3_rrsig_updater_thread(%i): starting an UPDATER thread", id); #endif /* * The caller has already initialized the signature context for us. * The zone & everything are ready. * */ /* Main loop */ for(;;) { #if DNSSEC_DEBUGLEVEL>1 log_debug("nsec3_rrsig_updater_thread(%i): dequeue (WAIT)", id); #endif nsec3_rrsig_update_item_s *query = (nsec3_rrsig_update_item_s*)threaded_queue_dequeue(dnssec_task_query_queue); if(query == NULL) { #if DNSSEC_DEBUGLEVEL>1 log_debug("nsec3_rrsig_updater_thread(%i): stop", id); #endif break; } if(rrsig_context_get_quota(sig_context) <= 0) { log_debug("quota exceeded, ignoring signature query"); free(query); task->stop_task = true; continue; } // NSEC3 updater does not care about going over quota, but it updates it yassert(query->item != NULL); nsec3_rrsig_updater_update_nsec3(sig_context, query, tmp_nsec3_ttlrdata); /* All the signatures for this set have been computed. Queue the result. */ /******************************************************************* * QUEUE THE ANSWER ******************************************************************/ #if DNSSEC_DEBUGLEVEL>1 log_debug("nsec3_rrsig_updater_thread(%i): enqueue (RESULT)", id); #endif yassert(query->item != NULL); threaded_queue_enqueue(dnssec_task_answer_queue, query); #if DNSSEC_DEBUGLEVEL>1 log_debug("nsec3_rrsig_updater_thread(%i): done", id); #endif } free(tmp_nsec3_ttlrdata); ERR_remove_state(0); #if DNSSEC_DEBUGLEVEL>0 log_debug("nsec3_rrsig_updater_thread(%i): exit", id); #endif return NULL; } /* ONE INSTANCE */ static void* nsec3_rrsig_updater_result_process(nsec3_rrsig_answer_context_s *answer_context) { #if DNSSEC_DEBUGLEVEL>0 log_debug("nsec3_rrsig_updater_result_process(): start"); #endif #if DNSSEC_DUMPSIGNCOUNT!=0 u64 sign_start = timems(); #endif nsec3_rrsig_updater_result_process_item_s *to_commit = NULL; threaded_queue *dnssec_answer_query_queue = &answer_context->task->dnssec_answer_query_queue; u32 count; for(count = 1;; count++) { #if DNSSEC_DEBUGLEVEL>1 log_debug("nsec3_rrsig_updater_result_process(): loop #%i", count); #endif nsec3_rrsig_update_item_s* task = (nsec3_rrsig_update_item_s*)threaded_queue_dequeue(dnssec_answer_query_queue); if(task == NULL) { /* Terminating ... */ #if DNSSEC_DEBUGLEVEL>1 log_debug("nsec3_rrsig_updater_result_process(): stop #%i", count); #endif break; } #if DNSSEC_DEBUGLEVEL>3 { /* DEBUG */ log_debug("nsec3_rrsig_updater_result_process() : retrieving results for"); } #endif if((task->removed_rrsig_sll != NULL) || (task->added_rrsig_sll != NULL)) { nsec3_rrsig_updater_result_process_item_s *item; ZALLOC_ARRAY_OR_DIE(nsec3_rrsig_updater_result_process_item_s *, item, sizeof(nsec3_rrsig_updater_result_process_item_s), GENERIC_TAG); item->next = to_commit; to_commit = item; item->added_rrsig_sll = task->added_rrsig_sll; item->removed_rrsig_sll = task->removed_rrsig_sll; item->item = task->item; //nsec3_update_rrsig_commit(task->removed_rrsig_sll, task->added_rrsig_sll, task->item, context->task->zone); } free(task); #if DNSSEC_DUMPSIGNCOUNT!=0 if((count & 0x3fff) == 0) { u64 elapsed = timems() - sign_start; float rate = (1000.f * count) / MAX(elapsed, 1.0f); log_debug("signatures updates: %u in %ums (%f/s)", count, elapsed, rate); } #endif } answer_context->items = to_commit; ERR_remove_state(0); #if DNSSEC_DEBUGLEVEL>0 log_debug("nsec3_rrsig_updater_result_process(): exit"); #endif return NULL; } static void* nsec3_rrsig_updater_result_thread(void* context) { #if DNSSEC_DEBUGLEVEL>0 log_debug("dnssec_updater_result_thread(): start"); #endif nsec3_rrsig_answer_context_s *answer_context = (nsec3_rrsig_answer_context_s*)context; void *return_ptr; return_ptr = nsec3_rrsig_updater_result_process(answer_context); return return_ptr; } static ya_result nsec3_rrsig_updater_filter_label(dnssec_task_s* task, zdb_rr_label *rr_label) { return DNSSEC_THREAD_TASK_FILTER_IGNORE; } static ya_result nsec3_rrsig_updater_filter_nsec3_item(dnssec_task_s* task, nsec3_zone_item *item, nsec3_zone_item *next) { rrsig_updater_parms *parms = (rrsig_updater_parms*)task->args; if(parms->signatures_are_verified) { zdb_packed_ttlrdata *rrsig = item->rrsig; if(rrsig != NULL) { u32 now = time(NULL); do { u32 until = RRSIG_VALID_UNTIL(rrsig); if(until < now) { return DNSSEC_THREAD_TASK_FILTER_ACCEPT; } rrsig = rrsig->next; } while(rrsig != NULL); } else { return DNSSEC_THREAD_TASK_FILTER_ACCEPT; } return DNSSEC_THREAD_TASK_FILTER_IGNORE; } return DNSSEC_THREAD_TASK_FILTER_ACCEPT; } static dnssec_task_vtbl nsec3_rrsig_updater_task_descriptor = { nsec3_rrsig_updater_thread_init, nsec3_rrsig_updater_thread_create_context, nsec3_rrsig_updater_thread_destroy_context, nsec3_rrsig_updater_filter_label, nsec3_rrsig_updater_filter_nsec3_item, nsec3_rrsig_updater_thread, nsec3_rrsig_updater_result_thread, nsec3_rrsig_updater_thread_finalise, "NSEC3 RRSIG updater" }; void nsec3_rrsig_updater_init(nsec3_rrsig_updater_parms *parms, zdb_zone *zone) { smp_int *quota = NULL; if(parms->quota != 0) { quota = &parms->remaining_quota; smp_int_init_set(quota, parms->quota); } parms->to_commit = NULL; dnssec_process_initialize(&parms->task, &nsec3_rrsig_updater_task_descriptor, NULL, zone); parms->task.args = parms; } ya_result nsec3_rrsig_updater_process_zone(nsec3_rrsig_updater_parms *parms) { yassert(parms != NULL); dnssec_task_s *task = &parms->task; zdb_zone *zone = task->zone; yassert(zone != NULL); ya_result return_code = SUCCESS; if(zdb_zone_is_nsec3(zone)) { /** @note: the scheduled one was not used here ... */ task->args = parms; /* work */ return_code = dnssec_process_zone_nsec3(task); /* release */ } return return_code; } /* * commits the results from the answers (or the list already built) */ void nsec3_rrsig_updater_commit(nsec3_rrsig_updater_parms *parms) { log_debug1("nsec3_rrsig_updater_commit(%p)", parms); dnssec_task_s *task = &parms->task; nsec3_rrsig_answer_context_s *context = (nsec3_rrsig_answer_context_s*)task->contexts[0]; if(context != NULL && context->items != NULL) { // commit all the signatures changes struct nsec3_rrsig_updater_result_process_item_s *to_commit = context->items; context->items = NULL; while(to_commit != NULL) { nsec3_rrsig_updater_result_process_item_s *item = to_commit; nsec3_update_rrsig_commit(item->removed_rrsig_sll, item->added_rrsig_sll, item->item, context->task->zone); to_commit = to_commit->next; ZFREE_ARRAY(item, sizeof(nsec3_rrsig_updater_result_process_item_s)); } } } void nsec3_rrsig_updater_finalize(nsec3_rrsig_updater_parms *parms) { log_debug("nsec3_rrsig_updater_finalize: good: %u expired: %u wrong: %u", parms->good_signatures, parms->expired_signatures, parms->wrong_signatures); if(parms->quota != 0) { smp_int_destroy(&parms->remaining_quota); } dnssec_process_finalize(&parms->task); } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb-zone-reader-filter.c0000644000077100007710000000012412650131756023410 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.448344 30 ctime=1454597652.459344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb-zone-reader-filter.c0000664000077100007710000001277112650131756023225 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone * @ingroup dnsdb * @brief Functions used to load a zone * * Functions used to load a zone * * @{ */ #include "dnsdb/dnsdb-config.h" #include "dnsdb/zdb-zone-reader-filter.h" struct zone_file_reader_filter_data { zone_reader *zr; zone_file_reader_filter_callback *callback; void *callback_data; }; typedef struct zone_file_reader_filter_data zone_file_reader_filter_data; static ya_result zone_reader_filter_read_record(zone_reader *zr, resource_record *rr) { zone_file_reader_filter_data *data = (zone_file_reader_filter_data*)zr->data; for(;;) { ya_result ret = zone_reader_read_record(data->zr, rr); if(ret != 0) // failure or end of input { return ret; } ya_result cb_ret = data->callback(data->zr, rr, data->callback_data); switch(cb_ret) { case ZONE_READER_FILTER_ACCEPT: return ret; case ZONE_READER_FILTER_REJECT: break; default: return cb_ret; } } } static ya_result zone_reader_filter_unread_record(zone_reader *zr, resource_record *rr) { zone_file_reader_filter_data *data = (zone_file_reader_filter_data*)zr->data; return zone_reader_unread_record(data->zr, rr); } static ya_result zone_reader_filter_free_record(zone_reader *zr, resource_record *rr) { zone_file_reader_filter_data *data = (zone_file_reader_filter_data*)zr->data; return zone_reader_free_record(data->zr, rr); } static void zone_reader_filter_close(zone_reader *zr) { zone_file_reader_filter_data *data = (zone_file_reader_filter_data*)zr->data; zone_reader_close(data->zr); ZFREE(data, zone_file_reader_filter_data); zr->data = NULL; zr->vtbl = NULL; } static bool zone_reader_filter_canwriteback(zone_reader *zr) { zone_file_reader_filter_data *data = (zone_file_reader_filter_data*)zr->data; yassert(zr != data->zr); bool b = zone_reader_filter_canwriteback(data->zr); // false positive for infinite recursion return b; } static void zone_reader_filter_handle_error(zone_reader *zr, ya_result error_code) { zone_file_reader_filter_data *data = (zone_file_reader_filter_data*)zr->data; zone_reader_handle_error(data->zr, error_code); } static const char* zone_reader_filter_get_last_error_message(zone_reader *zr) { zone_file_reader_filter_data *data = (zone_file_reader_filter_data*)zr->data; const char *ret = zone_reader_get_last_error_message(data->zr); return ret; } static zone_reader_vtbl zone_reader_filter_vtbl = { zone_reader_filter_read_record, zone_reader_filter_unread_record, zone_reader_filter_free_record, zone_reader_filter_close, zone_reader_filter_handle_error, zone_reader_filter_canwriteback, zone_reader_filter_get_last_error_message, "zone_reader_filter" }; /** * * Wraps a zone_reader to a filter that skips records using a callback * * @param filtering_reader the filter * @param filtered_reader the filtered * @param callback the callback function * @param callback_data parameter given to the callback function */ void zone_file_reader_filter(zone_reader *filtering_reader, zone_reader *filtered_reader, zone_file_reader_filter_callback *callback, void *callback_data) { zone_file_reader_filter_data *data; ZALLOC_OR_DIE(zone_file_reader_filter_data*, data, zone_file_reader_filter_data, GENERIC_TAG); data->zr = filtered_reader; data->callback = callback; data->callback_data = callback_data; filtering_reader->data = data; filtering_reader->vtbl = &zone_reader_filter_vtbl; } /** * @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/htbt.c0000644000077100007710000000012412650131756020076 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.403344 30 ctime=1454597652.325344534 yadifa-2.1.6-5826/lib/dnsdb/src/htbt.c0000664000077100007710000002512112650131756017704 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Hash-Table of Balanced trees structure and functions. * * Implementation of the Hash-Table of Balanced trees structure and functions. * An hashtable holding htbt collections. * * The idea behind this structure is that, although balanced trees are FAST, * the deeper, the slower they are. * * Another important thing is that btrees are accessed by a hash and thus, can collide. * * This structure is thus used for the top-level balanced tree in order to * * _ divide the top-level domains into smaller, faster trees. * _ reduce the number of potential collisions in said trees. * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include "dnsdb/htbt.h" #include "dnsdb/htable.h" /** @brief Initializes the collection * * Initializes the collection. * Basically : *collection=NULL; * * @param[in] collection the collection to initialize * */ htbt htbt_create() { htbt ret = htable_alloc(); /* AVL does not requires this ... * But again it's not AVL-only anymore. * I now use btree that could map to any balanced tree * * That's what I should do, in theory ... * But btree_init just does "=NULL" and the htable_init has already set data to NULL * So ... #if 0 */ if(ret != NULL) { u32 i; for(i = 0; i < DEFAULT_HTABLE_SIZE; i++) { btree_init((btree*) & ret[i].data); } } return ret; } void htbt_init(htbt* collection) { *collection = htbt_create(); } #if ZDB_INLINES_HTBT_FIND == 0 /** @brief Finds a node in the collection. * * Finds a node in the collection. * * THIS CALL IS NOT THREAD SAFE. * * @param[in] collection the collection to search in * @param[in] obj_hash the hash to find * * @return A pointer to the node or NULL if there is no such node. */ void* htbt_find(htbt collection, hashcode obj_hash) { /* compute the table hash from the object hash */ hashcode table_hash = HTBT_HASH_TRANSFORM(obj_hash); /* grab the entry for the given hash */ htable_entry* entry = &htable_get(collection, table_hash); /* search the tree of the entry */ return btree_find((btree*) & entry->data, obj_hash); } /** @brief Finds a node in the collection. * * Finds a node in the collection. * * THIS CALL IS NOT THREAD SAFE. * * @param[in] collection the collection to search in * @param[in] obj_hash the hash to find * * @return A pointer to a pointer to the node or NULL if there is no such node. */ void** htbt_findp(htbt collection, hashcode obj_hash) { /* compute the table hash from the object hash */ hashcode table_hash = HTBT_HASH_TRANSFORM(obj_hash); /* grab the entry for the given hash */ htable_entry* entry = &htable_get(collection, table_hash); /* search the tree of the entry */ return btree_findp((btree*) & entry->data, obj_hash); } /** @brief Inserts data into the collection. * * Insert datat into the collection. * The caller will then have to use the returned void** to set his data. * * THIS CALL IS NOT THREAD SAFE * * @param[in] collection the collection where the insertion should be made * @param[in] obj_hash the hash associated to the node * * @return A pointer to the data field associated to the hash, or NULL (out of memory) */ void** htbt_insert(htbt collection, hashcode obj_hash) { /* compute the table hash from the object hash */ hashcode table_hash = HTBT_HASH_TRANSFORM(obj_hash); /* grab the entry for the given hash */ htable_entry* entry = &htable_get(collection, table_hash); /* search the tree of the entry */ void** pdata = btree_insert((btree*) & entry->data, obj_hash); return pdata; } /** @brief Deletes a node from the collection. * * Deletes a node from the collection. * * THIS CALL IS NOT THREAD SAFE * * @param[in] collection the collection from which the delete will be made * @param[in] obj_hash the hash associated to the node to remove * * @return The node associated to the hash */ void* htbt_delete(htbt collection, hashcode obj_hash) { /* compute the table hash from the object hash */ hashcode table_hash = HTBT_HASH_TRANSFORM(obj_hash); /* grab the entry for the given hash */ htable_entry* entry = &htable_get(collection, table_hash); /* search the tree of the entry */ void** pdata = btree_delete((btree*) & entry->data, obj_hash); return pdata; } #endif /** @brief Destroys the collection. * * Destroys the collection. * No other thread should access it, obiviously. * * @param[in] collection the collection to destroy */ void htbt_destroy(htbt* collectionp) { yassert(collectionp != NULL); htbt collection = *collectionp; if(collection != NULL) { u32 i; for(i = 0; i < DEFAULT_HTABLE_SIZE; i++) { btree_destroy((btree*) & collection[i].data); collection[i].data = NULL; } htable_free(collection); *collectionp = NULL; } } void htbt_iterator_init(htbt collection, htbt_iterator* iter) { if(collection != NULL) { for(htbt const collection_limit = &collection[DEFAULT_HTABLE_SIZE]; collection < collection_limit; collection++) { if(collection->data != NULL) { /* We got one */ btree_iterator_init((btree)collection->data, &iter->iter); /* The next one, if any, can be found from the next hash-table slot*/ iter->table = collection + 1; iter->count = collection_limit - collection - 1; return; } } } iter->count = -1; iter->table = NULL; btree_iterator_init(NULL, &iter->iter); } void htbt_iterator_init_from(htbt collection, htbt_iterator* iter, hashcode obj_hash) { if(collection != NULL) { hashcode table_hash = HTBT_HASH_TRANSFORM(obj_hash); htbt const collection_limit = &collection[DEFAULT_HTABLE_SIZE]; collection = &htable_get(collection, table_hash); // if the tree exists if(collection->data != NULL) { /* We got one */ btree_iterator_init_from((btree)collection->data, &iter->iter, obj_hash); /* The next one, if any, can be found from the next hash-table slot*/ iter->table = collection + 1; iter->count = collection_limit - collection - 1; return; } // else find the first tree that exists for(collection++; collection < collection_limit; collection++) { if(collection->data != NULL) { /* We got one */ btree_iterator_init((btree)collection->data, &iter->iter); /* The next one, if any, can be found from the next hash-table slot*/ iter->table = collection + 1; iter->count = collection_limit - collection - 1; } } } // else there is nothing to see here iter->count = -1; iter->table = NULL; btree_iterator_init(NULL, &iter->iter); } #if ZDB_INLINES_HTBT_FIND == 0 bool htbt_iterator_hasnext(htbt_iterator* iter) { return btree_iterator_hasnext(&iter->iter); } #endif void** htbt_iterator_next(htbt_iterator* iter) { void* vpp = btree_iterator_next(&iter->iter); /* Is there still something to iter in the current tree ? */ if(!btree_iterator_hasnext(&iter->iter)) { /* are there still hash-table slots available ? */ if(iter->count > 0) { for(; (iter->count > 0) && (iter->table->data == NULL); iter->count--, iter->table++); if(iter->count > 0) { btree_iterator_init((btree)iter->table->data, &iter->iter); iter->table++; iter->count--; } } } return vpp; } htbt_node* htbt_iterator_next_node(htbt_iterator* iter) { btree_node* node = btree_iterator_next_node(&iter->iter); /* Is there still something to iter in the current tree ? */ if(!btree_iterator_hasnext(&iter->iter)) { /* are there still hash-table slots available ? */ if(iter->count > 0) { for(; (iter->count > 0) && (iter->table->data == NULL); iter->count--, iter->table++); if(iter->count > 0) { btree_iterator_init((btree)iter->table->data, &iter->iter); iter->table++; iter->count--; } } } return node; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/journal-cjf.c0000644000077100007710000000012412651632654021353 xustar000000000000000027 mtime=1453798828.948622 27 atime=1454597464.280344 30 ctime=1454597652.340344534 yadifa-2.1.6-5826/lib/dnsdb/src/journal-cjf.c0000664000077100007710000026157112651632654021174 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ /*------------------------------------------------------------------------------ * STATIC PROTOTYPES */ /*------------------------------------------------------------------------------ * FUNCTIONS */ /** @brief Function ... * * ... * * @param ... * * @retval OK * @retval NOK */ #define ZDB_JOURNAL_CODE 1 #define JOURNAL_CJF_BASE 1 #include "dnsdb/dnsdb-config.h" #include "dnsdb/journal-cjf-page.h" #include "dnsdb/journal-cjf-page-cache.h" #include "dnsdb/journal-cjf-page-output-stream.h" #include "dnsdb/journal-cjf-idxt.h" #include "dnsdb/journal-cjf-common.h" #include "dnsdb/journal-cjf.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dnsdb/zdb_error.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/journal.h" #include "dnsdb/zdb_types.h" #include "dnsdb/xfr_copy.h" #include "dnsdb/zdb-zone-path-provider.h" #include "dnsdb/zdb_zone.h" #define DEBUG_JOURNAL 1 #ifndef DEBUG #undef DEBUG_JOURNAL #define DEBUG_JOURNAL 0 #endif #define CJF_CYCLING_ENABLED 1 #define JOURNAL_FORMAT_NAME "cyclic" #define VERSION_HI 0 #define VERSION_LO 1 #define JOURNAL_CLASS_NAME "journal_cjf" #define LOCK_NONE 0 #define LOCK_READ 1 #define LOCK_WRITE 2 #define CJF_EXT "cjf" #define CJF_EXT_STRLEN 3 #define SOA_RDATA_SIZE_MAX 532 #define DO_SYNC 1 #define JRNLCJF_TAG 0x58494c4e524a /* * Contains the journal (almost: not the matching start and end SOA) */ #define CJF_WIRE_FILE_FORMAT "%s/%{dnsname}." CJF_EXT #define FIRST_FROM_END (CJF_EXT_STRLEN + (1 + 8 + 1 + 8)) #define LAST_FROM_END (CJF_EXT_STRLEN + (1 + 8)) /******************************************************************************* * * JNL (HEADER) ---> IDXT * | | * +------+------+---+ * | | | * v v v * PAGE -> PAGE -> PAGE * | | | * v v v * IXFRs IXFRs IXFRs * ******************************************************************************/ /* * MAGIC 'JNL' + Version 0 * Serial begin * Serial end * Begin Index Offset * Table Index Offset */ /* * MAGIC 'JCS' 0 * offset to next (0 until the section is closed and followed by a new one) * list of last-serial + file_offset */ struct cjf_header // Cyclic Journal File { u32 magic_plus_version; u32 serial_begin; u32 serial_end; u32 first_index_offset; u32 table_index_offset; // u32 last_soa_offset; u32 last_page_offset_next; // the byte after the last PAGE on the chain ends u16 flags; u8 __end_of_struct__; }; typedef struct cjf_header cjf_header; #define CJF_HEADER_REAL_SIZE offsetof(cjf_header,__end_of_struct__) /* #if CJF_HEADER_SIZE != CJF_HEADER_REAL_SIZE #error "CJF_HEADER_SIZE != CJF_HEADER_REAL_SIZE" #endif */ /* * PAGE * * Serial Number Stream Offset * * The table of serials streams (IXFR) and their offset * The value stored is of the serial ending the IXFR */ #define CJF_CJF0_MAGIC MAGIC4('C','J','F', 0x20) // ver 2.0 /** * There is a need of lockable 4K pages in an MRU that points back to their user * That's where the PAGE will be stored * I'm not sure of what the ratio between allowed FDs and allowed PAGE pages should be. */ static ptr_set journal_cjf_set = PTR_SET_ASCIIZ_EMPTY; static mutex_t journal_cjf_set_mtx = MUTEX_INITIALIZER; static shared_group_shared_mutex_t journal_shared_mtx; static bool journal_shared_mtx_initialized = FALSE; void log_debug_jnl(journal_cjf *jnl, const char *text) { log_debug4("cjf: %s,%i: %s: header SN=[%08x; %08x] F=%08x L=%08x dirty=%i empty=%i", jnl->journal_file_name, jnl->fd, text, jnl->serial_begin, jnl->serial_end, jnl->first_page_offset, jnl->page_table_file_offset, journal_cjf_is_dirty(jnl), journal_cjf_is_empty(jnl)); s16 n = jnl->idxt.count; if(jnl->last_page.count == 0) { n--; } log_debug4("cjf: %s,%i: %s: idxt %3hi/%3hi [%3hi] dirty=%i marked=%i", jnl->journal_file_name, jnl->fd, text, jnl->idxt.count, jnl->idxt.size, jnl->idxt.first, (jnl->idxt.dirty)?1:0, (jnl->idxt.marked)?1:0); log_debug4("cjf: %s,%i: %s: page: SN=[%08x; %08x] count=%3u size=%3u at=%08x next=%08x ... limit=%08x", jnl->journal_file_name, jnl->fd, text, jnl->last_page.serial_start, jnl->last_page.serial_end, jnl->last_page.count,jnl->last_page.size, jnl->last_page.file_offset, jnl->last_page.records_limit, jnl->last_page.file_offset_limit); for(s16 idx = 0; idx < n; idx++) { journal_cjf_idxt_tbl_item *item = &jnl->idxt.entries[(jnl->idxt.first + idx) % jnl->idxt.size]; log_debug4("cjf: %s,%i: %s: idxt[%3i] = %08x %08x", jnl->journal_file_name, jnl->fd, text, idx, item->last_serial, item->file_offset); } if(jnl->last_page.count == 0) { journal_cjf_idxt_tbl_item *item = &jnl->idxt.entries[(jnl->idxt.first + n) % jnl->idxt.size]; log_debug4("cjf: %s,%i: %s: idxt[%3i] = [empty] %08x", jnl->journal_file_name, jnl->fd, text, n, item->file_offset); } } static void journal_cjf_writelock(journal_cjf *jnl) { shared_group_mutex_lock(&jnl->mtx, GROUP_MUTEX_WRITE); } static void journal_cjf_writeunlock(journal_cjf *jnl) { shared_group_mutex_unlock(&jnl->mtx, GROUP_MUTEX_WRITE); } static void journal_cjf_readlock(journal_cjf *jnl) { shared_group_mutex_lock(&jnl->mtx, GROUP_MUTEX_READ); } static void journal_cjf_readunlock(journal_cjf *jnl) { shared_group_mutex_unlock(&jnl->mtx, GROUP_MUTEX_READ); } /** * * Does NOT set the fd field in jnl * MUST return -1 in case of error * * @param jnl * @param create * @return */ static int jnl_open_file(journal_cjf *jnl, bool create) { const u8* origin = (jnl->zone)?jnl->zone->origin:(const u8*)"\004NULL"; // VALID log_debug3("cjf: %{dnsname},%i: opening%s %s", origin, jnl->fd, (create)?"/creating":"", jnl->journal_file_name); int flags = O_RDWR; #ifdef O_NOATIME flags |= O_NOATIME; #endif int fd; cjf_header hdr; if(create) { flags |= O_CREAT; fd = open_create_ex(jnl->journal_file_name, flags, 0644); if(fd >= 0) { hdr.magic_plus_version = CJF_CJF0_MAGIC; hdr.serial_begin = 0; hdr.serial_end = 0; hdr.first_index_offset = 0; hdr.table_index_offset = 0; hdr.last_soa_offset = 0, hdr.last_page_offset_next = 0; //hdr.last_page_item_count = 0; hdr.flags = JOURNAL_CFJ_FLAGS_MY_ENDIAN; writefully(fd, &hdr, CJF_HEADER_SIZE); } else { log_err("cjf: %s,%i: failed to create %s: %r", origin, jnl->fd, jnl->journal_file_name, ERRNO_ERROR); } } else { fd = open_ex(jnl->journal_file_name, flags); if(fd < 0) { log_debug3("cjf: %s,%i: failed to open %s: %r", origin, jnl->fd, jnl->journal_file_name, ERRNO_ERROR); } } return fd; } bool jnl_ensure_file_opened(journal_cjf *jnl, bool create) { if(jnl->fd < 0) { journal_cjf_writelock(jnl); jnl->fd = jnl_open_file(jnl, create); int err = ERRNO_ERROR; journal_cjf_writeunlock(jnl); if(jnl->fd < 0) { if(create) { log_err("cjf: %s,%i: failed to open %s: %r", jnl->journal_file_name, jnl->fd, jnl->journal_file_name, err); } else { log_debug("cjf: %s,%i: failed to open %s: %r", jnl->journal_file_name, jnl->fd, jnl->journal_file_name, err); } } } return jnl->fd >= 0; } void jnl_header_flush(journal_cjf *jnl) { yassert(jnl->fd >= 0); if(journal_cjf_is_dirty(jnl)) { log_debug("cjf: %s,%i: flushing header SN=[%08x; %08x] F=%08x T=%08x", jnl->journal_file_name, jnl->fd, jnl->serial_begin, jnl->serial_end, jnl->first_page_offset, jnl->page_table_file_offset); off_t pos; if((pos = lseek(jnl->fd, 4, SEEK_SET)) != 4) { log_err("cjf: %s,%i: failed to set file position: %lli instead of %i (%r)", jnl->journal_file_name, jnl->fd, pos, 4, ERRNO_ERROR); logger_flush(); abort(); } cjf_header hdr; //hdr.magic_plus_version = 0; hdr.serial_begin = jnl->serial_begin; hdr.serial_end = jnl->serial_end; hdr.first_index_offset = jnl->first_page_offset; hdr.table_index_offset = jnl->page_table_file_offset; hdr.last_soa_offset = jnl->last_soa_offset; hdr.last_page_offset_next = jnl->last_page.records_limit; //hdr.last_page_item_count = jnl->page.count; hdr.flags = jnl->flags; writefully(jnl->fd, &hdr.serial_begin, CJF_HEADER_SIZE - 4); journal_cjf_clear_dirty(jnl); } } static void jnl_close_file(journal_cjf *jnl) { log_debug3("cjf: %s,%i: closing file", jnl->journal_file_name, jnl->fd, jnl->journal_file_name); if(jnl->fd >= 0) { log_debug3("cjf: %s,%i: closing file: closing PAGE cache", jnl->journal_file_name, jnl->fd, jnl->journal_file_name); journal_cjf_page_cache_close(jnl->fd); log_debug3("cjf: %s,%i: closing file: flushing IDXT", jnl->journal_file_name, jnl->fd, jnl->journal_file_name); journal_cjf_idxt_flush(jnl); log_debug3("cjf: %s,%i: closing file: flushing header", jnl->journal_file_name, jnl->fd, jnl->journal_file_name); jnl_header_flush(jnl); log_debug3("cjf: %s,%i: closing file: closing file", jnl->journal_file_name, jnl->fd, jnl->journal_file_name); close_ex(jnl->fd); jnl->fd = -1; } } /** * * Removes the first PAGE from the journal. * Adjust the current PAGE limit; * * @param jnl */ void journal_cjf_remove_first_page(journal_cjf *jnl) { log_debug_jnl(jnl, "journal_cjf_remove_first_page: BEFORE"); u32 stored_serial = jnl->serial_begin + 1; // (ensure an error would trigger a flush) u8 zt = 0; if(ISOK(zdb_zone_info_get_zone_type(jnl->zone->origin, &zt))) { if(zt == ZT_MASTER) { zdb_zone_info_get_stored_serial(jnl->zone->origin, &stored_serial); if(serial_le(stored_serial, jnl->serial_begin)) { log_debug("cjf: %s,%i: journal page %u will be lost, flushing zone first", jnl->journal_file_name, jnl->fd, jnl->journal_file_name, jnl->serial_begin); zdb_zone_info_background_store_zone(jnl->zone->origin); } } } journal_cjf_page_cache_clear(jnl->fd, jnl->first_page_offset); jnl->serial_begin = journal_cjf_idxt_get_last_serial(jnl, 0); jnl->first_page_offset = journal_cjf_idxt_get_file_offset(jnl, 1); ++jnl->idxt.first; --jnl->idxt.count; journal_cjf_set_dirty(jnl); if(jnl->last_page.file_offset < jnl->first_page_offset) { jnl->last_page.file_offset_limit = jnl->first_page_offset; } else // at or after { jnl->last_page.file_offset_limit = jnl->file_maximum_size; } log_debug_jnl(jnl, "journal_cjf_remove_first_page: AFTER"); log_debug("cjf: %s,%i: first PAGE now at %u (%08x), journal starts with serial %u (%08x", jnl->journal_file_name, jnl->fd, jnl->first_page_offset, jnl->first_page_offset, jnl->serial_begin, jnl->serial_begin); } /******************************************************************************* * * Index table handling functions * ******************************************************************************/ /*****************************************************************************/ static void journal_cjf_writelock(journal_cjf *jnl); static void journal_cjf_writeunlock(journal_cjf *jnl); static void journal_cjf_readlock(journal_cjf *jnl); static void journal_cjf_readunlock(journal_cjf *jnl); static const char * journal_cjf_get_format_name() { return JOURNAL_FORMAT_NAME; } static u32 journal_cjf_get_format_version() { return VERSION_U32(VERSION_HI,VERSION_LO); } static ya_result journal_cjf_read_soa_record(dns_resource_record *rr, input_stream *ixfr_wire_is) { ya_result return_value; if((return_value = dns_resource_record_read(rr, ixfr_wire_is)) <= 0) { /* FAIL or EOF */ return return_value; } #ifdef DEBUG rdata_desc rdatadesc = {rr->tctr.qtype, rr->rdata_size, rr->rdata}; log_debug("cjf: %{dnsname} %{typerdatadesc}", rr->name, &rdatadesc); #endif if((rr->tctr.qtype != TYPE_SOA) || (rr->rdata_size > SOA_RDATA_SIZE_MAX)) { log_err("cjf: expected SOA record but got %{dnstype} instead", &rr->tctr.qtype); return ZDB_JOURNAL_SOA_RECORD_EXPECTED; } return return_value; } /** * Appends the uncompressed IXFR stream (SOA RR ... RR SOA RR ... RR) to the journal * Only checks that the first SOA serial is the current last serial * Should also check that the stream is complete before adding it. * * @note edf 20160112 -- In order to handle enhancements: * * The zone of the journal SHOULD be locked * The zone of the journal MUST have locks in either of these states: * _ not locked * _ locked by a simple reader * _ doubly locked with the simple reader as owner or alternative owner * Any other case will be rejected. * * @todo edf 20150127 -- In order to trigger the zone write, this function should: ... * * _ get the current written serial (AXFR/TXT), there must be a bridge between that serial an the journal * _ get how much room is available after that serial * _ if the available room is less or equal to half the maximum size of the journal, * trigger a write to disk and proceed * * @note edf 20150309 -- the problem is this: * for a master, the journal is being written as the records are stored into the database * for a slave, the journal is first stored, then read. A slave should not truncate an update. * (and if we ever do it, it means that we will have to ensure that the calling part knows the final SOA is wrong) * * @note edf 20150326 -- both master and slaves are working (on my tests). This part is ready for real life testing. * */ static ya_result journal_cjf_append_ixfr_stream_master(journal *jh, input_stream *ixfr_wire_is) { journal_cjf *jnl = (journal_cjf*)jh; log_debug("cjf: %s,%i: append IXFR (master)", jnl->journal_file_name, jnl->fd); if(!jnl_ensure_file_opened(jnl, TRUE)) { return ERRNO_ERROR; } ya_result ret; ya_result record_size; u32 stream_serial_del; #ifdef DEBUG stream_serial_del = ~0; #endif // ensure the zone locks are usable { zdb_zone *zone = (zdb_zone*)jnl->zone; u8 owner = zone->lock_owner; u8 reserved_owner = zone->lock_reserved_owner; if( !( (owner == ZDB_ZONE_MUTEX_SIMPLEREADER) || (owner == ZDB_ZONE_MUTEX_NOBODY) || (reserved_owner == ZDB_ZONE_MUTEX_SIMPLEREADER) ) ) { return ERROR; } } // current record #if SLAVE_ONLY u32 starting_zone_serial; #endif u32 previous_journal_serial; #if SLAVE_ONLY zdb_zone *zone = (zdb_zone*)jnl->zone; zdb_zone_acquire(zone); zdb_zone_lock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); ret = zdb_zone_getserial((zdb_zone*)jnl->zone, &starting_zone_serial); zdb_zone_release_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); if(FAIL(ret)) { log_err("cjf: %s,%i: failed to get the serial from the zone: %r", jnl->journal_file_name, jnl->fd, ret); return ret; } // remember the offset in the page when we started u32 starting_page_file_offset = CJF_HEADER_SIZE; #endif bool journal_was_empty; if(!journal_cjf_is_empty(jnl)) { #if SLAVE_ONLY if(FAIL(journal_cjf_idxt_get_page_offset_from_serial(jnl, starting_zone_serial, &starting_page_file_offset))) { log_err("cjf: %s,%i: failed to get the serial from the zone: %r", jnl->journal_file_name, jnl->fd, ret); return ret; } #endif previous_journal_serial = jnl->serial_end; journal_was_empty = FALSE; } else { // create the IDXT journal_cjf_idxt_create(jnl, 1); journal_was_empty = TRUE; } dns_resource_record rr; dns_resource_record_init(&rr); // read the SOA record (start serial) if(FAIL(record_size = journal_cjf_read_soa_record(&rr, ixfr_wire_is))) { log_err("cjf: %s,%i: expected valid SOA record: %r", jnl->journal_file_name, jnl->fd, record_size); dns_resource_record_clear(&rr); return record_size; } #ifdef DEBUG log_debug1("cjf: %s,%i: SOA: %{dnsrr}", jnl->journal_file_name, jnl->fd, &rr); #endif // this is the SOA we are about to delete from, get its serial if(FAIL(ret = rr_soa_get_serial(rr.rdata, rr.rdata_size, &stream_serial_del))) { log_err("cjf: %s,%i: could not get serial from SOA record: %r", jnl->journal_file_name, jnl->fd, ret); dns_resource_record_clear(&rr); return ret; } // the journal can only be used by the writer /// @todo edf 20150323 -- lock parts of the journal journal_cjf_writelock(jnl); //////////////////////////////////////////////////////////////////////////// // we didn't got the SOA yet u8 soa_count; output_stream os; output_stream_set_void(&os); // very important do { // open a new output stream where to write the records // if the stream is already set in a non-void state, use it from its position // this may open a new page journal_cjf_page_output_stream_reopen(&os, jnl); // compute the amount of space available on the journal from the current writing position // this takes into account both the maximum size of the journal and the possible overwrite s64 available = journal_cjf_get_last_page_available_space_left(jnl); // are we in a situation were it is possible to overwrite the first page ? bool overwrite_risk = journal_cjf_page_current_output_stream_may_overwrite(jnl); u32 zone_stored_serial; u32 zone_stored_serial_page_offset; // if the journal is empty ... if(journal_was_empty) { // the serial of the SOA is our starting point previous_journal_serial = stream_serial_del; zone_stored_serial = 0; zone_stored_serial_page_offset = 0; } else { // if the serial we are about to delete from is not the last serial, AND if we are not in a starting state (empty journal) if(stream_serial_del != previous_journal_serial) // false positive: previous_journal_serial is initialised (!journal_was_empty) { // complain about it if(serial_lt(stream_serial_del, previous_journal_serial)) // !journal_was_empty -> previous_journal_serial set to jnl->serial_end { log_err("cjf: %s,%i: serial of stream (%i) is inside the journal range [%i; %i]", jnl->journal_file_name, jnl->fd, stream_serial_del, jnl->serial_begin, jnl->serial_end); } else { log_err("cjf: %s,%i: serial of stream (%i) is outside the journal range [%i; %i]", jnl->journal_file_name, jnl->fd, stream_serial_del, jnl->serial_begin, jnl->serial_end); } #ifdef DEBUG logger_flush(); #endif ret = ZDB_JOURNAL_IXFR_SERIAL_OUT_OF_KNOWN_RANGE; break; } // BEGIN SERVER FLUSH CONDITION AND TRIGGER zone_stored_serial = jnl->serial_begin; zone_stored_serial_page_offset = 0; // get the serial number of the persistent image of the zone file if(ISOK(ret = zdb_zone_info_get_stored_serial(jnl->zone->origin, &zone_stored_serial))) { // get the offset of the PAGE that works from that serial if(ISOK(ret = journal_cjf_idxt_get_page_offset_from_serial(jnl, zone_stored_serial, &zone_stored_serial_page_offset))) { // that offset is the limit of no return, if we overwrite it will not be // able to replay the journal from the zone // if the remaining space between the current writing position and the // above limit is half the maximum journal size, we ask to dump the zone // on disk. It will hopefully be done by the time we reach the limit // (else we will have to wait) bool cut_current_page = FALSE; if(zone_stored_serial_page_offset <= jnl->last_page.records_limit) { // we are after the limit, we can easily get the used space u32 used_space = MAX(jnl->last_page.records_limit - zone_stored_serial_page_offset, 1); if((jnl->file_maximum_size / used_space) <= 1) { cut_current_page = TRUE; } } else { u32 remaining_space = MAX(zone_stored_serial_page_offset - jnl->last_page.file_offset, 1); if((jnl->file_maximum_size / remaining_space) >= 1) { cut_current_page = TRUE; } } if(cut_current_page) { log_debug("cjf: %s,%i: half the space has been reached, requesting zone write and forcing page change", jnl->journal_file_name, jnl->fd); zdb_zone_info_background_store_zone(jnl->zone->origin); /// @todo edf 20150219 -- stop storing in this PAGE jnl->last_page.file_offset_limit = jnl->last_page.records_limit; // this will tell the PAGE is full jnl->last_page.size = jnl->last_page.count; journal_cjf_page_output_stream_cancel(&os); journal_cjf_idxt_append_page(jnl); output_stream_set_void(&os); // very important journal_cjf_page_output_stream_reopen(&os, jnl); overwrite_risk = journal_cjf_page_current_output_stream_may_overwrite(jnl); if(jnl->last_page.file_offset_limit >= jnl->last_page.records_limit) { available = jnl->last_page.file_offset_limit - jnl->last_page.records_limit; } else { // we are already at the limit available = 0; } } } else { log_err("cjf: %s,%i: could not find the serial %u in the journal: %r", jnl->journal_file_name, jnl->fd, zone_stored_serial, ret); } } else { log_warn("cjf: %s,%i: could not get information on the stored zone: %r", jnl->journal_file_name, jnl->fd, ret); } // END SERVER FLUSH CONDITION AND TRIGGER } soa_count = 0; for(;;) { // if the record is an SOA, we may be at the end of the current stream if(rr.tctr.qtype == TYPE_SOA) { if(++soa_count == 3) { // we had a +SOA already: // mark that we have a -SOA ready in rr #ifdef DEBUG log_debug1("cjf: %s,%i: SOA: %{dnsrr}", jnl->journal_file_name, jnl->fd, &rr); #endif break; } // this is the +SOA of the chunk // for now it is also the last SOA found in the file } yassert((soa_count > 0) && (soa_count < 3)); #ifdef DEBUG if(soa_count == 2) { log_debug1("cjf: %s,%i: +++: %{dnsrr}", jnl->journal_file_name, jnl->fd, &rr); } else { log_debug1("cjf: %s,%i: ---: %{dnsrr}", jnl->journal_file_name, jnl->fd, &rr); } #endif // if there is a risk overwriting a page, and not enough room is available, then update the journal structure if(!journal_was_empty) { // BEGIN CUT CONDITION TEST for(;;) { // if writing the next record (SOA) makes us go beyond the limit, we need to start a new page bool should_add_page = (record_size > available); if(!should_add_page) { break; } // if we have started to write, as a master, we MUST continue bool can_stop_writing_without_breaking = journal_cfj_page_output_stream_get_size(&os) == 0; // as a slave, we cannot lose the page that contains our starting point for the next update bool cannot_remove_first_page = (jnl->first_page_offset == zone_stored_serial_page_offset); // implies we need at least 2 pages // if writing the next record (SOA) makes us go beyond the limit and that limit is a page, we need to make room bool must_remove_first_page = (overwrite_risk && should_add_page); // if the journal is full, we should remove a page bool journal_full = journal_cfj_page_output_stream_get_current_offset(&os) >= journal_cjf_maximum_size(jnl); bool not_enough_pages_to_loop = (journal_cjf_idxt_get_page_count(jnl) <= 1); // impossible conundrum if(cannot_remove_first_page && must_remove_first_page) { log_warn("cjf: %s,%i: journal size is too small compared to the rate of updates", jnl->journal_file_name, jnl->fd); zdb_zone *zone = (zdb_zone*)jnl->zone; // the zone at this point is supposed to be locked // either simply with a simple reader // either doubly with something and a simple reader // if simply : do nothing // if doubly : with the simple reader : exchange them // with anything else : it cannot ever work u8 owner = zone->lock_owner; u8 reserved_owner = zone->lock_reserved_owner; if(owner == ZDB_ZONE_MUTEX_SIMPLEREADER) { ret = zdb_zone_info_store_locked_zone(jnl->zone->origin); } else if(owner == ZDB_ZONE_MUTEX_NOBODY) { zdb_zone_lock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); ret = zdb_zone_info_store_locked_zone(jnl->zone->origin); zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); } else if(reserved_owner == ZDB_ZONE_MUTEX_SIMPLEREADER) { zdb_zone_exchange_locks(zone, owner, ZDB_ZONE_MUTEX_SIMPLEREADER); ret = zdb_zone_info_store_locked_zone(jnl->zone->origin); zdb_zone_exchange_locks(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, owner); } else { ret = ERROR; } if(ISOK(ret)) { // and recompute ... if(ISOK(ret = zdb_zone_info_get_stored_serial(jnl->zone->origin, &zone_stored_serial))) { if(serial_ge(jnl->serial_end, zone_stored_serial)) { // get the offset of the PAGE that works from that serial if(ISOK(ret = journal_cjf_idxt_get_page_offset_from_serial(jnl, zone_stored_serial, &zone_stored_serial_page_offset))) { log_debug("cjf: %s,%i: zone stored with serial %i, journal page offset %i", jnl->journal_file_name, jnl->fd, zone_stored_serial, zone_stored_serial_page_offset); } else { log_err("cjf: %s,%i: could not find the serial in the journal: %r", jnl->journal_file_name, jnl->fd, ret); } } else { // the journal is older than the zone // zone_stored_serial_page_offset = last_page_offset if(ISOK(ret = journal_cjf_idxt_get_page_offset_from_serial(jnl, jnl->serial_end, &zone_stored_serial_page_offset))) { log_debug("cjf: %s,%i: last journal page offset %i", jnl->journal_file_name, jnl->fd, zone_stored_serial_page_offset); } else { // should not be possible log_err("cjf: %s,%i: could not find page for the serial in the journal: %r", jnl->journal_file_name, jnl->fd, ret); } } } else { log_warn("cjf: %s,%i: could not get information on the stored zone: %r", jnl->journal_file_name, jnl->fd, ret); } } else { log_err("cjf: %s,%i: could not trigger the zone write: %r", jnl->journal_file_name, jnl->fd, ret); } continue; } // remember the current limit for the page u32 old_page_file_offset_limit = jnl->last_page.file_offset_limit; if(must_remove_first_page) { #ifdef DEBUG log_debug1("cjf: %s,%i: must remove first page before overwrite", jnl->journal_file_name, jnl->fd); #endif // remove the first page (which is our current limit) journal_cjf_remove_first_page(jnl); // add the difference of limits available += jnl->last_page.file_offset_limit - old_page_file_offset_limit; // update the overwrite risk overwrite_risk = journal_cjf_page_current_output_stream_may_overwrite(jnl); // just continue writing break; } // if we must finish the steam, we cannot break it, obviously if(can_stop_writing_without_breaking) { if(not_enough_pages_to_loop) { #ifdef DEBUG log_debug1("cjf: %s,%i: journal is full with one page, adding one", jnl->journal_file_name, jnl->fd); #endif journal_cjf_page_output_stream_cancel(&os); journal_cjf_idxt_append_page(jnl); output_stream_set_void(&os); // very important journal_cjf_page_output_stream_reopen(&os, jnl); // compute the amount of space available on the journal from the current writing position // this takes into account both the maximum size of the journal and the possible overwrite available = journal_cjf_get_last_page_available_space_left(jnl); // are we in a situation were it is possible to overwrite the first page ? overwrite_risk = journal_cjf_page_current_output_stream_may_overwrite(jnl); // just continue writing break; } else // there are enough pages to loop { if(journal_cjf_page_line_count(jnl) > 0) { // we have at least one line in the page if(journal_full) { #ifdef DEBUG log_debug1("cjf: %s,%i: journal is full and the first page can be removed", jnl->journal_file_name, jnl->fd); #endif journal_cjf_page_output_stream_cancel(&os); //journal_cjf_remove_first_page(jnl); journal_cjf_idxt_append_page(jnl); output_stream_set_void(&os); // very important journal_cjf_page_output_stream_reopen(&os, jnl); // compute the amount of space available on the journal from the current writing position // this takes into account both the maximum size of the journal and the possible overwrite available = journal_cjf_get_last_page_available_space_left(jnl); // are we in a situation were it is possible to overwrite the first page ? overwrite_risk = journal_cjf_page_current_output_stream_may_overwrite(jnl); // just continue writing break; } #ifdef DEBUG log_debug1("cjf: %s,%i: journal is full but the first page cannot be removed", jnl->journal_file_name, jnl->fd); #endif // give up //goto journal_cjf_append_ixfr_stream_slave_exit; } #ifdef DEBUG log_debug1("cjf: %s,%i: last page has not even one line yet", jnl->journal_file_name, jnl->fd); #endif // empty page : just continue writing break; } } else { // just continue writing break; } // add the difference of limits available += jnl->last_page.file_offset_limit - old_page_file_offset_limit; // update the overwrite risk overwrite_risk = journal_cjf_page_current_output_stream_may_overwrite(jnl); } // END CUT CONDITION TEST } if(FAIL(ret = journal_cfj_page_output_stream_write_resource_record(&os, &rr))) { log_err("cjf: %s,%i: failed to write record %{dnsrr}: %r", jnl->journal_file_name, jnl->fd, &rr, ret); break; } yassert(ret == record_size); yassert(!overwrite_risk || (available >= record_size)); available -= record_size; if((record_size = dns_resource_record_read(&rr, ixfr_wire_is)) <= 0) { /* FAIL or EOF */ #ifdef DEBUG log_debug1("journal: %s,%i: EOF: no more resource records from input", jnl->journal_file_name, jnl->fd); #endif break; } } if((soa_count >= 2) && ISOK(ret)) { // only close the output stream if ALL the PAGE of a page have been written OR if we are about to exit the loop journal_cjf_page_output_stream_next(&os); } else { // cancel the stream journal_cjf_page_output_stream_cancel(&os); break; } } while(soa_count > 2); // It's for a goto and it's ugly ... //journal_cjf_append_ixfr_stream_master_exit: //journal_cjf_page_output_stream_close(jnl); output_stream_close(&os); dns_resource_record_clear(&rr); // ... // update the next append position // update the header (?) // journal_cjf_page_flush(); // => journal_cjf_idxt_flush() => jnl_header_flush(); // if the last SOA read is not the last serial, loop if(ISOK(ret)) { journal_cjf_page_cache_flush(jnl->fd); jnl_header_flush(jnl); journal_cjf_writeunlock(jnl); log_debug("cjf: %s,%i: append IXFR (master) done", jnl->journal_file_name, jnl->fd); return TYPE_IXFR; /* that's what the caller expects to handle the new journal pages */ } else { journal_cjf_writeunlock(jnl); // in case of error, forget the last stream addition (more or less no operation) log_err("cjf: %s,%i: append IXFR (master) failed with: %r", jnl->journal_file_name, jnl->fd, ret); return ret; } } static ya_result journal_cjf_append_ixfr_stream_slave(journal *jh, input_stream *ixfr_wire_is) { journal_cjf *jnl = (journal_cjf*)jh; if(!jnl_ensure_file_opened(jnl, TRUE)) { log_err("cjf: %{dnsname}: failed to open/create the file", jnl->zone); return ERRNO_ERROR; } ya_result ret; ya_result record_size; u32 stream_serial_del; #ifdef DEBUG stream_serial_del = ~0; #endif // current record u32 starting_zone_serial; u32 previous_journal_serial; zdb_zone *zone = (zdb_zone*)jnl->zone; zdb_zone_acquire(zone); zdb_zone_lock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); ret = zdb_zone_getserial((zdb_zone*)jnl->zone, &starting_zone_serial); zdb_zone_release_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); if(FAIL(ret)) { log_err("cjf: %s,%i: failed to get the serial from the zone: %r", jnl->journal_file_name, jnl->fd, ret); return ret; } // remember the offset in the page when we started u32 starting_page_file_offset = CJF_HEADER_SIZE; if(!journal_cjf_is_empty(jnl)) { if(FAIL(journal_cjf_idxt_get_page_offset_from_serial(jnl, starting_zone_serial, &starting_page_file_offset))) { log_err("cjf: %s,%i: failed to get the serial from the zone: %r", jnl->journal_file_name, jnl->fd, ret); return ret; } previous_journal_serial = jnl->serial_end; } else { // create the IDXT journal_cjf_idxt_create(jnl, 1); } dns_resource_record rr; dns_resource_record_init(&rr); // read the SOA record (start serial) if(FAIL(record_size = journal_cjf_read_soa_record(&rr, ixfr_wire_is))) { log_err("cjf: %s,%i: expected valid SOA record: %r", jnl->journal_file_name, jnl->fd, record_size); dns_resource_record_clear(&rr); return record_size; } #ifdef DEBUG log_debug1("cjf: %s,%i: SOA: %{dnsrr}", jnl->journal_file_name, jnl->fd, &rr); #endif // this is the SOA we are about to delete from, get its serial if(FAIL(ret = rr_soa_get_serial(rr.rdata, rr.rdata_size, &stream_serial_del))) { log_err("cjf: %s,%i: could not get serial from SOA record: %r", jnl->journal_file_name, jnl->fd, ret); dns_resource_record_clear(&rr); return ret; } // the journal can only be used by the writer /// @todo edf 20150323 -- lock parts of the journal journal_cjf_writelock(jnl); //////////////////////////////////////////////////////////////////////////// // we didn't got the SOA yet u8 soa_count; output_stream os; output_stream_set_void(&os); // very important do { // open a new output stream where to write the records // if the stream is already set in a non-void state, use it from its position // this may open a new page journal_cjf_page_output_stream_reopen(&os, jnl); // compute the amount of space available on the journal from the current writing position // this takes into account both the maximum size of the journal and the possible overwrite s64 available = journal_cjf_get_last_page_available_space_left(jnl); // are we in a situation were it is possible to overwrite the first page ? bool overwrite_risk = journal_cjf_page_current_output_stream_may_overwrite(jnl); // if the journal is empty ... if(journal_cjf_is_empty(jnl)) { // the serial of the SOA is our starting point previous_journal_serial = stream_serial_del; } else { // if the serial we are about to delete from is not the last serial, AND if we are not in a starting state (empty journal) if(stream_serial_del != previous_journal_serial) // false positive: previous_journal_serial is initialised (!journal_was_empty) { // complain about it /// @note 20150610 edf -- This is where the update glitch prevents updating. /// It is important to note that we are already in the main digestion loop. /// This was meant to detect a hole in the stream. /// But this also prevents a journal in the range [0..N] to accept an update in the range [N-i..N+j] /// The fix should be: if we are not beyond our current limit (N) then we should skip SOA--SOA++ until we are. if(serial_lt(stream_serial_del, previous_journal_serial)) // !journal_was_empty -> previous_journal_serial set to jnl->serial_end { log_info("cjf: %s,%i: serial of stream (%i) is inside the journal range [%i; %i]", jnl->journal_file_name, jnl->fd, stream_serial_del, jnl->serial_begin, jnl->serial_end); // SKIP ? the SOA has already been read // read until next SOA // then read again until next SOA and evaluate again if we are at the right point. // at some point we may find the right starting point, or finally give up for(int soa_found = 0;;) { // read next redcord if((record_size = dns_resource_record_read(&rr, ixfr_wire_is)) <= 0) { /* FAIL or EOF */ #ifdef DEBUG log_debug1("journal: %s,%i: skipping old changes: EOF: no more resource records from input", jnl->journal_file_name, jnl->fd); #endif ret = record_size; break; // breaks the for } if(rr.tctr.qtype == TYPE_SOA) { // we got another SOA if(++soa_found == 2) { // we are at the third one if(FAIL(ret = rr_soa_get_serial(rr.rdata, rr.rdata_size, &stream_serial_del))) { log_err("cjf: %s,%i: skipping old changes: could not get serial from SOA record: %r", jnl->journal_file_name, jnl->fd, ret); break; // breaks the for } // if the serial is still below : skip further if(serial_lt(stream_serial_del, previous_journal_serial)) { log_info("cjf: %s,%i: skipping old changes: serial of stream (%i) is inside the journal range [%i; %i]", jnl->journal_file_name, jnl->fd, stream_serial_del, jnl->serial_begin, jnl->serial_end); soa_found = 0; continue; } // if it is equal, we can proceed reading the stream into the journal if(stream_serial_del == previous_journal_serial) { ret = SUCCESS; } else // else it's broken { log_err("cjf: %s,%i: serial of stream (%i) is outside the journal range [%i; %i]", jnl->journal_file_name, jnl->fd, stream_serial_del, jnl->serial_begin, jnl->serial_end); ret = ZDB_JOURNAL_IXFR_SERIAL_OUT_OF_KNOWN_RANGE; } break; // breaks the for } // else we have found the second SOA and still need to find the end or the next SOA to try to recover from this } // else we don't care } // end for soa_found } else { log_err("cjf: %s,%i: serial of stream (%i) is outside the journal range [%i; %i]", jnl->journal_file_name, jnl->fd, stream_serial_del, jnl->serial_begin, jnl->serial_end); ret = ZDB_JOURNAL_IXFR_SERIAL_OUT_OF_KNOWN_RANGE; } // at this point, we either have // _ a success value in ret with record_size > 0 (and then we continue) // _ a success value in ret with record_size <= 0 (and then we are at the end of the stream) // _ an error value in ret with record_size > 0 (and the stream is not usable) if(FAIL(ret) || (record_size <= 0)) { #ifdef DEBUG logger_flush(); #endif journal_cjf_page_output_stream_cancel(&os); break; // breaks the do{}while(); } // rr contains the current (next) SOA // record_size contains the size of that SOA } } soa_count = 0; for(;;) { // if the record is an SOA, we may be at the end of the current stream if(rr.tctr.qtype == TYPE_SOA) { if(++soa_count == 3) { // we had a +SOA already: // mark that we have a -SOA ready in rr #ifdef DEBUG log_debug1("cjf: %s,%i: SOA: %{dnsrr}", jnl->journal_file_name, jnl->fd, &rr); #endif break; } // this is the +SOA of the chunk // for now it is also the last SOA found in the file } yassert((soa_count > 0) && (soa_count < 3)); #ifdef DEBUG if(soa_count == 2) { log_debug1("cjf: %s,%i: +++: %{dnsrr}", jnl->journal_file_name, jnl->fd, &rr); } else { log_debug1("cjf: %s,%i: ---: %{dnsrr}", jnl->journal_file_name, jnl->fd, &rr); } #endif // if there is a risk overwriting a page, and not enough room is available, then update the journal structure // BEGIN CUT CONDITION TEST for(;;) { // if writing the next record (SOA) makes us go beyond the limit, we need to start a new page bool should_add_page = (record_size > available); if(!should_add_page) { break; } // if we have started to write, as a slave, we should continue bool can_stop_writing_without_breaking = journal_cfj_page_output_stream_get_size(&os) == 0; // as a slave, we cannot lose the page that contains our starting point for the next update bool cannot_remove_first_page = (jnl->first_page_offset == starting_page_file_offset); // implies we need at least 2 pages // if writing the next record (SOA) makes us go beyond the limit and that limit is a page, we need to make room bool must_remove_first_page = (overwrite_risk && should_add_page); // if the journal is full, we should remove a page bool journal_full = journal_cfj_page_output_stream_get_current_offset(&os) >= journal_cjf_maximum_size(jnl); bool not_enough_pages_to_loop = (journal_cjf_idxt_get_page_count(jnl) <= 1); // impossible conundrum if(cannot_remove_first_page && must_remove_first_page) { log_err("cjf: %s,%i: journal size is too small compared to what the master is sending", jnl->journal_file_name, jnl->fd); // we are about to destroy what we still need to read // no can do : we must stop here. journal_cjf_page_output_stream_cancel(&os); soa_count = 0; goto journal_cjf_append_ixfr_stream_slave_exit; } // remember the current limit for the page u32 old_page_file_offset_limit = jnl->last_page.file_offset_limit; if(must_remove_first_page) { #ifdef DEBUG log_debug1("cjf: %s,%i: must remove first page before overwrite", jnl->journal_file_name, jnl->fd); #endif // remove the first page (which is our current limit) journal_cjf_remove_first_page(jnl); // add the difference of limits available += jnl->last_page.file_offset_limit - old_page_file_offset_limit; // update the overwrite risk overwrite_risk = journal_cjf_page_current_output_stream_may_overwrite(jnl); // just continue writing break; } // if we must finish the steam, we cannot break it, obviously if(can_stop_writing_without_breaking) { if(not_enough_pages_to_loop) { #ifdef DEBUG log_debug1("cjf: %s,%i: journal is full with one page, adding one", jnl->journal_file_name, jnl->fd); #endif journal_cjf_page_output_stream_cancel(&os); journal_cjf_idxt_append_page(jnl); output_stream_set_void(&os); // very important journal_cjf_page_output_stream_reopen(&os, jnl); // compute the amount of space available on the journal from the current writing position // this takes into account both the maximum size of the journal and the possible overwrite available = journal_cjf_get_last_page_available_space_left(jnl); // are we in a situation were it is possible to overwrite the first page ? overwrite_risk = journal_cjf_page_current_output_stream_may_overwrite(jnl); // just continue writing break; } else { if(journal_cjf_page_line_count(jnl) > 0) { // we have at least one line in the page if(journal_full && !cannot_remove_first_page) { #ifdef DEBUG log_debug1("cjf: %s,%i: journal is full and the first page can be removed", jnl->journal_file_name, jnl->fd); #endif journal_cjf_page_output_stream_cancel(&os); //journal_cjf_remove_first_page(jnl); journal_cjf_idxt_append_page(jnl); output_stream_set_void(&os); // very important journal_cjf_page_output_stream_reopen(&os, jnl); // compute the amount of space available on the journal from the current writing position // this takes into account both the maximum size of the journal and the possible overwrite available = journal_cjf_get_last_page_available_space_left(jnl); // are we in a situation were it is possible to overwrite the first page ? overwrite_risk = journal_cjf_page_current_output_stream_may_overwrite(jnl); // just continue writing break; } #ifdef DEBUG log_debug1("cjf: %s,%i: journal is full but the first page cannot be removed", jnl->journal_file_name, jnl->fd); #endif // give up goto journal_cjf_append_ixfr_stream_slave_exit; } #ifdef DEBUG log_debug1("cjf: %s,%i: last page has not even one line yet", jnl->journal_file_name, jnl->fd); #endif // empty page : just continue writing break; } } else { // just continue writing break; } // add the difference of limits available += jnl->last_page.file_offset_limit - old_page_file_offset_limit; // update the overwrite risk overwrite_risk = journal_cjf_page_current_output_stream_may_overwrite(jnl); } // END CUT CONDITION TEST if(FAIL(ret = journal_cfj_page_output_stream_write_resource_record(&os, &rr))) { log_err("cjf: %s,%i: failed to write record %{dnsrr}: %r", jnl->journal_file_name, jnl->fd, &rr, ret); break; } yassert(ret == record_size); yassert(!overwrite_risk || (available >= record_size)); available -= record_size; if((record_size = dns_resource_record_read(&rr, ixfr_wire_is)) <= 0) { /* FAIL or EOF */ #ifdef DEBUG log_debug1("journal: %s,%i: EOF: no more resource records from input", jnl->journal_file_name, jnl->fd); #endif break; } } // end for if((soa_count >= 2) && ISOK(ret)) { // only close the output stream if ALL the PAGE of a page have been written OR if we are about to exit the loop journal_cjf_page_output_stream_next(&os); } else { // cancel the stream journal_cjf_page_output_stream_cancel(&os); break; } } while(soa_count > 2); // It's for a goto and it's ugly ... journal_cjf_append_ixfr_stream_slave_exit: //journal_cjf_page_output_stream_close(jnl); output_stream_close(&os); dns_resource_record_clear(&rr); // ... // update the next append position // update the header (?) // journal_cjf_page_flush(); // => journal_cjf_idxt_flush() => jnl_header_flush(); // if the last SOA read is not the last serial, loop if(ISOK(ret)) { journal_cjf_page_cache_flush(jnl->fd); jnl_header_flush(jnl); journal_cjf_writeunlock(jnl); log_debug("cjf: %s,%i: append IXFR (slave) done", jnl->journal_file_name, jnl->fd); return TYPE_IXFR; /* that's what the caller expects to handle the new journal pages */ } else { journal_cjf_writeunlock(jnl); log_err("cjf: %s,%i: append IXFR (slave) failed with: %r", jnl->journal_file_name, jnl->fd, ret); // in case of error, forget the last stream addition (more or less no operation) return ret; } } static ya_result journal_cjf_append_ixfr_stream(journal *jh, input_stream *ixfr_wire_is) { u8 zt; ya_result ret = zdb_zone_info_get_zone_type(jh->zone->origin, &zt); if(ISOK(ret)) { switch(zt) { case ZT_MASTER: ret = journal_cjf_append_ixfr_stream_master(jh, ixfr_wire_is); break; case ZT_SLAVE: ret = journal_cjf_append_ixfr_stream_slave(jh, ixfr_wire_is); break; default: ret = ERROR; break; } } return ret; } /****************************************************************************** * * Journal Input Stream * This one returns and IXFR stream * ******************************************************************************/ struct journal_cjf_input_stream_data { journal_cjf *jnl; int fd; u32 available; u32 serial_from; u32 page_next; // DEBUG u16 idxt_index; u16 idxt_size; u16 todo_soa_record_size; bool first_stream; u8* todo_soa_record; }; typedef struct journal_cjf_input_stream_data journal_cjf_input_stream_data; static ya_result journal_cjf_input_stream_read(input_stream* stream, u8 *buffer, u32 len) { journal_cjf_input_stream_data *data = (journal_cjf_input_stream_data*)stream->data; const u8 *base = buffer; const u8 *limit = &buffer[len]; intptr n; ya_result ret = 0; journal_cjf *jnl = data->jnl; log_debug("cjf: %s,%i: input: reading %u/%u bytes, pos is %lli", jnl->journal_file_name, jnl->fd, len, data->available, lseek(data->fd, 0, SEEK_CUR)); // while there is still room in the output buffer while((n = limit - buffer) > 0) { // if there is no data ready on input, fetch some more if(data->available == 0) { // get the next one if(data->idxt_index == data->idxt_size) { // EOF : we were at the last index in the IDXT break; } // get the offset of the current PAGE table u32 page_offset = journal_cjf_idxt_get_file_offset(data->jnl, data->idxt_index); u32 stream_offset; u32 stream_limit_offset; // look for the first SOA requested if(!data->first_stream) { // we are already streaming, the XFR stream starts at the end of the PAGE (4096 bytes until next version of the journal) stream_offset = page_offset + CJF_PAGE_SIZE_IN_BYTE; } else { // the starting stream offset is obtained through a bit more work if(FAIL(ret = journal_cjf_page_get_stream_offset_from_serial(data->jnl, data->idxt_index, data->serial_from, &stream_offset))) { return ret; } data->first_stream = FALSE; } journal_cjf_page_tbl_header page_header; journal_cjf_page_cache_read_header(data->jnl->fd, page_offset, &page_header); stream_limit_offset = page_header.stream_end_offset; // we know where to start ... data->idxt_index++; (void)stream_limit_offset; yassert(stream_limit_offset != 0); yassert(stream_limit_offset > page_offset); /// @todo edf 20150115 -- fix this when a cycle occurs data->available = page_header.stream_end_offset - stream_offset; data->page_next = page_header.next_page_offset; if(lseek(data->fd, stream_offset, SEEK_SET) < 0) { return ERRNO_ERROR; } } n = MIN(n, data->available); if(FAIL(ret = readfully(data->fd, buffer, n))) { return ret; } data->available -= n; buffer += n; } return buffer - base; } static ya_result journal_cjf_input_stream_skip(input_stream* is, u32 len) { u8 tmp[512]; journal_cjf_input_stream_data *data = (journal_cjf_input_stream_data*)is->data; journal_cjf *jnl = data->jnl; log_debug("cjf: %s,%i: input: skipping %u bytes", jnl->journal_file_name, jnl->fd, len); while(len > 0) { ya_result ret; u32 n = MIN(len, sizeof(tmp)); if(FAIL(ret = journal_cjf_input_stream_read(is, tmp, n))) { return ret; } len -= n; } return len; } static void journal_cjf_input_stream_close(input_stream* is) { journal_cjf_input_stream_data *data = (journal_cjf_input_stream_data*)is->data; log_debug("cjf: %s,%i: input: close (%i)", data->jnl->journal_file_name, data->jnl->fd, data->fd); journal_cjf_readunlock(data->jnl); close_ex(data->fd); ZFREE(data, journal_cjf_input_stream_data); input_stream_set_void(is); } static const input_stream_vtbl journal_cjf_input_stream_vtbl = { journal_cjf_input_stream_read, journal_cjf_input_stream_skip, journal_cjf_input_stream_close, "journal_cjf_input_stream" }; /* * the last_soa_rr is used for IXFR transfers (it has to be a prefix & suffix to the returned stream) */ static ya_result journal_cjf_get_ixfr_stream_at_serial(journal *jh, u32 serial_from, input_stream *out_input_stream, dns_resource_record *out_last_soa_rr) { journal_cjf *jnl = (journal_cjf*)jh; log_debug("cjf: %s,%i: get IXFR stream at serial %i", jnl->journal_file_name, jnl->fd, serial_from); if(!jnl_ensure_file_opened(jnl, TRUE)) { return ERRNO_ERROR; } journal_cjf_readlock(jnl); if(serial_lt(serial_from, jnl->serial_begin) || serial_ge(serial_from, jnl->serial_end)) { if(serial_from == jnl->serial_end) { journal_cjf_readunlock(jnl); empty_input_stream_init(out_input_stream); return SUCCESS; // 0 } else { journal_cjf_readunlock(jnl); #ifdef DEBUG logger_flush(); #endif return ZDB_JOURNAL_SERIAL_OUT_OF_KNOWN_RANGE; } } ya_result ret; dns_resource_record rr; dns_resource_record_init(&rr); // increment the reference count of the journal // lock the range in the file so it cannot be overwritten // create a stream that know where to start, where to end // it has to first send the last SOA // then to send the start // then to send the last SOA again if(FAIL(ret = journal_cjf_idxt_get_page_index_from_serial(jnl, serial_from))) { journal_cjf_readunlock(jnl); return ret; } yassert(ret < MAX_U16); u16 idxt_index = (u16)ret; journal_cjf_input_stream_data *data; ZALLOC_OR_DIE(journal_cjf_input_stream_data*, data, journal_cjf_input_stream_data, GENERIC_TAG); data->jnl = jnl; data->fd = jnl_open_file(jnl, FALSE); /// @todo edf -- open the file, put the pointer at the right place and ret + 1, available = x data->serial_from = serial_from; if(out_last_soa_rr != NULL) { yassert(jnl->last_soa_offset != 0); // read the last SOA off_t from = lseek(data->fd, 0, SEEK_CUR); lseek(data->fd, jnl->last_soa_offset, SEEK_SET); input_stream tmp; fd_input_stream_attach(&tmp, data->fd); ret = dns_resource_record_read(out_last_soa_rr, &tmp); fd_input_stream_detach(&tmp); lseek(data->fd, from, SEEK_SET); if(FAIL(ret)) { journal_cjf_readunlock(jnl); log_err("cjf: %s,%i: unable to read the SOA at position %u: %r", jnl->journal_file_name, jnl->fd, jnl->last_soa_offset, ret); ZFREE(data, journal_cjf_input_stream_data); return ret; } } data->idxt_index = idxt_index; data->idxt_size = jnl->idxt.count; data->available = 0; data->first_stream = TRUE; out_input_stream->data = data; out_input_stream->vtbl = &journal_cjf_input_stream_vtbl; return ret; /* * In page_begin.file_offset, we get the first PAGE table * * That table may chain to a next PAGE, and so on and so forth * While this is happening, every stream between offsets: * * page_begin.file_offset + CJF_SECTION_INDEX_SIZE * * and * * @(page_begin.file_offset + 4) * * is to be sent by the stream * * When @(page_begin.file_offset + 4) is 0, it is the last PAGE * * Note that @(page_begin.file_offset + 4) is cached in the IDXT entries * * Every PAGE table but the last one has exactly CJF_SECTION_INDEX_SLOT_COUNT items * * jnl->page.count contains the count of items of the current (not full) PAGE * jnl->page.offset_next contains the supremum of input after the last PAGE * * This means a journal has to be fully initialised before being read (it was not the case for an IX file) * * The content of the PAGE itself is not required. Only the DNS part matters. * * All this also means a journal has to be flushed for its DNS on disk (since the file has to be opened separately because a cloned fd shares the file pointer) * * A range-locking mechanism is clearly needed. It should only be capable of locking up to two ranges (covers all cases). * * So here, in summary, return a stream that is linked to the journal * * It will start at offset: * * idxt[ret].file_offset + CJF_SECTION_INDEX_SIZE * * until: * * idxt[ret + 1].file_offset or page.offset_next * * and continue that way for every ret < idxt.count * */ } static ya_result journal_cjf_get_first_serial(journal *jh, u32 *serial) { ya_result ret = ERROR; journal_cjf *jnl = (journal_cjf*)jh; journal_cjf_readlock(jnl); u32 value = jnl->serial_begin; if(serial != NULL) { *serial = value; ret = SUCCESS; } journal_cjf_readunlock(jnl); log_debug("cjf: %s,%i: get first serial: %i", jnl->journal_file_name, jnl->fd, value); return ret; } static ya_result journal_cjf_get_last_serial(journal *jh, u32 *serial) { ya_result ret = ERROR; journal_cjf *jnl = (journal_cjf*)jh; journal_cjf_readlock(jnl); u32 value = jnl->serial_end; if(serial != NULL) { *serial = value; ret = SUCCESS; } journal_cjf_readunlock(jnl); log_debug("cjf: %s,%i: get last serial: %i", jnl->journal_file_name, jnl->fd, value); return ret; } static ya_result journal_cjf_get_serial_range(journal *jh, u32 *serial_start, u32 *serial_end) { journal_cjf *jnl = (journal_cjf*)jh; journal_cjf_readlock(jnl); if(serial_start != NULL) { *serial_start = jnl->serial_begin; } if(serial_end != NULL) { *serial_end = jnl->serial_end; } journal_cjf_readunlock(jnl); return SUCCESS; } static ya_result journal_cjf_truncate_to_size(journal *jh, u32 size_) { journal_cjf *jnl = (journal_cjf*)jh; yassert(!shared_group_mutex_islocked(&jnl->mtx)); if(size_ == 0) { log_debug("cjf: %s,%i: truncate to size 0", jnl->journal_file_name, jnl->fd); if(jnl->fd >= 0) { journal_cjf_page_cache_close(jnl->fd); close_ex(jnl->fd); jnl->fd = -1; } unlink(jnl->journal_file_name); jnl->idxt.dirty = FALSE; journal_cjf_idxt_destroy(jnl); jnl->file_maximum_size = MAX_U32; if(jnl->zone != NULL) { jnl->file_maximum_size = jnl->zone->wire_size >> 1; zdb_zone_info_get_zone_max_journal_size(jnl->zone->origin, &jnl->file_maximum_size); } jnl->last_page.file_offset = CJF_HEADER_SIZE; jnl->last_page.count = 0; jnl->last_page.size = CJF_SECTION_INDEX_SLOT_COUNT; jnl->last_page.serial_start = 0; jnl->last_page.serial_end = 0; jnl->last_page.records_limit = CJF_HEADER_SIZE + CJF_SECTION_INDEX_SIZE; jnl->last_page.file_offset_limit = jnl->file_maximum_size; jnl->serial_begin = 0; jnl->serial_end = 0; jnl->first_page_offset = CJF_HEADER_SIZE; jnl->page_table_file_offset = 0; jnl->last_soa_offset = 0; //jnl->file_maximum_size = MAX_U32; jnl->mtx.owner = LOCK_NONE; jnl->mtx.count = 0; jnl->flags = JOURNAL_CFJ_FLAGS_MY_ENDIAN; jnl->last_page.records_limit = jnl->last_page.file_offset + CJF_SECTION_INDEX_SIZE; jnl->last_page.file_offset_limit = jnl->file_maximum_size; //jnl->journal_file_name = strdup(filename); return SUCCESS; } else { log_err("cjf: %s,%i: truncate to size != 0 not implemented", jnl->journal_file_name, jnl->fd); return ZDB_JOURNAL_FEATURE_NOT_SUPPORTED; } } static ya_result journal_cjf_truncate_to_serial(journal *jh, u32 serial_) { journal_cjf *jnl = (journal_cjf*)jh; log_err("cjf: %s,%i: truncate to serial not implemented", jnl->journal_file_name, jnl->fd); return ZDB_JOURNAL_FEATURE_NOT_SUPPORTED; } static ya_result journal_cjf_close(journal *jh) { journal_cjf *jnl = (journal_cjf*)jh; log_debug("cjf: %s,%i: close", jnl->journal_file_name, jnl->fd); shared_group_mutex_lock(&jnl->mtx, 0x83); zdb_zone *zone; if((zone = (zdb_zone*)jnl->zone) != NULL) { yassert(zone->journal == jh); zone->journal = NULL; } shared_group_mutex_unlock(&jnl->mtx, 0x83); yassert(!shared_group_mutex_islocked(&jnl->mtx)); mutex_lock(&journal_cjf_set_mtx); ptr_set_avl_delete(&journal_cjf_set, jnl->journal_file_name); mutex_unlock(&journal_cjf_set_mtx); journal_cjf_writelock(jnl); jnl_close_file(jnl); jnl->vtbl = NULL; journal_cjf_writeunlock(jnl); shared_group_mutex_destroy(&jnl->mtx); free(jnl->journal_file_name); memset(jnl, 0xfe, sizeof(journal_cjf)); free(jnl); return SUCCESS; } static void journal_cjf_log_dump(journal *jh) { journal_cjf *jnl = (journal_cjf*)jh; log_debug("cjf: %s,%i: [%u; %u] '%s' (%i) lck=%i rc=%i", jnl->journal_file_name, jnl->fd, jnl->serial_begin, jnl->serial_end, jnl->journal_file_name, jnl->fd, jnl->mtx.owner, jnl->mtx.count); } static ya_result journal_cjf_get_domain(journal *jh, u8 *out_domain) { if(jh->zone != NULL) { dnsname_copy(out_domain, jh->zone->origin); return SUCCESS; } return ERROR; } static void journal_cjf_destroy(journal *jh) { journal_cjf *jnl = (journal_cjf*)jh; log_debug("cjf: %s,%i: destroy", jnl->journal_file_name, jnl->fd); shared_group_mutex_destroy(&jnl->mtx); free(jnl->journal_file_name); free(jnl); } /** * Links a zdb_zone and a journal * * @param jh * @param zone */ static void journal_cjf_link_zone(journal *jh, zdb_zone *zone) { yassert(zone != NULL); journal_cjf *jnl = (journal_cjf*)jh; if(jh->zone != NULL) { if(jh->zone->journal == jh) { log_debug("cjf: %s,%i: updating maximum journal size", jnl->journal_file_name, jnl->fd); jnl->file_maximum_size = jnl->zone->wire_size >> 1; zdb_zone_info_get_zone_max_journal_size(jnl->zone->origin, &jnl->file_maximum_size); return; } else { log_err("cjf: %s,%i: journal (%p) is already linked to a zone (%p) and that zone links to another journal (%p)", jnl->journal_file_name, jnl->fd, jh, jh->zone, jh->zone->journal); logger_flush(); abort(); } } //jh->zone may be null if(zone->journal != NULL) { if(zone->journal == jh) { log_debug("cjf: %s,%i: updating incomplete link", jnl->journal_file_name, jnl->fd); jh->zone = zone; jnl->file_maximum_size = jnl->zone->wire_size >> 1; zdb_zone_info_get_zone_max_journal_size(jnl->zone->origin, &jnl->file_maximum_size); return; } else { log_err("cjf: %s,%i: zone already points to another journal (%p instead of to %p)", jnl->journal_file_name, jnl->fd, zone->journal, jh); logger_flush(); abort(); } } log_debug("cjf: %s,%i: linking to zone %{dnsname},%p", jnl->journal_file_name, jnl->fd, zone->origin, zone); jnl->zone = zone; zone->journal = jh; jnl->file_maximum_size = jnl->zone->wire_size >> 1; zdb_zone_info_get_zone_max_journal_size(jnl->zone->origin, &jnl->file_maximum_size); { jnl->last_page.file_offset_limit = jnl->file_maximum_size; } } /******************************************************************************* * * vtbl handling functions * ******************************************************************************/ struct journal_vtbl journal_cjf_vtbl = { journal_cjf_get_format_name, journal_cjf_get_format_version, journal_cjf_close, journal_cjf_append_ixfr_stream, journal_cjf_get_ixfr_stream_at_serial, journal_cjf_get_first_serial, journal_cjf_get_last_serial, journal_cjf_get_serial_range, journal_cjf_truncate_to_size, journal_cjf_truncate_to_serial, journal_cjf_log_dump, journal_cjf_get_domain, journal_cjf_destroy, journal_cjf_link_zone, JOURNAL_CLASS_NAME }; ya_result journal_cjf_load_index_table(journal *jh) { journal_cjf *jnl = (journal_cjf*)jh; // check if the index table (referencing all indexes) if(jnl->page_table_file_offset == 0) { // the table does not exist or is corrupted // it has to be read again // from first_index_offset the index list has to be followed to recreate it // if such table only contains one entry, it could probably be ignored in most cases } else { // seek and load the table } return -1; } static journal_cjf* journal_cjf_alloc_default(const char *filename) { journal_cjf *jnl; MALLOC_OR_DIE(journal_cjf*, jnl, sizeof(journal_cjf), JRNLCJF_TAG); ZEROMEMORY(jnl, sizeof(journal_cjf)); jnl->vtbl = &journal_cjf_vtbl; jnl->fd = -1; jnl->file_maximum_size = MAX_U32; jnl->first_page_offset = CJF_HEADER_SIZE; jnl->journal_file_name = strdup(filename); jnl->last_page.file_offset = CJF_HEADER_SIZE; jnl->last_page.size = CJF_SECTION_INDEX_SLOT_COUNT; jnl->last_page.records_limit = CJF_HEADER_SIZE + CJF_SECTION_INDEX_SIZE; jnl->last_page.file_offset_limit = jnl->file_maximum_size; jnl->flags = JOURNAL_CFJ_FLAGS_MY_ENDIAN; shared_group_mutex_init(&jnl->mtx, &journal_shared_mtx, "journal-cjf"); return jnl; } /** * * Should not be called directly (only by journal_* functions. * * Opens or create a journal handling structure. * If the journal did not exist, the structure is returned without a file opened * * @param jh * @param origin * @param workingdir * @param create * * @return */ ya_result journal_cjf_open(journal **jh, const u8* origin, const char *workingdir, bool create) { /* * try to open the journal file * if it exists, create the structure for the handle */ // CFJ_PAGE_CACHE -> journal_cjf_page_cache_init(); if(!journal_shared_mtx_initialized) { shared_group_shared_mutex_init(&journal_shared_mtx); journal_shared_mtx_initialized = TRUE; } // CFJ_PAGE_CACHE <- journal_cjf *jnl; ya_result return_value; char filename[PATH_MAX]; if((jh == NULL) || (origin == NULL) || (workingdir == NULL)) { return ZDB_JOURNAL_WRONG_PARAMETERS; } #ifdef DEBUG log_debug("cjf: open(%p, '%{dnsname}', \"%s\", %d)", jh, origin, workingdir, (create)?1:0); #endif #ifdef DEBUG log_debug("cjf: trying to open journal for %{dnsname} in '%s'", origin, workingdir); #endif /* get the soa of the loaded zone */ *jh = NULL; if(FAIL(return_value = snformat(filename, sizeof(filename), CJF_WIRE_FILE_FORMAT, workingdir, origin))) { return return_value; } mutex_lock(&journal_cjf_set_mtx); ptr_node *node = ptr_set_avl_find(&journal_cjf_set, filename); if(node != NULL) { journal_cjf *current_jnl = (journal_cjf*)node->value; if(journal_cjf_is_empty(current_jnl)) { mutex_unlock(&journal_cjf_set_mtx); if(!jnl_ensure_file_opened(current_jnl, create)) { return ZDB_ERROR_ICMTL_NOTFOUND; } *jh = (journal*)current_jnl; return SUCCESS; } log_debug("cjf: %{dnsname} has already got an opened journal at %p, fd=%i", origin, current_jnl, current_jnl->fd); #if DEBUG logger_flush(); #endif *jh = (journal*)current_jnl; mutex_unlock(&journal_cjf_set_mtx); return 1; } mutex_unlock(&journal_cjf_set_mtx); int fd = open_ex(filename, O_RDWR); if(fd < 0) { // not found (?) int err = errno; if(err == ENOENT) { if(create) { jnl = journal_cjf_alloc_default(filename); *jh = (journal*)jnl; mutex_lock(&journal_cjf_set_mtx); ptr_node *node = ptr_set_avl_insert(&journal_cjf_set, jnl->journal_file_name); yassert(node->value == NULL); node->value = jnl; mutex_unlock(&journal_cjf_set_mtx); return SUCCESS; } else { return ZDB_ERROR_ICMTL_NOTFOUND; } } return MAKE_ERRNO_ERROR(err); } else // the file exists, is opened, an its file descriptor is in fd { /* * Got a journal file, initialise the handling structure */ struct cjf_header header; if(FAIL(return_value = readfully(fd, &header, sizeof(header)))) { close_ex(fd); return return_value; } if((header.magic_plus_version != CJF_CJF0_MAGIC) || ((header.flags & JOURNAL_CFJ_FLAGS_MY_ENDIAN) == 0) ) { if(header.magic_plus_version != CJF_CJF0_MAGIC) { log_err("cjf: wrong magic on %s", filename); } else { log_err("cjf: wrong endian on %s", filename); } close_ex(fd); if(create) { // try to fix it // rename char broken_file_path[PATH_MAX]; if(ISOK(snformat(broken_file_path, sizeof(broken_file_path),"%s.bad-journal", filename))) { bool try_again = TRUE; // remove previous bad-journal if any unlink(broken_file_path); // rename the journal into bad-journal if(rename(filename, broken_file_path) < 0) { log_err("cjf: unable to rename %s into %s: %r", filename, broken_file_path, ERRNO_ERROR); if(unlink(filename) < 0) { log_err("cjf: unable to delete %s: %r", filename, ERRNO_ERROR); try_again = FALSE; } } if(try_again) { return_value = journal_cjf_open(jh, origin, workingdir, TRUE); // we are in a branch where "create = TRUE" return return_value; } } else { log_err("cjf: %s is a bad journal, please remove it.", filename); } } return ZDB_JOURNAL_ERROR_READING_JOURNAL; } log_debug("cjf: journal for %{dnsname} expected to cover serials from %i to %i", origin, header.serial_begin, header.serial_end); log_debug("cjf: journal for %{dnsname} table index located at %x%s", origin, header.table_index_offset, (header.table_index_offset!=0)?"":", which means it has not been closed properly"); jnl = journal_cjf_alloc_default(filename); jnl->fd = fd; // file opened // if the file is empty, the header can be ignored (or reconstructed) if((header.flags & JOURNAL_CFJ_FLAGS_NOT_EMPTY) != 0) { jnl->flags = header.flags; jnl->serial_begin = header.serial_begin; jnl->serial_end = header.serial_end; jnl->first_page_offset = header.first_index_offset; jnl->page_table_file_offset = header.table_index_offset; jnl->last_soa_offset = header.last_soa_offset; jnl->last_page.serial_end = jnl->serial_end; jnl->last_page.records_limit = header.last_page_offset_next; jnl->journal_file_name = strdup(filename); journal_cjf_idxt_load(jnl); if(jnl->idxt.count > 0) { jnl->last_page.file_offset = journal_cjf_idxt_get_last_file_offset(jnl); journal_cjf_page_tbl_header current_page_header; journal_cjf_page_cache_read_header(jnl->fd, jnl->last_page.file_offset, ¤t_page_header); jnl->last_page.count = current_page_header.count; jnl->last_page.size = current_page_header.size; if(jnl->last_page.file_offset < jnl->first_page_offset) { jnl->last_page.file_offset_limit = jnl->first_page_offset; } else { jnl->last_page.file_offset_limit = jnl->file_maximum_size; } if(jnl->idxt.count > 1) { jnl->last_page.serial_start = journal_cjf_idxt_get_last_serial(jnl, jnl->idxt.count - 2); } else { jnl->last_page.serial_start = jnl->serial_begin; } } else { jnl->idxt.dirty = FALSE; jnl->flags = JOURNAL_CFJ_FLAGS_MY_ENDIAN|JOURNAL_CFJ_FLAGS_DIRTY; journal_cjf_page_cache_flush(jnl->fd); journal_cjf_idxt_destroy(jnl); jnl->serial_begin = 0; jnl->serial_end = 0; jnl->mtx.owner = LOCK_NONE; jnl->mtx.count = 0; jnl->first_page_offset = CJF_HEADER_SIZE; jnl->page_table_file_offset = 0; jnl->last_soa_offset = 0; jnl->file_maximum_size = MAX_U32; if(jnl->zone != NULL) { jnl->file_maximum_size = jnl->zone->wire_size >> 1; zdb_zone_info_get_zone_max_journal_size(jnl->zone->origin, &jnl->file_maximum_size); } jnl->last_page.file_offset = CJF_HEADER_SIZE; jnl->last_page.count = 0; jnl->last_page.size = CJF_SECTION_INDEX_SLOT_COUNT; jnl->last_page.serial_start = 0; jnl->last_page.serial_end = 0; jnl->last_page.records_limit = jnl->last_page.file_offset + CJF_SECTION_INDEX_SIZE; jnl->last_page.file_offset_limit = jnl->file_maximum_size; jnl_header_flush(jnl); #if _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED || /* Since glibc 2.3.5: */ _POSIX_C_SOURCE >= 200112L ftruncate(jnl->fd, CJF_HEADER_SIZE); #endif } } // got the header loaded // now we know the basics about this journal // remaining work has to be done on a as-needed basis *jh = (journal*)jnl; mutex_lock(&journal_cjf_set_mtx); ptr_node *journal_cjf_node = ptr_set_avl_insert(&journal_cjf_set, jnl->journal_file_name); journal_cjf_node->value = jnl; mutex_unlock(&journal_cjf_set_mtx); #ifdef DEBUG log_debug("cjf: returning %r", return_value); #endif return return_value; } } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_zone_process.c0000644000077100007710000000012412650131756022505 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.376344 30 ctime=1454597652.455344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_zone_process.c0000664000077100007710000002045612650131756022321 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include "dnsdb/dictionary.h" #include "dnsdb/nsec3_types.h" #include "dnsdb/nsec3_item.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_zone_process.h" static ya_result zdb_zone_process_label_children(zdb_zone_process_label_callback_parms *parms) { ya_result return_code = SUCCESS; dictionary_iterator iter; dictionary_iterator_init(&parms->rr_label->sub, &iter); while(dictionary_iterator_hasnext(&iter)) { zdb_rr_label** sub_labelp = (zdb_rr_label**)dictionary_iterator_next(&iter); dnsname_stack_push_label(&parms->fqdn_stack, &(*sub_labelp)->name[0]); parms->rr_label = *sub_labelp; return_code = parms->cb(parms); if((FAIL(return_code) || return_code == ZDB_ZONE_PROCESS_STOP)) { break; } return_code = zdb_zone_process_label_children(parms); if((FAIL(return_code) || return_code == ZDB_ZONE_PROCESS_STOP)) { break; } dnsname_stack_pop_label(&parms->fqdn_stack); } return return_code; } ya_result zdb_zone_process_all_labels_from_zone(zdb_zone *zone, zdb_zone_process_label_callback *cb, void *args) { ya_result return_code = ERROR; if(zone != NULL && zone->apex != NULL) { zdb_zone_process_label_callback_parms parms; parms.cb = cb; parms.zone = zone; parms.args = args; if(ISOK(dnsname_to_dnsname_stack(zone->origin, &parms.fqdn_stack))) { parms.rr_label = zone->apex; return_code = cb(&parms); if(!(FAIL(return_code) || return_code == ZDB_ZONE_PROCESS_STOP)) { zdb_zone_process_label_children(&parms); } } } return return_code; } static ya_result zdb_zone_process_nsec3_records(zdb_zone_process_rrset_callback_parms *parms) { const zdb_rr_label *real_label = parms->rr_label; nsec3_zone *n3 = parms->zone->nsec.nsec3; nsec3_label_extension *n3ext = parms->rr_label->nsec.nsec3; zdb_rr_label *nsec3_label; zdb_packed_ttlrdata *nsec3_packed_ttl_rdata; const zdb_packed_ttlrdata *out_nsec3_rrsig; u8 zdb_packed_ttlrdata_buffer[sizeof(zdb_packed_ttlrdata) - 1 + TMP_NSEC3_TTLRDATA_SIZE]; u8 zdb_rr_label_buffer[sizeof(zdb_rr_label) - 1 + MAX_DOMAIN_LENGTH]; nsec3_label = (zdb_rr_label*)zdb_rr_label_buffer; nsec3_packed_ttl_rdata = (zdb_packed_ttlrdata*)zdb_packed_ttlrdata_buffer; ZEROMEMORY(zdb_rr_label_buffer, sizeof(zdb_rr_label) - 1); nsec3_label->nsec = real_label->nsec; nsec3_label->flags = real_label->flags | ZDB_RR_LABEL_VIRTUAL; ya_result return_code = SUCCESS; while((n3 != NULL) && (n3ext != NULL)) { out_nsec3_rrsig = NULL; nsec3_zone_item_to_zdb_packed_ttlrdata( n3, n3ext->self, parms->zone->origin, &nsec3_label->name[0], /* dnsname */ parms->zone->min_ttl, nsec3_packed_ttl_rdata, TMP_NSEC3_TTLRDATA_SIZE, &out_nsec3_rrsig); parms->rrset = nsec3_packed_ttl_rdata; return_code = parms->cb(parms); if((FAIL(return_code) || return_code != ZDB_ZONE_PROCESS_CONTINUE)) { break; } parms->rrset = out_nsec3_rrsig; return_code = parms->cb(parms); if((FAIL(return_code) || return_code != ZDB_ZONE_PROCESS_CONTINUE)) { break; } n3ext = n3ext->next; n3 = n3->next; } parms->rr_label = real_label; return return_code; } static ya_result zdb_zone_process_rrset_records(zdb_zone_process_rrset_callback_parms *parms) { ya_result return_code = SUCCESS; btree_iterator iter; btree_iterator_init(parms->rr_label->resource_record_set, &iter); while(btree_iterator_hasnext(&iter)) { btree_node* rr_node = btree_iterator_next_node(&iter); parms->rrset = (zdb_packed_ttlrdata*)rr_node->data; parms->record_type = (u16)rr_node->hash; return_code = parms->cb(parms); if(return_code != ZDB_ZONE_PROCESS_CONTINUE) { break; } } if(return_code == ZDB_ZONE_PROCESS_CONTINUE) { if(zdb_zone_is_nsec3(parms->zone)) { return_code = zdb_zone_process_nsec3_records(parms); } } return return_code; } static ya_result zdb_zone_process_rrset_children(zdb_zone_process_rrset_callback_parms *parms) { ya_result return_code = SUCCESS; dictionary_iterator iter; dictionary_iterator_init(&parms->rr_label->sub, &iter); while(dictionary_iterator_hasnext(&iter)) { zdb_rr_label** sub_labelp = (zdb_rr_label**)dictionary_iterator_next(&iter); dnsname_stack_push_label(&parms->fqdn_stack, &(*sub_labelp)->name[0]); parms->rr_label = *sub_labelp; return_code = zdb_zone_process_rrset_records(parms); if((FAIL(return_code) || return_code != ZDB_ZONE_PROCESS_CONTINUE)) { break; } return_code = zdb_zone_process_rrset_children(parms); if((FAIL(return_code) || return_code != ZDB_ZONE_PROCESS_CONTINUE)) { break; } dnsname_stack_pop_label(&parms->fqdn_stack); } return return_code; } ya_result zdb_zone_process_all_rrsets_from_all_labels_from_zone(zdb_zone *zone, zdb_zone_process_rrset_callback *cb, void *args) { ya_result return_code = ERROR; if(zone != NULL && zone->apex != NULL) { zdb_zone_process_rrset_callback_parms parms; parms.cb = cb; parms.zone = zone; parms.args = args; if(ISOK(dnsname_to_dnsname_stack(zone->origin, &parms.fqdn_stack))) { parms.rr_label = zone->apex; return_code = zdb_zone_process_rrset_records(&parms); if(!(FAIL(return_code) || return_code != ZDB_ZONE_PROCESS_CONTINUE)) { return_code = zdb_zone_process_rrset_children(&parms); } } } return return_code; } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/rrsig.c0000644000077100007710000000012412650131756020263 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.433344 30 ctime=1454597652.497344534 yadifa-2.1.6-5826/lib/dnsdb/src/rrsig.c0000664000077100007710000013437112650131756020101 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup rrsig RRSIG functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include #include #include #include #include "dnsdb/dnsrdata.h" #include "dnsdb/dnssec.h" #include "dnsdb/rrsig.h" #include "dnsdb/rr_canonize.h" #include "dnsdb/zdb_listener.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/dnssec_keystore.h" #define MODULE_MSG_HANDLE g_dnssec_logger /* EDF: Don't ZALLOC */ #define ALLOW_ZALLOC 0 /* * 0 : no dump * 1 : dump * 2 : more dump ... */ #define RRSIG_DUMP 0 #define RRSIG_AUTOMATIC_ALARM_REFRESH 0 /* #ifndef DEBUG #undef RRSIG_DUMP #define RRSIG_DUMP 0 #endif *//* setup the header except the signature */ /* canonize the rr list */ /* sign the resulting stream (give the order to sign the the signature engine */ /* The result of the signature operation is a node ready to be insterted in the tree. * There must be a time when I can change the resource records of a rr_label. At that time I'll add the rrsig result. * * Said time is when all the RR in the label have been processed. * So what I could do is batch a label instead of processing by record. * The result is for the batch so when we get the result, we know we can insert it. */ /* self-explanatory */ ya_result rrsig_context_initialize(rrsig_context_s *context, const zdb_zone *zone, const char *engine_name, u32 sign_from, smp_int *quota) { /* Grab the keys */ /* Grab the origin */ /* Verify that all the keys are matching the origin */ /* Init the engine */ yassert(zone != NULL && context != NULL); /* Ensure the context is harmless */ ZEROMEMORY(context, sizeof(rrsig_context_s)); context->rrs.offset = -1; /* */ if(engine_name == NULL) { /* NOTE : engine_name CANNOT be a constant until I get rid of strtok_r */ /* engine_name = DEFAULT_ENGINE_NAME; */ return DNSSEC_ERROR_RRSIG_NOENGINE; } zdb_packed_ttlrdata* dnskey_rr_sll = zdb_record_find(&zone->apex->resource_record_set, TYPE_DNSKEY); if(dnskey_rr_sll == NULL) { return DNSSEC_ERROR_RRSIG_NOZONEKEYS; } context->sig_validity_regeneration_seconds = zone->sig_validity_regeneration_seconds; context->sig_validity_interval_seconds = zone->sig_validity_interval_seconds; context->sig_jitter_seconds = zone->sig_validity_jitter_seconds; context->sig_invalid_first = MAX_S32;//zone->sig_invalid_first; #if RRSIG_DUMP>=1 log_debug5("rrsig: header: sig_validity_interval_seconds=%d", context->sig_validity_interval_seconds); log_debug5("rrsig: header: sig_jitter_seconds=%d", context->sig_jitter_seconds); log_debug5("rrsig: header: sig_invalid_first=%d", context->sig_invalid_first); #endif /* We got a list of key records */ zdb_packed_ttlrdata* key = dnskey_rr_sll; char zone_dnsname[MAX_DOMAIN_LENGTH + 1]; dnsname_to_cstr(zone_dnsname, zone->origin); do { ya_result return_value; u8 algorithm = DNSKEY_ALGORITHM(*key); u16 tag = DNSKEY_TAG(*key); u16 flags = DNSKEY_FLAGS(*key); dnssec_key* priv_key; // from disk or from global keyring return_value = dnssec_key_load_private(algorithm, tag, flags, zone_dnsname, &priv_key); if(priv_key != NULL) { /* We can sign with this key : chain it * */ dnssec_key_sll* node; /* * This will be used in an MT environment. */ #if ALLOW_ZALLOC != 0 ZALLOC_OR_DIE(dnssec_key_sll*, node, dnssec_key_sll, DNSSEC_KEY_SLL_TAG); #else MALLOC_OR_DIE(dnssec_key_sll*, node, sizeof (dnssec_key_sll), DNSSEC_KEY_SLL_TAG); #endif node->next = context->key_sll; node->key = priv_key; context->key_sll = node; } else { /** * We cannot sign with this key * * Get the public version for signature verification */ log_warn("rrsig: no private key found for DNSKEY '%s' %{dnsname} algorithm %d tag=%05d flags=%3d: %r", zone_dnsname, zone->origin, algorithm, tag, flags, return_value); dnssec_key *public_key; if(ISOK(return_value = dnskey_load_public(&key->rdata_start[0], key->rdata_size, zone_dnsname, &public_key))) { dnssec_key_sll* node; #if ALLOW_ZALLOC != 0 ZALLOC_OR_DIE(dnssec_key_sll*, node, dnssec_key_sll, DNSSEC_KEY_SLL_TAG); #else MALLOC_OR_DIE(dnssec_key_sll*, node, sizeof(dnssec_key_sll), DNSSEC_KEY_SLL_TAG); #endif node->next = context->key_sll; node->key = public_key; context->key_sll = node; } else { log_err("rrsig: no public key found for DNSKEY '%s' %{dnsname} algorithm %d tag=%05d flags=%3d: %r", zone_dnsname, zone->origin, algorithm, tag, flags, return_value); } } key = key->next; } while(key != NULL); if(context->key_sll == NULL) { /* No key available at all : nothing to do. * * Later we will still be able to do verification with the public keys * we found, and cleanup based on time. But that's later ... */ return DNSSEC_ERROR_RRSIG_NOUSABLEKEYS; } soa_rdata soa; if(FAIL(zdb_zone_getsoa(zone, &soa))) { return DNSSEC_ERROR_RRSIG_NOSOA; } context->loose_quota = quota; ptr_vector_init(&context->rrs); context->zclass = zdb_zone_getclass(zone); context->original_ttl = soa.minimum; context->valid_from = sign_from; context->origin = zone->origin; context->origin_len = dnsname_len(zone->origin); dnsname_to_dnsname_stack(zone->origin, &context->rr_dnsname); context->rr_dnsname_len = dnsname_len(zone->origin); context->label_depth = context->rr_dnsname.size + 1; U8_AT(context->rrsig_header[ 3]) = context->label_depth; SET_U32_AT(context->rrsig_header[ 4], htonl(context->original_ttl)); SET_U32_AT(context->rrsig_header[ 8], 0); SET_U32_AT(context->rrsig_header[12], htonl(context->valid_from)); context->rrsig_header_length = dnsname_copy(&context->rrsig_header[RRSIG_RDATA_HEADER_LEN], zone->origin) + RRSIG_RDATA_HEADER_LEN; context->engine = dnssec_loadengine(engine_name); if(zdb_zone_is_nsec3(zone)) { if(zdb_zone_is_nsec3_optin(zone)) { context->nsec_flags = RRSIG_CONTEXT_NSEC3; } else { context->nsec_flags = RRSIG_CONTEXT_NSEC3_OPTOUT; } } else { context->nsec_flags = RRSIG_CONTEXT_NSEC; } u32 min_ttl = 900; zdb_zone_getminttl(zone, &min_ttl); context->min_ttl = min_ttl; return SUCCESS; } /* self-splainatory */ void rrsig_context_destroy(rrsig_context_s *context) { dnssec_key_sll* keys = context->key_sll; while(keys != NULL) { dnssec_key_sll* last_node = keys; keys = keys->next; #if ALLOW_ZALLOC != 0 ZFREE(last_node, dnssec_key_sll); #else free(last_node); #endif } rr_canonize_free(&context->rrs); context->canonised_rrset = NULL; ptr_vector_destroy(&context->rrs); dnssec_unloadengine(context->engine); context->engine = NULL; } /* * Appends a label to the context so it will be processed */ void rrsig_context_push_name_rrsigsll(rrsig_context_s *context, u8* name, zdb_packed_ttlrdata* rrsig_sll) { yassert(context != NULL && name != NULL); /* CANONIZED RR HEADER PRECALC : */ u8 label_dnsname[MAX_DOMAIN_LENGTH]; context->rr_dnsname_processing_apex = (*name == 0); if(!context->rr_dnsname_processing_apex) { dnsname_stack_push_label(&context->rr_dnsname, name); context->rr_dnsname_len += name[0]; } dnsname_stack_to_dnsname(&context->rr_dnsname, label_dnsname); context->label_depth = context->rr_dnsname.size + 1; context->flags = 0; context->rrsig_sll = rrsig_sll; if(context->rrsig_sll != NULL) { context->flags |= HAD_SIGNATURES; } context->added_rrsig_sll = NULL; context->removed_rrsig_sll = NULL; U8_AT(context->rrsig_header[ 3]) = context->label_depth; context->record_header_label_type_class_ttl_length = dnsname_canonize(label_dnsname, context->record_header_label_type_class_ttl); context->canonized_rr_type_offset = context->record_header_label_type_class_ttl_length; context->record_header_label_type_class_ttl_length += 2; SET_U16_AT(context->record_header_label_type_class_ttl[context->record_header_label_type_class_ttl_length], context->zclass); /** @note: NATIVECLASS */ context->record_header_label_type_class_ttl_length += 2; } /* * Called by: * * rrsig_updater_thread * zdb_icmtl_end */ void rrsig_context_push_label(rrsig_context_s *context, zdb_rr_label* label) { yassert(context != NULL && label != NULL); /* CANONIZED RR HEADER PRECALC : */ rrsig_context_push_name_rrsigsll(context, label->name, zdb_record_find(&label->resource_record_set, TYPE_RRSIG)); } /* * Called by: * * rrsig_updater_thread * zdb_icmtl_end */ void rrsig_context_pop_label(rrsig_context_s *context) { if(!context->rr_dnsname_processing_apex) { context->rr_dnsname_len -= context->rr_dnsname.labels[context->rr_dnsname.size][0]; dnsname_stack_pop_label(&context->rr_dnsname); } // yassert(context->rr_dnsname_len >= 0); context->rrsig_sll = NULL; context->added_rrsig_sll = NULL; context->removed_rrsig_sll = NULL; } void rrsig_context_set_key(rrsig_context_s *context, dnssec_key* key) { yassert(key != NULL); /* ONLY THE TYPE CHANGES IN THE TWO FOLLOWING CANONIZED HEADERS : */ /* We already got a canonized rrsig * We only need to update the key algorithm and tag */ \ U8_AT(context->rrsig_header[ 2]) = key->algorithm; SET_U16_AT(context->rrsig_header[16], htons(key->tag)); //context->rrsig_header_length = dnsname_copy(&context->rrsig_header[RRSIG_RDATA_HEADER_LEN], key->owner_name) + RRSIG_RDATA_HEADER_LEN; } static u32 rrsig_compute_digest(u8 * restrict rrsig_header, u32 rrsig_header_length, u8 * restrict record_header_label_type_class_ttl, u32 record_header_label_type_class_ttl_length, ptr_vector* canonized_rr, u8 * restrict digest_out) { /** * Only supported digest is SHA1 because we do RSA-SHA1 or DSA-SHA1 * @todo: Other digests ... later */ assert( (offsetof(zdb_canonized_packed_ttlrdata, rdata_start) - offsetof(zdb_canonized_packed_ttlrdata, rdata_canonized_size)) == 2 ); digest_s ctx; dnskey_digest_init(&ctx, rrsig_header[2]); /* * Add the rrsig (except the signature) to the digest. * * NOTE: This is true only at generation : * * Only the type of the rrsig changes in this loop, so I computed * the rest of the header just before, once. * * NOTE: At verification I have to put up with anything that's in the * signature's field (could be virtually anything) * */ #if RRSIG_DUMP>=2 log_debug5("rrsig: header:"); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG5, rrsig_header, rrsig_header_length, 32, OSPRINT_DUMP_HEXTEXT); #endif /* * Type covered | algorithm | labels | original_ttl | exp | inception | tag | origin * */ digest_update(&ctx, rrsig_header, rrsig_header_length); /* For EACH rr, canonization-order : * * digest the label (full dns name, canonized : FIXED) * digest the type (16 bits, Big Endian a.k.a network endian : LOOP-DEPENDENT) * digest the class (16 bits, BE, : FIXED) * digest the ttl (32 bits, BE : FIXED) * + * digest the rdata length (16 bits, BE : LOOP-DEPENDENT) * digest the rdata, with canonized full dns names ( variable : LOOP-DEPENDENT) * * * Since only the type change in the header part of the canonized rr, I've computer * the rest of the header just before, once. * * The rdata_size + rdata are canonized * (They are sorted by rdata according to the rules in the rfc4034) * * I'm using the standard qsort to do this. * * Compute the digest on the canonized rrs */ /* NOTE : this is a counter : it's not used as an offset in the array. * * The "offset" field of the ptr_vector is the last used slot, so effectively * the size-1 of its payload. */ s32 n = canonized_rr->offset; zdb_canonized_packed_ttlrdata** rdatap = (zdb_canonized_packed_ttlrdata**)canonized_rr->data; while(n-- >= 0) { zdb_canonized_packed_ttlrdata* rdata = *rdatap; /* * owner | type | class */ #if RRSIG_DUMP>=2 log_debug5("rrsig: record header:"); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG5, record_header_label_type_class_ttl, record_header_label_type_class_ttl_length, 32, OSPRINT_DUMP_HEXTEXT); #endif digest_update(&ctx, record_header_label_type_class_ttl, record_header_label_type_class_ttl_length); /* * ttl */ #if RRSIG_DUMP>=2 log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG5, &rrsig_header[4], 4, 32, OSPRINT_DUMP_HEXTEXT); #endif digest_update(&ctx, &rrsig_header[4], 4); /* * rdata+ , canonical order */ #if RRSIG_DUMP>=2 log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG5, &rdata->rdata_canonized_size, rdata->rdata_size + 2, 32, OSPRINT_DUMP_HEXTEXT); #endif digest_update(&ctx, &rdata->rdata_canonized_size, rdata->rdata_size + 2); /* I used to free the rdata here. I cannot do this anymore since * the digest could be recomputed with slight variations */ rdatap++; } /* * Retrieve the digest */ u32 digest_len = digest_get_size(&ctx); digest_final(&ctx, digest_out, digest_get_size(&ctx)); #if RRSIG_DUMP!=0 log_debug5("rrsig: digest:"); log_memdump_ex(MODULE_MSG_HANDLE, MSG_DEBUG5, digest_out, digest_len, 32, OSPRINT_DUMP_HEX); #endif return digest_len; } static void rrsig_context_append_delete_signature(rrsig_context_s *context, zdb_packed_ttlrdata* rrsig) { zdb_packed_ttlrdata* rrsig_clone; MALLOC_OR_DIE(zdb_packed_ttlrdata*, rrsig_clone, ZDB_RECORD_SIZE(rrsig), RRSIG_TTLRDATA_TAG); rrsig_clone->ttl = rrsig->ttl; rrsig_clone->rdata_size = rrsig->rdata_size; MEMCOPY(rrsig_clone->rdata_start, rrsig->rdata_start, rrsig->rdata_size); rrsig_clone->next = context->removed_rrsig_sll; context->removed_rrsig_sll = rrsig_clone; } static void rrsig_context_update_canon(rrsig_context_s *context, u16 rtype, zdb_packed_ttlrdata *rrset) { if(context->canonised_rrset != rrset) { rr_canonize_free(&context->rrs); /* copy, canonize labels & sort the RRs */ rr_canonize_rrset(rtype, rrset, &context->rrs); context->canonised_rrset = rrset; } } static bool rrsig_verify_signature(rrsig_context_s *context, dnssec_key* key, zdb_packed_ttlrdata* rrsig, zdb_packed_ttlrdata *rrset) { u8 digest[DIGEST_BUFFER_SIZE]; u8* rrsig_name = &rrsig->rdata_start[RRSIG_RDATA_HEADER_LEN]; /* * The owner of the signature must match the owner or the RRSIG */ #if RRSIG_DUMP != 0 rdata_desc rdatadesc={TYPE_RRSIG, ZDB_PACKEDRECORD_PTR_RDATASIZE(rrsig), ZDB_PACKEDRECORD_PTR_RDATAPTR(rrsig)}; log_debug("rrsig: verify: %{dnsnamestack} %{typerdatadesc}", &context->rr_dnsname, &rdatadesc); #endif if(dnsname_equals(rrsig_name, context->origin)) { /* * The digest for this signature could be different than the one I * would compute (ttl, inception, expiration) * * The type-covered, labels & key-tag should be the same */ #if RRSIG_DUMP!=0 u16 type = RRSIG_TYPE_COVERED(rrsig); log_debug5("rrsig: verify: %{dnsnamestack}(%d) %{dnstype} %05d", &context->rr_dnsname, context->label_depth, &type, key->tag); #endif time_t now = time(NULL); u32 valid_until = RRSIG_VALID_UNTIL(rrsig); if(valid_until < now) { /* * Expired signature */ #if RRSIG_DUMP!=0 u16 type = RRSIG_TYPE_COVERED(rrsig); log_debug5("rrsig: verify: -- EXPIRED at %d (%d ago)", valid_until, now - valid_until); #endif return FALSE; } // skip the verification if(!context->do_verify_signatures) { context->good_signatures++; context->sig_invalid_first = MIN(valid_until, context->sig_invalid_first); return TRUE; } /* * Update canonised */ u16 rtype = RRSIG_TYPE_COVERED(rrsig); rrsig_context_update_canon(context, rtype, rrset); /* * The length of the header in the RRSIG */ u32 rrsig_start_len = RRSIG_RDATA_HEADER_LEN + context->origin_len; u32 digest_len = rrsig_compute_digest(rrsig->rdata_start, rrsig_start_len, context->record_header_label_type_class_ttl, context->record_header_label_type_class_ttl_length, &context->rrs, digest); u8* signature = &rrsig->rdata_start[rrsig_start_len]; u32 signature_len = ZDB_PACKEDRECORD_PTR_RDATASIZE(rrsig) - rrsig_start_len; #if RRSIG_DUMP>=2 log_debug5("rrsig: signature record:"); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG5, rrsig->rdata_start, rrsig->rdata_size, 32, OSPRINT_DUMP_HEXTEXT); log_debug5("rrsig: signature to verify:"); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG5, signature, signature_len, 32, OSPRINT_DUMP_HEXTEXT); log_debug5("rrsig: verifying digest:"); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG5, digest, digest_len, 32, OSPRINT_DUMP_HEXTEXT); #endif /** * @todo: Verifying the digest is useless if it has already been verified once here already * And said digest only needs to be verified if it comes from a zone file or dynupdate */ if(key->vtbl->dnssec_key_verify_digest(key, digest, digest_len, signature, signature_len)) { #if RRSIG_DUMP!=0 log_debug5("rrsig: verify: -- OK"); #endif /* GOOD SIGNATURE : Nothing to do here : process the next type */ context->good_signatures++; /* Already signed, and signature is valid */ #if RRSIG_DUMP!=0 log_debug5("rrsig: verify: -- OK, first invalid at = %d (%d,%d)", MIN(valid_until, context->sig_invalid_first), valid_until, context->sig_invalid_first); #endif context->sig_invalid_first = MIN(valid_until, context->sig_invalid_first); return TRUE; } #if RRSIG_DUMP!=0 log_debug5("rrsig: verify: -- WRONG"); #endif context->wrong_signatures++; } #if RRSIG_DUMP!=0 log_debug5("rrsig: verify: -- ERR"); #endif /* WRONG SIGNATURE : The caller will have to remove it */ return FALSE; } /** @todo: Loop through the keys AFTER having computed the digest */ ya_result rrsig_update_records(rrsig_context_s *context, dnssec_key* key, zdb_packed_ttlrdata* rr_sll, u16 type, bool do_update) { do_update &= dnssec_key_is_private(key); /******************************************************************* * COMPUTE THE DIGEST (Always needed) ******************************************************************/ /* Update the type */ SET_U16_AT(context->rrsig_header[0], type); /** @note: NATIVETYPE */ /* Update the type */ SET_U16_AT(context->record_header_label_type_class_ttl[context->canonized_rr_type_offset], type); /** @note: NATIVETYPE */ /******************************************************************* * Find & Verify the signature (IF ANY) ******************************************************************/ /* Look into rrsig records for one that covers the current type */ zdb_packed_ttlrdata *rrsig = context->rrsig_sll; //zdb_packed_ttlrdata* rrsig_prev = NULL; /* I could need to detach the node from the list */ /** * While I've got signatures records * * @todo: NOTE: More than one signature can be made with a given key (I presume) * This means I cannot stop at the first match but I have to test them all ... * */ #if RRSIG_DUMP!=0 log_debug(">> ------------------------------------------------------------------------"); log_debug("rrsig: verifying %{dnsnamestack} %{dnstype}", &context->rr_dnsname, &type); #endif u32 now = time(NULL); u32 sig_count = 0; if(context->sig_invalid_first == 0) { context->sig_invalid_first = MAX_U32; } bool type_signed = FALSE; bool deleted_already = FALSE; u32 until = 0; dnssec_key_get_tag(key); // updates the tag field if needed while(rrsig != NULL) { u16 tag = RRSIG_KEY_TAG(rrsig); if(tag == key->tag) { /* If I've found the rrsig associated to the current type, I break */ if(RRSIG_TYPE_COVERED(rrsig) == type) { /* Got a signature: * * The goal is to remove it if it is wrong or expired * */ bool valid_signature; valid_signature = rrsig_verify_signature(context, key, rrsig, rr_sll); type_signed |= valid_signature; if(!valid_signature) { #if RRSIG_DUMP!=0 log_debug5("rrsig: delete wrong or expired signature"); #endif if(do_update) { rrsig_context_append_delete_signature(context, rrsig); deleted_already = TRUE; } } else { /* * It is not wrong but maybe it is time to make a new one ... * */ /* This key is still a candidate on the "next update event" list */ until = MAX(until, RRSIG_VALID_UNTIL(rrsig)); } } } //rrsig_prev = rrsig; rrsig = rrsig->next; } /* * "until" is the oldest signature validity for this record set made by this key * * If this until is too close, then generate a new signature. */ context->sig_invalid_first = MIN(until, context->sig_invalid_first); if(do_update && !type_signed) { if(until < now + context->sig_validity_regeneration_seconds) { type_signed = FALSE; if((rrsig != NULL) && (!deleted_already)) { rrsig_context_append_delete_signature(context, rrsig); } } /* * This should only be executed if: * * _ There are no RRSIG for this type * _ The RRSIG are soon to be expired (ie: less than 1 week) * * _ Type is not SOA: SOA should only be updated at the end of the change * */ #if RRSIG_DUMP!=0 log_debug5("rrsig: create: %{dnsnamestack}(%d) %{dnstype} %05d", &context->rr_dnsname, context->label_depth, &type, key->tag); #endif u32 valid_until; if(context->sig_jitter_seconds > 0) { random_ctx rndctx = thread_pool_get_random_ctx(); u32 jitter = random_next(rndctx) % context->sig_jitter_seconds; valid_until = now + context->sig_validity_interval_seconds + jitter; SET_U32_AT(context->rrsig_header[8], htonl(valid_until)); #if RRSIG_DUMP!=0 log_debug5("rrsig: sig_invalid_first = %d (%d ?) (jitter)", context->sig_invalid_first, valid_until); #endif } else { valid_until = ntohl(GET_U32_AT(context->rrsig_header[8])); #if RRSIG_DUMP!=0 log_debug5("rrsig: sig_invalid_first = %d (%d ?) (no jitter)", context->sig_invalid_first, valid_until); #endif } /** * @TODO: context->sig_invalid_first must be updated, and then the zone->sig_invalid_first too, when it's done. */ context->sig_invalid_first = MIN(valid_until, context->sig_invalid_first); #if RRSIG_DUMP!=0 log_debug5("rrsig: create: computing digest"); #endif rrsig_context_update_canon(context, type, rr_sll); u32 digest_len; u32 signature_len; u8 digest[DIGEST_BUFFER_SIZE]; u8 signature[DNSSEC_MAXIMUM_KEY_SIZE_BYTES]; digest_len = rrsig_compute_digest(context->rrsig_header, context->rrsig_header_length, context->record_header_label_type_class_ttl, context->record_header_label_type_class_ttl_length, &context->rrs, digest); #if RRSIG_DUMP>2 log_debug5("rrsig: signing digest:"); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG5, digest, digest_len, 32, OSPRINT_DUMP_HEXTEXT); #endif signature_len = key->vtbl->dnssec_key_sign_digest(key, digest, digest_len, signature); yassert(signature_len > 0); /* We got the signature. */ #if RRSIG_DUMP>=2 log_debug5("rrsig: signature:"); log_memdump(MODULE_MSG_HANDLE, MSG_DEBUG5, signature, signature_len, 32, OSPRINT_DUMP_HEXTEXT); log_debug5("<< ------------------------------------------------------------------------"); #endif ZDB_RECORD_MALLOC_EMPTY(rrsig, context->original_ttl, context->rrsig_header_length + signature_len); /* Copy the header */ MEMCOPY(&rrsig->rdata_start[0], context->rrsig_header, context->rrsig_header_length); /* Append the signature */ MEMCOPY(&rrsig->rdata_start[context->rrsig_header_length], signature, signature_len); /* Add to the schedule "to be added" list */ rrsig->next = context->added_rrsig_sll; context->added_rrsig_sll = rrsig; context->flags |= UPDATED_SIGNATURES; sig_count++; } else { // NOP } return sig_count; /* Signed */ } ya_result rrsig_update_label_rrset(rrsig_context_s *context, zdb_rr_label* label, u16 rrset_type) /* Maybe It's a dup*/ { yassert(context != NULL); if(rrset_type == TYPE_ANY) { ya_result return_code = rrsig_update_label(context, label); rrsig_context_update_quota(context, return_code); return return_code; } ya_result ret = DNSSEC_ERROR_RRSIG_NOSIGNINGKEY; /* No signing key */ s32 sig_count = 0; /* Get the first key (container) */ dnssec_key_sll* key_sll; zdb_packed_ttlrdata* records_sll = zdb_record_find(&label->resource_record_set, rrset_type); bool delegation = ZDB_LABEL_ATDELEGATION(label); /* While we have signing keys ... */ for(key_sll = context->key_sll; key_sll != NULL; key_sll = key_sll->next) { /* Take the real key from the key container */ dnssec_key* key = key_sll->key; rrsig_context_set_key(context, key); /* Get all the signatures on this label (NULL if there are no signatures) */ /* Sign every resource record */ /* * If the query has been marked "delegation" we only can sign the * DS record * * ie: avoid glue records, non-auth, ... * */ if(!delegation) { if(key->flags == (DNSKEY_FLAG_ZONEKEY | DNSKEY_FLAG_KEYSIGNINGKEY)) { /* KSK */ if(rrset_type != TYPE_DNSKEY) { #if RRSIG_DUMP>=3 log_debug5("rrsig: skipping : KSK of !DNSKEY (%{dnstype}/%{dnslabel}.%{dnsnamestack})", &rrset_type, label, &context->rr_dnsname); #endif continue; } } else if(key->flags == DNSKEY_FLAG_ZONEKEY) { if(rrset_type == TYPE_RRSIG) { #if RRSIG_DUMP>=3 log_debug5("rrsig: skipping ; ZSK of RRSIG (%{dnstype}/%{dnslabel}.%{dnsnamestack})", &rrset_type, label, &context->rr_dnsname); #endif continue; } } else { #if RRSIG_DUMP>=3 log_debug5("rrsig: skipping : unsupported key type (%{dnstype}/%{dnslabel}.%{dnsnamestack})", &rrset_type, label, &context->rr_dnsname); #endif continue; } } else /* delegation */ { if((rrset_type != TYPE_DS) || (key->flags != DNSKEY_FLAG_ZONEKEY)) { #if RRSIG_DUMP>=3 log_debug5("rrsig: skipping : delegation (%{dnstype}/%{dnslabel}.%{dnsnamestack})", &rrset_type, label, &context->rr_dnsname); #endif continue; } } /* * Get the right RRSIG for the type */ if(FAIL(ret = rrsig_update_records(context, key, records_sll, rrset_type, TRUE))) { break; } sig_count += ret; } /* Loop for the next key */ /* Inject the signatures back */ if(ISOK(ret)) { ret = sig_count; } return ret; } ya_result rrsig_update_label(rrsig_context_s *context, zdb_rr_label* label) { yassert(context != NULL); if(context->key_sll == NULL) { /* nothing to do */ return DNSSEC_ERROR_RRSIG_NOSIGNINGKEY; } u8 nsec_flags = context->nsec_flags; //bool at_apex = (label->name[0] == 0); /* Get all the signatures on this label (NULL if there are no signatures) */ /** * If there are signatures here: * Verify the expiration time : * * If it is expired, then destroy it (mark them for destruction) * * If it will expire soon AND we are supposed to work on the type AND we have the private key available, * then remove it * * Don't forget to set UPDATED_SIGNATURES if any change is made */ /* Sign relevant resource records */ s32 sig_count = 0; if(!ZDB_LABEL_UNDERDELEGATION(label)) { btree_iterator iter; btree_iterator_init(label->resource_record_set, &iter); /* Sign only APEX and DS records at delegation */ while(btree_iterator_hasnext(&iter)) { btree_node* rr_node = btree_iterator_next_node(&iter); u16 type = (u16)rr_node->hash; /* cannot sign a signature */ if(type == TYPE_RRSIG) { continue; } for(dnssec_key_sll* key_sll = context->key_sll; key_sll != NULL; key_sll = key_sll->next) { /* Take the real key from the key container */ dnssec_key* key = key_sll->key; rrsig_context_set_key(context, key); /* can the key sign this kind of record */ if(key->flags == (DNSKEY_FLAG_ZONEKEY | DNSKEY_FLAG_KEYSIGNINGKEY)) { /* KSK can only sign a DNSKEY */ if(type != TYPE_DNSKEY) { #if RRSIG_DUMP>=3 log_debug5("rrsig: skipping : KSK of !DNSKEY (%{dnstype}/%{dnslabel}.%{dnsnamestack})", &type, label->name, &context->rr_dnsname); #endif continue; } } else if(key->flags == DNSKEY_FLAG_ZONEKEY) { /* ZSK should not sign a DNSKEY */ if(type == TYPE_DNSKEY) { #if RRSIG_DUMP>=3 log_debug5("rrsig: skipping ; ZSK of RRSIG (%{dnstype}/%{dnslabel}.%{dnsnamestack})", &type, label->name, &context->rr_dnsname); #endif continue; } /* if not at apex then only sign the DS */ switch(nsec_flags) { case RRSIG_CONTEXT_NSEC3_OPTOUT: { if(ZDB_LABEL_ATDELEGATION(label)) { if(type != TYPE_DS) { continue; /* only sign DS & NSEC at delegation */ } } else { /* sign everything else */ } break; } case RRSIG_CONTEXT_NSEC3: { /* sign everything not filtered out yet */ break; } case RRSIG_CONTEXT_NSEC: { /* sign everything not filtered out yet */ if(ZDB_LABEL_ATDELEGATION(label)) { if((type != TYPE_DS) && (type != TYPE_NSEC)) { continue; /* only sign DS & NSEC at delegation */ } } else { /* sign everything else */ } break; } } } else { /* key type is not supported */ continue; } /* * Get the right RRSIG for the type */ zdb_packed_ttlrdata* rr_sll = (zdb_packed_ttlrdata*)rr_node->data; ya_result return_code; if(FAIL(return_code = rrsig_update_records(context, key, rr_sll, type, type != TYPE_SOA))) { return return_code; } sig_count += return_code; } /* for every key */ } } else { /* destroy all signatures */ log_debug("rrsig: destroy: %{dnsnamestack} %04x", &context->rr_dnsname, label->flags); zdb_packed_ttlrdata* rrsig_sll = zdb_record_find(&label->resource_record_set, TYPE_RRSIG); while(rrsig_sll != NULL) { #if RRSIG_DUMP>=3 log_debug5("rrsig: destroying illegaly placed signatures (%{dnslabel}.%{dnsnamestack})", &type, label->name, &context->rr_dnsname); #endif rrsig_context_append_delete_signature(context, rrsig_sll); rrsig_sll = rrsig_sll->next; } } /* All the signatures for this label have been processed. */ return sig_count; } /** * Takes the result of an update and commits it to the label * * @todo Have an alternative function using the scheduler. */ void rrsig_update_commit(zdb_packed_ttlrdata* removed_rrsig_sll, zdb_packed_ttlrdata* added_rrsig_sll, zdb_rr_label* label, zdb_zone* zone, dnsname_stack* name) { /* * NOTE: This is the only place where I can access the zone signature invalidation update properly * I have to tell to the alarm: update your signature alarm clock so that the zone for name is updated * * NOTE: NSEC3 records have not associated label. (Not really) * * NOTE: There is a listener hook in here. * */ /** * @todo: fetch the zone from the name, then update the invalidation using the added signatures */ #if RRSIG_DUMP>=3 log_debug("rrsig: updating: %{dnsnamestack}", name); #endif if((removed_rrsig_sll == NULL) && (added_rrsig_sll == NULL)) { #if RRSIG_DUMP>=3 log_debug("rrsig: updating: nothing to do for %{dnsnamestack}", name); #endif return; } #if ZDB_CHANGE_FEEDBACK_SUPPORT != 0 // notify the journal zdb_listener_notify_update_rrsig(zone, removed_rrsig_sll, added_rrsig_sll, label, name); #endif zdb_packed_ttlrdata* sig; zdb_packed_ttlrdata** rrsig_sllp = zdb_record_find_insert(&label->resource_record_set, TYPE_RRSIG); /* FB handled separately */ #ifdef DEBUG zdb_packed_ttlrdata** rrsig_sllp_check = rrsig_sllp; #endif /* * For each removed signature: * * Find it in the label's RRSIG list, then remove it: * ZFREE + MFREE * */ sig = removed_rrsig_sll; while(sig != NULL) { /* * Look for the RRSIG * */ zdb_packed_ttlrdata** rrsig_recordp = rrsig_sllp; zdb_packed_ttlrdata *rrsig_record = *rrsig_recordp; #ifdef DEBUG rdata_desc rdatadesc={TYPE_RRSIG, ZDB_PACKEDRECORD_PTR_RDATASIZE(sig), ZDB_PACKEDRECORD_PTR_RDATAPTR(sig)}; log_debug("rrsig: updating: deleting: %{dnsnamestack} %{typerdatadesc}", name, &rdatadesc); #endif /* This is why my "next" pointer is ALWAYS the first field */ bool warning = TRUE; while(rrsig_record != NULL) { /* * Check if the COVERED TYPE + TAG are matching */ if(ZDB_PACKEDRECORD_PTR_RDATASIZE(sig) == ZDB_PACKEDRECORD_PTR_RDATASIZE(sig)) { if(memcmp(ZDB_PACKEDRECORD_PTR_RDATAPTR(rrsig_record), ZDB_PACKEDRECORD_PTR_RDATAPTR(sig), RRSIG_RDATA_HEADER_LEN) == 0) { /* remove it from the chain */ *rrsig_recordp = rrsig_record->next; #ifdef DEBUG rrsig_record->next = (zdb_packed_ttlrdata*)~0; #endif ZDB_RECORD_ZFREE(rrsig_record); warning = FALSE; /* * I can stop here. */ break; } } rrsig_recordp = &rrsig_record->next; rrsig_record = *rrsig_recordp; } if(warning) { rdata_desc rdatadesc={TYPE_RRSIG, ZDB_PACKEDRECORD_PTR_RDATASIZE(sig), ZDB_PACKEDRECORD_PTR_RDATAPTR(sig)}; log_warn("rrsig: signature scheduled for delete not found: [%d] %{dnsnamestack} %{typerdatadesc}", ZDB_PACKEDRECORD_PTR_RDATASIZE(sig), name, &rdatadesc); } zdb_packed_ttlrdata* tmp = sig; sig = sig->next; free(tmp); } /* * For each added signature: * * Add it: * * ZFREE + MFREE * */ sig = added_rrsig_sll; while(sig != NULL) { zdb_packed_ttlrdata* rrsig_record; u8* rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(sig); u32 rdata_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(sig); #ifdef DEBUG rdata_desc rdatadesc={TYPE_RRSIG, rdata_size, rdata}; log_debug5("rrsig: updating: adding: %{dnsnamestack} %{typerdatadesc}", name, &rdatadesc); #endif /* Handle signature invalidation time */ #if RRSIG_AUTOMATIC_ALARM_REFRESH u32 valid_until = MIN(RRSIG_VALID_UNTIL(rrsig_record), zone->sig_invalid_first); if(zone->sig_invalid_first > valid_until) { /** * @todo Change the resign time for this zone to valid_until */ #if RRSIG_DUMP!=0 log_debug("rrsig: updating: changing signature invalidation from %d to %d", zone->sig_invalid_first, valid_until); #endif zone->sig_invalid_first = valid_until; alarm_event_node *event = alarm_event_alloc(); event->epoch = zone->sig_invalid_first; event->function = zdb_update_zone_signatures_alarm; event->args = zone; event->key = ALARM_KEY_ZONE_SIGNATURE_UPDATE; event->flags = ALARM_DUP_REMOVE_LATEST; event->text = "zdb_update_zone_signatures_alarm"; alarm_set(zone->alarm_handle, event); } #else #endif /**/ ZDB_RECORD_ZALLOC(rrsig_record, sig->ttl, rdata_size, rdata); /* Insert */ rrsig_record->next = *rrsig_sllp; *rrsig_sllp = rrsig_record; zdb_packed_ttlrdata* tmp = sig; sig = sig->next; free(tmp); } /* * If the head of the list is NULL */ if(*rrsig_sllp == NULL) { /* * Note : the RRSIG CANNOT be the last type on the label. * * When deleting a record of a given type from a label, * the associated RRSIG MUST be removed first. * * In order to accommodate an structure error, the caller could check * if the label is still relevant, and do a cleanup if required. */ #if RRSIG_DUMP!=0 log_debug5("rrsig: removing obsolete RRSIG node", label); #endif #ifdef DEBUG yassert(*rrsig_sllp_check == NULL); #endif zdb_record_delete(&label->resource_record_set, TYPE_RRSIG); /* FB handled separately */ } } /** * * Returns the first RRSIG record that applies to the give type. * * @param label the label where to do the search * @param covered_type the type covered by the RRSIG * * @return the first RRSIG covering the type or NULL */ zdb_packed_ttlrdata* rrsig_find_first(const zdb_rr_label* label, u16 type) { zdb_packed_ttlrdata* rrsig = zdb_record_find(&label->resource_record_set, TYPE_RRSIG); while(rrsig != NULL) { if(RRSIG_TYPE_COVERED(rrsig) == type) { return rrsig; } rrsig = rrsig->next; } return NULL; } /** * * Returns the next RRSIG record that applies to the give type. * * @param rrsig the previous RRSIG covering the type * @param covered_type the type covered by the RRSIG * * @return covered_type the next RRSIG covering the type or NULL */ zdb_packed_ttlrdata* rrsig_find_next(const zdb_packed_ttlrdata* rrsig, u16 type) { rrsig = rrsig->next; while(rrsig != NULL) { if(RRSIG_TYPE_COVERED(rrsig) == type) { return (zdb_packed_ttlrdata*)rrsig; } rrsig = rrsig->next; } return NULL; } /** * * Removes all the RRSIG covering the type * * @param dname the fqdn of the label * @param label the label * @param covered_type the type covered by the RRSIG */ void rrsig_delete(const zdb_zone *zone, const u8 *dname, zdb_rr_label* label, u16 type) { /* * zdb_packed_ttlrdata** prev = zdb_record_findp(&label->resource_record_set, TYPE_RRSIG); * * => * */ zdb_packed_ttlrdata** first = (zdb_packed_ttlrdata**)btree_findp(&label->resource_record_set, TYPE_RRSIG); if(first == NULL) { return; } zdb_packed_ttlrdata** prev = first; zdb_packed_ttlrdata* rrsig = *prev; while(rrsig != NULL) { if(RRSIG_TYPE_COVERED(rrsig) == type) { if(zdb_listener_notify_enabled()) { zdb_ttlrdata unpacked_ttlrdata; unpacked_ttlrdata.ttl = rrsig->ttl; unpacked_ttlrdata.rdata_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(rrsig); unpacked_ttlrdata.rdata_pointer = ZDB_PACKEDRECORD_PTR_RDATAPTR(rrsig); zdb_listener_notify_remove_record(zone, dname, TYPE_RRSIG, &unpacked_ttlrdata); } /* */ if(prev == first && rrsig->next == NULL) /* Only one RRSIG: proper removal and delete */ { zdb_record_delete(&label->resource_record_set, TYPE_RRSIG); break; } else { *prev = rrsig->next; /* More than one RRSIG: unchain and delete */ ZDB_RECORD_ZFREE(rrsig); rrsig = *prev; if(rrsig == NULL) { break; } } } prev = &(*prev)->next; rrsig = rrsig->next; } } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/avl.c0000644000077100007710000000012412650131756017717 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.421344 30 ctime=1454597652.286344534 yadifa-2.1.6-5826/lib/dnsdb/src/avl.c0000664000077100007710000010245112650131756017527 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief AVL structure and functions * * AVL structure and functions * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #define DEBUG_LEVEL 0 #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include "dnsdb/zdb_error.h" #include #if 0 /* fix */ #else #define DUMP_NODE(...) #endif #include "dnsdb/avl.h" /* This should be closer to 40 */ #define MAX_DEPTH 40 /* 64 */ /* * The following macros are defining relevant fields in the node */ #define LEFT_CHILD(node) ((node)->children.lr.left) #define RIGHT_CHILD(node) ((node)->children.lr.right) #define CHILD(node,id) ((node)->children.child[(id)]) #define BALANCE(node) ((node)->balance) /* * The following macros are defining relevant operations in the node */ /* What is used to compare the nodes */ #define REFERENCE_TYPE hashcode #define INIT_NODE(node,reference) (node)->hash=(reference);(node)->data=NULL #define REFERENCE(node) (node)->hash /* Compare two references */ #define BIGGER(reference_a,reference_b) (reference_a)>(reference_b) /* What is returned when a node is created/found */ #define DATA(node) (node)->data #define DATAPTR(node) &(node)->data /* Copies the payload of a node (not the balance + pointers) */ #define COPY_PAYLOAD(node_trg,node_src) (node_trg)->data = (node_src)->data; (node_trg)->hash = (node_src)->hash /* * */ #define TOOLEFT -2 #define LEFT -1 #define MIDDLE 0 #define RIGHT 1 #define TOORIGHT 2 #define DIR_LEFT 0 #define DIR_RIGHT 1 #define DIR_CRASH 127 /* #define DIR_TO_BALANCE(dir) (((dir)==0)?LEFT:RIGHT) */ static s8 DIR_TO_BALANCE_[2] = {LEFT, RIGHT}; #define DIR_TO_BALANCE(dir) DIR_TO_BALANCE_[(dir)] /* #define BALANCE_TO_DIR(bal) (((bal)RIGHT)) static inline avl_node* avl_node_single_rotation2(avl_node* node) { avl_node* save; if(BALANCE(node) < 0) /* balance = LEFT -> dir = RIGHT other = LEFT */ { save = LEFT_CHILD(node); LEFT_CHILD(node) = RIGHT_CHILD(save); RIGHT_CHILD(save) = node; } else { save = RIGHT_CHILD(node); RIGHT_CHILD(node) = LEFT_CHILD(save); LEFT_CHILD(save) = node; } BALANCE(node) = MIDDLE; BALANCE(save) = MIDDLE; return save; } static inline avl_node* avl_node_double_rotation2(avl_node* node) { avl_node* save; if(BALANCE(node) < 0) /* balance = LEFT -> dir = RIGHT other = LEFT */ { save = RIGHT_CHILD(LEFT_CHILD(node)); if(BALANCE(save) == MIDDLE) { BALANCE(LEFT_CHILD(node)) = MIDDLE; BALANCE(node) = MIDDLE; } else if(BALANCE(save) > 0) /* dir right & balance right */ { BALANCE(LEFT_CHILD(node)) = LEFT; BALANCE(node) = MIDDLE; } else /* BALANCE(save)<0 */ { BALANCE(LEFT_CHILD(node)) = MIDDLE; BALANCE(node) = RIGHT; } BALANCE(save) = MIDDLE; RIGHT_CHILD(LEFT_CHILD(node)) = LEFT_CHILD(save); LEFT_CHILD(save) = LEFT_CHILD(node); LEFT_CHILD(node) = RIGHT_CHILD(save); RIGHT_CHILD(save) = node; } else /* balance = RIGHT -> dir = LEFT other = RIGHT */ { save = LEFT_CHILD(RIGHT_CHILD(node)); if(BALANCE(save) == MIDDLE) { BALANCE(RIGHT_CHILD(node)) = MIDDLE; BALANCE(node) = MIDDLE; } else if(BALANCE(save) < 0) /* dir left & balance left */ { BALANCE(RIGHT_CHILD(node)) = RIGHT; BALANCE(node) = MIDDLE; } else /* BALANCE(save)>0 */ { BALANCE(RIGHT_CHILD(node)) = MIDDLE; BALANCE(node) = LEFT; } BALANCE(save) = MIDDLE; LEFT_CHILD(RIGHT_CHILD(node)) = RIGHT_CHILD(save); RIGHT_CHILD(save) = RIGHT_CHILD(node); RIGHT_CHILD(node) = LEFT_CHILD(save); LEFT_CHILD(save) = node; } return save; } static avl_node* avl_create_node(hashcode hash) { avl_node* node; ZALLOC_OR_DIE(avl_node*, node, avl_node, AVL_NODE_TAG); LEFT_CHILD(node) = NULL; RIGHT_CHILD(node) = NULL; node->data = NULL; node->hash = hash; BALANCE(node) = MIDDLE; return node; } /* static void avl_destroy_node(avl_node* node) { avl_destroy_node(node); } */ #define avl_destroy_node(node) LDEBUG(9, "avl_destroy_node(%p)\n",node);ZFREE(node,avl_node); /** @brief Initializes the tree * * Initializes the tree. * Basically : *tree=NULL; * * @param[in] tree the tree to initialize * */ void avl_init(avl_tree* tree) { *tree = NULL; } /** @brief Find a node in the tree * * Find a node in the tree matching a hash value. * * @param[in] root the tree to search in * @param[in] obj_hash the hash to find * * @return A pointer to the node or NULL if there is no such node. */ #if ZDB_INLINES_AVL_FIND == 0 void* avl_find(avl_tree* root, hashcode obj_hash) { #if 1 /* NOTE: If I do this in assembly code. I could probably win a few cycles * This is by far the most common call of the DB * NOTE: The compiler's job is very good. */ avl_node* node = *root; hashcode h; /* This is one of the parts I could try to optimize * I've checked the assembly, and it sucks ... */ /* Both the double-test while/ternary and the current one * are producing the same assembly code. */ while(node != NULL) { if((h = node->hash) == obj_hash) { return node->data; } node = CHILD(node, (obj_hash > h)&1); } /*return (node!=NULL)?node->data:NULL;*/ return NULL; #else /* * I would ... * * mov eax,node * test eax,eax ; node==NULL ? * jz exit_null ; YES -> JUMP * mov edx,obj_hash * loop: * cmp edx,[eax+hash_offs] ; node->hash==obj_hash ? * sbb ebx,ebx ; below=>ebx=~0 * jz exit_data ; EQUAL -> JUMP * and ebx,4 ; ebx=0 | 1 (left | right) * mov eax,[eax+child_offs+ebx] ; node=node->child[left|right] * test eax,eax ; node==NULL ? * jnz loop ; NO -> JUMP * exit_null: * ret ; return NULL * exit_data: * mov eax,[eax+data_offs] ; return node->data * ret */ /* NOT DONE YET !!! */ /* x86_64 : RDI = root, ESI = obj_hash */ __asm__ ( "movq (%rdi),%rax\n\t" "testq %rax,%rax\n\t" "jz avl_find_return_null\n\t" "\navl_find_loop:\n\t" "cmpl 16(%rax),%esi\n\t" "jz avl_find_return_data\n\t" "sbbq %rcx,%rcx\n\t" "andq 8,%rcx\n\t" "movq (%rcx,%rax),%rax\n\t" "testq %rax,%rax\n\t" "jnz avl_find_loop\n\t" "\navl_find_return_null:\n\t" #ifdef DEBUG "leave\n\t" #endif "ret\n\t" "\navl_find_return_data:\n\t" "mov 16(%rax),%rax\n\t" #ifdef DEBUG "leave\n\t" #endif "ret\n\t" ); #endif } #endif /** @brief Find a node in the tree * * Find a node in the tree matching a hash value. * This is required for search that could lead to a change to the data. * * @param[in] root the tree to search in * @param[in] obj_hash the hash to find * * @return A pointer to the node or NULL if there is no such node. */ #if ZDB_INLINES_AVL_FIND == 0 void** avl_findp(avl_tree* root, hashcode obj_hash) { avl_node* node = *root; hashcode h; while(node != NULL /* &&((h=node->hash)!=obj_hash) */) { if((h = node->hash) == obj_hash) { return &node->data; } node = CHILD(node, (obj_hash > h)&1); } /* return (node!=NULL)?&node->data:NULL; */ return NULL; } #endif /** @brief Insert a node into the tree. * * Insert data into the tree. * Since hash can have collisions, the data will most likely be a collection * (another tree, a list, ...) * * NOTE: * If the node associated to the hash already exists, it is returned unaltered, * the caller will be responsible to manipulate the node's data. * Else a new node is created, pointing to the data. * * @param[in] root the tree where the insertion should be made * @param[in] obj_hash the hash associated to the data * @param[out] obj the data to insert * * @return The node associated to the hash */ void** avl_insert(avl_tree* root, hashcode obj_hash) { LDEBUG(9, "avl_insert(%p,%08x) ------------------------------\n", root, obj_hash); if(*root == NULL) { *root = avl_create_node(obj_hash); LDEBUG(9, "First node (root) (%p)\n", *root); return &(*root)->data; } avl_node * nodes[MAX_DEPTH]; s8 balances[MAX_DEPTH]; u8 dirs[MAX_DEPTH]; avl_node* node = *root; hashcode node_hash; int level = 0; s8 dir = MIDDLE; while((node != NULL) && (obj_hash != (node_hash = node->hash))) { nodes[level] = node; balances[level] = BALANCE(node); /* DIR_LEFT = 0, DIR_RIGHT = 1 */ dir = (obj_hash > node_hash)&1; node = CHILD(node, dir); dirs[level++] = dir; } LDEBUG(9, "Level = %i\n", level); if(node != NULL) { /* match */ LDEBUG(9, "Got a match\n"); return &node->data; } /* Add a new node to the last one (the parent) */ node = nodes[--level]; /* the parent is node */ avl_node* ret = avl_create_node(obj_hash); CHILD(node, dir) = ret; LDEBUG(9, "Created a new node from %08x, going %i (%p)\n", node->hash, dir, ret); if(BALANCE(node) == MIDDLE) { /* There were no child, now there is one */ /* not balanced anymore */ BALANCE(node) = DIR_TO_BALANCE(dir); /* 0 or 1 => -1 or +1 */ LDEBUG(9, "parent was balanced, now it is not anymore : %i (%i)\n", dir, BALANCE(node)); } else { /* There was a child, now there is two */ /* balance */ BALANCE(node) = MIDDLE; LDEBUG(9, "parent was not balanced, now it is\n"); } avl_node* parent; /* Now I have to update the balance up to the root (if needed ...) * node is m_nodes[level] * we need the parent at m_nodes[level-1] * parent -> node -> (new node/processed node) */ while(level > 0) /* level points to the parent */ { LDEBUG(9, "\tUpdating balance at %i\n", level); if(BALANCE(node) == balances[level]) /* balance of the node */ { /* this branch will exit */ /* The node's balance has not been changed */ return &ret->data; } parent = nodes[level - 1]; /* The node's balance has been changed */ LDEBUG(9, "\t\tBalance of %08x was %i, now it is %i\n", node->hash, balances[level], BALANCE(node)); if(BALANCE(node) == MIDDLE) /* this branch will exit */ { /* BALANCE(node)==MIDDLE and we are balanced * balanced -> done */ LDEBUG(9, "Done (E)\n"); return &ret->data; } /* not balanced (anymore) */ /* Now dir child it is unbalanced ... */ /* Let's update the imbalance */ dir = dirs[level - 1]; LDEBUG(9, "\t\t\tIMABALANCE: dir=%i old parent balance=%i patch=%i\n", dir, BALANCE(parent), DIR_TO_BALANCE(dir)); BALANCE(parent) += DIR_TO_BALANCE(dir); if(MUST_REBALANCE(parent)) /* this branch will exit */ { /* parent is the "root" */ /* node is the pivot */ LDEBUG(9, "\t\t\t\tREBALANCING of %08x\n", parent->hash); BALANCE(parent) >>= 1; /* reset the balance to -1;1 ... */ LDEBUG(9, "\t\t\t\tBalance fix -> %i\n", BALANCE(parent)); /* HERE THE BALANCES ARE LOST/CORRUPTED !!! */ if(BALANCE(node) == BALANCE(parent)) /* if the sign is the same ... */ { /* BALANCE(node)=0; */ node = avl_node_single_rotation2(parent); /* the parent's parent has to be updated (to node) */ LDEBUG(9, "\t\t\t\tSingle rotation, new parent is %08x\n", node->hash); } else { /* BALANCE(node)=0; */ node = avl_node_double_rotation2(parent); /* the parent's parent has to be updated (to node) */ LDEBUG(9, "\t\t\t\tDouble rotation, new parent is %08x\n", node->hash); } /* typically ... * level--; * node=parent; * parent=m_nodes[level-1]; * here I have to reset the new parent * -> I have to get the parent on level-2 (oops if level is < 2 : * it means that the parent is the root, thus that we have to fix the root) * -> I have to get the dir used on level-2 and set it to node */ if(level > 1) /* 2 or more ... */ { CHILD(nodes[level - 2], dirs[level - 2]) = node; } else /* root */ { LDEBUG(9, "Root changing from %08x to %08x\n", (*root)->hash, node->hash); *root = node; } /* rebalancing -> done */ LDEBUG(9, "Done (I)\n"); return &ret->data; } node = parent; level--; } return &ret->data; } /** @brief Deletes a node from the tree. * * Deletes a node from the tree. * * @param[in] root the tree from which the delete will be made * @param[in] obj_hash the hash associated to the node to remove * * @return The node associated to the hash, NULL if it did not exist. */ void* avl_delete(avl_tree* root, hashcode obj_hash) { LDEBUG(9, "avl_delete(%p,%08x) ------------------------------\n", root, obj_hash); if(*root == NULL) { /* Already empty */ return NULL; } avl_node * nodes[MAX_DEPTH]; s8 balances[MAX_DEPTH]; u8 dirs[MAX_DEPTH]; #ifdef DEBUG memset(&nodes, 0xff, sizeof (avl_node*) * MAX_DEPTH); memset(&balances, 0xff, MAX_DEPTH); memset(&dirs, 0xff, MAX_DEPTH); #endif avl_node* node = *root; hashcode node_hash; int level = 0; s8 dir = MIDDLE; while((node != NULL) && (obj_hash != (node_hash = node->hash))) { nodes[level] = node; balances[level] = BALANCE(node); /* DIR_LEFT = 0, DIR_RIGHT = 1 */ dir = (obj_hash > node_hash)&1; node = CHILD(node, dir); dirs[level++] = dir; } LDEBUG(9, "Level = %i\n", level); yassert(level < MAX_DEPTH); if(node == NULL) { /* no match : nothing to delete */ LDEBUG(9, "No match\n"); return NULL; } LDEBUG(9, "[%i] VICTIM IS ", level); DUMP_NODE(node); LDEBUG(9, "\n"); nodes[level] = node; balances[level] = BALANCE(node); dirs[level++] = dir; /* THIS IS WRONG */ /* Remove "node" from the parent */ /* Keep the pointer for the find & destroy operation */ void* data = node->data; avl_node* victim = node; avl_node* victim_left = LEFT_CHILD(node); avl_node* victim_right = RIGHT_CHILD(node); /** We have found the victim node. From here 3 cases can be found * * #1 : the victim has no child. We just have to remove it. * * #2 : the victim has only got one child. We just have to remove it and * put its children in its place. * * #3 : the victim has got two children. * * Method '1': Theoretical way: * * We move the successor of the victim instead of B, then delete using * #1 or #2. * * Actually this requires a lot of work. (5 to 10 times more than ...) * * Method '2': Fastest way: * * We have to find his "successor" (left or right). * We overwrite the data of the successor into the victim. * We link the parent of the successor * We then rebalance from the node right before where successor was. * * #3 is dependent on #1 and #2 so let's handle #3 first. */ if(victim_left != NULL && victim_right != NULL) { /** Case #3: * * NOTE: It is recommended to switch left/right successors * between each delete for a better balancing. * * NOTE: The path has to be completed. * */ LDEBUG(9, "#3\n"); /* Arbitraty: "<" successor */ /****************************/ dirs[level - 1] = DIR_LEFT; LDEBUG(9, "[%i] FROM ", level - 1); DUMP_NODE(victim); LDEBUG(9, ", GOING LEFT (VICTIM)\n"); avl_node* beforesuccessor = victim; /* actually it's "victim" here */ avl_node* successor = victim_left; avl_node* tmp_node; LDEBUG(9, "[%i] From ", level); DUMP_NODE(successor); LDEBUG(9, ", going RIGHT\n"); nodes[level] = successor; balances[level] = BALANCE(successor); dirs[level++] = DIR_RIGHT; while((tmp_node = RIGHT_CHILD(successor)) != NULL) { beforesuccessor = successor; LDEBUG(9, "[%i] From ", level); DUMP_NODE(successor); LDEBUG(9, ", going RIGHT\n"); successor = tmp_node; nodes[level] = successor; balances[level] = BALANCE(successor); dirs[level++] = DIR_RIGHT; } yassert(level < MAX_DEPTH); /* successor has at most one left child */ LDEBUG(9, "[%i] Replacement is ", level); DUMP_NODE(successor); LDEBUG(9, "\n"); /* Method 2 uses 3 moves, method 1 uses 10 */ victim->data = successor->data; victim->hash = successor->hash; if(beforesuccessor != victim) { RIGHT_CHILD(beforesuccessor) = LEFT_CHILD(successor); BALANCE(beforesuccessor)--; } else { LEFT_CHILD(beforesuccessor) = LEFT_CHILD(successor); BALANCE(beforesuccessor)++; } DUMP_NODE(successor); LDEBUG(9, " : avl_destroy_node(%p)\n", successor); avl_destroy_node(successor); /* avl_destroy_node(successor); */ level -= 2; } /* Case #3 done */ else { /* Only 2 cases could occur right now : #1 and #2 */ DUMP_NODE(victim); LDEBUG(9, " : avl_destroy_node(%p)\n", victim); avl_destroy_node(victim); /* avl_destroy_node(victim); */ if(level > 1) { avl_node* victim_parent = nodes[level - 2]; /* ONE or BOTH are NULL, this is the best alternative to the if/elseif/else above */ CHILD(victim_parent, dir) = (avl_node*)((intptr)victim_left | (intptr)victim_right); BALANCE(victim_parent) -= DIR_TO_BALANCE(dir); /* The balance has changed */ /* At this point the victim is detached from the tree */ /* I can delete it */ level -= 2; } else /* Else we have no parent, so we change the root */ { /* ONE or BOTH are NULL, this is the best alternative to the if/elseif/else above */ *root = (avl_node*)((intptr)victim_left | (intptr)victim_right); return data; } } /* Rebalance from the victim_parent */ /* NOTE: A delete-rebalance can occur many times, up to the root. */ node = nodes[level]; /* start at the parent of the deleted node */ /* Now I have to update the balance up to the root (if needed ...) * node is m_nodes[level] * we need the parent at m_nodes[level-1] * parent -> node -> (new node/processed node) */ while(level >= 0) /* level points to the parent */ { LDEBUG(9, "Updating balance at %i : ", level); DUMP_NODE(node); LDEBUG(9, "\n"); if(BALANCE(node) == balances[level]) /* balance of the node */ { /* this branch will exit */ /* The node's balance has not been changed */ LDEBUG(9, "Balance is the same\n"); return data; } /* The node's balance has been changed */ /* * Balance became 0 : It was -1 or +1 : the tree's height decreased. * It is balanced but a propagation is required. * * Balance became -1 or +1 : It was 0 : the tree's height didn't changed. * It is a valid AVL and the propagation can stop. * * Balance became -2 or +2 : it was -1 or +1 : the tree is unbalanced. * It needs to be rebalanced and then a propagation is required. */ if(BALANCE(node) == MIDDLE) { /* Height decreased, tell it to the parent */ level--; if(level >= 0) { LDEBUG(9, "\tBalance [%i] changed for MIDDLE (%i) Fixing [%i] parent balance of %i (%i)\n", level + 1, balances[level + 1], level, DIR_TO_BALANCE(dirs[level]), dirs[level]); node = nodes[level]; BALANCE(node) -= DIR_TO_BALANCE(dirs[level]); } continue; } if(BALANCE(node) == LEFT || BALANCE(node) == RIGHT) /* this branch will exit */ { LDEBUG(9, "\tBalance changed for LEFT or RIGHT (%i)\n", balances[level]); return data; } LDEBUG(9, "\tBalance changed for imbalance (%i)\n", balances[level]); /* * We need to rotate in order to be AVL again. * * + cases: * * R(+) P(-) => R(0) P(0) (double rotation) * R(+) P(0) => R(+) P(-) (single rotation, delete special case) * R(+) P(+) => R(0) P(0) (single roration * * => if node&save balance are equal => MIDDLE for both * */ BALANCE(node) >>= 1; avl_node* child = CHILD(node, BALANCE_TO_DIR(BALANCE(node))); s8 parent_balance = BALANCE(node); s8 child_balance = BALANCE(child); if(child_balance == MIDDLE) /* patched single rotation */ { LDEBUG(9, "Single Rotation (delete)\n"); avl_node* root; root = avl_node_single_rotation2(node); yassert(root == child); BALANCE(child) = -parent_balance; BALANCE(node) = parent_balance; node = root; } else if(parent_balance == child_balance) /* single rotation case */ { LDEBUG(9, "Single Rotation\n"); node = avl_node_single_rotation2(node); yassert(node == child); } else { LDEBUG(9, "Double Rotation\n"); node = avl_node_double_rotation2(node); } if(level == 0) /* 2 or more ... */ { /* root */ LDEBUG(9, "Root changing from %08x to %08x\n", (*root)->hash, node->hash); *root = node; break; } /* link the parent to its new child */ /* level--; CHILD(nodes[level],dirs[level])=node; node=nodes[level]; */ /* The rotations could have changed something */ /* I'll process the same level again */ CHILD(nodes[level - 1], dirs[level - 1]) = node; /* node=nodes[level]; */ } LDEBUG(9, "avl_delete done (%p) level=%i\n", data, level); return data; } static void avl_destroy_(avl_node* node) { avl_node* child = LEFT_CHILD(node); if(child != NULL) { avl_destroy_(child); } child = RIGHT_CHILD(node); if(child != NULL) { avl_destroy_(child); } avl_destroy_node(node); /* avl_destroy_node(node); */ } /** @brief Releases all the nodes of a tree * * Releases all the nodes of a tree. Data is not destroyed. * * @param[in] tree the tree to empty */ void avl_destroy(avl_tree* tree) { if(*tree != NULL) { avl_destroy_(*tree); *tree = NULL; } } /* Iterators -> */ void avl_iterator_init(avl_tree tree, avl_iterator* iter) { /* Do we have a tree to iterate ? */ iter->stack_pointer = -1; if(tree != NULL) { /* Let's stack the whole left path */ register avl_node* node = tree; while(node != NULL) { iter->stack[++iter->stack_pointer] = node; node = LEFT_CHILD(node); } } } void avl_iterator_init_from(avl_tree tree, avl_iterator* iter, hashcode obj_hash) { /* Do we have a tree to iterate ? */ iter->stack_pointer = -1; if(tree != NULL) { /* Let's stack the path left path */ register avl_node* node = tree; while(node != NULL) { register hashcode h = node->hash; if(obj_hash < h) { iter->stack[++iter->stack_pointer] = node; node = LEFT_CHILD(node); } else if(obj_hash > h) { node = RIGHT_CHILD(node); } else { iter->stack[++iter->stack_pointer] = node; break; } } } } #if ZDB_INLINES_AVL_FIND == 0 bool avl_iterator_hasnext(avl_iterator* iter) { return iter->stack_pointer >= 0; } #endif void** avl_iterator_next(avl_iterator* iter) { yassert(iter->stack_pointer >= 0); register avl_node* node = iter->stack[iter->stack_pointer]; void** datapp = &node->data; /* we got the data, now let's ready the next node */ register avl_node* tmp; /* let's branch right if possible */ if((tmp = RIGHT_CHILD(node)) != NULL) { iter->stack[iter->stack_pointer] = tmp; /* replace TOP */ node = tmp; while((tmp = LEFT_CHILD(node)) != NULL) { iter->stack[++iter->stack_pointer] = tmp; /* PUSH */ node = tmp; } return datapp; } iter->stack_pointer--; return datapp; } avl_node* avl_iterator_next_node(avl_iterator* iter) { yassert(iter->stack_pointer >= 0); avl_node* node = iter->stack[iter->stack_pointer]; avl_node* current = node; /* we got the data, now let's ready the next node */ register avl_node* tmp; /* let's branch right if possible */ if((tmp = RIGHT_CHILD(node)) != NULL) { iter->stack[iter->stack_pointer] = tmp; /* replace TOP */ node = tmp; while((tmp = LEFT_CHILD(node)) != NULL) { iter->stack[++iter->stack_pointer] = tmp; /* PUSH */ node = tmp; } return current; } iter->stack_pointer--; return current; } /* <- Iterators */ static void avl_callback_and_destroy_(avl_node* node, callback_function callback) { avl_node* child = LEFT_CHILD(node); if(child != NULL) { avl_callback_and_destroy_(child, callback); } child = RIGHT_CHILD(node); if(child != NULL) { avl_callback_and_destroy_(child, callback); } callback(node->data); avl_destroy_node(node); /* avl_destroy_node(node); */ } /** @brief Releases all the nodes of a tree * * Releases all the nodes of a tree. * Calls a function passed in parameter before destroying the data. * It's the responsibility of the callback to process (destroy) the data * in the tree. * * @param[in] tree the tree to empty */ void avl_callback_and_destroy(avl_tree tree, callback_function callback) { if(tree != NULL) { avl_callback_and_destroy_(tree, callback); } } #ifdef DEBUG /** @brief DEBUG: check that a tree fits the AVL definition. * * DEBUG: check that a tree fits the AVL definition. * * @param[in] tree the tree to check * * @return A positive integer if the AVL is right (the depth actually) else * a negative integer. * */ ya_result avl_check(avl_tree tree) { int err = avl_checkdepth(tree); if(err < 0) { DIE(ERROR); } return err; } /** @brief DEBUG: check that a node fits the AVL definition. * * DEBUG: check that a node fits the AVL definition. * * @param[in] node the node to check * * @return A positive integer if the AVL is right (the depth actually) else * a negative integer. * */ s32 avl_checkdepth(avl_node* node) { if(node == NULL) { return 0; } int left_d = avl_checkdepth(LEFT_CHILD(node)); if(left_d < 0) { format("Child L of %08x\n", node->hash); return -1; } int right_d = avl_checkdepth(RIGHT_CHILD(node)); if(right_d < 0) { format("Child R of %08x\n", node->hash); return -1; } int max; int min; if(left_d > right_d) { max = left_d; min = right_d; } else { max = right_d; min = left_d; } if(max - min > 1) { format("AVL %08x is not balanced !!! %i %i\n", node->hash, left_d, right_d); return -1; } switch(BALANCE(node)) { case MIDDLE: if(left_d != right_d) { format("AVL %08x balance is broken (MIDDLE) %i %i\n", node->hash, left_d, right_d); return -1; } break; case LEFT: if(left_d <= right_d) { format("AVL %08x balance is broken (LEFT) %i %i\n", node->hash, left_d, right_d); return -1; } break; case RIGHT: if(left_d >= right_d) { format("AVL %08x balance is broken (RIGHT) %i %i\n", node->hash, left_d, right_d); return -1; } break; default: format("AVL balance is broken (%i) %i %i\n", BALANCE(node), left_d, right_d); return -1; } return max + 1; } static void avl_print_(avl_node* node) { if(LEFT_CHILD(node) != NULL) { avl_print_(LEFT_CHILD(node)); } format("[%08x]", node->hash); if(RIGHT_CHILD(node) != NULL) { avl_print_(RIGHT_CHILD(node)); } } /** @brief DEBUG: Prints the (sorted) content of the AVL * * DEBUG: Prints the (sorted) content of the AVL * * @param[in] tree the tree to print * */ void avl_print(avl_tree tree) { if(tree != NULL) { avl_print_(tree); } else { format("(empty)"); } } /** @brief DEBUG: Prints the content of the AVL node * * DEBUG: Prints the (sorted) content of the AVL node * * @param[in] node the node to print * */ #define HASH(x) (((x)!=NULL)?(x)->hash:0) /*#define MAX(x,y) (((x)>(y))?(x):(y))*/ int avl_getnodedepth(avl_node* node) { if(node == NULL) { return 0; } return MAX(avl_getnodedepth(LEFT_CHILD(node)), avl_getnodedepth(RIGHT_CHILD(node))) + 1; } void avl_printnode(avl_node* node) { if(node != NULL) { format("%08x@{%08x,%08x,%3i}", node->hash, HASH(LEFT_CHILD(node)), HASH(RIGHT_CHILD(node)), BALANCE(node)); } else { format("(empty)"); } } #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_icmtl.c0000644000077100007710000000012412650131756021104 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.407344 30 ctime=1454597652.371344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_icmtl.c0000664000077100007710000011465212650131756020722 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnsdb * @brief * * ICMTL is actually INCREMENTAL. * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dnsdb/zdb_icmtl.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/icmtl_input_stream.h" #include "dnsdb/dynupdate.h" #include "dnscore/ptr_set.h" #include "dnsdb/zdb-zone-journal.h" #include "dnsdb/zdb-zone-path-provider.h" #include "dnsdb/zdb_listener.h" #define ZDB_ICMTL_REPLAY_GATHER 0 #define ZDB_ICMTL_REPLAY_COMMIT 1 #define ZDB_ICMTL_REPLAY_COMMIT_AND_STOP 3 #define ZDB_ICMTL_REPLAY_STOP 4 #define ZDB_ICMTL_REPLAY_SHUTDOWN_POLL_PERIOD 1000 #define ZDB_ICMTL_REPLAY_BUFFER_SIZE 4096 #if ZDB_HAS_DNSSEC_SUPPORT != 0 #include "dnsdb/nsec.h" #include "dnsdb/rrsig.h" #include "dnsdb/dnssec.h" #endif #define ICMTLNSA_TAG 0x41534e4c544d4349 extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #define ICMTL_BUFFER_SIZE 4096 #define ICMTL_FILE_MODE 0600 #define ICMTL_SOA_INCREMENT 1 #define ICMTL_TMP_FILE_ENABLED 0 #define ICMTL_REMOVE_TMP_FILE_FORMAT "%s/%{dnsname}%08x.ir.tmp" #define ICMTL_ADD_TMP_FILE_FORMAT "%s/%{dnsname}%08x.ia.tmp" #ifdef DEBUG #define ICMTL_DUMP_JOURNAL_RECORDS 0 // awfully slow, only enable when debugging it #else #define ICMTL_DUMP_JOURNAL_RECORDS 0 #endif static smp_int icmtl_index_base = SMP_INT_INITIALIZER; /* * With this, I can ensure (in DEBUG builds) that there are no conflicting calls to the (badly named, mea culpa) * icmtl mechanism that registers changes to the DB (so the ICMTL protocol can use it). * * This means than every writer uses this at some point, so what we actually detect is the conflicting writers. */ static ya_result zdb_icmtl_replay_commit(zdb_zone *zone, input_stream *is, u32 *current_serialp) { ya_result ret; /* * 0: DELETE, 1: ADD * The mode is switched every time an SOA is found. */ const bool is_nsec3 = zdb_zone_is_nsec3(zone); const bool is_nsec = zdb_zone_is_nsec(zone); u8 mode = 1; // the first SOA will switch the mode to delete s32 changes = 0; zdb_ttlrdata ttlrdata; dns_resource_record rr; dns_resource_record_init(&rr); const u8 *fqdn = rr.name; dnslabel_vector labels; ttlrdata.next = NULL; /* * The plan for NSEC3 : * Store the fqdn + type class ttl rdata in collections * => the delete collection * => the add collection * Then there is the NSEC3 covered labels: keep a reference to them for later * * When a pass of SOA-/SOA+ has finished: * _ replace the NSEC3 in both collections (reading from delete) * _ delete NSEC3 to delete * _ add NSEC3 to add * * _ and finally update the NSEC3 for the labels kept above */ #if ZDB_HAS_NSEC3_SUPPORT != 0 nsec3_icmtl_replay nsec3replay; nsec3_icmtl_replay_init(&nsec3replay, zone); #endif #if ZDB_HAS_NSEC_SUPPORT != 0 nsec_icmtl_replay nsecreplay; nsec_icmtl_replay_init(&nsecreplay, zone); #endif ptr_set downed_fqdn = PTR_SET_DNSNAME_EMPTY; const bool keep_downed_fqdn = is_nsec3; /* * At this point : the next record, if it exists AND is not an SOA , has to be deleted * */ bool did_remove_soa = FALSE; // something has to be committed for(;;) { /* * read the full record * * == 0 : no record (EOF) * < 0 : failed */ if((ret = dns_resource_record_read(&rr, is)) <= 0) { if(ISOK(ret)) { log_info("journal: reached the end of the journal file"); } else { log_err("journal: broken journal: %r", ret); logger_flush(); // broken journal (bad, keep me) } break; } ttlrdata.ttl = ntohl(rr.tctr.ttl); ttlrdata.rdata_pointer = rr.rdata; ttlrdata.rdata_size = rr.rdata_size; /* * Stop at the SOA */ if(rr.tctr.qtype == TYPE_SOA) { mode ^= 1; if(mode == 0) { /* ADD */ #if ZDB_HAS_NSEC3_SUPPORT if(is_nsec3) { ret = nsec3_icmtl_replay_execute(&nsec3replay); if(FAIL(ret)) { dns_resource_record_clear(&rr); // DO NOT: input_stream_close(is); nsec3_icmtl_replay_destroy(&nsec3replay); #if ZDB_HAS_NSEC_SUPPORT nsec_icmtl_replay_destroy(&nsecreplay); #endif return ret; } } else #endif #if ZDB_HAS_NSEC_SUPPORT if(is_nsec) { nsec_icmtl_replay_execute(&nsecreplay); } #endif } } if(!did_remove_soa) { log_info("journal: %{dnsname}: removing obsolete SOA", zone->origin); if(FAIL(ret = zdb_record_delete(&zone->apex->resource_record_set, TYPE_SOA))) { /** * complain */ log_err("journal: removing current SOA gave an error: %r", ret); /* That's VERY bad ... */ changes = ret; break; } did_remove_soa = TRUE; } s32 top = dnsname_to_dnslabel_vector(fqdn, labels); if(mode == 0) { /* * "TO DEL" record */ #if ICMTL_DUMP_JOURNAL_RECORDS rdata_desc type_len_rdata = {rr.tctr.qtype, rr.rdata_size, rr.rdata }; log_debug("journal: del %{dnsname} %{typerdatadesc}", fqdn, &type_len_rdata); logger_flush(); #endif switch(rr.tctr.qtype) { #if ZDB_HAS_NSEC3_SUPPORT != 0 case TYPE_NSEC3PARAM: { #if ICMTL_DUMP_JOURNAL_RECORDS rdata_desc type_len_rdata = {TYPE_NSEC3PARAM, ttlrdata.rdata_size, ttlrdata.rdata_pointer }; log_debug("journal: del %{dnsname} %{typerdatadesc}", fqdn, &type_len_rdata); logger_flush(); #endif nsec3_icmtl_replay_nsec3param_del(&nsec3replay, &ttlrdata); break; } case TYPE_NSEC3: { // nsec3_zone_item *item = nsec3_get_nsec3_by_name(zone, fqdn, tmprdata); log_debug("journal: NSEC3: queue %{dnsname} for delete", fqdn); nsec3_icmtl_replay_nsec3_del(&nsec3replay, fqdn, &ttlrdata); break; } #endif #if ZDB_HAS_NSEC_SUPPORT != 0 case TYPE_NSEC: { if(FAIL(ret = zdb_rr_label_delete_record_exact(zone, labels, (top - zone->origin_vector.size) - 1, rr.tctr.qtype, &ttlrdata))) { log_err("journal: NSEC: %r", ret); } if(is_nsec) { /* * Set the record as "removed", so if it's not added later it will need to be removed from the NSEC chain */ nsec_icmtl_replay_nsec_del(&nsecreplay, fqdn); } break; } #endif case TYPE_SOA: { rdata_desc rdata = {TYPE_SOA, ttlrdata.rdata_size, ttlrdata.rdata_pointer}; log_info("journal: SOA: del %{dnsname} %{typerdatadesc}", fqdn, &rdata); s32 m1 = (top - zone->origin_vector.size) - 1; if(m1 == -1) { if(FAIL(ret = zdb_record_delete_exact(&zone->apex->resource_record_set, TYPE_SOA, &ttlrdata))) /* FB done, APEX : no delegation */ { if(!did_remove_soa) { log_err("journal: SOA: %r", ret); } } } else { if(FAIL(ret = zdb_rr_label_delete_record_exact(zone, labels, (top - zone->origin_vector.size) - 1, rr.tctr.qtype, &ttlrdata))) { if(!did_remove_soa) { log_err("journal: SOA: (2) %r", ret); } } } break; } #if ZDB_HAS_DNSSEC_SUPPORT != 0 case TYPE_RRSIG: { if(is_nsec3 && (RRSIG_RDATA_TO_TYPE_COVERED(rr.rdata[0]) == TYPE_NSEC3)) { /* * Get the NSEC3 node * Remove the signature */ nsec3_icmtl_replay_nsec3_rrsig_del(&nsec3replay, fqdn, &ttlrdata); break; } // THERE IS A FALLTROUGH TO default: HERE. IT MUST BE PRESERVED. } #endif default: { if(keep_downed_fqdn) { if(ptr_set_avl_find(&downed_fqdn, fqdn) == NULL) { ptr_set_avl_insert(&downed_fqdn, dnsname_dup(fqdn)); } } if(FAIL(ret = zdb_rr_label_delete_record_exact(zone, labels, (top - zone->origin_vector.size) - 1, rr.tctr.qtype, &ttlrdata))) { log_err("journal: del %{dnsrr}", &rr); log_err("journal: %{dnstype}: %r", &rr.tctr.qtype, ret); } } } } else { /* * "TO ADD" record */ switch(rr.tctr.qtype) { #if ZDB_HAS_NSEC3_SUPPORT != 0 case TYPE_NSEC3PARAM: { /* * The "change" could be the NSEC3PARAM flag changing ? */ if(is_nsec) { log_err("journal: NSEC3PARAM changes on the NSEC %{dnsname} zone", fqdn); nsec3_icmtl_replay_destroy(&nsec3replay); nsec_icmtl_replay_destroy(&nsecreplay); dns_resource_record_clear(&rr); return ZDB_JOURNAL_NSEC3_ADDED_IN_NSEC; } if(NSEC3_RDATA_ALGORITHM(ttlrdata.rdata_pointer) != DNSSEC_DIGEST_TYPE_SHA1) { log_err("journal: NSEC3PARAM algorithm %d is not supported", NSEC3_RDATA_ALGORITHM(ttlrdata.rdata_pointer)); nsec3_icmtl_replay_destroy(&nsec3replay); nsec_icmtl_replay_destroy(&nsecreplay); dns_resource_record_clear(&rr); return ZDB_JOURNAL_NSEC3_HASH_NOT_SUPPORTED; } #if ICMTL_DUMP_JOURNAL_RECORDS rdata_desc type_len_rdata = {TYPE_NSEC3PARAM, ttlrdata.rdata_size, ttlrdata.rdata_pointer }; log_debug("journal: add %{dnsname} %{typerdatadesc}", fqdn, &type_len_rdata); logger_flush(); #endif nsec3_icmtl_replay_nsec3param_add(&nsec3replay, &ttlrdata); break; } case TYPE_NSEC3: { if(is_nsec) { log_err("journal: NSEC3 changes on the dnssec1 %{dnsname} zone", fqdn); nsec3_icmtl_replay_destroy(&nsec3replay); nsec_icmtl_replay_destroy(&nsecreplay); dns_resource_record_clear(&rr); return ERROR; } log_debug("journal: NSEC3: queue %{dnsname} for add", fqdn); if(NSEC3_RDATA_ALGORITHM(ttlrdata.rdata_pointer) != DNSSEC_DIGEST_TYPE_SHA1) { log_err("journal: NSEC3 algorithm %d is not supported", NSEC3_RDATA_ALGORITHM(ttlrdata.rdata_pointer)); nsec3_icmtl_replay_destroy(&nsec3replay); nsec_icmtl_replay_destroy(&nsecreplay); dns_resource_record_clear(&rr); return ERROR; } nsec3_icmtl_replay_nsec3_add(&nsec3replay, fqdn, &ttlrdata); break; } #endif #if ZDB_HAS_NSEC_SUPPORT != 0 case TYPE_NSEC: { if(is_nsec3) { log_err("journal: NSEC changes on the dnssec3 %{dnsname} zone", fqdn); nsec3_icmtl_replay_destroy(&nsec3replay); nsec_icmtl_replay_destroy(&nsecreplay); dns_resource_record_clear(&rr); return ERROR; } zdb_packed_ttlrdata *packed_ttlrdata; ZDB_RECORD_ZALLOC_EMPTY(packed_ttlrdata, ttlrdata.ttl, rr.rdata_size); packed_ttlrdata->next = NULL; MEMCOPY(ZDB_PACKEDRECORD_PTR_RDATAPTR(packed_ttlrdata), rr.rdata, rr.rdata_size); #if ICMTL_DUMP_JOURNAL_RECORDS rdata_desc type_len_rdata = {rr.tctr.qtype, rr.rdata_size, ZDB_PACKEDRECORD_PTR_RDATAPTR(packed_ttlrdata) }; log_debug("journal: add %{dnsname} %{typerdatadesc}", fqdn, &type_len_rdata); logger_flush(); #endif s32 rr_label_top = top - zone->origin_vector.size; zdb_zone_record_add(zone, labels, rr_label_top - 1, rr.tctr.qtype, packed_ttlrdata); /* class is implicit */ if(is_nsec) { /* * Set the record as "add", so if it's not added later it will need to be removed from the NSEC chain */ nsec_icmtl_replay_nsec_add(&nsecreplay, fqdn); } break; } #endif default: { zdb_packed_ttlrdata *packed_ttlrdata; ZDB_RECORD_ZALLOC_EMPTY(packed_ttlrdata, ttlrdata.ttl, rr.rdata_size); packed_ttlrdata->next = NULL; MEMCOPY(ZDB_PACKEDRECORD_PTR_RDATAPTR(packed_ttlrdata), rr.rdata, rr.rdata_size); #if ICMTL_DUMP_JOURNAL_RECORDS rdata_desc type_len_rdata = {rr.tctr.qtype, rr.rdata_size, ZDB_PACKEDRECORD_PTR_RDATAPTR(packed_ttlrdata) }; log_debug("journal: add %{dnsname} %{typerdatadesc}", fqdn, &type_len_rdata); logger_flush(); #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 if(is_nsec3) { /* * If it's a signature AND if we are on an nsec3 zone AND the type covered is NSEC3 THEN it should be put on hold. */ if(rr.tctr.qtype == TYPE_RRSIG) { u8 *rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(packed_ttlrdata); if(RRSIG_RDATA_TO_TYPE_COVERED(*rdata) == TYPE_NSEC3) { nsec3_icmtl_replay_nsec3_rrsig_add(&nsec3replay, fqdn, packed_ttlrdata); break; } } } #endif if(rr.tctr.qtype == TYPE_SOA) { rr_soa_get_serial(ZDB_PACKEDRECORD_PTR_RDATAPTR(packed_ttlrdata), ZDB_PACKEDRECORD_PTR_RDATASIZE(packed_ttlrdata), current_serialp); rdata_desc rdata = {TYPE_SOA, ZDB_PACKEDRECORD_PTR_RDATASIZE(packed_ttlrdata), ZDB_PACKEDRECORD_PTR_RDATAPTR(packed_ttlrdata)}; log_info("journal: SOA: add %{dnsname} %{typerdatadesc}", fqdn, &rdata); } s32 rr_label_top = top - zone->origin_vector.size; zdb_zone_record_add(zone, labels, rr_label_top - 1, rr.tctr.qtype, packed_ttlrdata); /* class is implicit */ #if ZDB_HAS_NSEC3_SUPPORT != 0 if(is_nsec3) { nsec3_icmtl_replay_label_add(&nsec3replay, fqdn, labels, rr_label_top - 1); } #endif } } } // end if ADD changes++; } /* * Yes, I know. If 2^32 changes (add batch + del batch) occurs then it will be seen as an error ... */ if(ISOK(changes)) { #if ZDB_HAS_NSEC3_SUPPORT != 0 if(is_nsec3) { nsec3_icmtl_replay_execute(&nsec3replay); } else #endif #if ZDB_HAS_NSEC_SUPPORT != 0 if(is_nsec) { nsec_icmtl_replay_execute(&nsecreplay); } #endif } #if ZDB_HAS_NSEC3_SUPPORT != 0 nsec3_icmtl_replay_destroy(&nsec3replay); #endif #if ZDB_HAS_NSEC_SUPPORT != 0 nsec_icmtl_replay_destroy(&nsecreplay); #endif dns_resource_record_clear(&rr); if(keep_downed_fqdn) { ptr_set_avl_iterator downed_fqdn_iter; dnslabel_vector labels; ptr_set_avl_iterator_init(&downed_fqdn, &downed_fqdn_iter); while(ptr_set_avl_iterator_hasnext(&downed_fqdn_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&downed_fqdn_iter); // get the label, check if relevant, delete if not const u8 *fqdn = (const u8*) node->key; s32 labels_top = dnsname_to_dnslabel_vector(fqdn, labels); zdb_rr_label* rr_label = zdb_rr_label_find_exact(zone->apex, labels, labels_top); if((rr_label != NULL) && RR_LABEL_IRRELEVANT(rr_label)) { log_debug("journal: clearing %{dnsname}", fqdn); ya_result err; if(FAIL(err = zdb_rr_label_delete_record(zone, labels, labels_top, TYPE_ANY))) { log_err("journal: failed to clear %{dnsname}${dnsname}: %r", fqdn, zone->origin, err); } } free(node->key); node->key = NULL; } ptr_set_avl_destroy(&downed_fqdn); } return changes; } /* * Replay the incremental stream */ ya_result zdb_icmtl_replay(zdb_zone *zone) { ya_result return_value; u32 serial; zdb_zone_double_lock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_LOAD); return_value = zdb_zone_getserial(zone, &serial); if(FAIL(return_value)) { zdb_zone_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_LOAD); log_err("journal: %{dnsname}: error reading serial for zone: %r",zone->origin, return_value); return return_value; } input_stream is; #if ICMTL_DUMP_JOURNAL_RECORDS log_debug("journal: zdb_icmtl_replay(%{dnsname})", zone->origin); logger_flush(); #endif u32 first_serial; u32 last_serial; if(FAIL(return_value = zdb_zone_journal_get_serial_range(zone, &first_serial, &last_serial))) { zdb_zone_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_LOAD); if(return_value == ZDB_ERROR_ICMTL_NOTFOUND) { return_value = SUCCESS; } else { log_err("journal: %{dnsname}: error opening journal for zone: %r", zone->origin, return_value); } return return_value; } log_debug("journal: %{dnsname}: zone serial is %i, journal covers serials from %i to %i", zone->origin, serial, first_serial, last_serial); if(last_serial == serial) { zdb_zone_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_LOAD); log_debug("journal: %{dnsname}: nothing to read from the journal", zone->origin); return 0; } if(serial_lt(serial, first_serial)) { zdb_zone_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_LOAD); log_warn("journal: %{dnsname}: first serial from the journal is after the zone", zone->origin); // should invalidate the journal zdb_zone_journal_delete(zone); return 0; } if(serial_gt(serial, last_serial)) { zdb_zone_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_LOAD); log_warn("journal: %{dnsname}: last serial from the journal is before the zone", zone->origin); // should invalidate the journal zdb_zone_journal_delete(zone); return 0; } if(FAIL(return_value = zdb_zone_journal_get_ixfr_stream_at_serial(zone, serial, &is, NULL))) { zdb_zone_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_LOAD); log_err("journal: %{dnsname}: error reading journal from serial %d: %r",zone->origin, serial, return_value); return return_value; } log_info("journal: %{dnsname}: replaying from serial %u",zone->origin, serial); buffer_input_stream_init(&is, &is, ZDB_ICMTL_REPLAY_BUFFER_SIZE); u16 shutdown_test_countdown = ZDB_ICMTL_REPLAY_SHUTDOWN_POLL_PERIOD; u32 current_serial = serial; /* * Read all records from [ SOA ... SOA ... [ SOA in memory */ output_stream baos; input_stream bais; dns_resource_record rr; int baos_rr_count = 0; int baos_soa_count = 0; bytearray_output_stream_init_ex(&baos, NULL, ZDB_ICMTL_REPLAY_BUFFER_SIZE, BYTEARRAY_DYNAMIC); dns_resource_record_init(&rr); // 0: gather, 1: commit, 2: commit & stop for(int replay_state = ZDB_ICMTL_REPLAY_GATHER; replay_state != ZDB_ICMTL_REPLAY_COMMIT_AND_STOP;) { // ensure it's not supposed to shutdown (every few iterations) if(--shutdown_test_countdown <= 0) { if(dnscore_shuttingdown()) { return_value = STOPPED_BY_APPLICATION_SHUTDOWN; break; } shutdown_test_countdown = ZDB_ICMTL_REPLAY_SHUTDOWN_POLL_PERIOD; } // read the next record if((return_value = dns_resource_record_read(&rr, &is)) <= 0) { if(ISOK(return_value)) { log_info("journal: reached the end of the journal file"); replay_state = ZDB_ICMTL_REPLAY_COMMIT_AND_STOP; } else { log_err("journal: broken journal: %r", return_value); logger_flush(); // broken journal (flush is slow, but this is bad, so : keep it) replay_state = ZDB_ICMTL_REPLAY_STOP; } } else // first record must be an SOA (or it's wrong) if(baos_rr_count == 0) // first record ? { if(rr.tctr.qtype != TYPE_SOA) // must be SOA { // expected an SOA return_value = ERROR; break; } ++baos_soa_count; // 0 -> 1 // this is not mandatory but clearer to read } else // the page ends with an SOA or end of stream if(rr.tctr.qtype == TYPE_SOA) { if(baos_soa_count == 2) { // this record is the start of the next stream, keep it for the next iteration replay_state = ZDB_ICMTL_REPLAY_COMMIT; } ++baos_soa_count; } ++baos_rr_count; if((replay_state & ZDB_ICMTL_REPLAY_COMMIT) != 0) { log_info("journal: %{dnsname}: commiting changes", zone->origin); u64 ts_start = timeus(); zdb_zone_exchange_locks(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_LOAD); bytearray_input_stream_init_const(&bais, bytearray_output_stream_buffer(&baos), bytearray_output_stream_size(&baos)); zdb_icmtl_replay_commit(zone, &bais, ¤t_serial); zdb_zone_exchange_locks(zone, ZDB_ZONE_MUTEX_LOAD, ZDB_ZONE_MUTEX_SIMPLEREADER); input_stream_close(&bais); u64 ts_stop = timeus(); if(ts_stop < ts_start) // time change { ts_stop = ts_start; } u64 ts_delta = ts_stop - ts_start; if(ts_delta < 1000) { log_info("journal: %{dnsname}: commited changes (%lluus)", zone->origin, ts_delta); } else if(ts_delta < 1000000) { double ts_delta_s = ts_delta; ts_delta_s /= 1000.0; log_info("journal: %{dnsname}: commited changes (%5.2fms)", zone->origin, ts_delta_s); } else { double ts_delta_s = ts_delta; ts_delta_s /= 1000000.0; log_info("journal: %{dnsname}: commited changes (%5.2fs)", zone->origin, ts_delta_s); } // the current page has been processed if(replay_state == ZDB_ICMTL_REPLAY_COMMIT_AND_STOP) { // no more page to read break; } // reset the state for the next page // note: the next written record will be the last read SOA baos_rr_count = 1; baos_soa_count = 1; replay_state = ZDB_ICMTL_REPLAY_GATHER; bytearray_output_stream_reset(&baos); } // end if replay_state != ZDB_ICMTL_REPLAY_GATHER dns_resource_record_write(&rr, &baos); } input_stream_close(&is); output_stream_close(&baos); dns_resource_record_clear(&rr); if(FAIL(return_value = zdb_zone_getserial(zone, &serial))) { zdb_zone_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_LOAD); log_err("journal: %{dnsname}: error reading confirmation serial for zone: %r",zone->origin, return_value); return return_value; } if(serial != last_serial) { log_warn("journal: %{dnsname}: expected serial to be %i but it is %i instead",zone->origin, last_serial, serial); } log_info("journal: %{dnsname}: done", zone->origin); zdb_zone_double_unlock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER, ZDB_ZONE_MUTEX_LOAD); #if ICMTL_DUMP_JOURNAL_RECORDS if(is_nsec) { nsec_logdump_tree(zone); logger_flush(); } #endif return return_value; } ya_result zdb_icmtl_get_last_serial_from(zdb_zone *zone, u32 *last_serial) { ya_result return_value; return_value = zdb_zone_journal_get_serial_range(zone, NULL, last_serial); return return_value; } ya_result zdb_icmtl_begin(zdb_icmtl *icmtl, zdb_zone *zone) { #if ICMTL_TMP_FILE_ENABLED const char* folder; #endif ya_result return_code; if(smp_int_get(&icmtl_index_base) == 0) { smp_int_set(&icmtl_index_base, time(NULL)); } icmtl->patch_index = smp_int_inc_get(&icmtl_index_base); bytearray_output_stream_init_ex(&icmtl->os_add_, NULL, 65536, BYTEARRAY_DYNAMIC); counter_output_stream_init(&icmtl->os_add_, &icmtl->os_add, &icmtl->os_add_stats); bytearray_output_stream_init_ex(&icmtl->os_remove_, NULL, 65536, BYTEARRAY_DYNAMIC); counter_output_stream_init(&icmtl->os_remove_, &icmtl->os_remove, &icmtl->os_remove_stats); if(ISOK(return_code = dynupdate_icmtlhook_enable_wait(zone->origin, &icmtl->os_remove, &icmtl->os_add))) { icmtl->zone = zone; /* After this call, the database can be edited. */ zdb_packed_ttlrdata* soa = zdb_record_find(&zone->apex->resource_record_set, TYPE_SOA); if(soa != NULL) { icmtl->soa_ttl = soa->ttl; icmtl->soa_rdata_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(soa); memcpy(icmtl->soa_rdata, ZDB_PACKEDRECORD_PTR_RDATAPTR(soa), ZDB_PACKEDRECORD_PTR_RDATASIZE(soa)); } else { output_stream_close(&icmtl->os_remove); output_stream_close(&icmtl->os_add); log_err("journal: no soa found at %{dnsname}", zone->origin); return_code = ZDB_ERROR_NOSOAATAPEX; } } else { output_stream_close(&icmtl->os_remove); output_stream_close(&icmtl->os_add); log_warn("journal: already editing zone %{dnsname}", zone->origin); return_code = ZDB_ERROR_ICMTL_STATUS_INVALID; } return return_code; } static void zdb_icmtl_output_stream_write_packed_ttlrdata(output_stream* os, u8* origin, u16 type, zdb_packed_ttlrdata* record) { output_stream_write_dnsname(os, origin); output_stream_write_u16(os, type); /** @note NATIVETYPE */ output_stream_write_u16(os, CLASS_IN); /** @note NATIVECLASS */ output_stream_write_nu32(os, record->ttl); output_stream_write_nu16(os, record->rdata_size); output_stream_write(os, &record->rdata_start[0], record->rdata_size); } static ya_result zdb_icmtl_close(zdb_icmtl *icmtl) { dynupdate_icmtlhook_disable(icmtl->zone->origin); output_stream_close(&icmtl->os_remove); output_stream_close(&icmtl->os_remove_); output_stream_close(&icmtl->os_add); output_stream_close(&icmtl->os_add_); return SUCCESS; } ya_result zdb_icmtl_cancel(zdb_icmtl *icmtl) { ya_result return_code = zdb_icmtl_close(icmtl); return return_code; } ya_result zdb_icmtl_end(zdb_icmtl *icmtl) { ya_result return_value; icmtl->file_size_before_append = 0; icmtl->file_size_after_append = 0; zdb_rr_label* apex = icmtl->zone->apex; zdb_packed_ttlrdata* soa = zdb_record_find(&apex->resource_record_set, TYPE_SOA); if(soa == NULL) { zdb_icmtl_close(icmtl); return ZDB_ERROR_NOSOAATAPEX; } bool soa_changed = FALSE; if((soa->ttl != icmtl->soa_ttl) || (ZDB_PACKEDRECORD_PTR_RDATASIZE(soa) != icmtl->soa_rdata_size) || (memcmp(ZDB_PACKEDRECORD_PTR_RDATAPTR(soa), icmtl->soa_rdata, icmtl->soa_rdata_size) != 0)) { soa_changed = TRUE; } /* Increment the SOA's serial number ? */ // soa changed => no // no bytes written => no bool written_on = zdb_listener_notify_has_changes(icmtl->zone); bool must_increment_serial; if(soa_changed) { must_increment_serial = FALSE; } else { if(!written_on) { zdb_icmtl_close(icmtl); return SUCCESS; } must_increment_serial = TRUE; } if(must_increment_serial) { rr_soa_increase_serial(&soa->rdata_start[0], soa->rdata_size, ICMTL_SOA_INCREMENT); #if ZDB_HAS_DNSSEC_SUPPORT /* Build new signatures */ if(icmtl->zone->apex->nsec.dnssec != NULL) { rrsig_context_s context; u32 sign_from = time(NULL); if(ISOK(return_value = rrsig_context_initialize(&context, icmtl->zone, DEFAULT_ENGINE_NAME, sign_from, NULL))) { rrsig_context_push_label(&context, icmtl->zone->apex); rrsig_update_label_rrset(&context, icmtl->zone->apex, TYPE_SOA); /* * Retrieve the old signatures (to be deleted) * Retrieve the new signatures (to be added) * * This has to be injected as an answer query. */ dnsname_stack namestack; dnsname_to_dnsname_stack(icmtl->zone->origin, &namestack); /* Store the signatures */ zdb_packed_ttlrdata* rrsig_sll; rrsig_sll = context.removed_rrsig_sll; while(rrsig_sll != NULL) { if(RRSIG_TYPE_COVERED(rrsig_sll) == TYPE_SOA) { zdb_icmtl_output_stream_write_packed_ttlrdata(&icmtl->os_remove, icmtl->zone->origin, TYPE_RRSIG, rrsig_sll); } rrsig_sll = rrsig_sll->next; } rrsig_sll = context.added_rrsig_sll; while(rrsig_sll != NULL) { if(RRSIG_TYPE_COVERED(rrsig_sll) == TYPE_SOA) { zdb_icmtl_output_stream_write_packed_ttlrdata(&icmtl->os_add, icmtl->zone->origin, TYPE_RRSIG, rrsig_sll); } rrsig_sll = rrsig_sll->next; } rrsig_update_commit(context.removed_rrsig_sll, context.added_rrsig_sll, icmtl->zone->apex, icmtl->zone, &namestack); rrsig_context_pop_label(&context); rrsig_context_destroy(&context); } else { log_err("incremental: rrsig of the soa failed: %r", return_value); } } #endif } // Disable cannot be done before dynupdate_icmtlhook_disable(icmtl->zone->origin); input_stream remove_rr_is; bytearray_input_stream_init(bytearray_output_stream_buffer(&icmtl->os_remove_), bytearray_output_stream_size(&icmtl->os_remove_), &remove_rr_is, TRUE); bytearray_output_stream_detach(&icmtl->os_remove_); output_stream_close(&icmtl->os_remove_); output_stream_close(&icmtl->os_remove); input_stream add_rr_is; bytearray_input_stream_init(bytearray_output_stream_buffer(&icmtl->os_add_), bytearray_output_stream_size(&icmtl->os_add_), &add_rr_is, TRUE); bytearray_output_stream_detach(&icmtl->os_add_); output_stream_close(&icmtl->os_add_); output_stream_close(&icmtl->os_add); /* current SOA */ input_stream remove_soa_is; input_stream add_soa_is; bytearray_output_stream_context soa_os_context; u8 remove_soa_buffer[256+10+256+256+32]; u8 add_soa_buffer[256+10+256+256+32]; output_stream soa_os; bytearray_output_stream_init_ex_static(&soa_os, remove_soa_buffer, sizeof(remove_soa_buffer), 0, &soa_os_context); output_stream_write_dnsname(&soa_os, icmtl->zone->origin); output_stream_write_u16(&soa_os, TYPE_SOA); /** @note NATIVETYPE */ output_stream_write_u16(&soa_os, CLASS_IN); /** @note NATIVECLASS */ output_stream_write_nu32(&soa_os, icmtl->soa_ttl); output_stream_write_nu16(&soa_os, icmtl->soa_rdata_size); output_stream_write(&soa_os, icmtl->soa_rdata, icmtl->soa_rdata_size); bytearray_input_stream_init(remove_soa_buffer, bytearray_output_stream_size(&soa_os), &remove_soa_is, FALSE); output_stream_close(&soa_os); /* new SOA */ rr_soa_get_minimumttl(&soa->rdata_start[0], soa->rdata_size, &icmtl->zone->min_ttl); bytearray_output_stream_init_ex_static(&soa_os, add_soa_buffer, sizeof(add_soa_buffer), 0, &soa_os_context); zdb_icmtl_output_stream_write_packed_ttlrdata(&soa_os, icmtl->zone->origin, TYPE_SOA, soa); bytearray_input_stream_init(add_soa_buffer, bytearray_output_stream_size(&soa_os), &add_soa_is, FALSE); output_stream_close(&soa_os); input_stream cis; concat_input_stream_init(&cis); concat_input_stream_add(&cis, &remove_soa_is); concat_input_stream_add(&cis, &remove_rr_is); concat_input_stream_add(&cis, &add_soa_is); concat_input_stream_add(&cis, &add_rr_is); buffer_input_stream_init(&cis, &cis, BUFFER_INPUT_STREAM_DEFAULT_BUFFER_SIZE); return_value = zdb_zone_journal_append_ixfr_stream(icmtl->zone, &cis); input_stream_close(&cis); return return_value; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec3_item.c0000644000077100007710000000012412650131756021166 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.469344 30 ctime=1454597652.519344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec3_item.c0000664000077100007710000004155012650131756021000 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include "dnsdb/zdb_record.h" #include "dnsdb/nsec3_item.h" #include "dnsdb/nsec3_owner.h" #include "dnsdb/nsec3_zone.h" #include "dnsdb/rrsig.h" #include #define MODULE_MSG_HANDLE g_dnssec_logger extern logger_handle *g_dnssec_logger; nsec3_zone_item* nsec3_zone_item_find(nsec3_zone* n3, const u8* digest) { return nsec3_avl_find_interval_start(&n3->items, (u8*)digest); } nsec3_zone_item* nsec3_zone_item_find_by_name(nsec3_zone* n3, const u8* nsec3_label) { u8 digest[256]; ya_result digest_len = base32hex_decode((char*)&nsec3_label[1], nsec3_label[0], &digest[1]); if(ISOK(digest_len)) { digest[0] = digest_len; return nsec3_avl_find(&n3->items, digest); } else { return NULL; } } nsec3_zone_item* nsec3_zone_item_find_by_name_ext(zdb_zone *zone, const u8 *fqdn, nsec3_zone **out_n3) { nsec3_zone *n3 = zone->nsec.nsec3; nsec3_zone_item *n3zi = NULL; while(n3 != NULL) { if((n3zi = nsec3_zone_item_find_by_name(n3, fqdn)) != NULL) { break; } n3 = n3->next; } if(out_n3 != NULL) { *out_n3 = n3; } return n3zi; } nsec3_zone_item* nsec3_zone_item_find_by_record(zdb_zone *zone, const u8 *fqdn, u16 rdata_size, const u8 *rdata) { nsec3_zone *n3 = nsec3_zone_get_from_rdata(zone, rdata_size, rdata); nsec3_zone_item *n3zi = NULL; if(n3 != NULL) { n3zi = nsec3_zone_item_find_by_name(n3, fqdn); } return n3zi; } bool nsec3_zone_item_equals_rdata(const nsec3_zone* n3, const nsec3_zone_item *item, u16 rdata_size, const u8* rdata) { u32 param_rdata_size = NSEC3_ZONE_RDATA_SIZE(n3); u8 hash_len = NSEC3_NODE_DIGEST_SIZE(item); u32 type_bit_maps_size = item->type_bit_maps_size; u32 item_rdata_size = param_rdata_size + 1 + hash_len + type_bit_maps_size; if(item_rdata_size != rdata_size) { return FALSE; } /* Do not check the flags */ if(nsec3_zone_rdata_compare(rdata, n3->rdata) != 0) { return FALSE; } const u8 *p = &rdata[param_rdata_size]; nsec3_zone_item* next = nsec3_avl_node_mod_next(item); if(memcmp(p, next->digest, hash_len + 1) != 0) { #if DEBUG_LEVEL >= 9 //nsec3_avl_find_debug(&n3->items, item->digest); //nsec3_avl_find_debug(&n3->items, next->digest); //bool exists = nsec3_avl_find_debug(&n3->items, p) != NULL; log_debug("nsec3_zone_item_equals_rdata: REJECT: %{digest32h} NSEC3 ... %{digest32h} was expected to be followed by %{digest32h}", item->digest, next->digest, p); #endif return FALSE; } p += hash_len + 1; return memcmp(p, item->type_bit_maps, item->type_bit_maps_size) == 0; } /** * * @param n3 * @param item * @param origin * @param out_owner * @param nsec3 output buffer * @param nsec3_max_size output_buffer rdata size * @param out_nsec3_rrsig return value, if not NULL, it's a reference into the DB */ ya_result nsec3_zone_item_to_zdb_packed_ttlrdata(const nsec3_zone* n3, const nsec3_zone_item* item, const u8* origin, u8* out_owner, /* dnsname */ u32 ttl, zdb_packed_ttlrdata* nsec3, u32 nsec3_max_size, const zdb_packed_ttlrdata** out_nsec3_rrsig) { u32 param_rdata_size = NSEC3_ZONE_RDATA_SIZE(n3); u8 hash_len = NSEC3_NODE_DIGEST_SIZE(item); u32 type_bit_maps_size = item->type_bit_maps_size; /* Whatever the editor says: rdata_size is used. */ u32 rdata_size = param_rdata_size + 1 + hash_len + type_bit_maps_size; if(nsec3_max_size < rdata_size) { return BUFFER_WOULD_OVERFLOW; } /* * NOTE: ZALLOC SHOULD NEVER BE USED IN MT * */ nsec3->ttl = ttl; nsec3->rdata_size = rdata_size; nsec3->next = NULL; u8* p = &nsec3->rdata_start[0]; MEMCOPY(p, &n3->rdata[0], param_rdata_size); p += param_rdata_size; nsec3_zone_item* next = nsec3_avl_node_mod_next(item); MEMCOPY(p, next->digest, hash_len + 1); p += hash_len + 1; MEMCOPY(p, item->type_bit_maps, item->type_bit_maps_size); u32 b32_len = base32hex_encode(NSEC3_NODE_DIGEST_PTR(item), hash_len, (char*)& out_owner[1]); out_owner[0] = b32_len; u32 origin_len = dnsname_len(origin); MEMCOPY(&out_owner[1 + b32_len], origin, origin_len); nsec3->rdata_start[1] = item->flags & 1; /* Opt-Out or Opt-In */ *out_nsec3_rrsig = item->rrsig; return rdata_size; } /** * * @param n3 * @param item * @param origin * @param out_owner * @param out_nsec3 return value, if not NULL, it is allocated by a malloc * @param out_nsec3_rrsig return value, if not NULL, it's a reference into the DB */ void nsec3_zone_item_to_new_zdb_packed_ttlrdata( nsec3_zone_item_to_new_zdb_packed_ttlrdata_parm *nsec3_parms, u8** out_owner_p, /* dnsname */ zdb_packed_ttlrdata** out_nsec3, const zdb_packed_ttlrdata** out_nsec3_rrsig) { const nsec3_zone* n3 = nsec3_parms->n3; u32 param_rdata_size = NSEC3_ZONE_RDATA_SIZE(n3); const nsec3_zone_item* item = nsec3_parms->item; u8 hash_len = NSEC3_NODE_DIGEST_SIZE(nsec3_parms->item); u32 type_bit_maps_size = item->type_bit_maps_size; /* Whatever the editor says: rdata_size is used. */ u32 rdata_size = param_rdata_size + 1 + hash_len + type_bit_maps_size; zdb_packed_ttlrdata* nsec3; // ZDB_RECORD_MALLOC_EMPTY(nsec3, nsec3_parms->ttl, rdata_size); u8 * restrict * pool = nsec3_parms->pool; nsec3 = (zdb_packed_ttlrdata*)*pool; *pool += ALIGN16(ZDB_RECORD_SIZE_FROM_RDATASIZE(rdata_size)); nsec3->next = NULL; nsec3->ttl = nsec3_parms->ttl; nsec3->rdata_size = rdata_size; u8* p = &nsec3->rdata_start[0]; MEMCOPY(p, &n3->rdata[0], param_rdata_size); p += param_rdata_size; nsec3_zone_item* next = nsec3_avl_node_mod_next(item); MEMCOPY(p, next->digest, hash_len + 1); p += hash_len + 1; MEMCOPY(p, item->type_bit_maps, item->type_bit_maps_size); u8 *out_owner = *pool; *out_owner_p = out_owner; u32 b32_len = base32hex_encode(NSEC3_NODE_DIGEST_PTR(item), hash_len, (char*)&out_owner[1]); out_owner[0] = b32_len; const u8 *origin = nsec3_parms->origin; u32 origin_len = dnsname_len(origin); MEMCOPY(&out_owner[1 + b32_len], origin, origin_len); *pool += ALIGN16(1 + b32_len + origin_len); nsec3->rdata_start[1] = item->flags & 1; /* Opt-Out or Opt-In */ *out_nsec3 = nsec3; *out_nsec3_rrsig = item->rrsig; } u32 nsec3_zone_item_get_label(nsec3_zone_item* item, u8* output_buffer, u32 buffer_size ) { yassert(buffer_size >= 128); u8 hash_len = NSEC3_NODE_DIGEST_SIZE(item); u32 b32_len = base32hex_encode(NSEC3_NODE_DIGEST_PTR(item), hash_len, (char*)&output_buffer[1]); output_buffer[0] = b32_len; return b32_len + 1; } void nsec3_zone_item_write_owner(output_stream* os, nsec3_zone_item* item, u8* origin ) { u8 tmp[128]; /* enough to get a 64 bit digest printed as base32hex */ u32 label_len = nsec3_zone_item_get_label(item, tmp, sizeof (tmp)); output_stream_write(os, tmp, label_len); u32 origin_len = dnsname_len(origin); output_stream_write(os, origin, origin_len); } void nsec3_zone_item_to_output_stream(output_stream* os, nsec3_zone* n3, nsec3_zone_item* item, u8* origin, u32 ttl) { u8 tmp[128]; /* enough to get a 64 bit digest printed as base32hex */ u32 param_rdata_size = NSEC3_ZONE_RDATA_SIZE(n3); u8 hash_len = NSEC3_NODE_DIGEST_SIZE(item); u32 type_bit_maps_size = item->type_bit_maps_size; /* Whatever the editor says: rdata_size is used. */ u32 rdata_size = param_rdata_size + 1 + hash_len + type_bit_maps_size; u32 b32_len = base32hex_encode(NSEC3_NODE_DIGEST_PTR(item), hash_len, (char*)&tmp[1]); tmp[0] = b32_len; /* NAME */ output_stream_write(os, tmp, b32_len + 1); u32 origin_len = dnsname_len(origin); output_stream_write(os, origin, origin_len); /* TYPE */ output_stream_write_u16(os, TYPE_NSEC3); /** @note NATIVETYPE */ /* CLASS */ output_stream_write_u16(os, CLASS_IN); /** @note NATIVECLASS */ /* TTL */ output_stream_write_nu32(os, ttl); /* RDATA SIZE */ output_stream_write_nu16(os, rdata_size); /* RDATA */ output_stream_write_u8(os, n3->rdata[0]); output_stream_write_u8(os, item->flags); output_stream_write(os, &n3->rdata[2], param_rdata_size - 2); nsec3_zone_item* next = nsec3_avl_node_mod_next(item); output_stream_write(os, next->digest, hash_len + 1); output_stream_write(os, item->type_bit_maps, item->type_bit_maps_size); } void nsec3_zone_item_rrsig_del_by_keytag(nsec3_zone_item *item, u16 native_key_tag) { if(item->rrsig != NULL) { zdb_packed_ttlrdata **rrsigp = &item->rrsig; do { zdb_packed_ttlrdata *rrsig = *rrsigp; if(RRSIG_KEY_NATIVETAG(rrsig) == native_key_tag) { /* Remove from the list */ *rrsigp = rrsig->next; ZDB_RECORD_ZFREE(rrsig); break; } rrsigp = &rrsig->next; } while(*rrsigp != NULL); } } void nsec3_zone_item_rrsig_del(nsec3_zone_item *item, zdb_ttlrdata *nsec3_rrsig) { if(item->rrsig != NULL) { do { zdb_packed_ttlrdata **rrsigp = &item->rrsig; do { zdb_packed_ttlrdata *rrsig = *rrsigp; if(zdb_record_equals_unpacked(rrsig, nsec3_rrsig)) { /* Remove from the list */ *rrsigp = rrsig->next; ZDB_RECORD_ZFREE(rrsig); break; } rrsigp = &rrsig->next; } while(*rrsigp != NULL); nsec3_rrsig = nsec3_rrsig->next; } while(nsec3_rrsig != NULL); } } void nsec3_zone_item_rrsig_add(nsec3_zone_item *item, zdb_packed_ttlrdata *nsec3_rrsig) { if(item->rrsig == NULL) { item->rrsig = nsec3_rrsig; } else { zdb_packed_ttlrdata *good = NULL; zdb_packed_ttlrdata *rrsig; while(nsec3_rrsig != NULL) { /* look for the first item on the list */ rrsig = item->rrsig; bool add = TRUE; do { /* Replaces another signature ? */ if(zdb_record_equals(rrsig, nsec3_rrsig)) { add = FALSE; break; } rrsig = rrsig->next; } while(rrsig != NULL); zdb_packed_ttlrdata *tmp = nsec3_rrsig->next; if(add) { nsec3_rrsig->next = good; good = nsec3_rrsig; } else { ZDB_RECORD_ZFREE(nsec3_rrsig); } nsec3_rrsig = tmp; } if(good != NULL) { rrsig = item->rrsig; while(rrsig->next != NULL) { rrsig = rrsig->next; } rrsig->next = good; } } } void nsec3_zone_item_rrsig_delete_all(nsec3_zone_item *item) { zdb_packed_ttlrdata *rrsig = item->rrsig; item->rrsig = NULL; while(rrsig != NULL) { zdb_packed_ttlrdata *tmp = rrsig; rrsig = rrsig->next; ZDB_RECORD_ZFREE(tmp); } } /* * Empties an nsec3_zone_item * * Only frees the payload : owners, stars, bitmap, rrsig * Does not change the other nodes of the structure * * This should be followed by the destruction of the item */ void nsec3_zone_item_empties(nsec3_zone_item *item) { nsec3_remove_all_star(item); nsec3_remove_all_owners(item); yassert(item->rc == 0 && item->sc == 0); ZFREE_ARRAY(item->type_bit_maps, item->type_bit_maps_size); item->type_bit_maps = NULL; item->type_bit_maps_size = 0; nsec3_zone_item_rrsig_delete_all(item); } /* * Sets the type bitmap of the nsec3 item to match the one in the rdata * Does nothing if the bitmap is already ok * * NOTE: Remember that the item does not contain * * _ hash_algorithm * _ iterations * _ salt_length * _ salt * _ hash_length * _ next_hashed_owner_name */ ya_result nsec3_zone_item_update_bitmap(nsec3_zone_item* nsec3_item, const u8 *rdata, u16 rdata_size) { /* * Skip the irrelevant bytes */ if(rdata_size < 8) { return BUFFER_WOULD_OVERFLOW; } const u8 *bitmap = rdata; u16 type_bit_maps_size = rdata_size; // skip hash + flags + iterations bitmap += 4; type_bit_maps_size -= 4; // skip salt length + salt (and checks) if(type_bit_maps_size < *bitmap + 1) { return INCORRECT_RDATA; } type_bit_maps_size -= *bitmap + 1; bitmap += *bitmap + 1; // skip hash length + hash (and checks) if(type_bit_maps_size < *bitmap + 1) { return INCORRECT_RDATA; } type_bit_maps_size -= *bitmap + 1; bitmap += *bitmap + 1; /* * If it does not match, replace. */ if((nsec3_item->type_bit_maps_size != type_bit_maps_size) || (memcmp(nsec3_item->type_bit_maps, bitmap, type_bit_maps_size) != 0)) { /* If the size differs : free and alloc */ if(nsec3_item->type_bit_maps_size != type_bit_maps_size) { /* TODO : take the memory granularity in account in case of ZALLOC enabled */ ZFREE_ARRAY(nsec3_item->type_bit_maps, nsec3_item->type_bit_maps_size); ZALLOC_ARRAY_OR_DIE(u8*, nsec3_item->type_bit_maps, type_bit_maps_size, NSEC3_TYPEBITMAPS_TAG); nsec3_item->type_bit_maps_size = type_bit_maps_size; } memcpy(nsec3_item->type_bit_maps, bitmap, type_bit_maps_size); } return SUCCESS; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb-zone-find.c0000644000077100007710000000012412650131756021603 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.358344 30 ctime=1454597652.412344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb-zone-find.c0000664000077100007710000001264412650131756021417 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #ifdef DEBUG #include #endif #include #include #include #include "dnsdb/zdb.h" #include "dnsdb/zdb-zone-find.h" #include "dnsdb/zdb_zone_label.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_error.h" #include "dnsdb/dnsrdata.h" #include "dnsdb/zdb_listener.h" #if ZDB_HAS_NSEC_SUPPORT != 0 #include "dnsdb/nsec.h" #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 #include "dnsdb/nsec3.h" #endif #ifdef DEBUG #define ZONE_MUTEX_LOG 0 // set this to 0 to disable in DEBUG #else #define ZONE_MUTEX_LOG 0 #endif extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger /** * @brief Get the zone with the given name * * Get the zone with the given name * * @param[in] db a pointer to the database * @param[in] exact_match_origin the name of the zone * * @return a pointer to zone or NULL if the zone is not in the database * */ static inline zdb_zone* zdb_zone_find(zdb *db, dnsname_vector *exact_match_origin) // INTERNAL mutex checked { /* Find label */ yassert(group_mutex_islocked(&db->mutex)); zdb_zone_label *zone_label = zdb_zone_label_find(db, exact_match_origin); // zdb_zone_find if(zone_label != NULL) { return zone_label->zone; /// @todo edf 20141006 -- acquire } else { return NULL; } } bool zdb_zone_exists(zdb *db, dnsname_vector* exact_match_origin) { zdb_lock(db, ZDB_MUTEX_READER); bool does_exist = (zdb_zone_find(db, exact_match_origin) != NULL); // INTERNAL zdb_unlock(db, ZDB_MUTEX_READER); return does_exist; } /** * @brief Get the zone with the given name * * Get the zone with the given name * * @param[in] db a pointer to the database * @param[in] name the name of the zone (dotted c-string) * * @return a pointer to zone or NULL if the zone is not in the database * */ static inline zdb_zone * zdb_zone_find_from_name(zdb* db, const char* name) // INTERNAL mutex checked { dnsname_vector origin; u8 dns_name[MAX_DOMAIN_LENGTH]; if(ISOK(cstr_to_dnsname(dns_name, name))) { dnsname_to_dnsname_vector(dns_name, &origin); zdb_zone *zone = zdb_zone_find(db, &origin); // INTERNAL return zone; } return NULL; } bool zdb_zone_exists_from_name(zdb *db, const char* name) { zdb_lock(db, ZDB_MUTEX_READER); bool does_exist = (zdb_zone_find_from_name(db, name) != NULL); // INTERNAL zdb_unlock(db, ZDB_MUTEX_READER); return does_exist; } /** * @brief Get the zone with the given dns name * * Get the zone with the given dns name * * @param[in] db a pointer to the database * @param[in] name the name of the zone (dns name) * * @return a pointer to zone or NULL if the zone is not in the database * */ static inline zdb_zone * zdb_zone_find_from_dnsname(zdb* db, const u8 *dns_name) // INTERNAL mutex checked { dnsname_vector origin; yassert(group_mutex_islocked(&db->mutex)); dnsname_to_dnsname_vector(dns_name, &origin); zdb_zone *zone = zdb_zone_find(db, &origin); // INTERNAL return zone; } bool zdb_zone_exists_from_dnsname(zdb *db, const u8* dns_name) { zdb_lock(db, ZDB_MUTEX_READER); bool does_exist = (zdb_zone_find_from_dnsname(db, dns_name) != NULL); // KEEP zdb_unlock(db, ZDB_MUTEX_READER); return does_exist; } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/hash_table_values.c0000644000077100007710000000012412650131756022606 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.383344 30 ctime=1454597652.317344534 yadifa-2.1.6-5826/lib/dnsdb/src/hash_table_values.c0000664000077100007710000034646212650131756022432 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Hash table used to hash the dns names. * * Hash table used to hash the dns names. * * @{ */ #include "dnsdb/dnsdb-config.h" #include /** * @note I've tried the transposed hash table to see what would be faster: * * [0](0) : 33572985/s * [0](T) : 28201308/s * [1](0) : 17625817/s * [1](T) : 16023470/s * * [0](ORIGINAL) ayiuoez9 : 89285714/s * [0](TRANSPOS) ayiuoez9 : 76923076/s * [1](ORIGINAL) aeiouyz0 : 88495575/s * [1](TRANSPOS) aeiouyz0 : 78740157/s * [2](ORIGINAL) aeio : 178571428/s * [2](TRANSPOS) aeio : 126582278/s * [3](ORIGINAL) m : 434782608/s * [3](TRANSPOS) m : 357142857/s * [4](ORIGINAL) : 714285714/s * [4](TRANSPOS) : 666666666/s * * The original one is the fastest with both the old and the new algorithm. * */ /* Hash Values */ const u32 ZDB_HASH_TABLE[256][37] ={ {0xD885253C, 0x099128C1, 0xED616222, 0xFBBDF883, 0x068A4C7C, 0xF67E891C, 0xC677F8A4, 0x66CA897F, 0x12E738AB, 0x72A0BE2B, 0x11993499, 0x721556B1, 0x705D9504, 0x1871489D, 0x368E67DF, 0x41529873, 0x3C543C6F, 0xF309AAF5, 0xCAB1BEA5, 0x68CE1DBF, 0x4AA2A113, 0xDC25905E, 0x62414D91, 0xC2F014D1, 0xE7626577, 0x7707D6B7, 0xFA082FCF, 0xD62E4D5D, 0xFA106A65, 0x7910F6E8, 0x852D4222, 0xD0BF0B0B, 0x9D9DED71, 0x81111D09, 0x8D789900, 0xC54486B5, 0x10D50D72}, {0xA2491394, 0xCC2B1C8D, 0x150567B0, 0xC492F934, 0xD6F1BF73, 0x2D1E8548, 0x58422644, 0x716148CE, 0x78E95C1B, 0x173F5E66, 0xD3206569, 0xB62603D0, 0xF0EC1CFF, 0x0AA221A6, 0xF1664A6C, 0x16318678, 0x03E6D82A, 0x219FCA53, 0xC230E1AC, 0xC8EDB62C, 0x15E1898C, 0xB47F0AAE, 0x57049F3D, 0x6696233C, 0x0D5BA666, 0xCCFFA387, 0x00ACEC12, 0xF9834B21, 0x9E146B14, 0x1B5B813F, 0x979F0C04, 0x1E31AE5D, 0xFA9A6309, 0xDE2848E3, 0xF8E07777, 0xF183C9AA, 0xF946ACDF}, {0x3D4AEC7E, 0x99A882B2, 0x48555C8B, 0x93F5A31F, 0x2E180A28, 0x16E840B8, 0x2482CEBC, 0x31A6ED1B, 0x230F22B0, 0x8DADB3C4, 0xA9C2AFB0, 0x077B0300, 0x088FF2F4, 0xB9947644, 0xB775505C, 0x2769A2DC, 0xD48966B4, 0x7D488DAA, 0x1C7A01EE, 0x785D9285, 0x2423CE62, 0x8443A91E, 0xE60C3BBA, 0xB426DCFB, 0xD9FE0411, 0x1D1D7569, 0x18A0E08E, 0xC367805F, 0xD9603669, 0x9608F952, 0xC9DB7D94, 0x335B6305, 0x21568518, 0xE4A3A305, 0xDE663512, 0xA373935E, 0x4C2BA61C}, {0x5320BF91, 0x46B97147, 0xA661442E, 0x7B99D786, 0xA4992356, 0x63DFD36B, 0x8BDED2EA, 0xF4D581ED, 0x8EB9C4E1, 0xB25C94DD, 0xB9B6FD62, 0xCA117B01, 0x8ACF553E, 0x28E5C3A6, 0x69D8E108, 0xD6553C51, 0x89CC0635, 0x8E4D3109, 0xD0F2A698, 0x20C3B5CA, 0x6B185697, 0xF15EC427, 0x5143E302, 0xDC208CBF, 0x4CE40E31, 0x640D6365, 0x1DD81DA6, 0x3C19F9A7, 0xCBDF28EB, 0xDE235A7F, 0x1BD4F443, 0xC56317FA, 0x587EA1D3, 0x4744603D, 0xAF8C3D83, 0xD0FD7229, 0xDDE6EBCC}, {0x4AEF7B3E, 0x67475872, 0xB9174BDE, 0xABDECF1A, 0xE486D79F, 0x0A8CF93E, 0xEE4E8E99, 0x5FEC125B, 0x9502FA02, 0xECD50BCA, 0x4DC485F2, 0x3E12FF9E, 0xFF74EC95, 0xFEEAE032, 0x3EA99AFD, 0x90A4DE00, 0xB0BFC059, 0x1609AA78, 0xF4BC7936, 0x4F202FE9, 0xA22992E7, 0x34A1267C, 0x406AB625, 0x009F8F47, 0x6C316B8D, 0xE40E8218, 0x407255B0, 0x12017B30, 0xB1BE5052, 0x6777EE94, 0x0C60B1B7, 0x313229FC, 0x8341F8FD, 0x57F8854E, 0xBEC773E8, 0x19662938, 0xB76E142B}, {0x5CF777FB, 0x4E962996, 0x7ED09551, 0xE0AA3C02, 0x252BE4EB, 0x974EF663, 0x54DF80A7, 0x16115A3F, 0x2721838C, 0xCD813B11, 0xB1A52503, 0xF4F645FD, 0xBBE5DFAE, 0x2724C441, 0xEBC55FF6, 0x2984B0C0, 0x16BCD529, 0x2EB8DC8F, 0x02E5D931, 0x501F8047, 0xD0E6EA24, 0x0C6A014F, 0xDEA06675, 0xFAC56253, 0x67DD573A, 0xF6462E03, 0x1E28241A, 0xEBFBD5E1, 0xD825130B, 0xE339D315, 0x0DA46324, 0x5CE9B3D6, 0x81E0A9EF, 0xB1A9C3DB, 0xBF7AD38A, 0x039A8FB5, 0x4C9A77A4}, {0x668C91BD, 0xDE6B5641, 0xBAA14EA8, 0x047FED27, 0xEB96B51D, 0x0BAB2C44, 0xF022C7DF, 0xAC9026C4, 0x67FE3EAA, 0xF2E994E9, 0x4825DBCA, 0xB037E49B, 0x2005DA9E, 0xE4873DA2, 0xE0F08ADE, 0x84C3153C, 0x58C3B7DA, 0xB1E59747, 0xD3694882, 0xDE570D81, 0x8E2B9FAE, 0xADEEA492, 0x54292E36, 0x580BD4C9, 0xDCBA370C, 0xE04A6FCB, 0x557C21C7, 0xF30371C0, 0x1043CD6B, 0xC5F01E33, 0x52A3AC37, 0xC7EC9ECA, 0x6D432432, 0x06CB13BB, 0x6C564C7A, 0x4A12148E, 0x4B7F404B}, {0x9BDB1482, 0x048EC261, 0x3D1B8FDB, 0x78F05475, 0x1B80E5BA, 0xA890593B, 0xDF690678, 0x9F5EF12D, 0x28BFE37E, 0xFA491DAF, 0xAA1546DB, 0x069FA750, 0x3967BC58, 0x938DC293, 0x01E549D7, 0x34EE7EFB, 0xBF480AC3, 0x9FECFBD4, 0xECEFDB6F, 0x25E9AD0E, 0x5493A192, 0xC0AD627A, 0x62046635, 0xC1612124, 0x71AC3E8D, 0x805D5B6F, 0xA3E44C56, 0xAC192888, 0x7072B105, 0x58C504E0, 0x7B44F21C, 0xBBFDE1C2, 0x5602A037, 0x3D0341F6, 0xE2DD035F, 0x374021E7, 0x19105191}, {0xD2134A33, 0xDE18E8A0, 0xB414D965, 0x229D9CEF, 0xAE925137, 0x31D1641A, 0x0DBB8E44, 0xADF0AE51, 0xA7D920A2, 0x7DB74E6A, 0xD4512728, 0x8B90EB06, 0xEE56F37B, 0x75BEC3F3, 0x96E95EBD, 0x6CED8699, 0x6CDF6345, 0x378E6405, 0xD33DDCFC, 0x9B5C98A0, 0x10358257, 0x2EDA506C, 0x3E7D70AE, 0x99C21853, 0x545A2DA8, 0xB446D08C, 0x93AFE46D, 0x72F8A9D5, 0xD29B25C5, 0x051E29B5, 0x309424B4, 0x0B6A6BB4, 0x5F861964, 0x770E74C2, 0xB1BD9EC9, 0x95224FA1, 0x515C04A9}, {0x9000698C, 0x82B8B42C, 0x1E23E486, 0x676813B4, 0x08F291DB, 0x377F32C9, 0xED9FBED8, 0x1A6AB46E, 0x8C735C50, 0xB2B31FD5, 0xFA404624, 0x1071139D, 0x37B633C9, 0x943FC3AF, 0x2CBFBCBB, 0xC3D0D3CA, 0x9E625661, 0x973176D2, 0x2E10CBB6, 0x8D49AFBC, 0x62A5519E, 0x75DD0F0F, 0x43B7328F, 0xA408E248, 0xE94F9350, 0xCE860573, 0x9423CB42, 0x853A50CA, 0xE46D0292, 0xD44A52DB, 0xDBFDDCC7, 0xA4407C03, 0x2B4C425F, 0x2D29A766, 0x45F1E52C, 0x3AEB6F11, 0x5330CCAC}, {0x76BFBF07, 0xE684CFD2, 0x05431C0F, 0x7EFA79B6, 0xDF3B2DDB, 0x3C3B3ABC, 0xA400BF3D, 0xDD095A2B, 0x7A455760, 0xC54D3A68, 0x17EE161D, 0x3F42E066, 0x2713B8A3, 0x0553DE0F, 0xBC3F48DD, 0x8865D9A7, 0x4CA2E449, 0x51F88F57, 0x7069CB5B, 0x4B14366A, 0x4BFA4D55, 0x3FF0981D, 0x923EC9CD, 0xD94AFCD5, 0xC9C0C874, 0xA0A06A9A, 0xF744A314, 0xFE383B39, 0xCEEE5993, 0xA86EB6A6, 0x102088B4, 0xDC1D72E6, 0x71F97D53, 0xD6C42CFF, 0xAC9FE0E7, 0x352114D1, 0xA64E38C8}, {0x2FA7725C, 0x5BE73F35, 0x6EFE4BAD, 0x7184BF60, 0x9C29C2DB, 0x8DE48EB8, 0xEED5F58E, 0x330DA68C, 0x256F7E5A, 0x7419E8E3, 0x0BBD42B1, 0xAB17E7D5, 0x9B2E5472, 0x2CB5EAA4, 0x40DBEEE7, 0x3335CC7E, 0x06FF0A37, 0x1047797D, 0x25FCD2E1, 0xEABBCCDF, 0x1EB309B2, 0xF79FBE57, 0xB7467E44, 0x51D6EF89, 0x218CA588, 0xC850142C, 0x7C1A80BA, 0x34D39476, 0xB48922F0, 0x155B53AD, 0x27B53A4D, 0x464E7667, 0x23982914, 0xA94D3128, 0xEB560A54, 0x468C007A, 0xBF3F34C8}, {0x23A52E98, 0x4E9B4773, 0x3C9F662C, 0xB517FEEC, 0x270F4188, 0xA7504D8E, 0x45C33387, 0x18F1E537, 0xD7B186E8, 0x5772A5AA, 0x361747FC, 0x0CC8A293, 0xA2DD99E1, 0x5E2CCBD7, 0x3AEF54BB, 0x432BB4E2, 0x03F54A89, 0x82BA0987, 0xD215E742, 0xE76C76AB, 0xC928216E, 0x7DAAAB61, 0xBF7B15F4, 0xC124A10E, 0xCCCB931D, 0xC7A9986F, 0x49C69A27, 0x8B46A085, 0x94FE667F, 0xD23C9C37, 0x9D71C5F8, 0xCF1AC6AB, 0x9D05D458, 0x897645EB, 0x6BC45A56, 0x502E204E, 0x732C5136}, {0xCBA11C51, 0x8836F44B, 0x91C3980D, 0x42A82946, 0xA6FA2BDE, 0x6085A76F, 0x74D7452A, 0xA1C2E971, 0x0508DE5D, 0x8A3DBA4D, 0x3F8EEEB8, 0xB13D58A7, 0x27D72E34, 0x1AC7755E, 0x855F3E47, 0x1DEF7AFE, 0xF278D75D, 0x1BF0B875, 0x71C7BAA4, 0x375C2BCC, 0xE20360BD, 0xEA964E79, 0x38EBD6A6, 0x612613E6, 0xA9970CCF, 0x03B1484C, 0xCFD01C3A, 0xA645F8CB, 0x82980428, 0x7B68B294, 0x05597AFE, 0x5B641235, 0xD6B3DF3E, 0x899B896E, 0x771F9286, 0xAA9AEAF7, 0x4679FB37}, {0x9CB57F89, 0xE91DE720, 0x8CFD7D3A, 0xDB4005DC, 0x0C8198D2, 0xA388B79D, 0xDA0D3862, 0x0DFFC4EA, 0xAC3096EE, 0x3AACAD45, 0x0B452C37, 0x6F6114A5, 0xF7EE9566, 0x10329CA7, 0x4BA654F9, 0x35492AEC, 0x3AC3A53C, 0xC8D14C2E, 0xC17E387B, 0xCC57F0EB, 0x842DA76A, 0x1F0CD704, 0x1608EBD5, 0xD4EFB465, 0xF50F72AD, 0xF27270FA, 0x8C40F36F, 0x2D225C13, 0x7AAAA1E9, 0x98916391, 0x3A8B64A5, 0x826660A7, 0x3BA3F8E5, 0x378A9815, 0xB396302B, 0x3E30B3C2, 0x4EE1A91F}, {0x2DF0ECD0, 0x12B333C4, 0x9C541A74, 0x19421C37, 0x9DC3BC82, 0x4BF79A88, 0xCCFDF726, 0xEFF014FD, 0x0A7B8F73, 0x55EFFCF5, 0xFFEB81B7, 0x10D1651A, 0x51BBFEDA, 0xAD019A49, 0x4609E0FF, 0x89D1C25A, 0xF33A6007, 0x53EAC4F4, 0xCE40BD0D, 0x5EBD4D2D, 0xFE5D883C, 0x843C4F0D, 0x6681F4DF, 0x6A32CCDE, 0x137CE3EE, 0xAFEBD12F, 0xDC556527, 0x2C76EE4E, 0x4C7A062E, 0xD108610D, 0x6CC87CC6, 0x8352559E, 0x63C7297A, 0xDE76E562, 0x668F4E87, 0x78208FF5, 0x61EC64CE}, {0x79C953D7, 0x36B0A00C, 0x47DE99BE, 0x6AF532FE, 0xD593F790, 0x7CF2E4A4, 0xBF7BAFE5, 0x186FB65F, 0x201760B5, 0xD228CC03, 0x19E8EC8B, 0x514346CC, 0xE84BA45F, 0x77C93EB6, 0xB30F30E5, 0x46D334FC, 0x9EE5D985, 0xAF31CB1B, 0x88D3C5F7, 0x65BF04BB, 0x0C788FCC, 0x442A4D73, 0x8B0325AD, 0x3C792A03, 0x060F192D, 0xAD5C2463, 0x141B2BBE, 0x292D9C47, 0x21B6D27B, 0x2D7A264B, 0x98EF0DB4, 0xA6ECBF71, 0xE6F9565A, 0x24FE9F33, 0xDFB875D1, 0x70121197, 0x6E4F8E16}, {0x03BF81D0, 0xCE741340, 0x0FAEC483, 0x618EEE98, 0xE55C6259, 0x9C7EAAA9, 0x6351E282, 0x88FB4CC2, 0x8C460F1E, 0xBF8A1BC6, 0xE819D8D3, 0xD3BDF593, 0x7F1763CE, 0x41146EA2, 0xB0056809, 0x6CB6F389, 0x0FD5FCEE, 0xCF1D75D6, 0x01BD935E, 0xD89DCAB5, 0x314AD29C, 0x7DCA5CDB, 0xA91559B8, 0x49F5E92D, 0x0043CE81, 0x58355888, 0x697C051A, 0x94D0AF60, 0x69DB44C8, 0xCE438107, 0x133530C1, 0xF691C557, 0xCDD18634, 0xCBF8FDC3, 0xBC669C1A, 0x8BDFA83A, 0x17AFE9C8}, {0xC4F29786, 0x55BC48FE, 0xE2F486C0, 0xA43AEC74, 0x3D574BD5, 0x308747BD, 0xCC254739, 0x0BB39211, 0xF7D472DC, 0x9B96AE41, 0x5BE53336, 0x6947FB44, 0xB3EC1B1D, 0x6557EB4E, 0x4A904192, 0x6039E9E9, 0xE7DF3721, 0x2D3DC0EF, 0x3DF37128, 0x52ADD676, 0x3A891C83, 0x955BA477, 0x7608920C, 0x63F66B84, 0x89245BF4, 0x84C35891, 0xEBB17BA2, 0x2EE23E6F, 0xD7E2AE29, 0x6F517BDF, 0x9E758F74, 0x6C31CA6F, 0xAE6EE2F1, 0xE39492F9, 0xE459308D, 0xEC5401DA, 0xDE273F8A}, {0x76972B4A, 0x834C6929, 0x7FC6B6D4, 0x6938B3AF, 0x8AC97047, 0xA795A7FC, 0x68FED4B7, 0xAF7D6323, 0xC14938A3, 0x10448F83, 0xC23A71D5, 0x7C129684, 0x61258A43, 0x58E2687D, 0x3849C7DA, 0x887A27B5, 0x08D7BC75, 0x1FBD688C, 0xB8F1B363, 0xBA530790, 0x634D32A5, 0x5921F197, 0x29F5319D, 0x89F72CE9, 0x7A7F98E7, 0x59D79A52, 0x38F801C1, 0x9189A4C7, 0xB28F48B9, 0xB09774C5, 0x2FD7C8FF, 0xF6073A90, 0x4BA1B4F7, 0x87F8BD46, 0x5D93668C, 0xDB25E918, 0x6071FB3E}, {0xDC8D5C7F, 0xE9B946C7, 0xC33F961E, 0x76B40B05, 0x7229BEE5, 0xA578494B, 0xD193EED2, 0x634B3767, 0xA1A65BA4, 0xB2A18235, 0x774E87A1, 0x6C8ADE9F, 0x78B46ADF, 0x407207E6, 0xB32BE3AC, 0x3C2AB33A, 0xC859B31C, 0x5455D4E3, 0x6A75F655, 0x30FF62CD, 0xBA638A5B, 0x29A0B2E4, 0xB956976C, 0x7F48B1C1, 0x4FFF27C2, 0x0E964ED4, 0x2F520E8F, 0x0FA8F0AB, 0x6CD557C4, 0xBB84490C, 0x276708EA, 0xE01D97C3, 0x24FB5A86, 0xED21132C, 0xD21372B0, 0x81F19CDD, 0x5E5E8460}, {0xFFCAE46D, 0xB98757A7, 0x51D63497, 0xE5DF95A3, 0xBDD6478B, 0x2EA1FFD4, 0xABCBA456, 0xDC6ECA92, 0xEA167D0C, 0x3715AF06, 0x2B86317D, 0x535C8C2D, 0x397763D6, 0xFF949AA1, 0xAEBE24BB, 0x059BB8CA, 0x2C78A456, 0xA040F26F, 0x3D30E1E0, 0x9D13C549, 0x0E0CEB7D, 0x45956EE4, 0xF987526A, 0xB89F88ED, 0x028AE881, 0x76D914A5, 0x44237D8E, 0x56263328, 0x120D7AAC, 0xA2D7FC89, 0x485A2163, 0x7AB65F15, 0x49EA029E, 0xCD019A18, 0x3C954E8D, 0x41138BCE, 0xF1636DC9}, {0xA8DA5479, 0xF274D9D3, 0x58584D14, 0x9DD05A48, 0x588391AA, 0x2D9C5D08, 0xBB2A229A, 0xAEDDCE59, 0x947E8C0C, 0x921AA6B0, 0x859077E0, 0xD3E07D58, 0x5811D762, 0x23B0636B, 0xF7CC5429, 0xE64B42D2, 0xEE5F9EA7, 0x879F94D8, 0xF770D695, 0xDB67E31D, 0xF00E3CB2, 0xC6F70C2D, 0xB71E95C2, 0x1A3836BF, 0x91405CE5, 0xF6E5AB42, 0xEA25B8A9, 0xC7FDFE5E, 0x9C9EDB98, 0xFCBEE52E, 0xA097519D, 0x597C2EB0, 0x3529A37D, 0xD1004D1B, 0x6D172B46, 0xD7CCE7CC, 0xF3244EAA}, {0x7B84EB7E, 0x13EE01B3, 0x1999758A, 0x82E51C1A, 0x1DBC0715, 0x9F4E6A49, 0xB216CC8D, 0xD7D82BED, 0x2FF36E0E, 0x77107DD9, 0x0FEBD72E, 0x1283A686, 0xBD5A4935, 0x623E9F54, 0xB087F32D, 0xCFD89761, 0xBFFE31BA, 0x277E82EE, 0xDE0788DD, 0x5844BE6D, 0x134DF11A, 0x34DD936F, 0x92192354, 0xBC1C835B, 0x076ACF0C, 0xB4F48855, 0xAD3F367F, 0xCE8E104D, 0x1E0BFE6A, 0xB98D386F, 0x2A004912, 0x8D55C0C2, 0x089A10ED, 0xFC7F202C, 0xC969F5C4, 0xF181680B, 0x6D727DF1}, {0x357786BB, 0xEBFFA61E, 0x43582E82, 0x5B315B5E, 0x93993D96, 0x5C4DD85A, 0x03ECD45B, 0x07A82EC4, 0xF8389AC6, 0x315636C5, 0xF196985B, 0x9AB97A91, 0xA3BF113F, 0xA5028C88, 0x4B665550, 0x765309E3, 0x54C5E6D0, 0xC96F43C5, 0x71B8D322, 0x22631A18, 0xA16E6C83, 0x431C3476, 0x638BEBE3, 0x8C7B2D40, 0x45864744, 0xE1C7A748, 0x7010429F, 0xFCE8ACA0, 0x4529CF75, 0x4941483D, 0x0E585CBD, 0x17EFD999, 0x644BEC64, 0x565FCE57, 0xDA9A2FF0, 0x1E95C6C5, 0x5D82260F}, {0x9740DBF4, 0x5CAAFAFA, 0xE0781578, 0x2577EB5E, 0xE2203046, 0xA94BF2E5, 0x79A612DB, 0x10F94313, 0xF6983D99, 0xE47F681A, 0xBD6641EA, 0xB3620DEB, 0x92C503DE, 0x873CBA35, 0x6028D617, 0xD0929BD7, 0x5CA57C25, 0x70B2872C, 0x325F24B7, 0x9FEE662F, 0x655FAF73, 0x205D1E1F, 0x979D5D76, 0xBB39D090, 0xC74451CC, 0xF249B44D, 0x59413684, 0x78E99106, 0x3025110C, 0xCC602C86, 0x93CFFAAA, 0x8B3A3723, 0x5C46CF21, 0x1AE33E88, 0xEB9FD840, 0x8D56725A, 0x7DB70AED}, {0x9B105C95, 0x90607C64, 0xA4C03E0A, 0x4501B61E, 0xB5AEC5BF, 0xFB6D4B84, 0xD8513A75, 0x45C3A38E, 0x4B229625, 0x1248A03D, 0xCD4B95BD, 0x39FAEFD1, 0x9512C46A, 0xAC15BAFD, 0x9C6EBBF5, 0x1D5C5A3E, 0xBCF07AB8, 0x773FAC88, 0xBA2AA4F2, 0x796DC8C9, 0x1579913B, 0xD2C94654, 0x56937ACB, 0x87ED1382, 0xF96B6734, 0xE538E83F, 0x2FBF6651, 0x99F906FF, 0x56A0DE52, 0x51C87788, 0x0E2E73F7, 0x311863C1, 0x88627FA4, 0x75BDAC47, 0x4F91DC25, 0x65EAB074, 0xFB223A35}, {0x100A7345, 0xFBE038D2, 0x8D1F78AF, 0x22CCD951, 0x97672AAD, 0xD9F8A87A, 0x7C088D40, 0x2C370160, 0x90E14768, 0x55EB59E5, 0xE5CED485, 0x49C1D53B, 0x946FF420, 0xF6D692C3, 0xE975887A, 0x3F904803, 0x6309D281, 0xE45EA2E4, 0x8BC54B46, 0x9F5ABE00, 0xE86FC80A, 0x02617BBC, 0x0C99335D, 0x69133A45, 0x272C8A86, 0xE958EC72, 0x205803F5, 0x39467437, 0x87145369, 0xEC018595, 0xE64F2DA3, 0x70194301, 0xCD59F6ED, 0x7E4217EE, 0x648D093C, 0x2C294305, 0x16F697B7}, {0xB1B3EFF1, 0x606D21AA, 0x431CBF9D, 0x5AED97C1, 0x9353520F, 0xF006DEF3, 0x5FDC34C5, 0xEEDB20C2, 0x841F7843, 0xD185480C, 0xE2032F52, 0x9D565FAA, 0x68FD323F, 0x96A649DD, 0x0B77AD33, 0x63B6B315, 0x2FE9D0E1, 0x84A92C8C, 0x6D3E8EDC, 0xA6DCA4E3, 0xED0C6BA0, 0x67CE7956, 0x8F6E1455, 0xCF61B06D, 0x3F874B5C, 0x2A233586, 0x2011A762, 0x4AE0C327, 0xD7983D3F, 0x62ACD15D, 0x900E9EA6, 0xEB749CB8, 0xD15AF322, 0x210B89D1, 0x064D6934, 0x3B0C8F57, 0x3420F11C}, {0x7D8A9FF7, 0x08F1B9B4, 0x24ACBC49, 0x8AA2831D, 0xB8A8AE49, 0xB283ED38, 0x022FCDBE, 0xC243A109, 0x253C7F85, 0xC27DEA5F, 0xF417CC89, 0x82608798, 0xD4A7BBCB, 0x33700BA3, 0x901C3641, 0x64D8F603, 0x7C515EB3, 0xD1C7CE0B, 0xE7F4A2CD, 0x823AC760, 0xA7B0F961, 0x37D8BBDC, 0x603CF9C9, 0xD9F15C8C, 0x97764CF1, 0x2674800D, 0xB466FE93, 0x6F277CD4, 0x54FF4CA8, 0x2C7FD159, 0xD3CA6E35, 0x0A89316E, 0xE7AF6B75, 0x064E5DA4, 0x9EC433F1, 0x1976FE95, 0xE77F45ED}, {0x3A60FD52, 0x95F413F8, 0x387CFBD3, 0xA4BEA704, 0x8C252DA4, 0x4E947E3A, 0x81E8BF58, 0x0A297D88, 0xEFCD2549, 0xEA107720, 0x3A729CAB, 0x5B00ADFD, 0x59192E1E, 0xD6E32A28, 0xF2F4AC0F, 0xA439D94E, 0x52C0DD0A, 0x2C0DB3ED, 0x65976D81, 0x7B74AFC9, 0x888A5225, 0xF3E9DD6C, 0xE4D950BC, 0x5B08D44E, 0xB8B89D02, 0x4C0F5BCD, 0x23E7528A, 0x6A74631C, 0x32CEBF8C, 0xB6B3F91A, 0x24F5E4EA, 0x91EEE30F, 0x703B9D96, 0x37EE5806, 0x59539C69, 0x16871230, 0x19518348}, {0x92AAACF7, 0x963F837C, 0x9FFBBBB8, 0x267DBAB0, 0xE0355406, 0xCEA99FC7, 0xC0944C8F, 0x99A3D9B7, 0xC9C5AF82, 0xB421EA6F, 0x037D1FE2, 0xB4C819A7, 0x61719630, 0xB0D1FD01, 0x194A1121, 0xDA5B198A, 0xE0C245C1, 0xFA277523, 0x4ABDF545, 0x6F84062F, 0x168533B7, 0x8933835E, 0xC51012F8, 0xA0CD469F, 0x54DF3902, 0x5A5A8C4A, 0x9B24E67A, 0x209E5DBD, 0x8CDB97E7, 0xC9787ABA, 0x0B7E6C91, 0xF543DFB9, 0x28C2C779, 0x37DE8895, 0x920B99FC, 0x785FF132, 0x083204B8}, {0xDDA027A3, 0xC51AFB37, 0xCD9A3345, 0xA846243D, 0x3C2F56B6, 0x62A34DAA, 0x5B0DE142, 0x471B3B91, 0x6AF4BC34, 0x785A4F5F, 0x4ACF9132, 0xBDB392A0, 0x048AC4F5, 0x760E3CBF, 0x1BED9EE7, 0xC93F365B, 0x6FFBEC8E, 0xD4BBA12D, 0x590D33F8, 0xA81AD3CE, 0xB9E47136, 0x45CDA3F6, 0x99525C3E, 0x789604C6, 0xC1C124E1, 0xE7F5F0CF, 0xF2F5C175, 0xBB05A900, 0xE3D2853D, 0x180A0ACF, 0x163286AB, 0x58FE58BF, 0x953DE4A8, 0x09C6B8E4, 0x96DE0C2E, 0xC8ACB2E7, 0x37244EA5}, {0x4D594763, 0x56FC0696, 0xAC29E39B, 0x538FFF12, 0x164F3A03, 0x29B2B9D3, 0xA2C3FB7D, 0xBB14B942, 0xF88748DD, 0x365DADA6, 0xDEB734DE, 0x6ED860D4, 0x5E759942, 0x93E6BFA2, 0xF4B32040, 0x3651C389, 0x7F9EA5C5, 0xD7A6E0BE, 0x94D0CD8E, 0xA28289C8, 0xAAF5B3D2, 0x2C9EB3A4, 0x99BDA39C, 0xD6F7EE01, 0x0FCFB369, 0x459E5B83, 0x6262B205, 0x39707C6D, 0xA39293CC, 0xD6E737FC, 0x2163BCD6, 0xECFC5278, 0x11452A33, 0x5E1416BD, 0x6060B11A, 0x3E5B7005, 0xC2AC8CC2}, {0x9F2F5D81, 0xE89ED7FD, 0x1790939A, 0xE08549B0, 0x0FFDC897, 0xFB892726, 0xFF4AF729, 0x112D7EBE, 0xC103F753, 0xEB01EBFC, 0x9E0F0815, 0xEBDCDABE, 0xBFACA699, 0x0599EDF2, 0xF4910EF0, 0xBEB65D73, 0xDB7ED377, 0x33362688, 0xBBC3E750, 0x6B1EE572, 0xB27A6884, 0x1C69992B, 0x2B27220B, 0xFF939791, 0xB98A99A0, 0xF5A6BB01, 0xE0E301E4, 0x058EB273, 0x5EC6AEBA, 0xE31BF8A1, 0x16D62D0F, 0x391CF6D0, 0x7F48A3E6, 0x69F19A2A, 0xB0BD07E2, 0x549B6D95, 0x495E9C28}, {0xCE8465DF, 0x3651A299, 0x7AB47212, 0xB3EF0514, 0xF6392B79, 0x5A7A9CD0, 0x8DEEA124, 0x60639CB7, 0xA4294BA0, 0xACA4B328, 0x54F083EA, 0x7BEDD4DA, 0xE0235AB5, 0xBA60A198, 0x130025FE, 0x08AC3E8A, 0x8A089264, 0x1E1BB1B4, 0xD5DC988A, 0x3952CC3B, 0xAC33390F, 0xB6685FD2, 0xD5AF46DE, 0xED02EF9B, 0x4E08432E, 0x933C787D, 0x94EA3008, 0x26212B28, 0xEBD6E1A4, 0xE68E6F68, 0xC58378FE, 0xF0CC193F, 0x8824584A, 0x92861B78, 0x08FDC657, 0x82BABD9B, 0x9CB18A73}, {0x4E761F73, 0xE33AFB8E, 0x0994B970, 0x81D447AE, 0x2ADB5C7E, 0x3C1E5938, 0xE6351A60, 0xAC5CF756, 0xA492CA00, 0x1C6BB463, 0x0B0DED0D, 0x86C267A2, 0x444E414F, 0xC8CFD8A9, 0x1BF8BA97, 0x6511E0A5, 0x3BA69841, 0x44E534B0, 0x4A689E5B, 0xAEC18F0C, 0x898710CB, 0xED426FF7, 0xB23EB8EE, 0x8F4632B0, 0x6982EB46, 0x689D7087, 0xDC57CCA5, 0x8AF1D313, 0xAA6D7148, 0x6CE3C820, 0x98804417, 0x65666359, 0x7A5AF3DA, 0xE1B65AB1, 0x6DD9341F, 0x032CFC0D, 0x41920723}, {0x72A8128D, 0xC92433A8, 0xEEEC873D, 0x6A28C77A, 0x38BB6CE6, 0x191C21AC, 0xD85179AC, 0xC3F100C9, 0x289DE6A7, 0x1877D9E7, 0x9E8E8821, 0x5CAAD0A9, 0xE46CF441, 0x54588372, 0x29D9F2E3, 0x0360CB8A, 0x9CD52BED, 0xAC84821A, 0x2B9E4BCE, 0xA52F4A81, 0x7FFF30C9, 0x0F7CB7AB, 0x5AE37CEF, 0x6E19C8F3, 0x06DF9580, 0x380D8A7D, 0xD467D3A3, 0x2B966652, 0x15376B9E, 0xA3583E24, 0xF0770119, 0x3A23CB2B, 0xE28FC2E2, 0x4F69E1FF, 0x877FBDFA, 0x780A7186, 0x1FB4E106}, {0xB0D15B88, 0xC1AC90EC, 0x32DF98C5, 0x4A307A34, 0x0DA93FC7, 0x40CAE13D, 0xF1E5EA82, 0xCD59163F, 0xBEFF4371, 0xE00FC8D0, 0x35ED09C8, 0x3B5CC867, 0x28B23D0A, 0x312E740D, 0xE1AB35B6, 0x7FDC599A, 0x9B5D2C7A, 0xE43D149B, 0xBCD05047, 0x132926F5, 0xBD1F1511, 0x2FBDAE43, 0xD363596A, 0x935F43D0, 0x8F54EEAF, 0xCCAC9CC5, 0xD7528F30, 0x602B5B86, 0x3250DF81, 0x1C44B613, 0xF877AD17, 0xAE67E4C6, 0x47BF87A8, 0xAB3CE250, 0x4DB81AF2, 0x1E9C9D74, 0x480924D0}, {0xEA7F9E16, 0xA7516208, 0xC24A20A1, 0x17034D23, 0x6833978F, 0x7D953357, 0x7456A139, 0xB3097F4D, 0xBF41283E, 0x8F1EFB54, 0xF888AD56, 0x303CE840, 0x4031B220, 0xA475BA4B, 0x5E018F7B, 0x81D4720B, 0xE6414F31, 0xEF1CD8FE, 0x0E95910C, 0x09E92A73, 0x7C74DF69, 0x159E7E35, 0x0BFF973C, 0x841EB0DA, 0xA7822C9D, 0xA10BC00B, 0xA8D80B9C, 0x03727BB6, 0xD38FF5E3, 0xFC5957FB, 0xD75E52C9, 0x38D1B837, 0xB25E16F0, 0xA05B823E, 0xB6BF1EB3, 0x6BA9565E, 0xC43F258A}, {0xF0B81CEE, 0xEF7F5717, 0xB818C8E4, 0x5F5F6372, 0x9C0DD3E5, 0xC14DB857, 0x07628392, 0x3AD947CC, 0xE2F0B311, 0x847D589C, 0xD059DA66, 0x90731CA6, 0x52934F7E, 0x4C5F8457, 0x8F2CFDE0, 0x1A2147B4, 0x10B672A4, 0x67E4E7C8, 0x09F8DCDD, 0xD45E5113, 0x030B3F9B, 0x7BDDADE1, 0x64E97C43, 0xDE7DDB80, 0x2B698569, 0x72E32384, 0x11996106, 0xE2F89055, 0xBB8A5041, 0x1A531F5B, 0x27C9B8EB, 0x432579D5, 0xE88D2669, 0x9DBB1754, 0xF48A1D20, 0x0FE376F9, 0x81E7CAE0}, {0x313A0918, 0x06982C55, 0xBC8BFAFD, 0x093F5EC9, 0x3F4C421A, 0x015434C1, 0x5BE3B687, 0x8FA9609D, 0x1825F1B6, 0xB80F29A8, 0x5981631C, 0x8299145E, 0xED5B977B, 0xAF73D38E, 0xA523FACF, 0xACFA7987, 0xF0E2E124, 0x44EBF8D8, 0xEBFCEADE, 0x642E5399, 0xB9136F11, 0x3BE452F5, 0x8007A3F2, 0xD2B3CB5C, 0x6627F1BB, 0x663DB62A, 0x61A83DF8, 0x0EB2BC42, 0x3E2FBDFF, 0x529C0FA8, 0x0E37E309, 0xC7ADD149, 0xCA83D0D2, 0xD46478D1, 0x280E41F3, 0xC9515589, 0xB5E3637B}, {0x58870877, 0xD3A6C2A4, 0x1ECA5CD3, 0x925CA0D5, 0xA7D0763C, 0x45D16D06, 0x924127D6, 0x7AFED91A, 0x1CFA06F7, 0xC59A9E11, 0x2DADA5EF, 0x50F4A3F1, 0x10256892, 0x126983E6, 0x7EA3A461, 0xBA733099, 0x31567D97, 0x7798DC85, 0x9138D0DE, 0x4C826E3C, 0x1B7AFD84, 0x39E989A0, 0x258BBAD2, 0x919B9453, 0x8B2D8A98, 0x8BA3068D, 0x53F544C0, 0x3631B4B0, 0x0ED8FBFF, 0x58CB4524, 0xA0E452C6, 0x16281413, 0x30E553C5, 0x32A11D45, 0x84DF1015, 0x6B800D2B, 0xF48087B4}, {0x7A24E789, 0x65A88E86, 0x3A872AF5, 0xF8CE8F7C, 0xF9D044FD, 0xE8B474DA, 0x2495012B, 0x06D51F2F, 0x120D9F58, 0xDB2AC8A0, 0x1CE23804, 0xB3370DD7, 0x6BB4410C, 0xCC4199E6, 0x0C45B7A7, 0xD2A77EE1, 0x878C282C, 0x666E4D8C, 0x0A710531, 0x44B48A44, 0x3458945C, 0xD02CEE44, 0x46D0C196, 0xD7D5CF61, 0xB89B4080, 0xA370AF69, 0x65564C82, 0x131B197B, 0xDA58E4E1, 0xEDA59945, 0x4B43CB78, 0xB9084780, 0x806F00C9, 0xD9063E03, 0xA9A26CFC, 0x47982BA5, 0x47C46582}, {0xF8B34C48, 0x29D6D682, 0xE8049DB1, 0xB596973E, 0x047357F1, 0x82856DC0, 0x97210791, 0x52800BE6, 0xDE870640, 0xCEA99DD5, 0xFB31F4DD, 0x549E94B0, 0xD7C6F8CD, 0xDDAF9165, 0xAD9623F2, 0x35397C6E, 0xE3FA49DF, 0x195197EC, 0x203D0ED9, 0x6A18E6C0, 0x31A436CC, 0x232B9408, 0x76C6B064, 0x2993D7AA, 0xE7618E50, 0x62BEA422, 0x7DBDD918, 0xAE0F7241, 0x5915EC0F, 0xB4CEADC5, 0x81C5E39D, 0x8C986044, 0xB965CAC3, 0xFBA4B214, 0x542961AF, 0x38D521C9, 0x5793CF2E}, {0xCA5EF7A9, 0xADF4290D, 0xA9FF841F, 0x47662859, 0xFD5F54A5, 0xE159DA89, 0x233B9B3F, 0xDE7ACD16, 0xC58CAFB0, 0x71EDF824, 0x19EB8852, 0x682E64B4, 0xBAF48F30, 0xC429C9BD, 0x3D76A501, 0x5AF164C1, 0x12373AB6, 0xBBA5B4C8, 0x672B5905, 0x62BA39D5, 0xD849AF94, 0x8C13D1C5, 0x250D39F1, 0x79A0F29D, 0xB24988D6, 0x3CCB5825, 0x4E34F2BC, 0x3DDECA14, 0x56C1727A, 0xD661CA75, 0x65A92E05, 0xBAF6481F, 0x1689311B, 0xEB37D1C8, 0xB7F2992B, 0xF31E925A, 0x216D7238}, {0x6313B4E3, 0x07C875B1, 0xBA76165D, 0xB70F5547, 0xF7C4C3A9, 0xB5253995, 0x7703C523, 0xEF436F91, 0xF9BC6DAB, 0xC0243580, 0xD77BF62B, 0xC3264635, 0x8DCDC1AF, 0xDE4F108B, 0x8CC2E295, 0xBDCEDC68, 0x52CA75D9, 0x975CE27D, 0x40EE466B, 0x7BDF6B56, 0x962AB313, 0x74409B19, 0x181774D4, 0x35F55052, 0x8B8F007B, 0xA25E9ABA, 0xF59A7118, 0xDA9E2C18, 0xDF41EE80, 0x48603A10, 0x62F629C5, 0x6A7513B7, 0x01151E73, 0x3CCCC716, 0x275BACF3, 0x1EEF767D, 0xD5FD94BC}, {0x12C90D32, 0x144E86B7, 0x4CF4ACEF, 0x0804E0E3, 0x507DC67F, 0x462A2AE0, 0xDBC8C2EC, 0x0E7CB0B3, 0x7A794546, 0x724E01EA, 0x7ADAC0C9, 0xE14B57DD, 0x33F9317B, 0xBD780745, 0x618101AF, 0x7C849958, 0x44EAE313, 0x1F916CBD, 0x44B602E9, 0xCD419908, 0x92D62982, 0x076866AA, 0x9C0B81B2, 0xB2ED5462, 0x6785CBB3, 0xB6592909, 0xA284EA61, 0x88872834, 0x725BE6F7, 0x81A47789, 0x3F878EA6, 0x506E0603, 0x071034B3, 0x7A75A1CE, 0x9EA13F87, 0xA562C0AF, 0x2B65AB14}, {0xC8B1DF78, 0x19EBB4DF, 0x655BEB14, 0x1CD47BFC, 0x320D3BD7, 0x7DDEC14A, 0x7CECD374, 0xBBF5FF62, 0x040FCF8D, 0x77F37889, 0xE1223C26, 0x43C9E773, 0x7B4691D2, 0xDA4B53A4, 0x2AC2AA66, 0x6479E22E, 0xDCA8FA0C, 0x4B3D627C, 0x1745AF1D, 0x035B9F22, 0x79C1C86C, 0x4300F4F8, 0x4476D08E, 0x34441892, 0xCCDB434C, 0x09AF5D82, 0xE0096AC7, 0xEA733FD1, 0x5BD50D70, 0x7A0BADE0, 0xE5E545F0, 0xDB1E177E, 0xA0E00F70, 0xA1D1B3D9, 0xE4907571, 0x14E26A89, 0x2718C5F2}, {0xD3D440AE, 0xAA077F2D, 0xB6E49842, 0x99B0716A, 0x30820256, 0xB70BB020, 0x74FFD1AB, 0xA0661A1A, 0xBC59D72A, 0xD781BD62, 0x4C8BAC95, 0xAF44493E, 0x5E4D492D, 0x8E4D5B14, 0xD44742ED, 0xE6549603, 0x3EE732CE, 0xF6BD8C19, 0x0ED76D72, 0xB40B38F4, 0x2720A384, 0x8AC36F70, 0x80851F6B, 0xFA3F7875, 0xE31F7070, 0x6CEC7FBA, 0x0FE5C4A1, 0xBCBEFAE4, 0x53EDF6B3, 0x9AB2D6E2, 0x1413513E, 0x77D7270C, 0x12F56B41, 0xDF168243, 0xB2EC1700, 0x48202EE9, 0x8B538B0D}, {0x7CF6BB0D, 0x576A54C2, 0x001CCACA, 0x49BD2167, 0xEB87E36F, 0xE3147E95, 0x34667F9F, 0x3DD2F9EA, 0x374E77C6, 0xB4FA792C, 0x88A0E977, 0x40253643, 0xE21D5035, 0x72E17F89, 0x041E51F2, 0x4AC1FF84, 0xB6E5DF23, 0x524F2E8C, 0xDD1B0551, 0x27F1C4EC, 0x4A1D995F, 0x223FD2D8, 0xCD2FC1A8, 0x0A0EDF55, 0x054736F8, 0xC2410B69, 0x36701F7B, 0x6FFF8087, 0x62E187FB, 0xCEFDF3DA, 0x01560CBA, 0x0E26F0D0, 0x386482D8, 0x5119162D, 0xB2976C94, 0x9E3A4F2D, 0xF3CAC2F0}, {0x6CD946B5, 0x8C32236B, 0xB77DF4DD, 0xF1018A96, 0x678D46F5, 0xF29A818F, 0x9A32BF58, 0x08DC0188, 0xED8C8C77, 0xFF61817B, 0x23C8FFF3, 0x0676E69C, 0x79E41C5C, 0x3F1DB313, 0xDD15280C, 0x06188152, 0x9BD7F4AD, 0x4EA7B92E, 0x3BD6236D, 0xCA12A5AD, 0xDF9BF84C, 0x7C91445F, 0x0022A88A, 0x15ECBC73, 0x2A33876F, 0xD086B197, 0xF5093A03, 0xEF98B509, 0x09F30FCD, 0xEE776C5B, 0x25E6D73B, 0x093D3559, 0x969AAB95, 0xB26E7A2C, 0x00E84107, 0x82ECED3F, 0x542E9C40}, {0x9AA143F0, 0xB76B2FF3, 0x14582467, 0x4B95D497, 0x5CBD2912, 0xFBCD9A21, 0x309951B0, 0x6E1574D2, 0xF901FAAC, 0x8BE17FC3, 0xFF929BBB, 0x450F0D77, 0x899E0C2E, 0x79AFBD00, 0x51907DB6, 0x0F4BD89D, 0x5D52FE3F, 0xA2134499, 0x79949B4C, 0x77CD1D94, 0x3B3D137C, 0xF194A31C, 0x8C9A330C, 0x0CE859C2, 0x13D9A3EF, 0x22E3C70A, 0xB037C39B, 0x79A822CF, 0x8DA360A0, 0x71ED2690, 0x1B18A8BD, 0xD2667330, 0x655C5133, 0x2D4B38F5, 0xA8212396, 0x930B2473, 0x46A7DF6B}, {0xD3E13862, 0x96AD8A7B, 0xC93B026F, 0x2316A444, 0xE53DCF11, 0x141CFD83, 0x3CFD5FA6, 0xD46A8F76, 0x7BF42BCA, 0xF68AA65E, 0x9B24698E, 0xB2160E20, 0xD634EF29, 0x33726A9F, 0xD70459E9, 0x866E0C29, 0xE0B5B2A4, 0x777B0E34, 0x528C0E21, 0xEFEFE15C, 0xB64510FF, 0x0F2931E8, 0xDA8A8152, 0x0622C5B3, 0xB2466D7E, 0x1731C40C, 0x6066A9CB, 0x192D66FC, 0x3852FEF6, 0x55F7E1FF, 0xDAA995C4, 0xFFFDB3A2, 0xBBDBAC44, 0x1559F5DA, 0xA199FDE7, 0x65095CCE, 0x4CE9505B}, {0xC28B7225, 0x14856E42, 0x4059EEF6, 0x0168BBDF, 0x72A25425, 0x10B7920B, 0xEC13B381, 0xEC285976, 0x56CB9345, 0xA7BED63A, 0x1D6E21B3, 0x44211D3D, 0xF8126934, 0x74EDE685, 0xE48EA508, 0x10D1E5CC, 0xA18BC7CE, 0xFCB04B31, 0x578D4509, 0x714DECD4, 0xD36A17DF, 0x2F911135, 0xF8D3557A, 0x8230671D, 0x08C0B856, 0xE0E699A2, 0xE0436F83, 0x1A4362AC, 0xBB272DA6, 0xE13D2CB5, 0x7A459563, 0x09779CF7, 0x3DF1EA05, 0x32486446, 0xD3BE168B, 0x7F3C83CE, 0x244C7AB6}, {0x55BFC9D9, 0x48BC1867, 0xD55F6149, 0xAD38C7C5, 0xBCC48476, 0xAB8356C7, 0x59047F3D, 0x596983C5, 0xF87458A2, 0xBE0236D7, 0x5B20A311, 0x01E735AA, 0x89A881D5, 0xEA587335, 0xF30989CC, 0xBAAEB91F, 0x5D3FE815, 0x51B1E0A6, 0x5AA03AD9, 0x9FBF0803, 0x17115048, 0x3F0F7EDE, 0x0FFD1FB8, 0x6EE3BCF6, 0x5C235E91, 0x30E37686, 0x28B3FAD5, 0xC0FC5EF2, 0x50E89E68, 0x8D0EB044, 0xA0EE924C, 0xF4B5F98C, 0x5649015B, 0x27ECA424, 0xCE2ED97B, 0xABC7FCAB, 0xA13E4151}, {0x1020CEF6, 0xBD689576, 0x2856C33D, 0xB8459FB0, 0x25905FA1, 0xE5D50F51, 0x0D0613EE, 0x2153B644, 0xD181B86F, 0x8F0CFA68, 0xBE385BCB, 0xA3BA53E2, 0xA974A6B7, 0x2DFA4A34, 0x948FA559, 0x1DFFD943, 0x858A8CB3, 0xB03FD94A, 0x46B47618, 0x64D816B5, 0x38F90501, 0xB94BBDDB, 0xAA9FE4B1, 0xDCDD38E0, 0x55889794, 0x676282E2, 0x157421B1, 0x6AEF205F, 0x47364182, 0x8C90335E, 0x618DC969, 0xB5A7B45B, 0x2926C70E, 0x4FD9CF20, 0x7560AF5B, 0x30C0F4A9, 0xB3C3FE19}, {0xDFEA6F50, 0x2818CBDC, 0x64F0F0C4, 0xA016843D, 0x39A9EC1C, 0xE47945E2, 0xF6EB7E02, 0xE4706B9F, 0x76936CEA, 0x9F12F06E, 0x0D24A2EE, 0x5FFF8F62, 0xDD067681, 0x8D3D966A, 0xCE7B77E4, 0x1BDF6401, 0x77BCFA0B, 0xDD3930DF, 0x66299486, 0x85C4443C, 0x876B786C, 0x5B7830A2, 0x11CEC30B, 0x9EFAFF07, 0x6FFF4684, 0xE9084A98, 0xE65F3EA9, 0xBAD86267, 0x43D31557, 0xBD29D399, 0xBD308156, 0x975BBC74, 0x8A6636CD, 0xCDEF5351, 0x7E222850, 0x874132FA, 0x9667FEEF}, {0xA0F573E9, 0x43F6C249, 0xF8CB1FC2, 0x85D38E5D, 0x5B46CE25, 0x54C6BED4, 0xCE421D59, 0x1BDBEB19, 0x54194712, 0x152CF8F8, 0x50D9DAF0, 0x40A46C30, 0xDC7E24E2, 0x632BC0F5, 0xD888702E, 0x0524D889, 0xEE780C51, 0xF1C8B145, 0x773B7C9D, 0x00D8DF6F, 0x0E7DDC14, 0xE4565037, 0x53CABD97, 0xBE38B7F2, 0xECC554C3, 0xE2E2F61B, 0xB19ADD23, 0x2691870B, 0x6BD53A5E, 0x37971655, 0x630B7BD7, 0xFA2C20E3, 0xFC25D8DA, 0xDFD79A20, 0xF3E1F036, 0x9F47A4EE, 0xB0B2FB61}, {0x5E1DE654, 0xB95F1014, 0x7780B690, 0xD97D7DFE, 0x9A6192C5, 0x57071F56, 0x59B48225, 0x1157782B, 0xBD4CEBFC, 0x944A32F9, 0xF8D1BCDD, 0x1113796F, 0x13B15892, 0x4E960652, 0xB67F8027, 0xFF47AF65, 0x0C1379EF, 0x30D8B7B7, 0xCFC4C878, 0x0D0A2AD6, 0xB4C94DDB, 0x5F382A55, 0x5FC5B7F1, 0xCF01A8D5, 0x61874246, 0xA4EF39C8, 0xB5CD4DEA, 0xEB7D1C45, 0xB49DB456, 0x959388A8, 0xA58790E8, 0xC96B29E9, 0xC9CE2479, 0x3B259620, 0x5D1E7142, 0x5ECA651C, 0x608A597B}, {0x6A4AF458, 0x393C7AED, 0x2980A266, 0x87624706, 0x91D65092, 0xD0B1F145, 0x871EEDF4, 0xC7BD2135, 0xDBFF3DAF, 0x519DBA5E, 0x3FC950DE, 0xFF7B52FF, 0x9FD3B28A, 0x2B0DD9DD, 0x18B79457, 0x623456AB, 0xF1FC67A4, 0x416ED857, 0xE739F8B4, 0x9E693A1E, 0x4A0A9D43, 0xA7750CBC, 0x6EBE7DDE, 0x74EB6372, 0xDB8B1935, 0xF3F0BD18, 0xCFF5FE4A, 0xE44BEF93, 0x3CEC7118, 0x416E0BD5, 0x8ABFFC23, 0xED382F4B, 0xC307B6D9, 0x4C3651A6, 0xBD4F0FAD, 0xB35A93D4, 0xAF111F15}, {0x54DBBE22, 0xF64E8BD8, 0xC1445C83, 0x2BD859C5, 0x4BCBFEC2, 0x1E493E2B, 0x9CCBEBC8, 0xC240352B, 0x4C3B9F2C, 0x4C445523, 0x30A2FEAE, 0x8B274592, 0x75BDD1EE, 0x4C5F9A85, 0x053D17EA, 0xAD67ED4B, 0x6D9A6ABA, 0xF5286BCA, 0x12B45A48, 0x6F393424, 0xE5698639, 0x51B68BAF, 0x121788EA, 0x4CD37059, 0x6E5F3BB5, 0x4810773C, 0x60F24874, 0xC7D864C4, 0x6B9EB4E0, 0x7CE45BA0, 0xBB3ABDB7, 0xC09483B9, 0x0DA2A952, 0xDBB617A2, 0x8AA57D3D, 0xC6D82DB8, 0x205D8E42}, {0x152DADE6, 0xD675E877, 0x8D8C114D, 0x7DF045E6, 0xCE4B4050, 0x87DD732C, 0x2580CDB6, 0xCBCBF5A9, 0x6C6181A0, 0xE9F7867C, 0xE6FB5F69, 0x2676FFFC, 0x902FEDBE, 0xB1234099, 0x26878C9B, 0x98B291EF, 0x83F45B7F, 0x08C51883, 0xC1FF7874, 0xF169BB70, 0x869631E6, 0x8CE026CA, 0x1F234BC6, 0x75F3EC67, 0x10E295C0, 0x8032541A, 0xEC16E7AC, 0x91982EE3, 0xCFB2891B, 0x4EA8A154, 0xDE79AAF5, 0x24885B9F, 0xB284E30A, 0xC162D760, 0x05967BC9, 0x7ABF38BC, 0x171B591F}, {0xA81A654C, 0x1B8A2885, 0xB0900634, 0xEC569F2F, 0xFA0D173B, 0xB276E487, 0x012AAC52, 0x21BEB825, 0x0DD26D7B, 0x1BBFD031, 0xAE387C5A, 0xF20E5653, 0xB6657F21, 0xB323733C, 0xB1956D85, 0xA5115A52, 0x27D422A7, 0xA40A1D3A, 0xCF0BDD34, 0xE796C068, 0x8D78A06B, 0x3B317AF2, 0xB3E86B60, 0x24C8B023, 0x1378CED1, 0xB7EA96D9, 0x3138332C, 0x9E30465B, 0x8B841187, 0x2F5DA4DF, 0xAD22015C, 0xF0ECF1C5, 0x77C84A2C, 0x880035A6, 0xF01E1E54, 0x6505E592, 0xB9BE8AB8}, {0x9DBFB3B8, 0x2279B27E, 0x480F3EA7, 0x2D85BFDA, 0x30682319, 0x6492C674, 0x2D736ABD, 0x3C40681B, 0xE19CF0EF, 0x409B55A8, 0xD040B7BF, 0x494D99BF, 0x5BAAC02A, 0x92A1AAAD, 0xFFC3A440, 0xA067C014, 0x45540DD4, 0x7FD1C560, 0x4983F62A, 0xE11C858D, 0xE42E537B, 0x1224D508, 0xD32A67BD, 0xF4BA1F59, 0x74820E48, 0xCD7B9712, 0x11083EA0, 0xCE3A4020, 0x97AA25B4, 0xD7B4BBAC, 0xA9B346CC, 0x30C47EE9, 0x0AB6F105, 0x912E8E98, 0x05C750FA, 0x8597C472, 0x09DCB75A}, {0xBB031198, 0xB2DADB21, 0x08A5E184, 0xD7BB0AEA, 0xA14D4F1D, 0xAF5F03B2, 0x07109441, 0xC175F8B4, 0xF9EF0A05, 0xD8377F1D, 0xFFE57930, 0xC1BE6C3A, 0x4D450CD1, 0xF2A9E0CD, 0xE8E9BC1B, 0x86404CA8, 0xB3667DF0, 0xB8175350, 0x236C37A1, 0x1B242E2B, 0xA5280698, 0x800B4956, 0x6B26589A, 0x503F1068, 0x9149FCC1, 0x1A1B921A, 0xEF402BC7, 0x726327F8, 0xE84179AE, 0xEAC18012, 0x836C9489, 0xB3FEE097, 0xCC993D39, 0x35A269D4, 0xC7102AB3, 0x5341DBCF, 0xA55CC71B}, {0xE9944ABE, 0x9B51F6BA, 0xA8872BEE, 0xFE88B2BE, 0x43A7AC04, 0x7ED6F4CF, 0xA727DA60, 0xF8681B3D, 0xEB507489, 0xC5951DE5, 0xFEFB92CC, 0x8BEAE2D6, 0xBA4F1C28, 0x2C48F619, 0xA4BA8A8C, 0x710341EC, 0xF75C9120, 0x8B85EA23, 0x718C3B23, 0x23524B50, 0x85DDBFD1, 0x1893977C, 0xC0D871A1, 0x70ADB4E3, 0x4980AA7F, 0x6BC712D8, 0x9E264ABD, 0x8BCB9D16, 0x53D15B3B, 0xACE47468, 0x94B73C97, 0x4731BF6C, 0x291FED9C, 0xEDDDBC4A, 0x642DCCD0, 0xEF5682AE, 0xA1D4A00C}, {0x149705B6, 0x9B86E0CF, 0x01E51FDD, 0xB0CAB317, 0x1CEC9477, 0x00B7D4F6, 0xF6F7105A, 0xC229875D, 0x2A0E8AC1, 0xDC8EA9A1, 0x8187877B, 0x540069CC, 0xD2A6119F, 0x0EFD408E, 0x23489746, 0x84B9F4DB, 0xF530E119, 0x0EAB024F, 0xFB8DC5CD, 0x04004988, 0xF02C684E, 0x2847956F, 0xCF7A078F, 0xA93D7B85, 0x7CB2F899, 0xC882B8DC, 0xEB4050A8, 0x1995109E, 0x75726BE7, 0xF6301DDE, 0x5899873B, 0xAF4602BB, 0xA6E9E17D, 0x011CA231, 0xED257328, 0x73522956, 0xFF307703}, {0x1A22722E, 0x86E35586, 0x09C74027, 0x733C3533, 0xE9CBB096, 0x1A6F14FE, 0x29837C91, 0xB0F81407, 0xF7B053D1, 0xD6E90714, 0x28EC5AF1, 0x31C9BD82, 0x65566546, 0x83DE8BD1, 0x960E02F9, 0x6305CC9E, 0x798627BC, 0x20F65A05, 0x3341B9AE, 0x00D8C52A, 0x28A156DD, 0x216F564D, 0x2B897C8B, 0xAAB3B316, 0x8B160826, 0xCB15C9B9, 0xA1D973BB, 0x2CDD66D4, 0x03FE8222, 0x082B523A, 0x903E3DE7, 0x8CED51ED, 0x278D6284, 0xB70F4D0D, 0x2FF0215F, 0x8324F666, 0xB775560D}, {0x9FBB1F5C, 0x023268F1, 0xB1F35B0F, 0x3CBE6594, 0x20D27239, 0x62634C31, 0xAE1BC45F, 0x5780B3E3, 0x87B9E51E, 0xC8A27A48, 0x886A1E53, 0xB2BFCBEB, 0x1FACB990, 0xEABE010E, 0xA5380A74, 0xC91869AE, 0x75057E52, 0xA946AEE2, 0xC3A93A52, 0x777475F5, 0xB2CBD31C, 0x9F13CB84, 0xB2614852, 0x4DE5E973, 0x831F234D, 0xF33085B2, 0xB87F493F, 0x7A658C19, 0xA1198853, 0x37F77300, 0x295AAEB3, 0xA0901340, 0x8303E7FD, 0xBD916596, 0x060F8612, 0xAD9A6050, 0x8475A778}, {0x20FE87C9, 0x13D1592E, 0x22CE4553, 0xF5D2A2DA, 0x6ACA8331, 0xB963FB92, 0x8C8A4385, 0x45646817, 0xA3922B88, 0x4C3C4C15, 0x2CDF0410, 0x7791BFE3, 0x8DF5EF4D, 0x85CF3FF3, 0xEAF22E29, 0x0DBBD744, 0x1A87C469, 0x4F268786, 0xB3E8370B, 0x75CBDEB6, 0x603B298B, 0x398BA81B, 0x44966028, 0xB9346698, 0xF3CF6DE0, 0x09E50280, 0xCD027A4F, 0x39EFF780, 0xC65FD3C0, 0xCED394E0, 0xFD4F353C, 0x6EE4AC25, 0x81AE2ED6, 0xAD057958, 0x9794F8DE, 0x34F8D3A2, 0x42BA7025}, {0xE10DF81B, 0x78DA3879, 0xE141A1BE, 0xF98FFBE3, 0x9F45E869, 0x99DE2040, 0x55DF0E95, 0x527686FD, 0x9B2219E0, 0x389D4CB0, 0x0615D485, 0x4B42E23A, 0xC7560E98, 0xF7005C57, 0xB1B0E417, 0xB65D74AE, 0xA4C5B30C, 0x5D68FC1F, 0xE4C24E74, 0x8A72EB5C, 0xEE16DB7F, 0xBD005C59, 0xEC5AA7B6, 0x69148304, 0xB395F1DC, 0x9646CDB9, 0xC349362C, 0x3D62E3CC, 0x0CFA458E, 0x03B7F0F3, 0xCA3D1E73, 0xB690FC27, 0x9B8C7E36, 0x5EBE117A, 0xB0C80247, 0x777DD04E, 0x02D5B582}, {0x55FB01B1, 0xA60C90F4, 0xADDDA069, 0x7AA6729D, 0x30FA2AF5, 0x375F4C8A, 0xD2CB2E57, 0x51336659, 0xFAFC94DA, 0x662183CC, 0x2A220CFD, 0x12E28D11, 0x1DD9E71E, 0xF0F72C38, 0xD64A3256, 0x984C29B9, 0xF9FA4CC2, 0x1799BB6C, 0xA4EE5BE7, 0x62F14571, 0x0B7D4E67, 0x2537FA9F, 0x4D429514, 0x36EBD5C3, 0x228BCB03, 0x772B7D7C, 0xDF4AEF46, 0xAD276A9B, 0x200621DB, 0xAD3BCFCD, 0x63877554, 0xD20A3269, 0xB6502B29, 0x9DBAAE88, 0x3E352CC3, 0xA0557AE2, 0xB3794E4C}, {0xBCDF6FF9, 0x82FDDE11, 0x302BB814, 0x5A837560, 0x940A2BE5, 0x8D668B80, 0x0D6084A8, 0xC98492C5, 0x75BA5C68, 0xA55A8659, 0x6B82041E, 0xA1267439, 0x6428C7EE, 0x610FF88D, 0xDF34BF8A, 0x2E9102A3, 0xDBBD6D35, 0x90646016, 0xBE5CB362, 0x8E00E44D, 0x3CB48501, 0xD809D2F7, 0x2144FE74, 0x6C55DE64, 0x695FFEE4, 0xA9A10C69, 0x95125084, 0x038A229A, 0x2AE69CE1, 0xB149BADA, 0x118A5D40, 0xC6C9E5DC, 0x0F37BAE9, 0x5A72C716, 0x5AD980F4, 0xA5603797, 0x65ABAF1D}, {0x2A2F5EE0, 0x4E6F3202, 0x84456AD0, 0x0D7B34E2, 0xE592B4D7, 0x6FEE012C, 0x8F24A63E, 0xA68CEE97, 0x74DCDEA9, 0x26E293F3, 0x22574790, 0xD71E9AFC, 0x4768A5C9, 0xFC0DC4A8, 0xEBC03C2F, 0xF2C34D37, 0xEA4E8E16, 0x0852DCB4, 0xCC4DD35C, 0x17107B88, 0x70242D12, 0xD435D13F, 0x678193B2, 0x08E8D469, 0x9D25A819, 0xC6CBDA13, 0xB9F993E9, 0x458C7F6F, 0xF76FE226, 0x15C817ED, 0x245AF255, 0xE879BEDF, 0xAAA72F2F, 0xD9D58F6C, 0xC5F43731, 0x86C79F88, 0x4AD7D179}, {0x71C8E659, 0xF4898843, 0xCF89C432, 0xB9B71989, 0x581F0E0D, 0xD1618215, 0x922A86CE, 0xFBEF05F0, 0xB716E8BA, 0x6FC89A02, 0x0AFA1CB2, 0x6DCD4434, 0xCDF48DDF, 0xEA22EDE7, 0x8DF93388, 0x05C279ED, 0x876AE483, 0xA9F8F0A6, 0x9A3D4CC9, 0x16AE8F18, 0xAB6E9DBB, 0xEA8D2B42, 0x3CC0169C, 0x767B576A, 0x10E59937, 0x1AEE13A6, 0x5F7A14A3, 0xD71A9901, 0x56636BD8, 0xB4EC7391, 0x836980C5, 0x30995022, 0x53549581, 0xB563283C, 0x9887304B, 0xF227AD57, 0x9CADF482}, {0xE6A3D964, 0xB989C82E, 0x7DFBD74E, 0xFEC4C9D3, 0x6C1BD1F7, 0x0EC84575, 0x34F78B9C, 0x798D0166, 0x1B102A40, 0x03688C95, 0x543E5812, 0x3AE6A363, 0xE21A9546, 0x72086FE6, 0x0C55CE76, 0x0BE2FD89, 0x7C6000B0, 0xC917F9A9, 0x71278D56, 0xCBAEEC53, 0x982E8180, 0x3C428A8E, 0xC9826D37, 0x56317D3B, 0x37641B8F, 0xD515D389, 0xC660F466, 0x30273115, 0x35A35DDA, 0x355FD4E7, 0x8CA77939, 0x263808C9, 0x3F2C5FB9, 0xAA824B33, 0x15BEC70F, 0xEACA78F4, 0xB866678C}, {0xBE39631B, 0xDC0029C3, 0xBEE7B2F0, 0xE8035CCF, 0xB68BE6D1, 0xB9B7F1C1, 0x281851B5, 0x3ABA2C98, 0xB4BEABD2, 0x85D11E5A, 0xE0ABCA08, 0x1C07BF13, 0xCD8AD0F9, 0x886BE581, 0x9A331C21, 0x098BCEEB, 0xB23AC580, 0x939F6B5F, 0x4ABD19F6, 0x632BA5C1, 0xF9D8F978, 0x1CE65E90, 0x287E7CE9, 0xE40F2629, 0x207E0204, 0x0BF80BB8, 0x95066834, 0x3F0DC027, 0x1710865E, 0xFADCF580, 0x3BC5899F, 0x0148F042, 0x4FD09ECB, 0xAE08E78E, 0x5F0DA2B8, 0x80B04691, 0x30731ADD}, {0x95A8E184, 0x984E3774, 0xB5F17E64, 0x30585900, 0x3BB2C27F, 0xB585D053, 0x12B8C399, 0x7107D164, 0x67C95C8C, 0x120A64E0, 0x2FADA4CA, 0x5EA2080F, 0x1BA6ED8F, 0x4A1852C3, 0x28049969, 0x838F8422, 0x773FA6A3, 0x25DD22D3, 0x6BF99E17, 0x661DD59C, 0xFD2E2265, 0x88D8EFB9, 0xAC44BD0C, 0xAB28313F, 0xB5E7F150, 0x0DAD3C08, 0xC2E6E380, 0x77BB3CA2, 0x7E34A58F, 0x488A9222, 0x76AEE784, 0xEEBFD7E5, 0x57676BCF, 0x75243656, 0x6D617D37, 0x1163DD18, 0xAFBCC060}, {0x77E4EF37, 0x9BC73CA0, 0x3E27B28D, 0x8DBAA090, 0x59A321C1, 0xC2B74DDD, 0xD43918E2, 0x43A8F4BB, 0x6950E980, 0xBCD45367, 0x98FB8A75, 0xFF7B5FEF, 0x63A5A515, 0xDD2A4F63, 0x339AD8D9, 0x5EF6954E, 0x20D50381, 0x82D81CD5, 0x41EEF0BE, 0x107539CB, 0xDF39D64E, 0x7E500513, 0x03D41E23, 0xBECD598F, 0x3E311275, 0xC9A82474, 0xBB63EB86, 0xAB83A078, 0xC74284F6, 0xCE5C3CA1, 0x11BACD3A, 0xBB10EB20, 0xB72A6278, 0xC1BB7910, 0x99EFF903, 0x7C1D91D9, 0xA6D1AEDD}, {0xD68B1CDD, 0xDBE65AA5, 0x5BFD3013, 0x6A52C4A8, 0x3CF6AE91, 0x2C8521E2, 0x9C0E742B, 0x1247BE0A, 0x8CDDA2DB, 0xBA04814E, 0x71861F03, 0x157CC265, 0x6A154937, 0x72DCCD63, 0xE0E50A5B, 0x4C8FAA8F, 0x52EDC973, 0x31B56B06, 0x67A6DF5E, 0x2E439197, 0xAF80903A, 0x6F45A28C, 0x5699D608, 0xAC80392C, 0xA27C5FE8, 0x6A0747A7, 0x8A03B6B4, 0xF4619E70, 0xFDA16280, 0x29585F37, 0x7E8359D3, 0xBD886D98, 0x3000A31A, 0xBA96BA0D, 0xA20A6BA7, 0xD57F8EC0, 0x138CCCF0}, {0xD5B6CB91, 0x82B506D9, 0x07FBDE4C, 0x63382250, 0xB47904C1, 0xA73D837A, 0x6593FF1B, 0x1B04625E, 0xFAA2441D, 0x52743F3B, 0x5993A4F2, 0xF2E2AF51, 0xFCF26251, 0xE2A970F8, 0x3068B2DD, 0x2171EB4E, 0xE4EB64C0, 0xFC150B47, 0x65A14F2E, 0x8D1E5D40, 0x743573D9, 0x951FBD1D, 0x5393D468, 0x632922CA, 0xC101E9F6, 0xB66B32C7, 0x127F1A4A, 0x6F5D12FC, 0x58144991, 0x338A513B, 0x8CBA8F78, 0xFD606AAB, 0xFFC39EC1, 0xA283937E, 0x1CE135B4, 0x80320A72, 0x0F872B00}, {0xBA2B66EB, 0xC571A72F, 0x55CA57B2, 0xD8F454E3, 0x17E72B73, 0x281244FA, 0x51E88500, 0x0A60AA8D, 0x0C3ED18A, 0x4DE70F90, 0xEE97F088, 0xE9FD6EAD, 0xEDAE2F10, 0x5D60DF88, 0x5B908F80, 0x59CDB7AB, 0x3254BC47, 0x2EBCB06D, 0x11AC6743, 0x9EECA2AB, 0xFA0D095C, 0xE4628FC9, 0xC3641C86, 0xEB056992, 0x0A1CC4A3, 0x616DF2CD, 0xA10F3132, 0x9A619167, 0xC7FD10BA, 0x1F9437EF, 0xE6BC3B64, 0x0E7CC07D, 0x000797AF, 0xE3B3C82B, 0x1CF3859D, 0x8D8CD8CA, 0x98ED93B3}, {0x031E5197, 0xA752D6C5, 0x24682582, 0xFEFC9CCE, 0x97492147, 0x7D9AACB4, 0xC0BD8A14, 0x93E2B611, 0xE0F9B053, 0x289B34B1, 0xFFDF8A79, 0x5F75ADE7, 0xB3A13473, 0xD34AC7CB, 0x7D4C3B2F, 0xAF199350, 0x85C254F3, 0xFDDEFEED, 0x92BF01B5, 0xF4738727, 0x746E80BC, 0x75AE9A77, 0x94389B62, 0x36B3F199, 0xF7E2BEEC, 0x5962405F, 0xEC3A7CD4, 0x250B7B72, 0xC677528C, 0x3CCD569B, 0x00FB0388, 0x61F11273, 0xE9F7A0A8, 0x9813CD13, 0x57C4502D, 0xEFC4CB10, 0x51A9EBF8}, {0xD7FF9B11, 0x744FCD0A, 0xF527AC9F, 0x05931F42, 0xC1A471A6, 0x5AA593F1, 0x15A3742B, 0xC4FAFCF5, 0xCC93AFA7, 0xC75C6198, 0x7F3BD7ED, 0x141C3B85, 0xCCB34A72, 0x6A25623B, 0x81132A99, 0xC6A65586, 0x31656505, 0x7C630898, 0x7030F582, 0x69F74E3E, 0x9E9976EF, 0xD858BAC2, 0x40A17057, 0xA92B9879, 0x20DD03F8, 0xE83C5201, 0x5E434304, 0x29E0B787, 0xE3A1A90D, 0x643A53E9, 0xB374FCA0, 0x72EF02F1, 0xA4606AFD, 0x4CE5C561, 0x96D005A6, 0x6B19E7E8, 0x5BC1F210}, {0x8DE45E60, 0x138E996A, 0x557B91FD, 0x5A1D1954, 0xA30D7795, 0xF6F57B3B, 0x4E7A1CFF, 0xB729E83D, 0x06419B28, 0x5D9B6268, 0x06B9BFF1, 0xD0289A32, 0x66FCEAC2, 0x36CA984C, 0x2599BC4B, 0xF55A6AF5, 0xB8720CD4, 0xAFF14877, 0xE38C92EE, 0x205B1071, 0xE41A779D, 0x9BC303CF, 0xB35DE416, 0x8C44C606, 0xA2A62B00, 0xC307348E, 0xA030B6C1, 0xDAB10621, 0x95A4CD1B, 0x8A1EEEE9, 0x349296D4, 0xBEA73086, 0xCD4EE813, 0xBADA9E72, 0xE1483653, 0x92DBDAD5, 0x0EB804CD}, {0xCA1E8E1F, 0xEC973A1D, 0x0609F8DD, 0x80D25A35, 0x23A8915D, 0x85F4DA95, 0xF7CEE84C, 0x15F7560A, 0xED4F3353, 0xC095F150, 0x90461656, 0xFD806545, 0xDB0DEC25, 0x81FB306B, 0x1916B13B, 0xC52D632A, 0x4810298A, 0xB14B423D, 0x30BC11C1, 0xB93D69C0, 0xEA8638EC, 0x84A0DBAD, 0x93B507FC, 0x35EF323C, 0x99FF9F6E, 0x926AB176, 0xEB6BCFF1, 0x78BEE4CC, 0x32A8BAE8, 0x08A29566, 0x7CFFAB78, 0x946A59FA, 0xFE953281, 0x8D453F1D, 0x32577972, 0xF20FE794, 0xFD59968E}, {0xAAD94587, 0x6F6ADB0B, 0xCE309287, 0x55C99EF7, 0x72023F25, 0xE45D4412, 0x94206632, 0x6E87D8EB, 0x53DC34EF, 0x67462315, 0xC7030FDF, 0x6BE11570, 0x070B9636, 0x88B14325, 0xD2D5830A, 0xC067831E, 0x46D4852C, 0xB0FCE7F5, 0x5AA0B7E1, 0xDA9AA2A4, 0xDAE36F6C, 0xAD3C6099, 0xD72FA3C7, 0x51C0CC98, 0x6E55929C, 0x6F2CF934, 0x9182DEBA, 0xFBA122C5, 0x631A1CE4, 0xD55F269E, 0x1200239F, 0xD25F4B50, 0x872BDEBD, 0xFDC28608, 0xC06882AE, 0xD0F2361F, 0xDF42C009}, {0xA1E4AE45, 0x4E8D39DC, 0xA2B2B308, 0x834219B3, 0x8DC299BA, 0xE57FEA1C, 0x55F57FA6, 0x59502DF5, 0x6B7BF64B, 0x9D25CF20, 0x4C968F71, 0xE58E0948, 0x9B8350F1, 0xDD003AC1, 0x6B6F66AB, 0xBAFA6841, 0xB15DFE3C, 0x0C8EC81F, 0x86B968F4, 0x9D1BD557, 0xF677DBEE, 0x047964B8, 0x645F330A, 0x9D0D9409, 0x22B857E6, 0x362C0BE1, 0xFD24479F, 0x9F04AE41, 0xA3454545, 0xAD26E466, 0x50529497, 0x166529FF, 0x8A6E4A2E, 0xBFBF1CC6, 0xC1E0FD79, 0xA86235D9, 0x95DF6894}, {0x9785AEF1, 0x70D13941, 0x72740888, 0xA072159F, 0x1C3FE5F8, 0x494F9ADD, 0x4B1111B8, 0x9382346F, 0xFF67B053, 0xE5639A9B, 0xCCA10603, 0x1329A007, 0xF110F1CC, 0xD3325426, 0x50DC2AFF, 0xC5FB1163, 0x61059019, 0x9C47AC21, 0x56887B98, 0x7267F394, 0xED1E039C, 0x0563EC08, 0x733DA614, 0x2A3206A7, 0xB33458D7, 0x5CC11243, 0xFA4F7E97, 0x3C949109, 0x291F68C7, 0x6EE4DE70, 0xA8EFD620, 0x31C30B96, 0x6C9F60D4, 0x0820AC46, 0xE23CB2FA, 0x3F4DF95E, 0xCA0C6477}, {0x04AE4641, 0x2EAAC8E6, 0xA21A2757, 0xEB89E797, 0xEC499B26, 0xDB8BE0BC, 0xF45F503D, 0x920368E0, 0x7D249561, 0x9E9A171A, 0x84DC3A8E, 0xAE99DF3A, 0x434E8599, 0x244D847D, 0x4C7143E3, 0xEF19492F, 0x5DD480D9, 0xEF62386C, 0x6F21D732, 0x4D3815CC, 0x42BF52DA, 0x82666524, 0x958E2C1B, 0x9685B619, 0x3E14D10C, 0x46B7F996, 0x46437CD6, 0x6F6A1994, 0xA27735F6, 0x0CEF03CC, 0xB7E3B27E, 0x2540FA3E, 0x7239032C, 0xC17EABC4, 0x1E676171, 0xD609A948, 0xE193B699}, {0x77E31BF0, 0x02D74F07, 0xAA5997FC, 0xA652A675, 0x3A263F68, 0x4935A819, 0xAE813D17, 0x9743D6C6, 0xD55F370D, 0x3C5BD9BA, 0xD3BFB2AA, 0xE0333F2B, 0xDA23460A, 0x64EAC5D0, 0xD1F60C91, 0x5DAA38F6, 0xFE2698DB, 0x6E0F162E, 0x8B8AC782, 0x67FA4BD3, 0x0A5E239C, 0x2EC299EE, 0x33EC2F1B, 0xFB9D7380, 0x0D06E502, 0x8ACE5CCD, 0xC16CFA42, 0xDA588BE3, 0xD20D0AA5, 0x7A465010, 0xA88FD11C, 0x66E75FBC, 0x617556E7, 0x5BFE7437, 0xB10EB50F, 0x74809232, 0x2988A883}, {0x37A34CE1, 0xD85776FD, 0xD474D839, 0x4D97F895, 0x709BFF5C, 0xF575B91C, 0xA55D19A0, 0x53FEF3CF, 0x5E56571D, 0x088DA979, 0x100F834D, 0x1870C068, 0x47523EBE, 0xEB3976BB, 0x19F2CABB, 0x1C34D9B7, 0xDE95F0A8, 0xB7613A64, 0x3E1728B5, 0xA8EB7C43, 0x1C74FA5C, 0xF9AB6317, 0x93D3DA75, 0x36814DD2, 0x762D8B53, 0x54D386DC, 0xE0742193, 0xA4414406, 0x46505E34, 0x991AE5D2, 0x40EB92DC, 0xAF32E681, 0x3D6A4192, 0x0802E36B, 0x55DBAF9D, 0x11B9BEE1, 0x865C9712}, {0x35FC6D27, 0x8372D70C, 0xF23902E2, 0x1CCF21F1, 0x597643B3, 0xBB69A507, 0x41CA2AA4, 0x6FB2C701, 0x9F0861D1, 0xF33947BE, 0x9228728E, 0x57B46F8A, 0xED298496, 0x0857A65B, 0x8F0DEE19, 0x0D547A0A, 0xA8AEAE6F, 0x9643C874, 0x81443A02, 0x1192CC11, 0xAF714E11, 0x167FC846, 0x23579D4C, 0xEB75DE7F, 0x17F910E3, 0xFBD03FF9, 0x48A8B34E, 0xE2E774A4, 0x70BFB947, 0x6AE8C6BC, 0x368D9AB3, 0xFEE75395, 0x37EDB729, 0x39A67562, 0xFD276142, 0xBA32D7CF, 0xB77D23C5}, {0x5D5B69AA, 0xC6348906, 0xF9F1C026, 0x17C55876, 0xFB2C6B16, 0x5516640A, 0xAACB2482, 0xCF625806, 0x708B273C, 0x8069068E, 0x2A8C61D5, 0x1E07BE12, 0xA711DF1D, 0x833F2D5C, 0x1ED0E475, 0xE4F1E41D, 0x3F70407D, 0x1272296F, 0x8FAC80FF, 0x7851C89D, 0x5C33458A, 0xD54C4CFB, 0x58389725, 0xAA927B5B, 0xB2157D56, 0x46DA2947, 0xC7408D83, 0x5E7FE305, 0xEBD8AF39, 0x55B5758B, 0x86E663F4, 0x5C87ED13, 0x688A6549, 0x54661492, 0x5A521EC1, 0xFA7213DB, 0x4CEE6A43}, {0x4E9945D8, 0xD210AB74, 0x077E15D2, 0x9BA49B84, 0xA3515A82, 0x94655FC9, 0x23294878, 0x236E1CA5, 0x01531E9D, 0x9951A703, 0xD940FB2C, 0x95B48B26, 0xBD70DF91, 0xBDFDCD93, 0x28399A7B, 0xFD279D37, 0xA6483FB2, 0x47D373D4, 0xDF36B400, 0x60056314, 0x952F9FB0, 0x95F3CD51, 0x6359A012, 0x50249DA1, 0xD4F5AF1B, 0xE862ACE0, 0x7D6F80E6, 0x748E5D6D, 0x5DD8737F, 0x25DE3C07, 0x50E45166, 0x52DA0109, 0xDEFF1AE3, 0x103FB79F, 0xE1EDFF8D, 0x88E3A974, 0xE47BFD40}, {0x6CE4825F, 0x48721D73, 0x4B0A2B88, 0x71BAA292, 0xA8254FA3, 0xBE54BAEA, 0xFDDF176D, 0x13B802A2, 0x36F63936, 0x51A803D5, 0xD6A990DB, 0x47745034, 0xF0DDC8A1, 0x7ECF212B, 0xB82EDC2E, 0xA56CC339, 0x2D31B7BC, 0x043B2179, 0xEEB3A6AD, 0x41D5FBA7, 0xAC8AC3C0, 0x3C5161CB, 0x50D45B9D, 0xB76AA4F3, 0x55944F6F, 0x8F0CBCA6, 0x0A3F86AD, 0xAB8D0892, 0x5A601630, 0x72AF6BC1, 0xB28EDED4, 0xA4CDED33, 0x74D77AE7, 0xDA576086, 0x1348306F, 0xBFAE5B05, 0x7D203F02}, {0xFE7296A0, 0xAF7677D3, 0xF3506729, 0x323F5E82, 0x7B8D3650, 0xD319F17C, 0xFDEFA604, 0x2E19A191, 0x314F7C94, 0x00ED0AD5, 0x581A3AE2, 0xA62182A6, 0x5A1D8ED4, 0x60728B4F, 0xB8D0A409, 0xF40771D8, 0xBC743425, 0xE87F584C, 0x230BCAF6, 0xA4CD27BC, 0x9B624B3F, 0x335EFE85, 0x898C6708, 0xD6B41FE0, 0xE57A1CF3, 0x7D8E7865, 0x9933AF2B, 0xB7E5A3E3, 0xD473126D, 0x453E8D29, 0x3553F741, 0xA2D1EC55, 0xAD0FB55B, 0x860760ED, 0xDA8361DD, 0xF10F7069, 0xB7134699}, {0x3AC8473F, 0x567E481E, 0x4973A6C3, 0x7391F93C, 0xB35C0152, 0x9F187C84, 0xBEE910B7, 0x0F3D7FA1, 0x9B789759, 0x379FEE58, 0x838D1817, 0x444C8BA8, 0x3141EEB8, 0x0FFC473C, 0xF8056826, 0xF29F245D, 0x4925E88B, 0x87C5D1B2, 0x07E31DD1, 0x9B521BFE, 0x840ADBFF, 0x4217662F, 0x92BB6545, 0x0D859DEA, 0x84B6C125, 0x496A9B0C, 0xCE7E52F4, 0x37821EA5, 0x6E114C8F, 0x4AFADC1B, 0x3EFB5A3A, 0xEC9C649D, 0x282921A5, 0xCB90D05D, 0x331900D5, 0xD384762D, 0x51C60340}, {0x05A6A9A8, 0xF0921B7F, 0x90FC7748, 0x7072DCB1, 0x715FCD96, 0xFB10DB5B, 0xD78AFD3B, 0x4C6087A6, 0x565729BF, 0x184A8E81, 0xDB54D46A, 0x7E6D03BC, 0x82DA6547, 0x54E32905, 0x98638C14, 0xDC2C3A2F, 0xF4FB2F0C, 0x42FCC515, 0x3F7439DA, 0x3F06AF79, 0x699D0193, 0x32984E2C, 0x4BC7F213, 0xAD49166F, 0x1BF3778B, 0xC1870AF6, 0x59FB593C, 0x0F056271, 0xB09E66A5, 0xCA519618, 0xFAD1484A, 0xD6790857, 0x9D69D1FE, 0x18B87E4C, 0x0710C1A3, 0x99B2EB8E, 0xC85BBD01}, {0x640B2527, 0xAEE3177E, 0x3B2A7E5D, 0x1CA96047, 0xBF57F6B7, 0xA98D87EB, 0x30C95D17, 0x81535D68, 0x91FC9ADE, 0xFAAB623B, 0xB2F5069B, 0x43053C72, 0x4445E536, 0xF88A4E19, 0x7BBEF10E, 0x561C6B74, 0xCC465462, 0xF7CE2A11, 0x5B41E8FF, 0x1ED272F7, 0x518D9306, 0x942C92A3, 0x4F17C875, 0x0799A4A8, 0x7FF141DD, 0x26D7CA82, 0xF8F1E455, 0x9CD4019D, 0x6F6857B5, 0x597AFE8C, 0xE64F862C, 0xC857D0D6, 0x3395E288, 0x570ADF0A, 0xBEA416F4, 0xFC297A67, 0x03C359BE}, {0xFABBA607, 0x8DE6FE3B, 0x19635B3E, 0x905F65EA, 0xDA3B6A06, 0x345944DF, 0x7895B27D, 0xA2C1B783, 0xA6C96B1C, 0x6F33BED8, 0xB0BB6495, 0x7214E4FB, 0x1D9CA72A, 0x35B32E5B, 0x37EFB052, 0xD2DB596C, 0x862DBD87, 0xFB4B9283, 0xDD8062D8, 0x6C350BF4, 0xA7B131F0, 0xC2A19824, 0xCBD85198, 0x8C913509, 0xC5E4666A, 0x7294F15B, 0x1AE03D2C, 0xD0471B3C, 0x2C834A7A, 0x534EB482, 0x26CCB1FC, 0xA2C493CE, 0x26462806, 0xA8C6BA2F, 0x8F8EFC8B, 0x091FD578, 0xE76B152F}, {0xA2153053, 0x331E1674, 0xCD15102F, 0xF403E59C, 0x2C1BBD16, 0x7E688DBC, 0xEAD5AC8D, 0x9E0DC719, 0x8E5952FA, 0x087494E8, 0x3D004BE0, 0xDEF85680, 0xB7C67713, 0x45EF015F, 0xAFFCB312, 0xF0FDAF84, 0x3CB8F3B1, 0xA1687293, 0xF15C90ED, 0x0D5347EE, 0xE2FB21A8, 0x60440FAB, 0x1F6B5D15, 0x1124B85F, 0x10EE3774, 0xFB18E8AE, 0x3E3AB86F, 0x8DC0B504, 0x0CC52922, 0x57EC96D1, 0x467DBE13, 0xB16F8511, 0x1E90564B, 0x4D659DB1, 0x4D8B5559, 0xACE315D7, 0x066E83D7}, {0x984802D5, 0x880EF765, 0xC86C62A4, 0x4D149184, 0xDBDCDBE6, 0xFA25FD75, 0xD99BEDBD, 0x52B2FE5B, 0x4A92E976, 0x66D3F23A, 0x90919986, 0x18A084CE, 0x14FC5E1A, 0x99115594, 0xF3AE4150, 0xA0542257, 0x0C18128C, 0xFAAB30BF, 0x3C1FE2B8, 0xABD2E8EF, 0xFBEAD8B3, 0x91C70F61, 0xF86CEFB5, 0xBF6CDEFD, 0x6CE8A434, 0x69C62876, 0x4DD3B3DD, 0xB0A525C9, 0x9FDD0FB2, 0x9E93B77E, 0x44DA3ACC, 0xA3F9D36E, 0x6AF9D851, 0x180D6192, 0x7E7E169C, 0x74AE2FAF, 0x651E661A}, {0xA38F7D74, 0x09672B86, 0xD801E609, 0x8BD1D538, 0x02453D0E, 0xE43D2B66, 0xE85B1B82, 0x2210895F, 0x2D1E358A, 0x84C39499, 0xC137C965, 0x31F538FC, 0x49C38062, 0xE5F7B263, 0x2B65E37E, 0x6FA685CA, 0x5C6231BF, 0x7DF09031, 0xDC4CE949, 0xF9ED6BAB, 0x5526F0E7, 0xDBCC0779, 0xB1C8A38E, 0xE5449682, 0x2A8BB0D1, 0x94515874, 0x5188D5A3, 0x287B8741, 0x88A015B8, 0x4B23CC72, 0x41E24DF8, 0xA48C82FA, 0x42F540B6, 0x728AA3DE, 0x6CDA023D, 0x31FA1887, 0x68A86EFD}, {0x221E23E3, 0xD9019D7D, 0xD9DA4F9F, 0xFA159929, 0x4E2EC6E9, 0x96E848E4, 0x599D1BBD, 0x6D53E1A1, 0x8A90A63E, 0x14268279, 0xD92F0B38, 0x2D243352, 0x3A88AA5F, 0x88AEB8F3, 0x643037FA, 0x6CECC201, 0x12A1CAA8, 0x06C52D4F, 0xC956784A, 0x924066AC, 0x2B6435DB, 0x9A1C2E47, 0x0B05F4CC, 0x3D2AD9D5, 0xB7A018D0, 0x3D122C9D, 0x47483BD0, 0xBBBCDAC0, 0x182F57B5, 0x02B73F31, 0x9D4B9D56, 0x0707AC31, 0x0B7FE526, 0xB6243F18, 0x3A78E8D1, 0x75C76A63, 0x54703CBA}, {0xB583A5AC, 0xF9E68596, 0xF3D9AC16, 0x13550FCA, 0x37D358BA, 0xC42C75D5, 0xAE169470, 0x79932F36, 0x8FC43E6B, 0xBE81991C, 0x95F1DACC, 0x6F19FDE8, 0xE99786CF, 0xDAB865F3, 0xA8D91C30, 0x8CE7BE1D, 0xE1F2C82A, 0xBBCFEBAE, 0x07973B0A, 0xE34EAECC, 0xAF1DF6EE, 0xFF024AD9, 0xE3400A6F, 0x3157B46A, 0xE307DABD, 0x8E63675C, 0x8459D697, 0x4898D46B, 0xCA9B210F, 0xC2C6D9CD, 0x328B8F0A, 0x7E77BDA5, 0x97E1E91E, 0xB8DB1D24, 0x16AC4269, 0x342536AC, 0x12CF47A1}, {0x40C66BD8, 0xBE8FF639, 0xFE7F6B95, 0x8A231FF1, 0x561DCC90, 0xD39BDCD5, 0xC235D991, 0x9D53A4F8, 0x639B4A87, 0x51715067, 0xC0DD5B98, 0xFDA35981, 0x9FF34AB7, 0x4D2E46F7, 0x3277FC26, 0x8E10F50F, 0x07C1E535, 0xB6D42619, 0x89EA428D, 0x165B3FB0, 0x08258FD9, 0x564091F3, 0xD5716D0C, 0xC2EDEE98, 0x0A45317C, 0x2B9E87FE, 0xFF78D44E, 0x707E514A, 0xC50B0F88, 0x78BFFA56, 0xAF319824, 0x3F31041F, 0xBAC8440C, 0x0EF757EC, 0xBADDDB63, 0xC73500BF, 0x5896D57D}, {0x2110F0F5, 0x33A4F2A1, 0x64C1B419, 0x5EA76769, 0xF97839E1, 0x0B94DD7D, 0x6D6EF85D, 0x4FA87BC5, 0xE48C8C13, 0x3D10C850, 0xFBE56279, 0x5C257F3E, 0xAC352BBA, 0xEB10CB53, 0x4169D04F, 0x96C0B9F5, 0x3280CEA8, 0xC4E3406B, 0x91C6D2AC, 0x4E3DAF19, 0x09DD09C8, 0xF66DDBDD, 0x9C49168E, 0xFE262E86, 0x7C842891, 0x3FBF2C3C, 0x8F92D062, 0x4169BB8C, 0xF9C9666A, 0x11489C25, 0x8F09126E, 0xA7955217, 0x558DC2ED, 0xCCD929F4, 0x478162FD, 0x6DD458C4, 0x06E46F9A}, {0x267E907B, 0xB967E2C6, 0xD9361CC5, 0x4EDB8F7E, 0x717904BA, 0x01D6F356, 0xEDA02D48, 0x492D19D2, 0x0EA61A19, 0xF836FC98, 0x8FF9E574, 0x7227D0AE, 0x10EC1A8C, 0xE700882E, 0x2F485D1E, 0x2D2E4849, 0x8E0566BB, 0x00CDC5B8, 0x7445A207, 0x2EC1ABEF, 0xE7B43E6D, 0x5BF7CFD2, 0x3DB5659C, 0xA91763E7, 0x99A8D5C3, 0x29608C5D, 0x006E9103, 0x1E159167, 0xCAC176E2, 0xAE79217D, 0x5A65E39C, 0x8D07C419, 0xE2DE71FD, 0x71F59736, 0x52032BE2, 0xE7BB97D4, 0x14809E74}, {0x45070BDD, 0x844E4E13, 0x47F0B0C8, 0x07DAD52E, 0xC04DF7A7, 0xF083846F, 0xF6C14CE1, 0xF906A0D0, 0x12581B92, 0x3710AD53, 0x2C31BA4E, 0xF7EF066C, 0xB57192AA, 0xBA9D9333, 0xB0A3C8F9, 0x67DC87BF, 0x431FDFED, 0xA4A8968E, 0x9BBFC898, 0x13439F79, 0x48CF29EF, 0x2DA04139, 0x0DA3BEBA, 0x9208ED36, 0xB06B15A5, 0xA897D064, 0x85199F32, 0x942E28DA, 0x099DFD2C, 0x9556E777, 0xCF1A869C, 0xE4A5D7D0, 0xBF5F919A, 0xF8794304, 0x0A81436C, 0x9446C6AD, 0xBBB67CA0}, {0x3F02A4DC, 0x77F398D5, 0x5CA9E0D5, 0xA8DD3CC9, 0x41FC2887, 0xA7790ECA, 0x584C8248, 0xD7168B5E, 0x62F17C6A, 0x16293D55, 0x98D8FBE0, 0xF6A8A2BB, 0x8673181D, 0x55A40A87, 0x496D9CAC, 0xEE11ABC9, 0xB0D77707, 0x52671EFE, 0xB9F87AD8, 0x834D880D, 0xB06A3691, 0x585169AC, 0x2BB806B4, 0x414E1780, 0x1C2916B4, 0x568E55F7, 0x3BDA42C0, 0xCE92E0A5, 0x480C7D0E, 0xB6B67EAC, 0x690AAC22, 0xC9130908, 0xB104BEA0, 0xAE012092, 0xF698785B, 0x02148E32, 0xB5BF4EBB}, {0x2FE5061A, 0xAAD70FC2, 0x13633F89, 0x94F4B949, 0x4F752D53, 0x0574A2E7, 0xF589AE92, 0xEB6D3F4A, 0x28751B82, 0x87969FA5, 0xDD927192, 0x070DDE93, 0x74025481, 0x6634D33A, 0x8503B221, 0x6D9B8E56, 0x4E74FC3C, 0x1F822737, 0x8908259A, 0xAE01B7D8, 0x4141CC94, 0xBFDC05D0, 0x68336B52, 0x4506D6E5, 0xB9133F0F, 0xBEFB8AF2, 0x833F8FAA, 0xC16EA47F, 0xCDE1DA7B, 0x027D8438, 0x192010D2, 0x2EE7E4E9, 0x75CFE418, 0x09EB064D, 0xB6594544, 0x00487A75, 0xF51D6C91}, {0x837F9C78, 0x062E13F7, 0xB74216E8, 0x5A71DAE8, 0x059AA690, 0xE557038A, 0x50158372, 0xE674CDCF, 0x6334BFC8, 0x6369092B, 0xC0587620, 0xBD0C9D19, 0x1E13F6CC, 0x2F01FB91, 0x59BCC185, 0x860FD042, 0xC1ABFE73, 0x62C29FD3, 0x7CA184D4, 0x7ADC8927, 0xC753D37A, 0xCEEA2CCD, 0x73C631F0, 0x60F65443, 0x49337EDC, 0x8E046764, 0x188B7066, 0x44E41D51, 0x72C3BD05, 0xA36FBE26, 0x8391AF36, 0x7E761A1B, 0x2292C2B4, 0x285B495F, 0xBE5908A4, 0xDD278719, 0x29CA9F70}, {0xF01C567B, 0xF3A54001, 0x701A3DA8, 0x0F5FBDC1, 0x45FCD76F, 0x850536ED, 0x751077C3, 0x3C7D1E57, 0xB3E3BB4E, 0x1ED414BD, 0x0CF9B9B6, 0xDD02DECF, 0x088B7A5A, 0xD2F56540, 0xF7F32438, 0x08CEB7A9, 0xE5EBAD56, 0x6209BCBA, 0x638EB6FC, 0x3A810C39, 0x7B6B9DC1, 0x2D6C87D5, 0x7B149D5D, 0x6703DFE6, 0xF61C1D07, 0x1C3E5997, 0x279DCDD8, 0xB9E78DC3, 0x60B617E3, 0x333C7AA1, 0xA99524C1, 0xB2DE73C5, 0xD5E11F42, 0x33A7816B, 0x4CF186A1, 0xC3C722D6, 0x6D9550C5}, {0xB9AEF79B, 0x0155452B, 0x9DC7CC8F, 0x9057B700, 0x80528B4F, 0xD731656D, 0x72DEA06B, 0xB0FCB7DF, 0x5DC56826, 0xC772296C, 0x90FE3425, 0xE8DD2C4C, 0x08CAB581, 0x4E149D2D, 0xDF1D0EEF, 0xC8DA6AB6, 0x8239452D, 0xBB520C08, 0xD82659B6, 0x78ED101B, 0xBA07698F, 0xBE2801A0, 0xB27909E1, 0xA7B07FF6, 0xAB936A94, 0x14C6B239, 0x8DA6DC13, 0xF552E247, 0x4D0B4359, 0xBBC9BDEE, 0x3F45D604, 0xDDE7D292, 0xC1EA6692, 0x48C0C381, 0x2E711C2B, 0x64235F26, 0x2FCDC4F8}, {0xF51B4F70, 0x157A8BEA, 0xC208EFDA, 0xD2867C25, 0xD3B08736, 0x001F9793, 0xD6070C0A, 0x0F6CA79B, 0xD866A587, 0x256F8506, 0x10847B01, 0x1D439474, 0xE2FEF733, 0xFF38FA7C, 0x41548195, 0xCC2F1864, 0x3E84CB66, 0x912FB755, 0x0C665371, 0x809FC42F, 0x5FD6142C, 0x1C0891A2, 0xC30C2315, 0xB4C6E990, 0xE3716E0E, 0xC4043AFC, 0x5FF81C19, 0xDACCFF0F, 0xFA83E1C8, 0x92038D4C, 0x58572776, 0xE0EB272C, 0xE1FE1B01, 0x4AE38BA7, 0x2E7B876F, 0x4D55BD25, 0x91EAC958}, {0xE04F8D6C, 0x3646750A, 0x9D52E13E, 0xB45CDDB2, 0xDAB38DC0, 0x42387533, 0x111E2570, 0xC70441C3, 0xE3F094F8, 0x65756EAA, 0x91295044, 0xD94D666D, 0xF1427897, 0x2E445D42, 0x43E60447, 0x4DC27224, 0x6AB31C8F, 0xDCB4B7CD, 0xCF1A7CA4, 0x559C680D, 0xB4C402FD, 0xE086084A, 0x4B2A4BBE, 0x2CE47B68, 0x7C28FA36, 0x010D0B0B, 0xEA20ACC9, 0xF2ED977F, 0x6028D172, 0xFC728ACE, 0x85554585, 0x47DBF0B8, 0x4F89022C, 0xB0F9B62F, 0xEE9781D0, 0xCB552CCE, 0xE032C249}, {0x79CD16F9, 0x854A611E, 0xD8250A5E, 0xC1E5A5A5, 0x7888D2B9, 0x7936796A, 0x673B5932, 0xE04D879D, 0x1951ECFD, 0xCBAEEB87, 0xED31B528, 0xE4B380D1, 0xF81E74E7, 0x2FD09F9C, 0x183C1575, 0xC0C5D480, 0x8C2F01C8, 0x969A8AF3, 0x402EAD48, 0x39424AAF, 0x033A8C84, 0x22AEE979, 0x72617515, 0xD8904503, 0x61AAA1CB, 0xEC1A9CE5, 0xC6A94A75, 0x40B32BF1, 0x3AC3AD64, 0x89E43378, 0xF4640E1E, 0x5DE8BEE9, 0x82E24FB8, 0xFD08C6EE, 0x00238A50, 0x73421DF4, 0x46AE8A12}, {0x3E69A909, 0xB7A7DDE6, 0x38F7FD98, 0xDC399BD7, 0x81AF6BE5, 0xA21A5C34, 0x634C7303, 0xDC1A31AF, 0xB1C7F889, 0xA2BF2F43, 0x621A60A9, 0x3D30F0BF, 0xA0126B24, 0x9714F7FE, 0xBD459359, 0x275FFA75, 0xCE20C735, 0x5C16603E, 0x9D212EFD, 0x0AC6399D, 0x4C960FDA, 0x7BE606C2, 0x5973D334, 0x397EDA92, 0xD973B184, 0x386EDF7D, 0x0B40DB6B, 0xAA83D02C, 0x5FEDB174, 0x113133A7, 0x7B43A963, 0x241A2B2E, 0xAB4E5B4E, 0x8158DFEB, 0x8F24BE12, 0xE59897DD, 0xEF93CBA3}, {0x53E48B71, 0x00DD1DCB, 0xE0969EFB, 0x25301CA9, 0x0A533CBA, 0x7E588A09, 0xEB316AA9, 0x0B52A036, 0xBAC2F5AE, 0xECDA52F1, 0x6673FF9B, 0xE039E95A, 0xC643DDF9, 0x5D8538E4, 0xCBF865D6, 0x3551DE84, 0x7A51E6E5, 0xBCBCF18B, 0x015B0E76, 0x94807C5E, 0xEFDBE9BC, 0xE60E7178, 0x9AE40E7E, 0x1E84BC10, 0x6718E7D7, 0x0E136F72, 0xFCC77B44, 0x2E4BF433, 0x7D292864, 0x776B9D41, 0xACAD2F19, 0xD1389A47, 0x8E691F1B, 0x61FE50BF, 0xE61B46B1, 0xD43231E8, 0x4695F372}, {0xC28C1A75, 0xCD9E6AFA, 0xA36EDF5F, 0x614A0367, 0xEFE34CDC, 0x76755F32, 0x0CFF295F, 0x37B56B6A, 0xD0EF22A3, 0xF8DF2171, 0x010C556C, 0xB06B0F76, 0x9A7685CF, 0x5F5534F3, 0x4AAA0487, 0xFCFE632C, 0xCCC3E31E, 0xC5324E1A, 0x7566ECD5, 0x822FE12E, 0x19D53FFD, 0x55B5D8CC, 0x0EEA8855, 0x12EF55C1, 0xD9E20705, 0x4FC83381, 0x50F61379, 0xDAE2A7C6, 0xC4945EFB, 0x9DDB7E9F, 0xD88D9367, 0x7B7905FF, 0x10CE298A, 0x7A549BCA, 0xB7F86D0D, 0xB4822508, 0xF8CB24B7}, {0x9E1ADC78, 0x2884E372, 0x54F85D27, 0x3A4380CF, 0x50B2BD2B, 0xF8C017B1, 0x098D6FFF, 0x5C4E3226, 0x5E4C3922, 0x557CD2FE, 0x490D854C, 0x61C9B0E6, 0x29920280, 0x0A08C7D3, 0x547CD385, 0xAB00EA1E, 0xF5DFDBAC, 0xCC09B215, 0xF9E5597D, 0xB666DA00, 0xE2355B6E, 0xE4F3D35B, 0xDE864228, 0xE0535CDE, 0x123CA186, 0xCA77365E, 0x8279A275, 0xDE365D4B, 0xE7C36736, 0x945F6C27, 0xE4D52B1D, 0x42070322, 0xF1FA9C05, 0x39BBA440, 0x2D66CFD1, 0x0D23B5F9, 0xF47D10B6}, {0x8D89BA53, 0x85EA4347, 0xBC5F27A6, 0x0BBB1463, 0x53DD10A0, 0x2AB26708, 0x140F828A, 0x227AD6AF, 0x76D2644F, 0x9E513D54, 0x32E1851D, 0x06817CDD, 0x8664A2A7, 0x6ADDE963, 0xA27A583D, 0xD5E73FD6, 0x812BE542, 0xB3A4E592, 0x32211DA3, 0xC53FF8BA, 0x62C7D52D, 0x25D8443E, 0x3B16295B, 0x019CA2EF, 0xF4D46117, 0xCB5F1143, 0x4E577405, 0xE727E302, 0x5A716F40, 0x5F02D61E, 0x705E66CE, 0x98448DAA, 0x0208E262, 0x941462E3, 0x93699848, 0x100A5D91, 0xC0CF7392}, {0x98E51D76, 0xBB268773, 0x31D68459, 0xD27B72B7, 0xDE3544AE, 0x9CB29868, 0xFB359269, 0xD3F441E2, 0x4FE14A59, 0x9CBF4EBE, 0xF7E8F1F8, 0x3072ECDF, 0xBFAF4935, 0x23D3589F, 0x2D52C10C, 0xE8823826, 0xAB9B10DE, 0xF69E7D60, 0x0A494C59, 0x91CEFAB5, 0xAD11FA07, 0xA39AEF0C, 0xEDB487ED, 0x18056499, 0xA643FE4F, 0x213F7AAA, 0x0BC5AA76, 0xC046D051, 0x2933FE79, 0xD8A25D93, 0x00AD6C0D, 0xCDE824FD, 0x94E1DB3E, 0xF477DB15, 0xE3A4FBB4, 0xF5CD5438, 0xA43A7F95}, {0x80D8E585, 0xA2242B63, 0x5747A219, 0x58FC1857, 0x9D7701CC, 0x6AABC4AB, 0x02B0FD42, 0x7FF2341A, 0x7464899F, 0xB91A9E41, 0xC6165D05, 0xC3B9D4F8, 0x05A2D7CB, 0x63536E5F, 0xBB015C1B, 0xC91450D4, 0xE1215460, 0x06F74ACA, 0xE740A7F7, 0x0C2CD7BE, 0xEAE93A68, 0x7029902A, 0x94479C20, 0xD6C0E13F, 0xFF2B0C42, 0xB077C7BB, 0xDBF303EC, 0xB263FA3A, 0x09D95D6C, 0x4E892551, 0xD73BE643, 0x3CFA7262, 0x96C3B9E7, 0x75259973, 0x6DEC3BED, 0xA340192F, 0x768D28A6}, {0xC61E7CCD, 0x83A2B467, 0xF00F7A30, 0x1DAB2EE9, 0x248EE246, 0x1D8A0E2C, 0x17881FA7, 0x302F4B5E, 0xE771BB2E, 0x59A5F091, 0x6D029A2D, 0x7C211FFF, 0x95E49092, 0xDA2B3CCE, 0x2D7C60F1, 0xC4B0D77D, 0x58164182, 0x494031F6, 0x65B53032, 0x62AB21E6, 0x86D1EAE5, 0x8C56ED70, 0xEEB19411, 0x2D923D73, 0x448C9DA4, 0x2E5235B6, 0x445EDDFB, 0x55E33BE5, 0x48A2CE92, 0x2B64DA27, 0x171DEB88, 0x648D58EF, 0x9D5509BB, 0x6C28571A, 0x7C3D044A, 0xC88FB99F, 0xDBCDFDB7}, {0x8530E29B, 0x51C36566, 0x8F8EEBFC, 0xC920AB9E, 0x09F3C5F4, 0xD2B55A95, 0x6DC6F9FC, 0x33284F8E, 0x7941FD5C, 0x5B311964, 0x26BC851D, 0xB2DA0FE7, 0x3F53143A, 0x14269D46, 0xEBE73C6E, 0x0B3E5F89, 0xE90B9DFB, 0xFD201343, 0x5DFE2231, 0x31F44B04, 0x974739B5, 0xE64072A8, 0x9942400C, 0xE4426ED3, 0xF0C5EFC5, 0x5E827273, 0xDDCF2B1A, 0x12830ACC, 0xBBAA4B50, 0xAD5FF7ED, 0x2E1CBCD8, 0xDEE4DA5A, 0x98F54CAA, 0xAE01D6E6, 0xCBD3CBEE, 0xF79DF834, 0x661340F4}, {0x69A6D127, 0x2AFCFE62, 0xF58EFD93, 0x56B14DDB, 0xA86CC22C, 0x6B563AE1, 0x5302944D, 0x33B4BE65, 0x8D9835DA, 0x48E8D973, 0xBC313962, 0xF06057C0, 0x643E71DD, 0x59EB908D, 0x64F123DD, 0xC0CAA67F, 0x16FC58D3, 0x4A30D556, 0xA34997E6, 0x092348A6, 0x6EEB1B6E, 0xFBDF96E6, 0xC24B4D9A, 0x42DA09B9, 0xE899C1F2, 0xB20D988B, 0x169AEB29, 0x15EB0E98, 0x779EA79B, 0xD4ADCB1B, 0x03CB9537, 0x6AE929C2, 0x0D89F9C0, 0x1B85B948, 0x4543334F, 0x6FF8E1EE, 0xB8330188}, {0x7427052A, 0x79F760EF, 0x54CB3D37, 0x27DACA7A, 0xB5DC2ADB, 0xFE4EB5B5, 0x32A4081D, 0x7B39DAFD, 0x30CB4C7A, 0xDB036A8C, 0x0E765D34, 0x053D3422, 0x9F0B8404, 0x73B8D39B, 0x8EF77E0E, 0xB5F145EC, 0xE00CA0CE, 0xF7F1120C, 0x45AFA4FE, 0x872E6545, 0xABF8D9C5, 0x4C8A253C, 0x933FC365, 0x85DF7694, 0xE372AD8F, 0x218E80AC, 0x845E56BA, 0x5634716F, 0x5C7AE834, 0x05CC8BA4, 0x4F1E491F, 0x0B742F6B, 0xCAA48663, 0xF7185A6B, 0xCB4A975C, 0x2D323250, 0x63315415}, {0x572B975B, 0x16F47525, 0xA0470A2A, 0x5CEBF471, 0x1055873B, 0x389995C9, 0x592EE10B, 0xBFC4A4B4, 0x673EDB8A, 0xD6890A67, 0xA33771C3, 0x9FB6D0B8, 0x1FA70E5E, 0x0F26EEFB, 0x1A641DED, 0x32D96D70, 0x1FCE400A, 0x41AA7952, 0x7EFD4EA5, 0xBB6F1FF3, 0xFD773644, 0xDFDC53E3, 0x8A00327B, 0x157D3AF8, 0x07DADA40, 0x4147D482, 0xD7D36E6C, 0xA63110AD, 0xA839CE60, 0x5110C355, 0x5E7A42E0, 0x6C324D06, 0x9135E247, 0x3AE10B3A, 0x85DEBFCE, 0x9D7AFDBC, 0x4FCB4661}, {0x079B1127, 0x4D24C131, 0x8AF6FF6E, 0xF3B29BF5, 0x9A44A289, 0xCE1F8DCC, 0x0E0CD025, 0x35646A36, 0xCE8583DD, 0x3AA163E2, 0xE9C3D218, 0xD4A3216F, 0x603A5E0C, 0x6E66CE40, 0xCE006D79, 0xE25EB57C, 0xE7F62AE0, 0x0D5CD5B8, 0x46E72D87, 0x16B903AD, 0xEF215AED, 0x86D77253, 0x31716973, 0x4B015FD2, 0x6B1BBCEF, 0xFAA745C3, 0x29572222, 0x149ADB60, 0x06DC7868, 0x1D7A1BE4, 0x42F71B55, 0xDAA5303A, 0x2AB35EAE, 0xDD578B3C, 0x2EDA300E, 0x8A809E9A, 0xB12809BF}, {0x1F94523F, 0x40EE4196, 0xCC1FEF2A, 0x6DAD0FE9, 0xEC8F2F9C, 0xE1F47258, 0x8234024C, 0x8494AF00, 0x5F06BD30, 0xC966A83F, 0x5F965E14, 0xC72B5B01, 0x89AE8118, 0x43515D9C, 0x7C0D7C69, 0xEC71E0A0, 0xB204284D, 0xF2437DD3, 0xF9021504, 0xA8D29CD7, 0x5D33FC9D, 0x310761EF, 0x70149CF7, 0x30CDB896, 0x9074CB73, 0x9FD9793E, 0x86291B7C, 0x0A9D67E5, 0x6C6C6410, 0x1B63143C, 0xD8EEA9F2, 0xB7BF1074, 0x21D4040B, 0x331BB797, 0x8AEA22B9, 0x399A0041, 0xC5253CF4}, {0x775F9E49, 0x610C2997, 0xD89F5D87, 0x12D60B08, 0xA2B77D05, 0x595D63ED, 0x97232D62, 0x14387C50, 0x06D0AC1E, 0x6CFCB913, 0x553A9CAC, 0x2B5A5C53, 0x5976BB27, 0x6420F3C2, 0x75A2AF6E, 0xD60DD93A, 0xEF2D6AB0, 0xFF6D5F5B, 0x0614E0AE, 0x12C1945F, 0x10EA4EB8, 0x6BA6491A, 0x9FFBB2CC, 0x0B68E70A, 0xAA22DE93, 0x6EF6CFBD, 0xD6BF400C, 0x673EDFE9, 0xCE5FE3FE, 0x40013F16, 0x95BE70F0, 0xD9783744, 0x95BDDEF4, 0x7BE7E522, 0xAEA8F7F3, 0x1A29E609, 0x223F06EC}, {0xB6F396DE, 0x7ADE9C5D, 0xDAEAC722, 0x9DBE635E, 0x8932C951, 0xCBCB26A5, 0xC311628E, 0xC16CF204, 0xACD48D8F, 0xF638CEDD, 0xAD1A7BC7, 0x7D002FA0, 0x19325A49, 0x47901639, 0xEA4ACD84, 0xA6638DCA, 0xB337B7FE, 0x9D31DB37, 0xE59D6E72, 0x146BE4D3, 0xD94372C5, 0xD4E34170, 0xD3DB2215, 0x3F7E49B3, 0xB2888CB4, 0x9E9BD7E5, 0xE33BD59C, 0x9A51C244, 0x1A6FCF42, 0xBA05E71E, 0x665EA467, 0x380D3A7E, 0xB2DCFD9A, 0x66834EA0, 0x0F65CB5B, 0x60D749A0, 0x12B1C14A}, {0x69246CC6, 0x1421E3C3, 0x4F4AD5CB, 0x237C04A8, 0xF9F0D0DC, 0x030797AD, 0xAE0F3148, 0x1AE7F307, 0x297C1CDC, 0xBE4ECB0C, 0x43874E3B, 0x77E0F13C, 0x63BF1C43, 0x41994798, 0x7975FC4A, 0x798ADB3C, 0x01D4AF7F, 0xD5DA05A8, 0x0F0A924F, 0xB30263CF, 0x5CDCB9E5, 0xC5DF7D65, 0x6F44001E, 0x6C8D1A6E, 0x384016E1, 0x276C3EC2, 0xEE90E8D1, 0xF0A5AB45, 0xA994E23C, 0x6F72991D, 0xAB4A8723, 0x79B456F8, 0xF3235BD3, 0xF743DFCA, 0x53C641E1, 0x7ADA4240, 0xF72177BF}, {0x7451D784, 0x18D318D5, 0x87A1DF65, 0xF87EEE6B, 0x399FF741, 0xA24FEBED, 0x610AE096, 0xA58D1070, 0x9742FCEA, 0x539E62DC, 0x90528258, 0x63B5907D, 0x13FD9BB7, 0x25E19480, 0x0D959C47, 0xCCF4050E, 0xD211B9A6, 0x022B5FB3, 0x983B358B, 0xB8CD1D91, 0x309C7F5A, 0xA453EC62, 0xDDC8E6B3, 0x11BA247C, 0xA6C741EB, 0x5F579501, 0x725C634A, 0x2AF323F9, 0x7A3D090E, 0xA03B28CE, 0xEFF9370C, 0xBABDC3DA, 0x221FE410, 0xB524D45C, 0x05B9B0D9, 0x9ED276F2, 0x99CB125B}, {0x9184D5B1, 0xAE6990B3, 0x09FE6157, 0x6538AC90, 0x3466E51C, 0x411991ED, 0xF4ECB478, 0x754DC5B9, 0x96E63734, 0xADA6EAED, 0x5A333CDE, 0xDC8CEBDF, 0xEA4AE3B4, 0x6B034956, 0xBB1CFB44, 0x7BA35112, 0x4123592F, 0x51233293, 0xDBC20C36, 0xB54D6F5C, 0xB2776A57, 0x31BB48DC, 0xE7A57D46, 0xD1467D89, 0xAD5244BD, 0xE8FA9AD9, 0xFA6AA917, 0x4564E9BC, 0x0DD02FD2, 0x3920DC1B, 0x62D3423E, 0xD846080C, 0x626007BF, 0x54FC6558, 0x973D504E, 0x1999C0B5, 0x985A8EB0}, {0xF437F9CD, 0xDF20F179, 0x05453F2D, 0xE86FB803, 0x2A8CD496, 0x5290BFFB, 0xE4993D5C, 0xB398DFB7, 0xE25E4456, 0x6D3D0A29, 0x3AD2DDA7, 0x6197079D, 0x37F35C9A, 0x02DF13F5, 0x5D2A054F, 0xD908948F, 0x4D1B49EF, 0xD96856EC, 0x2F38E1C7, 0x2847CA82, 0x10475AEF, 0xB36B3FD7, 0xBE0BAA2C, 0x7D4611D3, 0xDA76E37C, 0xD5CA94D1, 0xFCEA9AAB, 0xB0763FC6, 0x7C230A0B, 0x0B8A20A0, 0x0F189C69, 0xA57CF84A, 0xA87C6B06, 0xADC43164, 0x742D5882, 0x03C62337, 0xC0AA0528}, {0xCCAF1C0A, 0xD3E25622, 0xCD10D341, 0x15FA73C9, 0x1294AF47, 0xAC227E12, 0x59C33FDF, 0x83ACB129, 0x3BEB3407, 0x89379EF9, 0xAD56EC26, 0x4230AB6A, 0x35B36957, 0x0320C9DA, 0x77C7BE15, 0x90085500, 0x432A38C8, 0x960563D4, 0xA0744D3D, 0x4984A7E5, 0xF31AD010, 0x0108789C, 0x8F6B3E08, 0x7BEA35B7, 0xAC369B64, 0xDD1E5B26, 0xAC357C7E, 0x2E92F104, 0xF9BC2499, 0x2E00F57E, 0xB7DF5AAD, 0xBEE86455, 0x45BE7F96, 0x9FF01B1B, 0xF5BEEFF3, 0x17952278, 0xEF1C3893}, {0xA131BE6B, 0x04D37455, 0xED3D8FDF, 0x4CB17D2B, 0xC218B582, 0xD29E0E8D, 0x2E786AE5, 0xF36FBD70, 0x384154F1, 0x93D5D548, 0xFB6E1DDF, 0x0E0F5184, 0x4848F1DE, 0x7A9346FB, 0xC0F3B940, 0x8109275A, 0x2E97E643, 0xAAF0EAA8, 0x872821B8, 0xE102D09B, 0xB19733F8, 0x702F4DA2, 0x98BCA0AA, 0x81DC2392, 0x3FE91C23, 0x24C4EB3D, 0xF2C6B4CF, 0x3510EA6B, 0x1847174E, 0x67C9EA78, 0xB1046EA7, 0x03ACB007, 0xD811D8C6, 0xCF3E0C2A, 0xCA280A4E, 0x24995C8D, 0x855CBD89}, {0x90C8BDB6, 0xA34A1094, 0x11D43443, 0xDA192944, 0x76FF83A2, 0xBA0D9485, 0xD5801790, 0x30FC2D2B, 0x4035D04E, 0x7B0219B7, 0xF89036FA, 0x7C317FCF, 0xAB22C4BF, 0xFEED3EE1, 0x512AAAD8, 0x526B3E8C, 0x5A20E80D, 0x3B4314C3, 0x34C1C2B3, 0x841FEB6A, 0x65BA0E16, 0x2F3DBEE8, 0xD49E3699, 0xCEEBA4C3, 0x51B77A62, 0x748E420F, 0x96C7F281, 0x60600CA9, 0x232BBF22, 0x7654B7C5, 0x11F45BC5, 0x99F89998, 0xACCFA29F, 0x36D9D53B, 0xF8BB2738, 0xBE6404DB, 0x0DCBE4E3}, {0xB940E21C, 0x7C02ACC8, 0xF522292A, 0xB2E96260, 0x5691731A, 0x89FDAB2C, 0xDB8DD0D9, 0x7A29518E, 0x02D9E550, 0x5D95E2C5, 0x91FB6225, 0x8CD1E5C8, 0xB7BCCDD9, 0x917E8CA4, 0x6FDF062E, 0x29A8AC07, 0xF81C28E1, 0xF3BDB95C, 0x6B4E329B, 0xDBC18A31, 0x6E6A7F3C, 0x47C079CB, 0xAE72373D, 0x4920D95C, 0x5626ACFB, 0xAD52C44A, 0xBEE4DAD9, 0xC2EA88DA, 0xFD4CFF9B, 0xEAF4CB98, 0x8E0C0F3C, 0x721E5EA7, 0x40485D4F, 0xE2A4625E, 0xCC0D0437, 0xC5B23A7B, 0xD7B6012F}, {0x3992B53D, 0xC7289CDA, 0x2B251944, 0x90B4B90A, 0xBB2D6B04, 0xD2DEE748, 0xFAD9D19A, 0x8CB129DA, 0x5A89E453, 0xC9272659, 0x92241CF8, 0xA60563FE, 0xF3B31E62, 0x61E37986, 0x5774AF4A, 0xB456FC85, 0xB2010731, 0x8B257545, 0x18E9DA09, 0x33EC0A71, 0x6495AA09, 0x19D0DD24, 0x223347ED, 0x4F7418EF, 0xB2FE109A, 0xEFE2CC4A, 0x46635A90, 0xB1E6E4B9, 0x2C0B0CD7, 0x2CDC00D7, 0xCF0325BC, 0x8D8EA776, 0xD5CF7D13, 0xF73D0C53, 0x08356C1A, 0xB666927E, 0xA1A2D320}, {0xF1676F1D, 0x0384B46D, 0x039EF62A, 0x20A56EFC, 0x08CA70B7, 0x3DC3F9C0, 0xB71DF1F0, 0x2CBE2F34, 0xABD5C8C4, 0xF51C86F3, 0x0C0B3648, 0x6484608F, 0x529DAFA3, 0xA325C293, 0xADABC4DA, 0x447E1CB8, 0x599F87C0, 0xA296C9C4, 0xDC71CDAA, 0xA3A7E1C0, 0xAC307A3A, 0x0472662A, 0x269E60CE, 0xFB062D02, 0xD3891B9A, 0xEE01C9AE, 0x38C638F6, 0xD48A8D9A, 0x81EDB4D6, 0x66D0728A, 0x799286AD, 0x96A4AAAF, 0xE6087B80, 0xDF9A5851, 0xB2F519CC, 0xCFBC56CC, 0xD98C07FE}, {0xF2110AC7, 0xE674EF39, 0x11E05ED1, 0x18E0A6F7, 0x84D48750, 0x7250A73F, 0x9799A488, 0x5CD2D94B, 0xC9541CAC, 0xD8B7F874, 0xED66BA86, 0x93B8EBA6, 0x9216BC10, 0x18F62CC0, 0x4769B4C7, 0x8D864A52, 0x91A5B304, 0xC8E79F3D, 0x8A11769E, 0xF94B27CA, 0x6A00A478, 0xEFDF65D7, 0x5031677B, 0x458684CE, 0xB1CA0C1E, 0x6411A339, 0xBF2B831E, 0x3F7B1EDC, 0xF74FE18A, 0xA34D53EA, 0xBB261E3E, 0x6C772D66, 0x5C60F986, 0x62202131, 0x260E1D22, 0x03DA2CF1, 0x668666C8}, {0x7EF6DD43, 0x715F6B57, 0x3371014C, 0xBA3237EB, 0xE10CC0B0, 0x0CC59E77, 0xA5B3EF0F, 0xE2D01757, 0xD8245C53, 0xFEFD7C94, 0xE3B3C81A, 0x77E44729, 0xF0ABE12C, 0xE03F3D72, 0xDCD8B489, 0x0438FA90, 0x12F7298D, 0x43ED88A5, 0x3942EF5F, 0xED4913A3, 0x0FCE1B14, 0x7FA9AD22, 0xB0DE3238, 0x303C6A0C, 0x8FD9A158, 0xC62BFF7D, 0x065E4EBE, 0x404D7302, 0x91F9B4F6, 0x2B7EBDF3, 0x318B5922, 0xCFC788FA, 0x185344EA, 0xFE19F20F, 0xAC1CF775, 0xE7C62117, 0x9D6604BF}, {0x9CBE1B12, 0xE6294FFD, 0xBB3E8C70, 0x48C654AE, 0x5C0977B1, 0xF92CA674, 0x626113F5, 0x4B2149C7, 0xE5B10CDD, 0x3FDE0C76, 0x8897724F, 0x321F032C, 0x75BB5617, 0x414735FC, 0xD2BAF17B, 0x25727DB2, 0x95D05717, 0xCCFD35C0, 0xD15DCA48, 0x8719EDF7, 0x4BE7B2D3, 0x9D08E019, 0x36707AB7, 0x70EB2AA5, 0x9CE6F85E, 0x965E540A, 0x74E7BE83, 0x45904731, 0x51F86D86, 0xCB7E6F2C, 0x5F0967EF, 0x7D150DBC, 0x04DB2A81, 0xD5660FF7, 0x2B65C6B1, 0x2079D22F, 0x8081B43F}, {0x3BCB1D9D, 0x9B41B4BA, 0xE264204A, 0xBA8EC0F2, 0x9E29734E, 0x8EA21EFE, 0xAFE8723E, 0xC89E8189, 0xA14FC1AB, 0xAAD1CD2F, 0xE40793C2, 0xA8044BD4, 0xF227DD86, 0xA3A7E772, 0x2397F4AE, 0xCC72647A, 0x60436135, 0x075CB43C, 0x28B25CDA, 0xD034C5CE, 0xBD665B60, 0xE7717A62, 0x7F8D16A2, 0xEB68A53F, 0x1A86148D, 0xCFAC4021, 0x8B65220C, 0xF6C7BC7B, 0x1C316E8D, 0xDA0493E7, 0x57628938, 0x7CA0B3CF, 0x36A7DFC2, 0xEDF1B1C6, 0x7E660268, 0x8A133BFF, 0x7D2BA431}, {0xAD495822, 0xF035F3D9, 0x7757AA36, 0xB1E214DB, 0xEE1D0E5F, 0x897CC5E9, 0xD269772F, 0xF985866F, 0xD6EC06F0, 0x64719CF7, 0x0ED33D98, 0xF031A97C, 0xBE79EEF1, 0x1A0DB802, 0x4F8D8158, 0xBB802376, 0x6E1E72C1, 0x91AEAC95, 0x92FD26D5, 0x6071D050, 0xA13BCBC9, 0x1E70CD33, 0xC2EBAE0D, 0x88FEE85E, 0x20526ECD, 0xDCC0C3EE, 0xAF184541, 0x5BB9CAB7, 0x2772EED0, 0x6495AAB2, 0xE670B18A, 0x8A9A9156, 0x61C26648, 0x7D574169, 0x343D2BBB, 0x957E9C54, 0x53C3836B}, {0xFC111846, 0xBFD560EB, 0xEE9F8CD7, 0xEFEE20F5, 0xBB7584C9, 0x157E4079, 0x90DB0965, 0x47DB79B2, 0xA6EEB0E6, 0x696CF73C, 0xE7492B42, 0x69A3BBCB, 0x9A4AABCF, 0x07932D52, 0xF70DBDEC, 0xC1254B48, 0x14CBB77D, 0xAFBC3EB8, 0x24D6C7ED, 0xD9081975, 0xF3C1EC1F, 0xA0096AF5, 0x83713A88, 0xF5811E30, 0xB6A4C568, 0x0A59151C, 0x2AAF11E9, 0x9E2EBFD4, 0x7B276F0A, 0x17FED9CC, 0x04C69704, 0xF31CD56A, 0xBA0F3949, 0x3A1E061C, 0xBD598149, 0xBF76D75F, 0xA38E5926}, {0x2A7A9254, 0xE2E5ABAF, 0x30E23420, 0x894A3DED, 0x4A4C4965, 0xE45FAEB3, 0xBD94747E, 0xA23447C4, 0xAFB7CDF4, 0xB856E7B4, 0x2B69428B, 0x72B446F8, 0xE4DCDA76, 0x5AA0ECE9, 0x36DC757C, 0x3A82C2DF, 0x5FCB6229, 0x6D5996ED, 0xB8368BE7, 0x697FE838, 0xD8BDEC25, 0x6E7EC630, 0x69AAC756, 0x0F727C23, 0x671252B9, 0x32CDA6F7, 0x9F2FF941, 0x1DA6498B, 0xC5783B45, 0xED207B82, 0x168E4265, 0xC9D62D31, 0x7BC9A0D5, 0x56EA875B, 0x9C8A4D66, 0xD5F00849, 0x3F38BA19}, {0xD628591A, 0xBFF9AEED, 0x308F087F, 0x66D66E55, 0x666FA65F, 0x59FC30EF, 0xBFC2D69F, 0x0F7B136D, 0x5985189D, 0x2A8CD4D1, 0x5C8088BF, 0xD8F0525A, 0xAE0A8972, 0x78704DE4, 0xEEE46972, 0x19C3A8FF, 0x1727286C, 0x9C3AED51, 0x1079B161, 0x99614F04, 0x3EC31B57, 0x4354210C, 0x583544F9, 0x1CC8C5FA, 0xB704D274, 0x64147580, 0x5F3D9CA5, 0x21BD3590, 0x17D2536C, 0x77C72C05, 0x47D4E782, 0x512CE9BD, 0x539E4D3C, 0xB932E0DB, 0x1EEDEDF2, 0xC60FDEC5, 0xA141A4C1}, {0x0EFD8B69, 0xBB7D1832, 0x40CE93EF, 0x0CAAF48D, 0x2B888E46, 0xA392042E, 0xF7802A3C, 0x8BDD0DBF, 0xC11BD12B, 0xC53C4C47, 0xDBDFAD37, 0x54B20285, 0x5D84EA3F, 0xBEA5F97A, 0x7449F045, 0x02DECA11, 0xB4EAFCB7, 0x48F75125, 0x33494243, 0x915997CE, 0xA4A3C86F, 0x87942D1C, 0x68814271, 0xF1B8DBC0, 0x37789DC1, 0xFB6D02D4, 0x3ECC20C8, 0x375F5D6C, 0xAC844756, 0xC622AF54, 0x4083A75F, 0xF60F10A2, 0xA0ECDD35, 0x7E915018, 0xCC0BA920, 0x596B0237, 0x7E208D1A}, {0x3FD7CB00, 0x12FFCB64, 0x8A460E2E, 0x29E42524, 0x368396CE, 0x6489E25B, 0x8924B43D, 0x8796D41D, 0xA35D9186, 0xC7C36207, 0xB607F970, 0xC1FB9734, 0x1A5C4401, 0xAF24D106, 0xC34B8D9B, 0x1439CC3A, 0xDB482FC8, 0xF9E785E6, 0x5DADF604, 0xE05862B4, 0xC0A0AE34, 0xFB3C8990, 0x7765A1DF, 0x6F3D618E, 0x1D1149C1, 0xECC2A459, 0xB78A55F8, 0x2D6F3575, 0x02E2A241, 0x1B26E51E, 0xA1975E02, 0x2905E84C, 0x79022D04, 0xDA5C630E, 0xD0D5F648, 0xF239A92E, 0x97466814}, {0xEE9D3520, 0xBAB69353, 0xA50A1A1F, 0x5ACEE1A8, 0xB050A106, 0x8266A03A, 0xBE0AE7C5, 0xEC73BAE9, 0x32804617, 0xA1FCFA6A, 0x8C67E7CC, 0xB80C39B6, 0x2DF53DF0, 0x82BC21AE, 0xFA0E8840, 0x40890F69, 0x57E65720, 0x58FEAE37, 0xC414C240, 0x88180834, 0xD37EA0FB, 0x314825E6, 0xD8A436B6, 0x4438B74E, 0x98E651FA, 0x372190C1, 0x081CFD49, 0xF45A1D56, 0x649902D0, 0x360296A9, 0x206D9A0F, 0x94646528, 0xA19D3701, 0x4E34A944, 0x91182CB0, 0x7809D5EB, 0x46A1B067}, {0xB0FEF4FB, 0xB4513961, 0xBBCB86CB, 0x2E3BF8D0, 0x4E812154, 0x1F5DCE5D, 0x49DA4187, 0x07CA12A8, 0x303E7C7A, 0x37779F7C, 0x9794BA65, 0xF4A50052, 0x0A3B2B8E, 0xF6F69F5A, 0x349D25A6, 0x2F084B70, 0x596F4297, 0x435D2DA7, 0xC5812342, 0x4E0B6CAC, 0x78062509, 0xD0491DF1, 0x5A7C6E0D, 0x9FC45C7D, 0x10F6F9A6, 0x5A3CA7B8, 0xC60C5A41, 0x437AD272, 0xA00E2A35, 0xC91C8E2D, 0x79F48275, 0xDF434825, 0xE4766899, 0xDFCC9BC5, 0x4C64ADD5, 0xD6D946F7, 0x5483FDFB}, {0x5DFCE4F4, 0xB3BC0E39, 0xD5686328, 0x88CC7C42, 0x1A90C59B, 0x79D42AB0, 0x56847A79, 0x002B3195, 0x382745FE, 0xC36F0857, 0xC91BE201, 0xD0B64C5F, 0xFFB8655B, 0xDF99494A, 0x61B9B984, 0x18E7DA96, 0x89E35296, 0xDFA6475F, 0xB74528D4, 0x32FF0EFC, 0xC0774F71, 0xED686E51, 0xB865CE5D, 0xDC34163B, 0x05F155EA, 0x9B1697F4, 0x03DD27C1, 0x57D66706, 0xA9B3245D, 0xDB20A949, 0x2AF9A49F, 0xAA21B848, 0xD9C87BAC, 0x3F6DEFEC, 0x508EB539, 0x5E9D979B, 0x31C7DBFB}, {0xDC18222D, 0xFA7DE485, 0x4E6516FD, 0xB19C1246, 0x29951E62, 0xD42CA1AC, 0x0F21CF76, 0x2D040D67, 0x56EF3F4B, 0x6B101B07, 0xF98BFA0A, 0x88C94E5D, 0xB35DB34E, 0x9E8E3721, 0xFA3D959C, 0xAB98D7C1, 0xBC4AE2A8, 0x2A41B9BB, 0xFB514AB0, 0xA8F4F078, 0x55C39522, 0xECDB0BBE, 0x4498148A, 0x91E93750, 0x947F5AC2, 0x1496F490, 0x0E38AAB1, 0x9332B875, 0x84619046, 0xFE2FBE43, 0xD48F8657, 0xD0ED5155, 0x347D575D, 0x9979D411, 0x1B55758E, 0x4EC065E7, 0x0250E824}, {0x4351A408, 0xABDAB10C, 0x31A4F70D, 0x73B7979C, 0xD60C55CD, 0xD2D681CD, 0xD321407E, 0x0A8BCA35, 0x5B2A3A67, 0xFBD568FA, 0xD486DBE7, 0xE41990A9, 0x305B2835, 0x0B45A04C, 0xED904CDB, 0xF3CBBE7E, 0x236F1FB6, 0xFD7AD037, 0xEF4C8CB6, 0x413320BF, 0xB96BF56F, 0xA22C1B54, 0x7F965953, 0x0641A14F, 0xA024A0CB, 0xE3AC760B, 0xB24EF75D, 0x035907D2, 0x312611FE, 0x97BD2A9E, 0x31A9BAE0, 0x9315EA40, 0x8441FC49, 0x0330A00B, 0x7C7AF1A5, 0xA3AC3CB7, 0xEE5F69B3}, {0x3B77B924, 0xC24288C9, 0x04F53001, 0xBD5ED85E, 0xF2513282, 0x50EB67BF, 0x044746C5, 0x5163617D, 0xDCD788C8, 0x8756CCC5, 0x9BA7E61B, 0x3AA23923, 0x840708AC, 0xFB09E2B1, 0x07F93D25, 0x3B6A7E3E, 0x253B5669, 0x7841DC7D, 0x79725A0B, 0xBD82F5E5, 0xDBFDF536, 0x8A656D95, 0x210AB020, 0x61EB5C19, 0x2677FE69, 0x2C8B84E8, 0x4BD0F536, 0x3BDCBCBB, 0x59B8C8BC, 0xEFC7FBC7, 0xE059E1FE, 0x41FFAD4E, 0x9AFE8C69, 0x2B119B17, 0xE20A89C8, 0x732305E6, 0x20769BA7}, {0x8B145FAF, 0x004E6933, 0x13DA7D6A, 0x7AC71A79, 0x62A9B67E, 0xC27DF902, 0x0290D9D8, 0xD25AD73F, 0x615A2A2C, 0xF8B8D005, 0xA099BDBD, 0xA46B5969, 0x333281BB, 0xEA8302AD, 0x9D7654CA, 0x22EDC9B4, 0xAA5B68BF, 0x6DE71742, 0xCD380BB5, 0xE63022E8, 0xEAC6DDA4, 0x486432C8, 0x15590868, 0x0A14D624, 0x47FECB99, 0x56D9F96E, 0x44236C82, 0xA9FC9BE6, 0x2BD2A718, 0x9DE93A96, 0x5520A386, 0xED2EB35B, 0x1F772456, 0x29D7B44D, 0xE055F18C, 0x2D982C39, 0x557F9637}, {0xA29620CA, 0x5C12AEB0, 0x845A906B, 0x798305FA, 0xCC7F72D9, 0x02A84439, 0xEA59C663, 0xC4C34053, 0xF939E2D2, 0x87FFF0F9, 0x6182BA5E, 0x423C132C, 0x022FB1A9, 0xA095AFAB, 0x95A5AE63, 0x09084186, 0xE5CDFAC5, 0x9E6A8CB4, 0x874476CC, 0xF86B2806, 0xF33EE3EA, 0x86698DD2, 0x47335B7F, 0x94F9F723, 0x7AA447D0, 0x8919EE6B, 0xC93CA98D, 0x902EC307, 0xCA352BDB, 0xDAF9B52F, 0x02A51C4D, 0x27B05892, 0x3992E5A8, 0xF0C6E482, 0x26EC08D4, 0x0169F9B4, 0x018A9982}, {0x6EBA4D7A, 0x146E8D7A, 0x3985F7A0, 0x0E696856, 0x6593D6D5, 0xDCA1ECBE, 0x39858C09, 0xC865AD51, 0x6F1D4645, 0x5425AE5E, 0xDF213897, 0x54D2805E, 0xFBC2FF3E, 0xF8D3B942, 0x704964FA, 0x27511138, 0xA6982C63, 0xB35624AD, 0x4B8F1229, 0xF73C6192, 0x24A66D44, 0xE5D96AF5, 0xF86B1C84, 0xA2400F12, 0x6A2C0316, 0x89B271C9, 0x78C9E756, 0xC0366782, 0xA50DD274, 0x7214AF0D, 0xF7671D63, 0x16AC7571, 0x555668C6, 0x8715E885, 0x280BBE87, 0xF531F58F, 0x9B89D7C8}, {0x41EBE5EF, 0xDBDFEE46, 0x28BFF1D4, 0x03B10304, 0x8944BE2C, 0x28CA6066, 0x711544B6, 0xB5D80D49, 0x709D665E, 0x04F5B926, 0xBDF4EAE3, 0x4E8BB54E, 0xBE7FFBD3, 0xB28FDD1C, 0xE0AF523E, 0xC638426C, 0xDF50BC55, 0xB6726CC9, 0xC5545A19, 0x4C768C26, 0xCAF434C6, 0x31187B00, 0x49B7D7F0, 0x491C673F, 0x45AFB7A0, 0xCDC11E5D, 0x67B4D51C, 0xE6F4C79D, 0x2C5E1D11, 0xD356EE90, 0x4598CFAE, 0xF1271366, 0xC7CD1AA2, 0xC5800941, 0xED84DE5A, 0x71B966AC, 0x3E996898}, {0x401D8FBE, 0x0FBAC0BE, 0x87F0DF66, 0xF704714A, 0x6A9882D6, 0xF2F0386D, 0x47890BD6, 0x52355601, 0x797BAB30, 0x83EDCC2F, 0x5AA6D2DD, 0x79279BF9, 0x0C22976E, 0x0EF0265E, 0x342176D5, 0x30E0CCA1, 0x8EEF51BE, 0x489C6182, 0x1E318618, 0x9D5CD930, 0xCCD31AB5, 0xE230FD5C, 0x93EDABEC, 0x000BB7BB, 0x37214977, 0x87EFD6C4, 0x272664F0, 0x0D74F10C, 0xC8FFEC76, 0xB9CD2B55, 0xA4C3F3BB, 0x577B0836, 0xF85F14E4, 0xE4137AEF, 0x2E494DF8, 0x15B4A72F, 0x57F818F3}, {0x2A51AC64, 0x55EA1D25, 0x73F63ABD, 0x1393A0EF, 0xA41BD017, 0xEB53F626, 0xE59A5BBB, 0x93E8D794, 0xE5E56CFB, 0x6D6455D5, 0xDFA95ED7, 0xAC225ADD, 0x1F3C8A9A, 0x0C0EEA4B, 0x14D8453B, 0x2367CEC3, 0x8B968283, 0x981D9FC6, 0xFCAD1C5F, 0x33DC6568, 0x8C921FE8, 0xD8448018, 0x4F689F54, 0x2D644973, 0x75A3CEF4, 0x2FD03C12, 0xE5BA1C78, 0xB67F8964, 0x8C6D9C21, 0x22E3B11A, 0x97726796, 0xB33800E2, 0x152433E1, 0x80EA2788, 0x4C612B5A, 0xFDD45F6B, 0x0036773D}, {0xB22C61D1, 0xD4A42BCE, 0x5EF01DC7, 0x62F9CEB6, 0xAA581620, 0x16796B17, 0xE78FF9C6, 0xF340FF57, 0xC36A5288, 0x25B7C151, 0x16AB4497, 0x73976A98, 0x7CF745FC, 0x8E83E6DD, 0x7F78E6E0, 0x0E86CD8C, 0xFA59F4FC, 0x652846FC, 0x70B86ED9, 0x356FB4A8, 0x13ACDDB7, 0x3E5AA108, 0xE24D7623, 0x670F4C96, 0x7C79B748, 0xFAC4A127, 0x5E4B8ECE, 0x52C7ABD0, 0xD2EAF1C5, 0x975FF704, 0x08703B09, 0x113E1A31, 0xB97B35FF, 0x01D87FE2, 0xAC51C60E, 0x7430093F, 0xB3497846}, {0xEBF4C72B, 0x320A6BB1, 0x6B36911E, 0x4DEEF783, 0xBF6768DC, 0x8C58F99B, 0x922E383C, 0x2BE30204, 0x65CD3C81, 0xC3365F95, 0x4A29E97B, 0xADCEF01E, 0xAABB8AD8, 0x10C83346, 0x6EF7D292, 0xBF96453B, 0xDBB5D9C5, 0x2CABF9DA, 0x5C0B9180, 0x2ACAC4AE, 0xFBBE28EE, 0xEAEFFB5F, 0x8A1CE852, 0xB6E57C22, 0x48DB6796, 0x3152B861, 0x2A1B8BDB, 0xC6A327F4, 0x345CFBC7, 0xF88A409B, 0xC5F5EFAB, 0xFAFA126B, 0x3579E67B, 0x98293BFC, 0xB46E5053, 0x7FF28536, 0x1A3154BB}, {0x70BB502D, 0x4AEC05FD, 0x32A06654, 0x5FA54917, 0xB2F20082, 0x02E9AAD4, 0xD9BBD33A, 0x086BD423, 0x7AB2731E, 0x810691FE, 0xFC7FD17C, 0x834F2BFD, 0x7E5CF291, 0xFF690C69, 0x48323915, 0x73F92343, 0x6ADB2A80, 0xBF274E56, 0x8A75C426, 0x8BCB9754, 0x85E3145F, 0x7C8DE9CF, 0x97C16BC8, 0xD03E0747, 0x9266E3DC, 0x997D01B5, 0xF4625D54, 0xC34D31B3, 0x13569E89, 0x8AF65908, 0x0ED221EF, 0x2356E831, 0xBEC005D1, 0xC315D354, 0x05574F86, 0x5FD8C68B, 0x3651053E}, {0xA6EB2E46, 0xC57B4832, 0xB095B99F, 0x5B0435E2, 0xA27432DF, 0xFB170336, 0x7309BA75, 0x999C33A1, 0xEA2B6032, 0xDB245387, 0xCE89EDDA, 0x2DE5BAFE, 0xC276A632, 0x033B278C, 0xA6976078, 0xEFE96244, 0x904A6BA2, 0x6FDC3467, 0x9EC4BF67, 0xC43D1C74, 0x1740D627, 0xAF8A99DC, 0xDD297C57, 0x245E6863, 0xC6FBC7FB, 0xB0DE45B1, 0x78E5FAB9, 0xEBFF7AB4, 0x9298E679, 0xAEBA925C, 0xDF16138D, 0x94C8C6D9, 0x6C0F6CCF, 0xB5555874, 0xC1942FDA, 0xAEE24590, 0x91EA4A10}, {0x9FC70E3F, 0xBB1BCC37, 0x425589C4, 0x821A1725, 0x3C67E94F, 0x8C6739A2, 0x2A4CC345, 0x93723CDC, 0xBB58B71F, 0xFEB4D91E, 0xE71B044B, 0xEC001111, 0x2BCEF86F, 0xEE950642, 0x4946DDB6, 0xDE3196EA, 0xD922AE7B, 0x2CF9A2A0, 0x6DC36BA3, 0xE91FB01F, 0x846921BB, 0xC95A6D7A, 0x30602F50, 0x70217F98, 0x049D0839, 0x6CFAE590, 0x8A2BCCA1, 0x60CD95DC, 0xEE946FC7, 0x1330A5F7, 0x0DED7CF1, 0x9742AD16, 0x39D4AE76, 0xEB37EC32, 0x002F2777, 0x202978C0, 0x0DF73BBD}, {0x6FB35DF5, 0x52BA4246, 0x492C020D, 0xD14888E7, 0xF8FFF2A7, 0x10622E26, 0xF82FDF0B, 0x572BC4D3, 0x3E6EA194, 0xB5BC2D8B, 0x80E74BFD, 0x438EA3B4, 0x5CCA0DA3, 0x0E3C1585, 0xEE186446, 0xC459FDF5, 0x6FE7891B, 0x13C9585F, 0x1647A5F8, 0x5AF12514, 0x8AC87135, 0x016C7578, 0x134D5C1F, 0x9746051B, 0x0A24EA61, 0x4E284497, 0xD279DE99, 0x91255074, 0xEC67AE55, 0xF99C9DD7, 0xFE530769, 0xDE147527, 0xC8A67B28, 0x90668D3C, 0xC1C5EB50, 0x797506D0, 0xE37218F2}, {0x12FA8749, 0x3E092444, 0xEECFAB98, 0x3B4DAC87, 0x6F793235, 0x4356602A, 0x2EB6CFFA, 0x25D4914B, 0xC51056D6, 0x1806A5C7, 0x6401E4CC, 0x9E544662, 0xBC2BFA25, 0x814558A9, 0x37B5CAFF, 0xD5BDCCD9, 0x96473844, 0x405DFECD, 0xFB6C9968, 0x70784E77, 0x72FD667C, 0x5EE44E70, 0xE67D0D9F, 0xC1279713, 0xF2912A9F, 0xF5A20056, 0x9A804815, 0x70B63B4D, 0x4D7190CC, 0x28718097, 0xA49013CB, 0xDF7368D0, 0xAD9B6AD3, 0xE3DD7BD1, 0xECF1098D, 0xB62CCD81, 0xBDC7CCD1}, {0x42A7D845, 0xAE816DDF, 0xFD186BB1, 0xA929B325, 0xB1C28DB8, 0x33807D06, 0x68F7E569, 0xB920AC6E, 0xC749A738, 0x83C8FD76, 0x6E995FE9, 0xB4185D4C, 0x58112E28, 0x5DAA5A00, 0x99BEB688, 0xBAE16866, 0xAB316CF8, 0x84853B00, 0x721CAC7F, 0x0D12AA6B, 0xF1B05D1C, 0x5D2045E2, 0x8FDD7B2D, 0x0E4C034B, 0x37D503DE, 0xDD801F89, 0x8259F5C7, 0xF53FF251, 0x9AA2BCA4, 0x47B7CD0F, 0x2C1F8761, 0xB947BCEA, 0xC9394765, 0x29FB5B05, 0x91D4E7A2, 0x802B0004, 0x7F7C5789}, {0x62324F61, 0x8B657126, 0xA37478B0, 0xBB686485, 0x029310B9, 0x60946B35, 0x8316048A, 0x02F66AAF, 0x1A0A0A31, 0xC231E951, 0x25A67284, 0x94379E14, 0x2FBF7C94, 0xF743D053, 0x55BB8AEC, 0xB26DBE19, 0x697F4FAB, 0x0465D0E0, 0x6B1B73FE, 0x10134F16, 0x9189D9C8, 0x1811C019, 0x45B97131, 0x4C131CFC, 0xC2A7642C, 0x57D7667D, 0xEA7FBF25, 0xEB22AE17, 0xADDEC146, 0x52AF48ED, 0xC416AD97, 0x4F265526, 0x5440C640, 0x1C96E8D2, 0x3B81D254, 0x4687E447, 0x2859C70F}, {0x1A4E65F8, 0x0BCD1F17, 0xC0DC3A67, 0xA11D9870, 0x204ADED5, 0xF5DB1845, 0xDDCDE427, 0xD888B8E8, 0xDEEFF252, 0xC48C75C3, 0xCB3A2177, 0x54742A0D, 0xF65CA5B1, 0xF4A4B813, 0x67CECB8F, 0x2D14B087, 0x415C8A06, 0xB5966EA1, 0x1DAC2857, 0x653FD5B0, 0x260F52C1, 0x7788095B, 0x020BBA7F, 0x9358D07F, 0xD48617DC, 0xB26B4073, 0xAB6DBE8A, 0x9258F3EC, 0xC85E9447, 0xB5BA17E5, 0x7DB63962, 0xB5EA495D, 0xCB4C631D, 0x358FA9A3, 0x3D5E23EF, 0x3F09A770, 0xA8305620}, {0x07C27742, 0x08FBF9CC, 0x0FAE7FC0, 0x679F5557, 0xE58B0291, 0xF53FB79F, 0x7A1B467D, 0xBE675AF9, 0x935991AF, 0x53D801B1, 0x12B683F2, 0x71489C77, 0xEA404266, 0xD2F59F5B, 0x436962CB, 0xDC41A387, 0x598A12E9, 0x393FD780, 0x22D7D0D7, 0xD4B7B3B2, 0x71C733C0, 0xB9294FC6, 0xEF82697E, 0x7B7480D3, 0x9A6DEE75, 0x1A2EF122, 0xAE86B34E, 0x9DD2A443, 0x03772D70, 0xFA5C32CC, 0x642220FF, 0xA1D0D227, 0x78EA9DFA, 0xA0AECEB1, 0x1C3BF351, 0xF65122BB, 0x3C707FFB}, {0x8C2A542E, 0x712C76CE, 0x20F8C69E, 0xD813E9C5, 0x1CA0BB68, 0xEECDD3F2, 0xE8BD79CF, 0x5F35E1F4, 0xBA16B9B8, 0x5866BCE9, 0x5F575709, 0x377CA185, 0xC378B942, 0x71247643, 0xC7E26CF3, 0x3C32DDF0, 0xA3A834EE, 0x48D9F31C, 0x58D484E7, 0xBEE20A44, 0x5341C703, 0xF75C7BD6, 0x0D71EA00, 0xDC569EF8, 0xED1A8539, 0xACF1C672, 0x2D6AC356, 0x1D4E77FF, 0x978AD28F, 0x401DA261, 0xC91C0838, 0x37242F40, 0x08348236, 0x2DD66A25, 0xC2A92601, 0x8B1B3662, 0x50715199}, {0x911E06FF, 0xC4026969, 0xE15195FA, 0xDCA8FCB3, 0xFB3ABEEB, 0xCCFADEA2, 0xE64FD99E, 0x4FC0A8A2, 0x4F760445, 0x6B5E8842, 0x0DE756BB, 0xA1C29CD1, 0x4DE78041, 0xE456F497, 0x22E99107, 0x98FF2237, 0x785E6C4B, 0x15F0CA98, 0x838CB878, 0x3A2EA31A, 0x93F418DF, 0xCB0DA3F4, 0x0F294C5A, 0x2277505E, 0xD4530493, 0xFC08D337, 0xB05E7D2A, 0x1061B79A, 0x4C76B691, 0x0DEB5EFF, 0xB5D2D35B, 0x35C14A00, 0x30A2E2ED, 0x7C506EA6, 0x07174596, 0x8A420FE0, 0xEC14306B}, {0xBBF7EE2D, 0x51A00B0D, 0x4C4F0016, 0xFFE03EF7, 0xA91001AB, 0x42DAC641, 0x7FE2DB36, 0x86D40E7D, 0x226AAFEA, 0x2074F757, 0x5ADFCDD2, 0xF5566354, 0x9732E077, 0x82A2F6C4, 0x872DF023, 0xC49695D4, 0x4DC39A39, 0x2C858C99, 0xB17EC565, 0xAD9BFC95, 0xCB33C8E4, 0xA22E6087, 0x1D1B3EBF, 0x8FCD8803, 0x564761E8, 0x657A482D, 0xC81F441F, 0x16902B19, 0x4491AFFE, 0xF1EF34DE, 0x5217FF93, 0xEE5320AB, 0xBC05BC99, 0x13649675, 0x26F8CC82, 0x0640334D, 0xEAFE8B8F}, {0xD91D5C30, 0xE3E9E02C, 0x445346D5, 0xB16317B6, 0xADF94844, 0x02E3CE3D, 0xE9942620, 0xFF850889, 0x9014A418, 0x0306BCC6, 0x5E666F42, 0xE7832C50, 0xA51ECE32, 0x177AD47C, 0x3F03FD8D, 0x922123A2, 0x28E99092, 0x0BC649B7, 0x22AF4FFD, 0x77A45AD4, 0x4707577A, 0xFF9BA95B, 0xE6CE1022, 0xAE52E672, 0xEDF149A2, 0x144491AE, 0xA73F03B2, 0x86135EA7, 0x56C4945C, 0x0F1D7F0E, 0xBEA107A5, 0xEC5F0B49, 0xFB3CA351, 0xF5432AE5, 0xD2286DA5, 0x842827D0, 0x25262C60}, {0x96D1F5B6, 0xBB070F3B, 0x28CAD4C3, 0x95E4043E, 0x4D8DA18D, 0x30A380FD, 0x9B94B359, 0x324AC88E, 0x03197C48, 0xE70841D4, 0xC925ABFC, 0x3FF52919, 0x59CA146F, 0x9766043E, 0xF871EBCD, 0xC46EEAB2, 0x3314CA24, 0xD7F83508, 0x33200B58, 0xB216983B, 0x57CAA057, 0xF2A05E8B, 0x7589FCEE, 0x4811F7DD, 0xB5EA14D8, 0x303ACE6F, 0x0918F848, 0x09751CD9, 0x6A874323, 0x8D95EF20, 0x626D35C5, 0x8F5BA9F7, 0x41060F9A, 0x115CD712, 0x6EA16A8C, 0xFD6357FF, 0x9E922BAD}, {0x29F03778, 0x6D3A6FDC, 0x7FE8404F, 0x14B4098F, 0x7933DFCB, 0x2775AF8E, 0x7AAFBABB, 0x9ECCAB4D, 0x987E8066, 0x4261E21A, 0x0750E975, 0xD5D3BA85, 0x70D34D98, 0x601417A8, 0x8E720C36, 0x75CBD64A, 0x7152C716, 0xD024CA9D, 0xB3121EF5, 0xA1032D43, 0xE7BDA34F, 0xE7FCF957, 0x8C3EE28D, 0x3D895552, 0xB0B466E0, 0x6480D4F9, 0xE3A31A0A, 0x2B8D41B0, 0x9FFB99AC, 0xC09C0239, 0x95CB3D8A, 0xB43A5F62, 0xA693DA5E, 0x6AB0EDCE, 0x4F7CDE51, 0xDB793ADC, 0x0573488B}, {0x8F052C3D, 0x7D5B30AD, 0x6938465B, 0xD046F2C5, 0x7CEBD0FF, 0x5B41A4F3, 0xFAA481B4, 0x41776844, 0x49C089FE, 0x47E2E1E5, 0x4114E8B7, 0xDC2CB5B8, 0xD7B95677, 0x1DAFC1D7, 0x17AD5FE4, 0x1D6C9A5C, 0x89AD03CA, 0x62827ED5, 0x7F2E7004, 0xC5D09259, 0x78888430, 0xE7CA5D4C, 0x46722456, 0x27224063, 0x77AF8453, 0x17153294, 0xEE5CF911, 0xB6283C83, 0xA34BB723, 0xB2C79B61, 0xC7846E75, 0xA0F652F6, 0x55360874, 0xCFA197FF, 0xC8112E4F, 0x52931336, 0x6920EF6D}, {0xB0346D53, 0x602B8423, 0x7A878432, 0x1E57C0AA, 0x533C9089, 0xA7497C76, 0x6F3A45B6, 0xDEC65599, 0x2375996C, 0x47A74EFF, 0x9E8C0AC6, 0xE538178A, 0x7272287B, 0x5D06845B, 0x8AAAD01E, 0xF185C646, 0xA6AFF9C6, 0x7866F191, 0x2C8FD825, 0xB46F53D0, 0xDE4FE828, 0xD684351A, 0xC45EFDEC, 0x823A43DB, 0x1615C5DA, 0xD8D045F1, 0x0AE67446, 0xB3417159, 0x65A02242, 0xC50B45FD, 0xDC158020, 0xF14D3A58, 0xDC3374E3, 0x71B75FC5, 0x7124E32F, 0xACC13DAA, 0x252FB4BE}, {0x1D6BF290, 0xECDA0463, 0x03462A4A, 0x7AC220E7, 0x1A555C49, 0xD4FA7170, 0xAF570804, 0xD8D2B2AD, 0xBC22261B, 0x50B165A7, 0x6E9F5D06, 0xFFACFDF9, 0x5490CD01, 0x4DA8C562, 0xE9C10BD7, 0x4DCC7574, 0x6EF8C0F5, 0xEDD012F4, 0xE15BAC48, 0xF61F8BA0, 0xCEBB61AE, 0xECAE90BD, 0xCB809669, 0xFD18BD7D, 0x92943C15, 0x658D2F6F, 0x5F2FBEBA, 0x193F0850, 0x29B01C70, 0x06CD4FA4, 0xD8110260, 0x700535FA, 0xF025046D, 0xB776ACB5, 0x25E42E6F, 0x33CC46C4, 0xB65AC414}, {0xF3E71979, 0xB104D5F9, 0xFAB1844C, 0x3FA9F592, 0x931F6BB9, 0x754E2361, 0x3BFC41CD, 0xB481F67B, 0x5FCAB99B, 0x8365B425, 0xC10DDB20, 0x94A94287, 0x86ADE790, 0xFB614A68, 0xE6AED9A6, 0xF018FF03, 0x3ECF7650, 0xDFBD85B3, 0x600DC9F0, 0x7A4C63BA, 0x7C3BF0C5, 0x850DCD86, 0xD67D48A1, 0x7815F195, 0xCE902CD9, 0xF91DA3D9, 0x844EDB6C, 0x1AE80057, 0x006F847D, 0xF41FC7B5, 0x2ADED5E8, 0x400F8F68, 0x927C2FDB, 0x191494B0, 0x7F4585CE, 0xDFCC7276, 0x1045493D}, {0x6000AA82, 0x72981436, 0x94949516, 0x18441C9C, 0x29D88BB9, 0x0824CE75, 0x5C73C342, 0x2D0BBD81, 0x5088310A, 0xB25B950C, 0xC138A826, 0xD9F73D05, 0x7F35B0B9, 0x17DC9E04, 0x249AD5B9, 0xF45C018E, 0x8453DF7B, 0x1518D000, 0xEFA60740, 0x530560B5, 0x0D716455, 0xA2EDB6DF, 0x5D2DADD3, 0x0945F7EC, 0x509DC46D, 0x50716F31, 0xD87D4235, 0x7DA4FD4C, 0xBD7A189F, 0xE7EFB2D1, 0xD341026F, 0x11EF0D64, 0x45E164A5, 0x47087E9E, 0xFF2C5F5F, 0xFE9B3757, 0xB86AD126}, {0xE02503FC, 0x41CCA4CB, 0xF12CCD50, 0x1AC7C6ED, 0xDF36D318, 0x57A748B2, 0x9BD0BF93, 0xC9E20162, 0x71A796B2, 0x6653FF5C, 0x8D3CB6F1, 0xC1E99228, 0xAD8B4DF8, 0xE09ACAE0, 0x50301789, 0x81D6284C, 0x7CFCC690, 0x9463E5B5, 0x286ACA45, 0xEA7CE9B4, 0x03EB2A99, 0xA3079B15, 0x499B1674, 0xC02ECFB6, 0x6E53D545, 0x1EE839BB, 0x3EA54F10, 0xFDE2819F, 0x97AF95D6, 0xCF757D38, 0x6C373715, 0x92F0A958, 0x1CEF9586, 0x8DD84F81, 0x5C669E1E, 0x01ECB720, 0x969909E6}, {0x2D1FB241, 0x4F0E0C46, 0x4747304D, 0x7BCEE5CC, 0x63667506, 0xA6CA6BDB, 0x755E7929, 0x65CF2772, 0x310637BF, 0x205BAB6F, 0xAFF1ADCE, 0x64A1E05E, 0xF67A1D73, 0xE406B87A, 0x44F341E1, 0x2CBD9F95, 0x0FD0AF20, 0xF293EE03, 0x899FDA8A, 0xE67DD678, 0xBF376D9A, 0xBB069E3D, 0x0F88BF9E, 0x817994CC, 0x32943F3E, 0xF0C8E14F, 0x5BCF3011, 0x3FD2BEBB, 0x714F208C, 0xBD067165, 0x4A957439, 0xBC590C03, 0xCBA6B2B8, 0x22D5A77B, 0xBD71011B, 0xF8910497, 0x02A732C8}, {0x7B8F04D2, 0x987AFD06, 0xD2649A8C, 0xA0141A26, 0x7D8A51FE, 0xC2C775E8, 0xC33B8030, 0xBA583DB8, 0x9A7718B8, 0xFBA77061, 0xB14FAC50, 0x94BE7F2A, 0x4FC21B53, 0xFB2B3008, 0xA8BA27A8, 0x5E889551, 0x6E458F30, 0xCF5D23D6, 0x0B7AE76E, 0x493AA165, 0xF5B66827, 0x0474298C, 0x69815307, 0x0BB955BF, 0x0AF44E2F, 0xAF09F7E0, 0xCB70DAD2, 0x1F533744, 0x0A95BA05, 0xCD5C9BDA, 0x6E9E046E, 0xDA5C524E, 0xA2FDCA13, 0x2CD88903, 0x985491BA, 0x0FAEE46B, 0x451E6BAD}, {0x86E2D326, 0x97A927D5, 0x224E9F7C, 0x2E61EE1A, 0xFE52C52C, 0x1E0D8866, 0xAA921877, 0x16DD2BA2, 0x6C2A81B5, 0xA45879B5, 0xACF26BE4, 0x3C236B92, 0x2C63A6EA, 0x0B29669C, 0x164D1CB1, 0x59720A81, 0x2889A7DA, 0x0F23345E, 0x34BA951D, 0x10342C7C, 0x87DA6DB0, 0x0E4FB8C8, 0x2B4B9081, 0xA07DDE1E, 0x777F4984, 0xBD248EB2, 0xB787440D, 0xC000BDAE, 0xC0230404, 0x4A211BCE, 0x14DEB28F, 0x1DE2AAD6, 0xD7724A60, 0xE3125EFE, 0x8111E938, 0x67BAB9FA, 0x1D2B2EC0}, {0x3C388BA5, 0xDCC673D8, 0x65AB8ED1, 0x63FAF73C, 0x3C738632, 0x6F100AE9, 0x75671766, 0xF885D05B, 0xBC9156D7, 0x69D2F8D2, 0xA734A4E4, 0x8B35F56E, 0xF23FEFD7, 0x18EB28BF, 0x0534D95E, 0xAB95C453, 0x4CB7B57D, 0x506C79E7, 0x68E5667F, 0x45D28F01, 0x097543D8, 0xC9CC3421, 0x316443E0, 0xE337FF96, 0x883075B9, 0xB2FCF3E8, 0x1320B2E5, 0xC00A6C1A, 0x81FC8F2A, 0x012DC719, 0x4895C61E, 0xCA8D27B7, 0xA2C6B219, 0xFE132FDE, 0x7D768D5A, 0xD8E3B807, 0xE518A515}, {0x940CD418, 0x6ABB97E6, 0xF9688B86, 0xE63AE360, 0xF6932BBE, 0x1414A186, 0xF6F5EFC8, 0xC164AE8E, 0x1F648031, 0xAF12E70D, 0x29D3B2C8, 0xF3EDF9A8, 0xE8C0D0D0, 0x2C81A9EF, 0x05DEB9E6, 0x66803FEB, 0x542CEB28, 0xEB3811D8, 0x6B42E705, 0xDB1CEBDD, 0x00BE85B8, 0x88DC7E01, 0x69E20C12, 0x4EA346CB, 0xFBB0C3EB, 0xFC3FC996, 0x6B9B6EE7, 0xEF0F84E0, 0xC991FAA6, 0x09B4DA9E, 0xCBF85F7E, 0x20631336, 0x359D4DB7, 0x0B3D9270, 0x4F7F845D, 0x9BC56853, 0xEDEB1BCE}, {0xA14790F7, 0x5673B0A0, 0xE3BED709, 0x3DCA5E6E, 0x392B4EEB, 0x7BB39FF4, 0x56BD376D, 0x1836D3AC, 0x6994E304, 0xB3B19F56, 0xFE972B4C, 0xC624A1E8, 0x4881257E, 0x6411A846, 0x36B967AE, 0xBB0C8014, 0xBED2218F, 0xEF9DEA26, 0x82EBCE2E, 0x93AD05CA, 0x5A2CD29F, 0x9A249BFC, 0x7AE88791, 0x28A5E503, 0x634F7929, 0xD2B6AB7E, 0x2E20612A, 0x8DE8FBEC, 0x2A95C9F2, 0x87B4E9C9, 0xB6F5F6BA, 0x5BAEFDC0, 0xD99C2FBF, 0x6F56A241, 0xE18F6716, 0xB2CB598C, 0x96898D80}, {0x600C5B7B, 0x6B0FB589, 0x716D5A4E, 0x559881CE, 0x93C870DB, 0x4EDB62C5, 0xCAFA0E1D, 0xFFBF0ACE, 0xF1E3406E, 0x9099E608, 0x1C3A3BFF, 0x7C8FD481, 0x7E7FCED3, 0xA7DCE690, 0x62D25F77, 0xB2A4E431, 0xB907C58D, 0xE02914DE, 0xFA16AD08, 0x47EE3704, 0xF24D2899, 0xB8DE2CCF, 0xF99FBB6A, 0xFE041157, 0x89EA9D4E, 0xF6FACDAC, 0xB8D394D2, 0xDF495392, 0x54C1CE45, 0xF9D44BF3, 0x8E5A60DC, 0x66AA4AA9, 0x44A3E0DA, 0x8221CEB8, 0xF5CDDA85, 0xF1688C7D, 0x72EEBA6C}, {0xE053BA71, 0xF342AEF9, 0x43B9611F, 0x8C536C10, 0xA90E858C, 0x8A825DC3, 0x44933D2B, 0xF2F53A99, 0xD2AAD392, 0xB286EB51, 0xF8C92CB0, 0x1E47F397, 0xDB2BC5A8, 0xE87AC0DF, 0x37B5F6CF, 0x1679CACF, 0x4A10EDA1, 0xCA4E05E3, 0x4E25E482, 0x2D23ECC5, 0x379DE179, 0x53B803A6, 0x39C6C484, 0xCA5AA813, 0x3F0D505C, 0x0C424AE4, 0x4F2EF279, 0x10E22958, 0x8017134A, 0xFEFC221E, 0x6A0C5262, 0x902557DC, 0x727583FC, 0x9FC69217, 0xD63A07B8, 0xB193AB86, 0x27E0CDD5}, {0xE4ACC0D7, 0xA8DC3F76, 0xCB316F92, 0x6D43E961, 0xE0F83FE6, 0xD6B72780, 0xB255CF65, 0x78F2992F, 0xAC94D465, 0xE424EDAC, 0xD988D90D, 0xAAD096FF, 0x9A3AD365, 0xE49502B0, 0xA94A2490, 0xF5BCA82B, 0x3E6C47DE, 0x5F5F3760, 0x1A6302AE, 0xD2B9F7E6, 0x05D3231F, 0x92BCAEB1, 0x1B5B28B3, 0x1F528C4F, 0x8EB8B125, 0xCA09EAAF, 0x9ED58EEB, 0xDDBCE516, 0xA6874D12, 0xF46F9F7C, 0x4179D4B1, 0x44C4E4B4, 0x43489CDF, 0x684DED90, 0xF10A986A, 0xE8F879B7, 0x08B9BF73}, {0x2A5895FE, 0x56CE6CC1, 0x5E7ED45E, 0xCA8C2331, 0x52EB2FD5, 0xE3D38FDB, 0x99403E77, 0x58995171, 0x8DF6E00F, 0x01937BA3, 0xA1F7AB7F, 0xE45BC89D, 0x9104F992, 0x83DC8307, 0x9FC35EF3, 0x734BF964, 0xA02D67F4, 0x7403AF0F, 0x2D9C5BED, 0x8106579E, 0x598312A1, 0x7EAF7F16, 0x61FD33AA, 0x201A97D1, 0xE89178CF, 0xD1CD20EA, 0x55C7A0EB, 0x2290B7D2, 0xF502AA37, 0x20B406D1, 0xB8ECDFE1, 0x1680F194, 0x4E248E3A, 0xE71994A5, 0xBC275FC7, 0x4A130313, 0xC88115A6}, {0x646DF035, 0x52A0B8B3, 0x17CF09F0, 0x952A675E, 0xB7F51121, 0xDAAD4E86, 0x4E77BA5E, 0x138DD4C0, 0xEEAE0D91, 0x06818DA5, 0xD48B5B52, 0x9B2BB0BB, 0x5545D4E5, 0xC1752A6D, 0xFB1CB8CE, 0xB0BAFFCB, 0xB5B822F7, 0x8A2275E2, 0xFFF9ED8B, 0x21EE5F16, 0x81A0553B, 0xAC356172, 0x92178AEC, 0x604E8F86, 0x4E4A291F, 0xF8AB0966, 0x745DA2A1, 0x9B9F5965, 0x9C715F26, 0xBB47C27B, 0x2E4559D5, 0x7019D572, 0x06117836, 0x4516CB91, 0x54CAF4F2, 0xCE156DF5, 0x665E61D5}, {0x9841114C, 0xC739EF2A, 0x14B83062, 0x243EAA97, 0x05016119, 0x236B6D51, 0x9F568A46, 0x4E7BA066, 0xCDB83963, 0x1DCEB36A, 0xC82D4452, 0x17DDFE65, 0x512F49B9, 0xAD49B7F5, 0x9AF0D8F0, 0x106974B6, 0x2BC99EDA, 0x23EEB3AB, 0x9FA054BD, 0xBEAFB817, 0x6410B667, 0xCF604B9C, 0x45963838, 0xDA94C599, 0xF5640582, 0x46D09940, 0x733068D9, 0xC8637801, 0x5E9710F1, 0x53B71D31, 0xCFD7B87D, 0x8D847D05, 0x8E680E06, 0x21949C66, 0x08DA9039, 0x9E0C3D49, 0xCDC76277}, {0x0303B940, 0x03920AF7, 0xAB58346D, 0x58D75886, 0xF3E3190A, 0xBAD8520E, 0x623DBDA7, 0x69B025BF, 0xCADCC444, 0xB7500FC7, 0x696CFEB5, 0x8752B53D, 0x08DFD774, 0xCD1BEECD, 0x469B8BEF, 0x91E92609, 0xDC7A4E2A, 0x4ACC5E6D, 0xEA7E60ED, 0x8A2F8F23, 0x42A81674, 0x309CBAAD, 0xC2D2AACE, 0x676B6968, 0x1C325AD8, 0xABB3177C, 0xF3847A04, 0x9C24A27B, 0xDB39F99A, 0x2C94F092, 0x6A2953FD, 0xA8687F67, 0xD3B4EF39, 0x5B7A65DD, 0x3841CC06, 0xF1CD03C8, 0xE56EF64E}, {0xAD7670D0, 0x863B8C42, 0xFBDE1207, 0x44AFEEFD, 0x1BF4B706, 0xF79E7152, 0x2F489BAA, 0x918C9807, 0xAD72FD00, 0x875CF555, 0xEC201427, 0xAF8C317B, 0x3EA42AFF, 0x39E1186A, 0xDB2613FF, 0x57725925, 0xDBD3BCAB, 0xCABB5927, 0xC35F1079, 0xFA3F72E5, 0x111C506A, 0x8CB431E1, 0x9D90EA60, 0xD93FDED1, 0x1AC5BF2A, 0xE4014502, 0xA9A43890, 0xA3D65D68, 0x13A5CC24, 0x6E3ABCC4, 0x9A513106, 0x5CB45B33, 0x3A4ABC3C, 0x28111F9A, 0x04880B4E, 0x740BE57E, 0xCD197B2B}, {0xBFAE7AD4, 0xCF36EDA6, 0xB6EEA600, 0x574741FC, 0xB99B99F4, 0x97C321D8, 0x91402DE2, 0x95005F34, 0xFBDAAF56, 0xC521F253, 0x6D5EF39F, 0x34FD0D8D, 0x0E9E671F, 0xD9A3F670, 0x6594C416, 0x521B4AA1, 0x8EEA51BF, 0xB3F62301, 0x1234626A, 0x61FF1F3D, 0xAF4443A0, 0xEC77DE9B, 0xE4807B34, 0xE6F61F38, 0x01F3645B, 0x8ACA6258, 0x932D4DA0, 0x5C8F64BB, 0x275FC2AA, 0x102D0B98, 0x704BFF2D, 0x920A86EB, 0xDD3126A7, 0x15942B55, 0xC53B68BC, 0x1F181708, 0xBB2F2BAC}, {0x6978C189, 0xE276AB06, 0x45CC0887, 0xE5166291, 0xDE5F1398, 0xD0F3413D, 0xB82A9AE9, 0xD541E85B, 0x9CC8BC79, 0x276119C3, 0x77E81288, 0xC593AEF2, 0xB7D2137F, 0xC2A27B58, 0xF658E3A2, 0xE0F7A50C, 0x1F789DF6, 0xBF461BDA, 0x992318C4, 0x55F7B611, 0x568DDF95, 0x40408342, 0xDF532AB5, 0xE4FCD050, 0xDC4D9C28, 0x13B10EFB, 0xD5471960, 0x2C56F542, 0x59CFCAD2, 0x53419764, 0x55D3CC78, 0x9A18E28B, 0x8372799C, 0xB7A810A9, 0x73B02096, 0xEBE88C9B, 0x8D142B07}, {0x0ACB736B, 0x59C4B340, 0x98898F87, 0x71E26AB1, 0xE847F78F, 0xDF3ADCA5, 0x06144E9F, 0x012FD1D1, 0x87A7CCA7, 0xD7C28A65, 0x68023FEA, 0xBA79DD5F, 0x3D2F972C, 0xD188B10C, 0x3E9F2BCF, 0xB0F895A1, 0x7A533B37, 0x1C7B73AE, 0x84A3EC05, 0x68638A32, 0x9BC3CF73, 0x1D31043D, 0xCD841B3B, 0x680E4FF9, 0x7C3E6FAF, 0x41A2EDF2, 0x4DBF60F9, 0x5BE28884, 0x60002992, 0xD64CDC27, 0xEEB2DB46, 0x1009C715, 0xB3376EEB, 0xFC78EA63, 0x0F3F5DA2, 0x454316E3, 0x395D2C0A}, {0x737848AC, 0x7D9D3DC1, 0xB9925CCE, 0x75BBB020, 0x656F525A, 0xA8991680, 0x2672D881, 0xA28E81E7, 0xD465C5C4, 0x7550726C, 0x931248D1, 0x00832875, 0x2539E86B, 0xE8DC0BBF, 0x48203C63, 0x96EE3C29, 0xFE82FCE1, 0x81BE894C, 0x7C78D9E9, 0x632C18D2, 0x36459F6D, 0x851E239A, 0xEEA230B7, 0x3803ADA1, 0x674AA785, 0x2B7C0445, 0x1770B321, 0xD30DC314, 0xC7FDD289, 0x7BB54A09, 0xB50141CA, 0xEAAB6F50, 0x3ED219BE, 0xB2451B7B, 0x59921640, 0x56A63082, 0xBE02A09A}, {0xF1104B21, 0xD41E5659, 0x325B408F, 0x4C1F0B69, 0xCC28570E, 0x7F234110, 0xE6752CD2, 0x7325C0A7, 0x7CF454EB, 0xD53C85A2, 0x129F3E8A, 0x4D70F86C, 0xDC23328C, 0x1DE25626, 0xCF344FF9, 0xC49C3D22, 0x668441EC, 0xE286900D, 0x51F1C0BC, 0xAF07A355, 0x92E318A4, 0xE5575714, 0x95440706, 0xF5A1C83E, 0xC3458F16, 0xC323B7B7, 0x9EDA7B28, 0x89BAA3C5, 0xF044A6A1, 0x2B4FD669, 0xF397694B, 0x95FA0176, 0xF87C0EB1, 0x65207897, 0xBB9FF64D, 0xDD8919C2, 0x5EB0F04A}, {0x9289DE6F, 0xF3F25CD4, 0x9E17CCBC, 0xF1B5E865, 0x0CE58250, 0x31A16A9A, 0xC9D0AC65, 0x448C5F53, 0x367B28EE, 0x5A76DFB2, 0xA9A8CAF3, 0x15DE8FD2, 0x90B72B33, 0x3A233E37, 0x58B58320, 0x3630EAFF, 0xDB457148, 0xF1D040F8, 0x677A7FBE, 0xA069CDDC, 0x3382CB00, 0xDC64DDA8, 0xC302B55F, 0xD8C609EF, 0x0CC666D5, 0x23B96DDA, 0x69E7CB6E, 0x4E6AFF1E, 0xC821772A, 0xBCD258CB, 0x617E713D, 0xFA87A14F, 0x6EDFA280, 0x053B9023, 0xC9F571AB, 0xCA868F17, 0x6F4075F9}, {0x5D28BACA, 0xD8E8E550, 0xC1450196, 0x4A58BBFE, 0x05AD30ED, 0x2CA781C5, 0xFA9FC941, 0xB15F53CD, 0x5925EB67, 0x32175731, 0xA2E63AAA, 0x8BBF326B, 0xF34A9400, 0xAD7B7749, 0x5B93CDBD, 0x82E459B1, 0x994E5887, 0x2B89B597, 0xDFE0E4C5, 0xA11E8542, 0xF9BF2C1C, 0x58A460BC, 0x101C572D, 0x41829642, 0x6F6BC678, 0xCC50019A, 0x5CF0989C, 0x58EEB02E, 0x333A8EC2, 0x2FFE8B45, 0xE59B5647, 0x4ECCE197, 0xF1D0021D, 0xA4905513, 0xF08CA613, 0xF02529AA, 0x083F35C2}, {0x52191549, 0x7E237119, 0x156ABCA5, 0xB6D68DB3, 0xD7EB8811, 0x82E114CD, 0x48588521, 0x460FB492, 0xEAA820AC, 0xFC510DB8, 0x5C808A2F, 0x643D135E, 0xD5581316, 0x3DE90520, 0xB0E337BB, 0xFB2BF84B, 0x183D48ED, 0xCED95E9D, 0x2C550933, 0x507BBFC5, 0x3C5BF2A0, 0x68197BA5, 0xC8847FDE, 0x50C07AE5, 0x612A2F1C, 0x1FB43D3D, 0x5812CED6, 0x4AB2E45C, 0x2A0E8AA3, 0x0D84E62F, 0x724CB6BC, 0x019DD736, 0xAF620A91, 0x8EBF0585, 0xC30B5191, 0x0E8B0846, 0x75C1DE88}, {0x9CAA40F7, 0xD0AAF5C9, 0x8032F141, 0xADD08797, 0x30301AEE, 0x89284228, 0x0378ED2D, 0xCE75AE05, 0x164DA2F7, 0xDD75424D, 0x2BA7E112, 0x3673EC13, 0x13CDC6D3, 0x6D4AE72F, 0xB0F4B68F, 0x9263994F, 0x8A3A93AA, 0x30927E0F, 0x2FA41CFE, 0xE423BE50, 0x60BBE11C, 0x196DF642, 0x5B214C95, 0xAD67FF62, 0x1880925E, 0x14D24735, 0xE11D9268, 0x0758209E, 0xDFE17901, 0x9D77FBD4, 0xC45F2FEC, 0xA5491920, 0x66D7AF64, 0xF8D9427D, 0x610AFCC8, 0x537ED573, 0x0893A5A7}, {0x5DFD7359, 0xA8C0316B, 0x233450E6, 0xA0916CAA, 0xB331FE40, 0x36803B22, 0xA07C70DB, 0x817D92DD, 0xE5F20876, 0xCA972A48, 0x31D6A608, 0x837445D3, 0xF86FD16C, 0x96217983, 0x75CB3F78, 0xA506A973, 0x587F9465, 0x9760238D, 0xD3C05E4B, 0x992C4429, 0xD140EF6F, 0x8F14FD45, 0x66BCB4D6, 0xBAB14670, 0x68F2EA45, 0x3A1246B2, 0x8B178611, 0x7860C8DA, 0x6F40B5E4, 0x2C515E4F, 0x5A315A85, 0x51E51745, 0x2CA115F8, 0xDDACE164, 0x232475E4, 0xEFAF52A4, 0x287D8744}, {0x3C855DA8, 0xE288C105, 0x739583AF, 0xF71992C4, 0x4E437D6D, 0x86689586, 0xEE48412B, 0x5B71E654, 0xD21E49C8, 0xF17D6EC7, 0xA00074FF, 0xA69B7D4D, 0xC3145A7A, 0x89083E87, 0x947D35A6, 0xC04DBB6C, 0x60E9D531, 0xD93FBE15, 0x1B5B9BFD, 0x48B168F9, 0x76387167, 0x5A120655, 0xDDB846BC, 0x7A11F6B9, 0xFDF40EFC, 0xDDA8676C, 0x73BBED52, 0x69D3DF3F, 0x825A0597, 0xFE702C04, 0x80DFECAC, 0x7C282309, 0xA77864D6, 0x9E1635E0, 0x4064E46A, 0x8DCD9CDD, 0x4C9BD52B}, {0xD2834820, 0x8BB31A14, 0x5B1BA700, 0xFA6F74A3, 0x5A7963DA, 0x70AF02DF, 0x67A3EE05, 0xACF66316, 0xED8810E5, 0x6D9C3A9B, 0xDE5700F2, 0xCAA15C04, 0x1216D779, 0x70EC52DD, 0x52E4848F, 0x113195C5, 0x2A767B66, 0x045996B2, 0x08F38E9D, 0x871D34A1, 0x3BDB0114, 0x1A5BBAC6, 0x4FB89653, 0x0116C79A, 0xE1DDC68E, 0x47A1B243, 0x86F00C39, 0xC220C567, 0x7FE08843, 0x007C712F, 0xD1FFC893, 0x06351AA0, 0x9F560023, 0x62A98700, 0xF8D57BCE, 0xACFC3AF4, 0xA9DFB6A2}, {0x336F863F, 0x3A375259, 0xF5C6A327, 0x1E345224, 0xC372DD35, 0x2DB21041, 0x2911ACBF, 0x5388E8A1, 0x9E60D14F, 0xD9FFFBCF, 0xEBD01FC4, 0x65320FB5, 0xEA2A2A60, 0x9A7568DA, 0x4BB02D10, 0x4DDD9FB1, 0x4B65A72D, 0xFD7BDD39, 0xEA3B0F85, 0xB2E4375A, 0xC0427919, 0xCBB1E844, 0x2AAA5C33, 0xFEB4E727, 0x207A1F20, 0xA090CF8A, 0x5C727232, 0x5FECB8C3, 0x000B94E7, 0x76AB4A28, 0xB7213ABC, 0x12A89C26, 0xEEBE517D, 0x76CC2BC2, 0x03DE934C, 0x0DB13437, 0x2814CF39}, {0xF98981CE, 0x38D0C86B, 0x5E50A50F, 0xAC0B8790, 0x9894ACFF, 0x6F6B74D5, 0xC1BBE67C, 0x7AF6D00F, 0x8CAE8C82, 0xFCE050D0, 0xECC57D74, 0xE078F27F, 0xD65F00E2, 0xCB4270DA, 0x0AE340F3, 0x3331C02F, 0x1B7CD2C8, 0x15B73279, 0xDB320A68, 0x001E7A86, 0xE060BCFA, 0x8429DFAF, 0x493D40F3, 0x07907BBB, 0x5A265D96, 0x36D26EDC, 0xA44E4DF8, 0x4CD28267, 0xF06FA170, 0x91620626, 0x253AC674, 0xBFC9864F, 0xD2D88AF5, 0x629677B2, 0xE752AB2D, 0xF622F3E7, 0x43DD2A68}, {0xE46C53FD, 0xC42C1706, 0x660BDCBF, 0x8890B768, 0x80A67C66, 0x628E8B95, 0x9D8ACA7A, 0xBF062D7B, 0x75E415DD, 0x7F37BA75, 0x439A397B, 0x9D22952D, 0x4CC6A807, 0x411B21E0, 0x151C720C, 0x07F019AF, 0xF76792E1, 0x99450CE3, 0xBF921EF8, 0x581D7AFC, 0x78ED4C0E, 0xAD41E084, 0x767890DC, 0x78A245C4, 0x74E16729, 0x5225859E, 0x8806FEC8, 0xD1BE84C3, 0xBCA094F4, 0xB61610A1, 0x7F44F90F, 0xE5BF5E3C, 0xAC2B82CB, 0xBDA02D0D, 0xFE8113FF, 0x88385F45, 0x4DB9AE16}, {0x5EA26E30, 0xE788AEF2, 0xA9399CB3, 0x8166483B, 0x2645FE21, 0xD71CDF7A, 0xCE8E50E1, 0x6EA02194, 0xC7FA3D6E, 0xC708FD21, 0x2546BA0E, 0x94FF591D, 0xDE301CCC, 0x188AFC49, 0xDC3F5BB9, 0x69F21397, 0x865E7ABB, 0x58EDCE62, 0x48DBF1BD, 0x4E45747F, 0xF7BF50B6, 0xF83EC20E, 0x0C6DC058, 0xFFBC4448, 0xC7F6518A, 0x6D2F97DD, 0x15497CAA, 0x2B54167D, 0x6DB67369, 0xECB74B69, 0x2B7818FA, 0x381AC6C3, 0xF3FF9E14, 0xB13B0827, 0xBEF94E1A, 0x9D14B3BD, 0x9E6B0E64}, {0xC97DF2E3, 0x707DAC88, 0x9AFB9612, 0xF3C19831, 0xCBB71DED, 0xE28C99F3, 0x1B88CDB5, 0x4E6B5D08, 0xC8F9B95A, 0x4AF75C1F, 0x64987020, 0x866E0500, 0x76FA8B29, 0xA4D54A8C, 0x38CECD31, 0x73AE3B45, 0xD6B31263, 0x3ADFC51A, 0x97B8826F, 0xB1E561EB, 0xBA1E5902, 0x8A65F5AB, 0xFADE26F3, 0xD74D679B, 0xB6BD5834, 0x7B682E31, 0xC9401168, 0x8C255444, 0x6BFADC3C, 0x78A013A9, 0x92ED6649, 0x52C1BFEF, 0xDBC397A7, 0x37B3F311, 0xD75B948F, 0x2FED937E, 0x4724A822}, {0x498E4B2B, 0x31ADC5E5, 0xAEE46216, 0x062D5A01, 0xAB785ECE, 0x729F8425, 0xE0A49126, 0x770E4EF5, 0xAC968C3C, 0x6F80635A, 0x34D7142E, 0x8A236044, 0xA75DB49E, 0xF8BF2F60, 0x8993ECFA, 0xFD139627, 0x18A5B6D2, 0x45089B0E, 0xD0863D4D, 0x75BBFD75, 0x7D2BCC27, 0x19D49389, 0x129ABCFC, 0x78CD7D08, 0xE162E158, 0xBD4E65AD, 0x338BD0A5, 0x2E3702C6, 0x63B726CE, 0x17334EB0, 0xE01432B8, 0x0EBD97D6, 0x09EB3286, 0x9CD3BECE, 0x62EF89B0, 0x65228160, 0xB5955FBA}, {0xE5794628, 0x32B95161, 0x537EE11E, 0xBD46BFF2, 0x28A4E1A0, 0xBFAAB842, 0x034AD384, 0x8DEC7BB9, 0x9AEDDFE2, 0x18BA6C3B, 0x24FB1618, 0x7A0D674E, 0x6E9A4C16, 0xDA8E7078, 0xEB3E175B, 0x591FD375, 0x6698B75F, 0xD949D569, 0x2CDBB04C, 0x07E7FE4C, 0x50302076, 0x8E358F52, 0x73D792BF, 0x9A9C20FD, 0x0A16D061, 0x4085AB9E, 0x23BF06A1, 0xB3F8C223, 0xA7AD458D, 0x6FEA9A3D, 0x3F7CC0E3, 0xF430E240, 0x4AE4EA0F, 0x6C9FE91C, 0xB32D7B13, 0x4D926135, 0x77954D33}, {0x8D4DEA61, 0x059B2D8B, 0x63B97A54, 0xBC8437B8, 0x3BFA3A82, 0x91B59107, 0xBA2E40A9, 0x5FACA42E, 0xF377D74C, 0xA4BCFABC, 0x4B9F462B, 0x68C5BE21, 0x1737D6BA, 0x030569F2, 0x200629F6, 0xF872C87D, 0x92783E02, 0x85BDF641, 0x8BD4D0AD, 0xDF326677, 0x443DB3C2, 0x02353E34, 0xB9759C19, 0xBE029608, 0x3F48E101, 0x70B59FE7, 0x25B32129, 0x9B2774CE, 0x8D4F9DE3, 0xB4B38F33, 0x65D5E77F, 0x34E6E767, 0xBCFCBB81, 0xB86FF9F0, 0xD68313E6, 0x3C7F330B, 0x58EBB0C4}, {0x962534DE, 0xD43C0010, 0xA1276577, 0x9523283D, 0x2F98CF40, 0x54C45EEA, 0xB386C860, 0x2DB305F2, 0xF128C55D, 0x88138BBB, 0xFB139983, 0x7F71CD9F, 0x75074986, 0x5D6F0FF8, 0xF58FF8A4, 0xE96537A3, 0xC3B09F26, 0x737DCD6C, 0x8FFD581E, 0x9FC49B45, 0x2F13EA85, 0x63A6E555, 0xA4D85A94, 0x1974EA76, 0xF5DB0583, 0x59E0C514, 0xAACCA253, 0x88FA1E3D, 0xB0F2E158, 0x7DCDED4C, 0x2F3E02F6, 0x9D3D2401, 0x06A3E450, 0x9FF1B209, 0x8B5F2CD9, 0x3E49ED41, 0xB7469E24}, {0x244D1C44, 0x7109E99C, 0xE8AB44BD, 0xB8757397, 0xE03C8B8F, 0x964DD476, 0x3B17E99B, 0x3ADFC2FC, 0x16841685, 0x34DC1841, 0x60712879, 0xDED4FD68, 0xDCCB55AB, 0x437BCF50, 0x1DBAC670, 0x74612094, 0x9EEE2401, 0xCD3CD201, 0xF86F7563, 0x19F24161, 0x09E5D659, 0xCD920B92, 0xE6E709CC, 0x7E0DFDF7, 0x8A37BD95, 0x1DDB269C, 0x8A194C6C, 0x9360FC48, 0xF160A93E, 0x6BE0EA2B, 0x4BEB1D39, 0x94AF218A, 0x02807D3B, 0xC3039D44, 0x34F83B7D, 0x4CB8EE84, 0xC7B49EE6}, {0x7FD8A488, 0xAA50AEAC, 0x3BBC09F9, 0x0D6BCF62, 0x75DE5E1A, 0x27A2AA2E, 0x1E0E6778, 0xDBDAD274, 0x19D48B4C, 0x03FB284F, 0x07813D48, 0xCC1B638F, 0x6C54CC4F, 0x9D758586, 0x7DCA5ED2, 0x6B1BEC71, 0x5C290259, 0xE2C9A153, 0xC37E2808, 0x2D303C91, 0xEC29E6DC, 0x02C221FE, 0x16200655, 0x9CD178C2, 0x90B865B2, 0xF0085067, 0x69898A53, 0x64CCD518, 0x915C2D15, 0xE2C688DF, 0x3A8E9475, 0xEE619A24, 0x39AE75A9, 0x31CDFECA, 0x99144079, 0x26C9A62E, 0x92119094}, {0x3FF53D66, 0x0FAACF12, 0x790170D3, 0x7948B7BB, 0xCC34309D, 0xA5A63240, 0x14DD44B5, 0xE0F20471, 0xE6865375, 0xFD595A36, 0xCE990BDA, 0x12C95E92, 0x5B06F963, 0x7D955183, 0x872B3654, 0x8D0665E4, 0xFC279DED, 0x4D5EF6BE, 0x9AD0C205, 0x3EDE3B65, 0x2A1AADF2, 0x835098B5, 0xB7E8D066, 0x068D3716, 0x7A8B483D, 0xC910922C, 0xC36F0FBB, 0xC43B2F63, 0xCCA819D1, 0x9E3E7C00, 0x3170DC11, 0x6D086538, 0xEC88005D, 0x00AED685, 0xA938B7A5, 0x452432B4, 0xC2780F91}, {0x0F024247, 0x951ED321, 0x6D49574F, 0x598CAAED, 0xD09C0B49, 0x6B55D201, 0xE7F9E2DA, 0xC26ABD16, 0xC4C1A7EB, 0x1791D6A5, 0xB3637B71, 0x2A17657E, 0x95EE8417, 0x6E13CA76, 0x953BE33D, 0x888A1412, 0xFBDFB22C, 0x5409D489, 0xDFFCB1FD, 0x5C85CF46, 0x68E3F41F, 0x10916344, 0x3920DF7A, 0xD573D166, 0xA7C012AD, 0xCD21A277, 0xF340CAFC, 0xF1FD0E17, 0xD486AD06, 0x458ED915, 0x6DF127C9, 0xEDDF5E52, 0x5815AB3C, 0x32904192, 0xD5BF6802, 0xE8BC2880, 0xE3E01AE2}, {0xF7969B39, 0x607E7701, 0xDE888A4D, 0x0C6163FB, 0x5D397EBF, 0x67B4D2A7, 0x085780A8, 0xC732C810, 0xE1E79EDF, 0xFBE072A5, 0x1FF90795, 0xD525CE15, 0x467725B1, 0xA003D89E, 0x4A845D2B, 0x6A8907DB, 0xB985A881, 0x2DE6E8AB, 0xB9FBBD44, 0x9D39DDBA, 0xB19A67FB, 0x78CBA1D7, 0x9B1C704D, 0x883EF871, 0x8BAEF511, 0x6D62D532, 0x2B693923, 0xE133B2AE, 0x868AA2B5, 0x531AD5DE, 0x2A9C4298, 0x696AE1AC, 0x1C2AB4F3, 0x3714E891, 0x0859CA95, 0xB9A49E56, 0xD344189F}, {0xDBA34A46, 0x525E2F5D, 0x425AC32C, 0x5C8C2998, 0x857A327F, 0xBBAD7F54, 0xDF0B977B, 0x30A8F52B, 0x5D5A87ED, 0xF3FF5165, 0x04028D39, 0x2A013C6B, 0x99864956, 0x4C92514D, 0x9B0F688A, 0xA9B3862B, 0x6090BC63, 0x8CB6F3F6, 0xFC104E02, 0x79D74F76, 0x45098B12, 0x1EC99EBB, 0x0B25C8E2, 0x760375BB, 0xB370E685, 0x22615F26, 0x52FC67B5, 0x7DA33688, 0xB8255106, 0x7A05EF2F, 0x373CFB3B, 0x290A077E, 0x43C0B57D, 0x4A370821, 0x064C1B0D, 0x8BDB6399, 0x97071926}, {0x48AD399F, 0x0787CCA3, 0x6E1B8AF8, 0x97282AD3, 0x14EB25B8, 0x686A15E1, 0xD3C7487B, 0xB4029D97, 0x1EB7AB3B, 0x25B9E580, 0xE089C35E, 0xF296B4CA, 0xBA9A3888, 0x4ACD6363, 0x3F4857E0, 0xEA0E6553, 0xD58EB585, 0x707C9C27, 0x2F07A081, 0xC4E55800, 0x2D97C374, 0xF13FB446, 0x5A05256E, 0x0C83AB1D, 0xB3E2C494, 0x42D49027, 0xF5291785, 0x278BE1A4, 0x72D15DC4, 0x45AB3260, 0xC083C6A0, 0xFCD1863E, 0x2EDF9796, 0x4392C20E, 0x4862EA8D, 0xCF403752, 0x49D2AD36}, {0x279950BE, 0x53EC6405, 0x96165890, 0xB091A77B, 0x1CE39EA2, 0xDC46972E, 0x480C0B39, 0x79DD8A2E, 0x215FF5BB, 0x1B6A6B0C, 0x9E5501C9, 0x5008030B, 0xAB667687, 0x1763B54F, 0x104DCD25, 0xAFFAFFAF, 0x42B8FB93, 0x6161C266, 0xBBD17E3B, 0x3359C8E8, 0xA4B9F194, 0x67D1CE13, 0xC1B04259, 0x2E70E492, 0xDC5504AC, 0x07D7E04B, 0xB9EFE988, 0xDCF3C85B, 0x426DB7D8, 0xB9EE2CF9, 0x258AC253, 0xA2D138DF, 0x57190F78, 0xEFE2E960, 0xF669F638, 0xAD0D122D, 0x586FF633}, {0x3AA445C5, 0x82121A38, 0xA53708B0, 0x65EBB7A7, 0x7E40F2A0, 0xD45C01E0, 0x4C135B64, 0x4483C683, 0x8B908363, 0x3060F6F4, 0x8DD7B5FA, 0x110EFCED, 0x7217D5C9, 0x1F42CA09, 0xA45A6A01, 0xF45068D3, 0x899DA5D3, 0x8D9C2A6E, 0xD6BBAC2E, 0x10DF6E91, 0x49FBC07B, 0x1B6BBFBF, 0x5916C6F2, 0x3CA37EE1, 0x561EA9D4, 0xCEEFDA2C, 0x05E82C9E, 0xB8B64F9A, 0x5B8E38A4, 0x3CA4266A, 0x816927C6, 0x4E3933DC, 0x85F8A507, 0xD07445B3, 0x2C4C169B, 0x6A2C6C33, 0xF80E95C6}, {0x10668FFE, 0xABDD162E, 0x065E1F2A, 0x41D00404, 0x9FDA8555, 0xB78413E6, 0x038AEEE2, 0x8CCF48C2, 0xB67099FD, 0x7FAA17E1, 0x02159424, 0x86C66F3E, 0x85F81B0A, 0x5D6EE998, 0xEDF1CBEC, 0xD0853AC9, 0x15D68A47, 0x930249D4, 0x421CF02D, 0xA2474696, 0xDBCAA082, 0x71DD02F7, 0x419C99D9, 0x6C2EB812, 0xC55577DF, 0x46E2C20E, 0x12F8C3D2, 0xF51C5CDD, 0x638C6841, 0xFD41B200, 0x874010CB, 0xEA7691C8, 0xAFCFE37F, 0x67F61CE6, 0x19004414, 0x0FD9CD59, 0xCB4074DC}, {0xDE9227D2, 0xB3795C38, 0x962A57AA, 0xC0E6A70F, 0xDAC95877, 0xA294F421, 0xBAAB6840, 0xC2BC1EA8, 0x801778B0, 0xE654E1B0, 0xF355C3D7, 0xC1F9C216, 0xBE234AE7, 0x76F738D5, 0x3892A48A, 0xD43E12FA, 0x3AF53B97, 0xFA7FB3EA, 0xC2CE1C25, 0xE80C854D, 0xDD5D55BA, 0x19CAC0B3, 0x70E634CA, 0x31D75E04, 0x511CDEE9, 0x8328D6B4, 0x09DE4759, 0x345B879D, 0x8DA9C94D, 0x1EE4004E, 0x759316E6, 0xA8491E35, 0x6445CCB8, 0x15B6F7E8, 0xCB639A2C, 0xEBE83DBD, 0x90AF65E6}, {0xF4CA0086, 0x09DA11C5, 0x6C94C74D, 0x5C5E3080, 0xB7DF63A7, 0x5F212E84, 0xF32BACDC, 0xA446472C, 0x65814C27, 0x4417784A, 0x47D4D043, 0x179BA479, 0x74D39DA2, 0xDBDC4A4C, 0x2619ADC3, 0xF6D44E53, 0x33714F0A, 0xA2488ACF, 0x3B0971B3, 0x8A7DC9ED, 0x9B3CA3EE, 0xDFD95018, 0x6CB74E4B, 0xFE088ED7, 0xE685BD03, 0x8D3CD380, 0x93B25780, 0x8556CDE9, 0x24D9AC0F, 0xF727F9FC, 0x1E31F736, 0xB232B542, 0x85357F85, 0x25076674, 0x4D02443F, 0x98313DD6, 0xE69659EC}, {0xF6843837, 0x91E6E323, 0xA7044159, 0xFC084237, 0x83B46317, 0xEEC42D73, 0xF887CE2A, 0xB867CBFB, 0x1048E50A, 0xDC531AA9, 0x5196D992, 0x9ADC4932, 0xD7B39954, 0xD1E5368F, 0x3965BAA3, 0x798CC085, 0xF5463286, 0x0CA49F86, 0xFAED57A4, 0x1662BD6A, 0x465880D5, 0x3DCEC41E, 0x6E0B831A, 0x14A220B2, 0x4559F9AE, 0x39EC421F, 0xB9757889, 0x5B7AC1BE, 0xF6B93106, 0xE18E0A82, 0xCFD2409A, 0x11EB2351, 0x5F8C898C, 0x51B7D124, 0xFE8213F5, 0xEF315329, 0x48065118}, {0xFDEA39E4, 0xFC060DE0, 0x27F056DF, 0x3D412695, 0x557B6E30, 0x1053AB0E, 0xD8F2D8A1, 0x8033EB16, 0x4D9F8252, 0x92DB5EB6, 0x652124DD, 0x30D35B8B, 0x3BFC52BD, 0x5142E79C, 0x46C4A360, 0x58E7F1A2, 0x60A2489E, 0x15EB320F, 0x2E206A72, 0xC3D3D391, 0x20B00E02, 0x8FCF90E0, 0xA040B0E5, 0x9F6EB05C, 0x7A29BB05, 0x1EEEE732, 0xA1CD3E44, 0x5A8AE34A, 0x7FC98E40, 0x9D1361FE, 0xA76FA685, 0xBD825724, 0xCBED467E, 0x25CCC97D, 0x0C6DAED7, 0x04F9B50B, 0xB3FC465E}, {0xA1E9ED49, 0xBD52045C, 0x6FC6321C, 0xB3D8CAFB, 0x9675AB8B, 0x5B92E81F, 0x927BBBD0, 0xBD651670, 0xDB23F118, 0x648AB78E, 0x8A9663CE, 0xEC8D4E2D, 0x977976D9, 0x0BE30247, 0x79451F8D, 0xDC985389, 0x02830FD5, 0x62CADFA6, 0x176DC515, 0xF261AAAF, 0xB74EAD64, 0x108DC582, 0x92843B18, 0x0DC14C32, 0x60685DE2, 0x558C7F82, 0xC4BB0A82, 0xAB33A47F, 0x3BC99611, 0x2BA78298, 0xE6970964, 0x41296FC5, 0x299C2548, 0xB7FDCD2A, 0xFEB4097E, 0xBED156C2, 0xCC458AEB}, {0x678782BA, 0xE609F550, 0xDB413C47, 0xAFF47725, 0xF0EDE797, 0x3F22BA40, 0xA858550B, 0x3CE3F3DE, 0x1EB0737C, 0x89D7C765, 0x6BF2898C, 0x3149D8E5, 0x170E5471, 0x1B531BE7, 0x46F341D1, 0x67B9D033, 0xB777E210, 0xA0030F60, 0x004C65FA, 0xF45F4906, 0x6AACD5F2, 0x3DFC77AF, 0xF23FDE19, 0x873A25C1, 0xCDCCE709, 0x46039BF5, 0x7C80C056, 0x2C7F2015, 0x54E4C8D0, 0xA3EBAC3C, 0x34E51E4B, 0x7A9A2408, 0xDD077383, 0x5C139470, 0xDFC431C0, 0x4BD6C7A3, 0x24BE74D6}, {0x907FB31B, 0xB2E9015B, 0x6AC9D8E9, 0xB293E235, 0x1F163074, 0xF6EE902C, 0xF45831C6, 0x00A140ED, 0xB3485BB9, 0x76AC8E58, 0xD5E9BA0F, 0x1EFF75C2, 0x418B67A0, 0xE43FEE88, 0xE4D04FD0, 0x8661A694, 0x30AADC99, 0x86DF6C37, 0xFDAB09CD, 0x78EAE5B4, 0xA0853281, 0xA15D0DEB, 0xC46B5D12, 0x8D2CFB47, 0xA79F9BD5, 0xFCBCA89F, 0x0615B8DD, 0x53E2734B, 0xCA9C2F8B, 0x7240F139, 0xF3533D4D, 0x82E611CE, 0x040D1675, 0x53B62A44, 0xB6D6ED64, 0x60A78388, 0xEBA54BBD}, {0xB51B412E, 0x7C35E35B, 0xB639210E, 0x23F2693B, 0xD4CD19BA, 0xB0EE647A, 0xB726C1F6, 0x905D60B1, 0xF04E7ED2, 0x2426915F, 0xEECCC94C, 0x4C3E330B, 0x13826C9C, 0x9964F7DE, 0x3334544A, 0x4FFCA9AB, 0xE8EE0B55, 0x233C24A3, 0x6221B29F, 0xA977BB4F, 0xF6620B48, 0xD6E41FCC, 0x64D53A97, 0x98D3F870, 0x3C4BF89F, 0xC6F26354, 0xC1FA36D7, 0xF0D3F20A, 0x54145C69, 0x39898169, 0x7D1EB796, 0x08C7CCF1, 0x54DAB192, 0x70CB8984, 0xCA81E7B3, 0x26B5179A, 0x38BD2380}, {0x11164ABA, 0x1E157B1C, 0x8F33977D, 0x75BE4C72, 0xEDAF817F, 0x2BC84FAB, 0xD26332B7, 0x0F6B7604, 0x39A4BB17, 0x60870C55, 0xAF809D3C, 0x5F20658E, 0xFC57A8A2, 0x5463055C, 0xCF9D841A, 0x60693904, 0x3EFA8818, 0xA0C6D057, 0x4EEEEBF6, 0xFA9E8465, 0x6B0F3B99, 0xC4AD3B5B, 0xB70D55A6, 0xB16600B1, 0xFD1B2D93, 0x8184BC2C, 0xBB45115C, 0x95AD621F, 0x998F4BE0, 0x57E469B8, 0x1D9D6947, 0x1739FDD2, 0xAC2F5207, 0x09A72355, 0x102C7990, 0xB36F38E8, 0xAEE3F95E}, {0xF0BE5584, 0xE3BAC577, 0xA67C271F, 0xFE8AD256, 0x6557E671, 0x82900BD2, 0xD8989856, 0xC2F66CDB, 0xB3D9C85C, 0x12721679, 0x3ED9E157, 0x353B5D80, 0x01139C46, 0x2D8293C9, 0x50E84CD3, 0xA200796F, 0xE920F2B5, 0x0FEA17AB, 0x37AF7CC0, 0xA5C1A47D, 0xE432E5E5, 0x652244B4, 0x3B3F9B37, 0xB45A46A9, 0x6C5C102F, 0x8AAD0736, 0x17CDA8B5, 0xE1CE973D, 0xF26987DE, 0x44F60361, 0xE02BB20C, 0x47A7C27C, 0x071A4F93, 0x322DD615, 0xF90C5A41, 0x23E51C22, 0x6168FE01}, {0xCBC7FD98, 0xC5D2E0F2, 0x6125DE3D, 0x8945FCDA, 0x3860E540, 0xF3D2C799, 0x818D4B65, 0x8EEF66FD, 0x7B329435, 0x9953BFEF, 0xE823AF52, 0xA2B97B26, 0x3EC9D193, 0x40734D58, 0xE9E571AC, 0x4D83C5A4, 0x3BAB0D12, 0x11437879, 0x598BEC34, 0xA3F118D1, 0xE52DCCDD, 0x35EC08DE, 0x9EA69A46, 0xAE28E4CE, 0x9F32658F, 0x107F53F5, 0x7276E445, 0x716D66ED, 0xF5E2E825, 0x1A0D1A43, 0xE8B36C19, 0x867D3FC4, 0xC64C1882, 0xEA2ECBC2, 0x901E929A, 0xDA847CC8, 0x2AFF7969}, {0x9F9F67F4, 0x0D46956C, 0xF4A7C477, 0x21B98410, 0xBD1D7BE4, 0x791A5DF3, 0xC3E5D38C, 0xD93B36DB, 0x4552C062, 0x4BEE6B1F, 0xD021B6EB, 0x33B8E793, 0xBA9DC9CB, 0xADEC6B19, 0x81486D28, 0xD33A27D1, 0x8A7F6F7B, 0x10CDA228, 0xA12790B0, 0x9F751D20, 0x40AB17BC, 0x0760B657, 0xA34D3688, 0x7F85B329, 0x70AA1876, 0xE1A109A2, 0x7231E067, 0x68801124, 0x7C7D22EA, 0xAE92C39C, 0x6F98EEB4, 0x8EEB4ABF, 0xBFB8C8C7, 0xB15DCC46, 0x61F60440, 0xAC7BE5A7, 0x5AA1402E}, {0x342415DD, 0x1D3B1C22, 0xBB19BA2F, 0xC58DC5B0, 0x11B36D5B, 0xB5B67B50, 0x6C01EED5, 0xB1610BFC, 0x05F23A4A, 0x474CE3E5, 0x08BE4B69, 0xCAB4A0DB, 0x290AA645, 0x97EE09AB, 0xA21A05FF, 0x7E803EDF, 0x3692A08B, 0xDA49464C, 0x233C62ED, 0x2B8BD2CB, 0x2BB1C60D, 0x984D9AA4, 0xD2B7DB97, 0xF7991BE9, 0x9558DB93, 0x7248EC4B, 0xB12D0831, 0xA85DDF18, 0x0B27B05B, 0x2B6DFE29, 0x0E1462F0, 0xC9CC99AF, 0xFF89F292, 0x30BEE433, 0x0D04BE76, 0x3CD3EFCB, 0x7A68D00F}, {0x2AB9FD4E, 0xD388FBE6, 0x0815DCCA, 0xCA773140, 0x5F72763F, 0x5AD1581E, 0x61282867, 0x3932B16C, 0xB17E4429, 0x06001140, 0xBB3F2DD6, 0x747A1C9E, 0xECB29646, 0x1CF17CD5, 0x0F909FAF, 0x6E6764B0, 0xBDB4E233, 0x77A835BB, 0x1D49A8C6, 0xE0A0C588, 0x01169042, 0x8D0136C4, 0x21037751, 0x30902A5D, 0x59357B03, 0x2AF8CA37, 0x1AC84486, 0x6B7ADA98, 0xCA6934F4, 0x1E16C29E, 0xE9B91DDD, 0xB3204082, 0xB194000A, 0xAC8E3D27, 0x8AD441F1, 0x906B6DCF, 0x97265F85}, {0x2E5A58D9, 0x6BDA61D6, 0x05DF64D0, 0xA2B97225, 0x25798FAF, 0x9C65625B, 0x65A6AE07, 0x04CB7F39, 0xA527774C, 0x33859061, 0xAD320F04, 0xF3218C5F, 0x0DDA64DC, 0x2827BE8B, 0x7C77F660, 0x7A4C3BBF, 0xFE927CB4, 0x190C280F, 0x42B634F5, 0xDEB84CE0, 0xF05DC4E8, 0x5FB57455, 0xF6F30E95, 0x377D41E9, 0x3215BA39, 0x1725E820, 0xBFA8A318, 0x2FBF89D7, 0x33DA7C71, 0xB26EC1F2, 0xA4DA15A4, 0x8000A783, 0xAB8587D4, 0x1806E80C, 0x03D1E2A1, 0x4348B12D, 0x18F4BF3C}, {0x14389E67, 0x5016EEEC, 0x76B6F802, 0xE3840C8E, 0x2BF72A9B, 0xF1EF0C56, 0x8B630051, 0xD553E09C, 0x2B0FB4ED, 0xD37DF1B2, 0xC999CB73, 0xAB86E2E2, 0x9624180C, 0x06947CFB, 0x3FBF289D, 0x2F374651, 0xA913A1E2, 0xCEDE77B6, 0xD077929D, 0x958FA4E8, 0x3054F6A8, 0x96DB8CC9, 0xABF35F54, 0x03F4F512, 0xD40A434B, 0xA92F1DB9, 0xDFC9431B, 0x88A7008B, 0x891F4942, 0xC76BEBE1, 0xEF3E21D4, 0x5BDD570A, 0x45C0C894, 0x59DA07B7, 0xA48C011E, 0x3E82589F, 0x6F9F4EA0}, {0x0EF7CBC4, 0xE4846CA8, 0x369D90E4, 0xF0B8B768, 0xDE0498B8, 0xAC998767, 0xCB8C3020, 0x32AFC1E6, 0x761113D4, 0x644D556F, 0xCA53911E, 0x43C12E68, 0x514A9448, 0xA42C3D3E, 0x22396BAF, 0xADB1AADC, 0x371F9A3E, 0x5B93123A, 0xDD32ECC7, 0xB1333F88, 0x961AABAE, 0x1F52C631, 0xC102AD12, 0x6D51F880, 0x6967E3E8, 0xC2C9120D, 0x54049859, 0xD564EE7E, 0x2259051C, 0xA4D94C7D, 0xCE7724D5, 0xFD8A5B70, 0x4C4A2794, 0x86676797, 0x0EFD17A1, 0xA61D8DD2, 0xA68F774A}, {0xB2E07D39, 0x7C8670B6, 0x5DFABCF0, 0x526C8C2D, 0x4053E94D, 0x818563BB, 0x3EA42129, 0x3353FB57, 0x92C75C7E, 0x046C5D38, 0xB054331C, 0x3797AD10, 0xBB392667, 0x517B1A0C, 0xCBE0E6E7, 0x402FD418, 0x1DA297A2, 0xC657C508, 0x0308BB0C, 0x46E8F3A5, 0x4B7EB7F5, 0xEDB4D83A, 0xD430D0C7, 0x00D30EDA, 0xCBB4E36B, 0xBF98C913, 0x83600293, 0x217B73DF, 0xA2B07FF9, 0xC57989F7, 0x8DBD48EE, 0x4BA283CA, 0x4395C8AE, 0xB955ABB0, 0x1F003456, 0x72CC786A, 0xFF80AFDC}, {0xE7DFD8A9, 0xA0C938EB, 0x2590445F, 0xD967BB6E, 0x2686734E, 0x7959B9F2, 0x091517CE, 0x28D7115E, 0x46904894, 0x9581AD38, 0x0EDC248D, 0x9C738C76, 0x3E02CD68, 0xC463760D, 0xFA387D69, 0x70FCF8FC, 0xA7C5EB2F, 0xF7CECB25, 0xE85DF7B5, 0x844C8F74, 0xB54B0E56, 0x954868BA, 0x9F06B3B4, 0xF0BE675D, 0x9DE1DD9E, 0x5EACB7A9, 0x1BF61CDE, 0x6B58D57B, 0xA60C60AC, 0x04F50D0D, 0xCD947E88, 0xDAAF407B, 0x403D6F08, 0x7F014E16, 0x926C1BC1, 0xDD30B3E8, 0x1A986C11}, {0xAA930E29, 0x848683C9, 0xE3AA7B87, 0x3BE5B89D, 0xD39DC7B4, 0x30E7C58C, 0xF931E1AD, 0xA2783313, 0x20672D65, 0x3F5F6F1F, 0x4DAEE61A, 0xA8E34D70, 0x34779795, 0x74649E22, 0x7F9C9D2F, 0x3840CF0A, 0x0ABA5004, 0x1033B6E5, 0xE4350FF0, 0x0068F852, 0x3180E3A2, 0x320AF903, 0x17AE2116, 0xE0C5E6B5, 0x1DABCF69, 0xE721EE3C, 0x4D60FD82, 0xC95CAC40, 0x6D43DA02, 0x1EBE34A9, 0xD58396AD, 0x13A5DBAC, 0xF4681DFF, 0xDAC4A329, 0x3F7FA690, 0x5A472781, 0x2E082433}, {0x08497910, 0x0B5E2FA0, 0xA4DFA944, 0x6AD7A8E8, 0x7918042C, 0x453E22B8, 0x1FA5094B, 0x4B71A3C9, 0x258D12AB, 0xE71D1E8B, 0x4515C213, 0x5D50E264, 0xD223F155, 0x40F5B3A5, 0x76EDE533, 0x697792CA, 0x348677EF, 0xE19B319D, 0x4441B1EA, 0xCF270DDD, 0xAE1CF7F4, 0xE39D11F3, 0xF90BEA58, 0x702FBB25, 0xD1C6F588, 0x2F4D111E, 0x06B705BC, 0x518B5A78, 0x2B697EFE, 0x4051AD14, 0xA2035F8A, 0x32E3CE3E, 0xF0B18866, 0xCE00C274, 0xCDF904F0, 0x78064A99, 0x1424378D}, }; /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/journal-cjf-page.c0000644000077100007710000000012412650131756022261 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.423344 30 ctime=1454597652.348344534 yadifa-2.1.6-5826/lib/dnsdb/src/journal-cjf-page.c0000664000077100007710000001073612650131756022075 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #define JOURNAL_CJF_BASE 1 #include "dnsdb/dnsdb-config.h" #include "dnsdb/journal-cjf-page-output-stream.h" #include "dnsdb/journal-cjf-page.h" #include "dnsdb/journal-cjf-idxt.h" #include "dnsdb/journal-cjf-page-cache.h" /** * Search from the offset of the stream for a serial, looking in an PAGE referenced by index * * @param jnl * @param idx * @param serial * @param out_offset * @return */ ya_result journal_cjf_page_get_stream_offset_from_serial(journal_cjf *jnl, int idx, u32 serial, u32 *out_offset) { u32 file_offset = journal_cjf_idxt_get_page_offset(jnl, idx); journal_cjf_page_tbl_item value; if(journal_cjf_idxt_get_page_serial_from_index(jnl, idx) == serial) { // the first one journal_cjf_page_cache_read_item(jnl->fd, file_offset, 0, &value); *out_offset = value.stream_file_offset; return SUCCESS; } // read how much items are in the PAGE journal_cjf_page_tbl_header hdr; journal_cjf_page_cache_read_header(jnl->fd, file_offset, &hdr); //for(int i = 1; i <= CJF_SECTION_INDEX_SLOT_COUNT - 1; i++) for(int i = 0; i < hdr.count - 1; i++) { journal_cjf_page_cache_read_item(jnl->fd, file_offset, i, &value); if(value.ends_with_serial == serial) { // we found the item that ends with the requested serial, // the next item is the one that starts from the requested serial journal_cjf_page_cache_read_item(jnl->fd, file_offset, i + 1, &value); *out_offset = value.stream_file_offset; return SUCCESS; } } //this is the wrong idx return ERROR; } /** * * Returns true iff the current PAGE table is full * * @param jnl * @return */ bool journal_cjf_page_is_full(journal_cjf *jnl) { yassert(jnl->last_page.size > 0); return jnl->last_page.count == jnl->last_page.size; } bool journal_cjf_page_line_count(journal_cjf *jnl) { return jnl->last_page.count; } /** * * Returns the file offset value at index in the current PAGE * * @param jnl * @param index * @return */ u32 journal_cjf_page_get_file_offset(journal_cjf *jnl) { return jnl->last_page.file_offset; } u32 journal_cjf_page_get_stream_file_offset(journal_cjf *jnl) { return jnl->last_page.records_limit; } /** * * Returns the last serial number value at index in the PAGE * * @param jnl * @param index * @return */ u32 journal_cjf_page_get_last_serial(journal_cjf *jnl, s16 index) { journal_cjf_idxt_tbl_item *entry; entry = &jnl->idxt.entries[(jnl->idxt.first + index) % jnl->idxt.size]; return entry->last_serial; } yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec3_collection.c0000644000077100007710000000012412650131756022363 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.326344 30 ctime=1454597652.512344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec3_collection.c0000664000077100007710000001645612650131756022204 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #define _NSEC3_COLLECTION_C #define MODULE_MSG_HANDLE g_dnssec_logger extern logger_handle *g_dnssec_logger; #define DUMPER_FUNCTION(...) logger_handle_msg(MODULE_MSG_HANDLE,MSG_DEBUG,__VA_ARGS__) //#define DEBUG_LEVEL 9 //#define DEBUG_DUMP #include #include "dnsdb/nsec3_collection.h" /* * The following macros are defining relevant fields in the node */ /* * Access to the field that points to the left child * */ #define AVL_LEFT_CHILD(node) ((node)->children.lr.left) /* * Access to the field that points to the right child */ #define AVL_RIGHT_CHILD(node) ((node)->children.lr.right) /* * Access to the field that points to one of the children (0: left, 1: right) */ #define AVL_CHILD(node,id) ((node)->children.child[(id)]) /* * OPTIONAL : Access to the field that points the parent of the node. * * This field is optional but is mandatory if AVL_HAS_PARENT_POINTER is not 0 */ #define AVL_PARENT(node) ((node)->parent) /* * Access to the field that keeps the balance (a signed byte) */ #define AVL_BALANCE(node) ((node)->balance) /* * The type used for comparing the nodes. */ #define AVL_REFERENCE_TYPE u8* /* * */ #define AVL_REFERENCE_FORMAT_STRING "%{digest32h}" #define AVL_REFERENCE_FORMAT(reference) reference /* * Two helpers macro, nothing to do with AVL */ #define NODE_SIZE(node) (sizeof(AVL_NODE_TYPE) + (node)->digest[0]) #define NODE_PAYLOAD_SIZE(node) (NODE_SIZE(node)-sizeof(nsec3_children_union)-1) /* * A macro to initialize a node and setting the reference */ #define AVL_INIT_NODE(node,reference) MEMCOPY((node)->digest,&(reference)[0],(reference)[0]+1) /* * A macro to allocate a new node */ #define AVL_ALLOC_NODE(node,reference) \ yassert((reference)[0]!=0); \ ZALLOC_ARRAY_OR_DIE(AVL_NODE_TYPE*, node, (sizeof(AVL_NODE_TYPE)+(reference)[0]), AVL_NODE_TAG); \ ZEROMEMORY(node,sizeof(AVL_NODE_TYPE)+(reference)[0]) /* * A macro to free a node allocated by ALLOC_NODE */ static void nsec3_free_node(nsec3_zone_item* node) { /* * This assert is wrong because this is actually the payload that has just overwritten our node * assert(node->rc == 0 && node->sc == 0 && node->label.owners == NULL && node->star_label.owners == NULL & node->type_bit_maps == NULL); */ u32 node_size = NSEC3_NODE_SIZE(node); ZFREE_ARRAY(node, node_size); } #define AVL_FREE_NODE(node) nsec3_free_node(node) /* * A macro to print the node */ #define AVL_DUMP_NODE(node) format("node@%p",(node)); /* * A macro that returns the reference field of the node. * It must be of type REFERENCE_TYPE */ #define AVL_REFERENCE(node) (node)->digest /* * A macro to compare two references * Returns TRUE if and only if the references are equal. */ #define AVL_ISEQUAL(reference_a,reference_b) (memcmp(&(reference_a)[1],&(reference_b)[1],(reference_a)[0])==0) /* * A macro to compare two references * Returns TRUE if and only if the first one is bigger than the second one. */ #define AVL_ISBIGGER(reference_a,reference_b) (memcmp(&(reference_a)[1],&(reference_b)[1],(reference_a)[0])>0) /* * Copies the payload of a node * It MUST NOT copy the "proprietary" node fields : children, parent, balance */ #define AVL_COPY_PAYLOAD(node_trg,node_src) MEMCOPY(&(node_trg)->flags,&(node_src)->flags,NODE_PAYLOAD_SIZE(node)) /* * A macro to preprocess a node before it is preprocessed for a delete (detach) * If there was anything to do BEFORE deleting a node, we would do it here * After this macro is exectuted, the node * _ is detached, then deleted with FREE_NODE * _ has got its content overwritten by the one of another node, then the other * node is deleted with FREE_NODE */ #define AVL_NODE_DELETE_CALLBACK(node) #include AVL_NODE_TYPE* AVL_PREFIXED(avl_find_interval_start)(AVL_TREE_TYPE* root, AVL_REFERENCE_TYPE obj_hash) { AVL_NODE_TYPE* node = *root; AVL_NODE_TYPE* lower_bound = NULL; AVL_REFERENCE_TYPE h; yassert(node != NULL); /* This is one of the parts I could try to optimize * I've checked the assembly, and it sucks ... */ /* Both the double-test while/ternary and the current one * are producing the same assembly code. */ /** * Get a key that */ while(node != NULL) { h = AVL_REFERENCE(node); /* * [0] is the length of the obj_hash * * The obj_hashs starts at [1] * */ #ifdef DEBUG if(h[0] != obj_hash[0]) { DIE_MSG("NSEC3 corrupted NSEC3 node"); } #endif int cmp = memcmp(&obj_hash[1], &h[1], h[0]); /* equals */ if(cmp == 0) { return node; } /* bigger */ if(cmp > 0) { lower_bound = node; node = AVL_CHILD(node, DIR_RIGHT); } else { node = AVL_CHILD(node, DIR_LEFT); } } if(lower_bound == NULL) { lower_bound = *root; yassert(lower_bound != NULL); while((node = AVL_CHILD(lower_bound, DIR_RIGHT)) != NULL) { lower_bound = node; } } return lower_bound; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_sanitize.c0000644000077100007710000000012412650131756021622 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.463344 30 ctime=1454597652.394344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_sanitize.c0000664000077100007710000005445412650131756021443 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup zone Functions used to sanitize a zone * @ingroup dnsdb * @brief Functions used to sanitize a zone * * Functions used to sanitize a zone * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include "dnsdb/zdb_sanitize.h" #include "dnsdb/rrsig.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_error.h" extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #define TYPE_OFFSET(t) ((t)>>3) #define TYPE_BIT(t) (1<<((t)&7)) #define HAS_TYPE(t) ((types[TYPE_OFFSET(t)] & TYPE_BIT(t)) != 0) #define SET_TYPE(t) (types[TYPE_OFFSET(t)] |= TYPE_BIT(t)) #define UNSET_TYPE(t) (types[TYPE_OFFSET(t)] &= ~TYPE_BIT(t)) #define CNAME_TYPE 5 #define NS_TYPE 2 #define DS_TYPE 43 struct zdb_sanitize_parms { zdb_zone *zone; u32_set dnskey_set; }; typedef struct zdb_sanitize_parms zdb_sanitize_parms; static void zdb_sanitize_parms_init(zdb_sanitize_parms *parms, zdb_zone *zone) { parms->zone = zone; u32_set_avl_init(&parms->dnskey_set); } static void zdb_sanitize_parms_update_keys(zdb_sanitize_parms *parms) { const zdb_packed_ttlrdata *dnskey_rrset = zdb_zone_get_dnskey_rrset(parms->zone); while(dnskey_rrset != NULL) { const u8 *dnskey_rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(dnskey_rrset); u32 dnskey_rdata_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(dnskey_rrset); u16 keytag = dnskey_get_key_tag_from_rdata(dnskey_rdata, dnskey_rdata_size); u32_set_avl_insert(&parms->dnskey_set, keytag); dnskey_rrset = dnskey_rrset->next; } } static bool zdb_sanitize_parms_has_key(zdb_sanitize_parms *parms, u16 tag) { return u32_set_avl_find(&parms->dnskey_set, tag) != NULL; } static void zdb_sanitize_parms_finalise(zdb_sanitize_parms *parms) { u32_set_avl_destroy(&parms->dnskey_set); } static void zdb_sanitize_log(dnsname_stack *dnsnamev, ya_result err) { if(err & SANITY_UNEXPECTEDSOA) { log_warn("sanity: %{dnsnamestack} failed: unexpected SOA", dnsnamev); } if(err & SANITY_TOOMANYSOA) { log_err("sanity: %{dnsnamestack} failed: too many SOA", dnsnamev); } if(err & SANITY_CNAMENOTALONE) { log_warn("sanity: %{dnsnamestack} failed: CNAME must be alone", dnsnamev); } if(err & SANITY_UNEXPECTEDCNAME) { log_warn("sanity: %{dnsnamestack} failed: unexpected CNAME", dnsnamev); } if(err & SANITY_EXPECTEDNS) { log_warn("sanity: %{dnsnamestack} failed: expected NS", dnsnamev); } if(err & SANITY_UNEXPECTEDDS) { log_warn("sanity: %{dnsnamestack} failed: unexpected DS", dnsnamev); } if(err & SANITY_MUSTDROPZONE) { log_err("sanity: %{dnsnamestack} critical error : the zone will be dropped", dnsnamev); } if(err & SANITY_TRASHATDELEGATION) { log_warn("sanity: %{dnsnamestack} failed: delegation has unexpected records", dnsnamev); } if(err & SANITY_TRASHUNDERDELEGATION) { log_warn("sanity: %{dnsnamestack} failed: non-glue records found under delegation", dnsnamev); } // SANITY_TOOMANYNSEC is not used if(err & SANITY_RRSIGWITHOUTKEYS) { log_warn("sanity: %{dnsnamestack} failed: RRSIG records without matched DNSKEY", dnsnamev); } } static void zdb_sanitize_rr_set_useless_glue(zdb_zone *zone, zdb_rr_label *label, dnsname_stack *name, zdb_rr_label** parent) { zdb_rr_label** delegation = parent; // start from the parent // while there is a delegation while(*delegation != NULL && (((*delegation)->flags & ZDB_RR_LABEL_DELEGATION) == 0)) { delegation--; } if(*delegation != NULL) { u16 ip_type = TYPE_A; zdb_packed_ttlrdata* delegation_ns_record_list_head = zdb_record_find(&(*delegation)->resource_record_set, TYPE_NS); // try to find the address in the NS set for(;;) { zdb_packed_ttlrdata* ip_record_list = zdb_record_find(&label->resource_record_set, ip_type); zdb_packed_ttlrdata* delegation_ns_record_list = delegation_ns_record_list_head; while(ip_record_list != NULL) { bool matched = FALSE; while(delegation_ns_record_list != NULL) { const u8* nameserver_name = ZDB_PACKEDRECORD_PTR_RDATAPTR(delegation_ns_record_list); if(dnsname_equals_dnsname_stack(nameserver_name, name)) { matched = TRUE; break; } delegation_ns_record_list = delegation_ns_record_list->next; } if(!matched) { /* * Useless A/AAAA record */ rdata_desc rdata; rdata.type = ip_type; rdata.len = ZDB_PACKEDRECORD_PTR_RDATASIZE(ip_record_list); rdata.rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(ip_record_list); #ifdef DEBUG log_debug7("sanity: about label: %{dnslabel} %x", label->name, label->flags); #endif log_warn("sanity: %{dnsname}: consider removing wrong glue: %{dnsnamestack} %{typerdatadesc}", zone->origin, name, &rdata); } ip_record_list = ip_record_list->next; } if(ip_type == TYPE_AAAA) { break; } ip_type = TYPE_AAAA; } } } static ya_result zdb_sanitize_rr_set_ext(zdb_sanitize_parms *parms, zdb_rr_label *label, dnsname_stack *name, u16 flags, zdb_rr_label** parent) { zdb_zone *zone = parms->zone; /* * CNAME : nothing else than RRSIG & NSEC */ /* record counts for ... (can overlap) */ u32 not_cname_rrsig_nsec = 0; u32 not_ns_ds_nsec_rrsig = 0; u32 not_a_aaaa = 0; u32 a_aaaa = 0; u32 others = 0; /* outside the first 256 types */ u32 soa = 0; u32 nsec = 0; bool ns_points_to_itself = FALSE; ya_result return_value = 0; bool isapex = zone->apex == label; u8 types[32]; /* I only really care about the types < 256, for any other one I'll use a boolean 'others' */ ZEROMEMORY(types, sizeof(types)); zdb_packed_ttlrdata *rrsig = zdb_record_find(&label->resource_record_set, TYPE_RRSIG); // the signing key must be known while(rrsig != NULL) { u16 tag = RRSIG_KEY_TAG(rrsig); zdb_packed_ttlrdata *rrsig_next = rrsig->next; if(!zdb_sanitize_parms_has_key(parms, tag)) { log_warn("signature without key"); struct zdb_ttlrdata rrsig_record = {NULL, rrsig->ttl, ZDB_PACKEDRECORD_PTR_RDATASIZE(rrsig), 0, ZDB_PACKEDRECORD_PTR_RDATAPTR(rrsig)}; zdb_record_delete_exact(&label->resource_record_set, TYPE_RRSIG, &rrsig_record); } rrsig = rrsig_next; } btree_iterator iter; btree_iterator_init(label->resource_record_set, &iter); while(btree_iterator_hasnext(&iter)) { btree_node* node = btree_iterator_next_node(&iter); u16 type = node->hash; zdb_packed_ttlrdata* record_list = (zdb_packed_ttlrdata*)node->data; u32 ttl = record_list->ttl; while((record_list = record_list->next) != NULL) { record_list->ttl = ttl; } if((type & NU16(0xff00)) == 0) { if(type == TYPE_SOA) { soa++; not_cname_rrsig_nsec++; not_ns_ds_nsec_rrsig++; not_a_aaaa++; } else { switch(type) { case TYPE_CNAME: not_ns_ds_nsec_rrsig++; not_a_aaaa++; break; case TYPE_NSEC: nsec++; case TYPE_RRSIG: not_a_aaaa++; break; case TYPE_NS: case TYPE_DS: not_cname_rrsig_nsec++; not_a_aaaa++; break; case TYPE_A: case TYPE_AAAA: not_cname_rrsig_nsec++; not_ns_ds_nsec_rrsig++; a_aaaa++; break; default: not_cname_rrsig_nsec++; not_ns_ds_nsec_rrsig++; not_a_aaaa++; break; } type = ntohs(type); SET_TYPE(type); } } else { others++; } } /* if(nsec > 0) { u32 max = ((zone->apex->flags & ZDB_RR_LABEL_NSEC) == 0)?0:1; if(nsec > max) { return_value |= SANITY_TOOMANYNSEC | SANITY_MUSTDROPZONE; } } */ /* * Too many SOAs or SOAs not at the APEX */ if(soa > 0) { if(!isapex) { return_value |= SANITY_UNEXPECTEDSOA | SANITY_TOOMANYSOA; /* * Remove them all */ zdb_record_delete(&label->resource_record_set, TYPE_SOA); } else { if(soa > 1) { return_value |= SANITY_TOOMANYSOA | SANITY_MUSTDROPZONE; /* * DROP */ } } } if(HAS_TYPE(CNAME_TYPE)) { /* * Cannot accept anything else than RRSIG & NSEC */ if(!isapex) { if(others + not_cname_rrsig_nsec > 0) { return_value |= SANITY_CNAMENOTALONE; /* * What do I remove ? */ } } else { /* * No CNAME at apex */ return_value |= SANITY_UNEXPECTEDCNAME; /* * Remove them all */ zdb_record_delete(&label->resource_record_set, TYPE_CNAME); } /* * Other DNS record types, such as NS, MX, PTR, SRV, etc. that point to other names should never point to a CNAME alias. * => insanely expensive to test */ } if(HAS_TYPE(DS_TYPE)) { if(!isapex) { /* * MUST have an NS with a DS */ if(!HAS_TYPE(NS_TYPE)) { return_value |= SANITY_EXPECTEDNS; zdb_record_delete(&label->resource_record_set, TYPE_DS); } } else { /* * cannot have a DS at apex */ return_value |= SANITY_UNEXPECTEDDS; /* * Remove them all */ zdb_record_delete(&label->resource_record_set, TYPE_DS); } } /* */ if(HAS_TYPE(NS_TYPE)) { /* * Need glue ? * * Has glue ? */ } if(isapex) { /* * supposed to have one NS at apex */ if(!HAS_TYPE(NS_TYPE)) { return_value |= SANITY_EXPECTEDNS; /* * Just report it */ } } else { if(flags & ZDB_RR_LABEL_DELEGATION) { if(HAS_TYPE(NS_TYPE)) { } else { return_value |= SANITY_EXPECTEDNS; } if(a_aaaa > 0 && parent != NULL) { zdb_sanitize_rr_set_useless_glue(zone, label, name, parent); } /* * If we have anything excepct NS DS NSEC RRSIG ... */ if(others + not_ns_ds_nsec_rrsig > 0) { /* * If A/AAAA is all we have */ if(a_aaaa == others + not_ns_ds_nsec_rrsig) { //zdb_packed_ttlrdata* record_list = ns_record_list; zdb_packed_ttlrdata* record_list =zdb_record_find(&label->resource_record_set, TYPE_NS); while(record_list != NULL) { if(dnsname_equals_dnsname_stack(ZDB_PACKEDRECORD_PTR_RDATAPTR(record_list), name)) { ns_points_to_itself = TRUE; break; } record_list = record_list->next; } } if(! ns_points_to_itself) { return_value |= SANITY_TRASHATDELEGATION; } } } else if(flags & ZDB_RR_LABEL_UNDERDELEGATION) { if(a_aaaa > 0 && parent != NULL) { zdb_sanitize_rr_set_useless_glue(zone, label, name, parent); } if(others + not_a_aaaa > 0) { return_value |= SANITY_TRASHUNDERDELEGATION; } } } if(return_value != 0) { return_value |= SANITY_ERROR_BASE; } return return_value; } ya_result zdb_sanitize_rr_set(zdb_zone *zone, zdb_rr_label *label) { zdb_sanitize_parms parms; zdb_sanitize_parms_init(&parms, zone); zdb_sanitize_parms_update_keys(&parms); ya_result return_code = zdb_sanitize_rr_set_ext(&parms, label, NULL, 0, NULL); zdb_sanitize_parms_finalise(&parms); return return_code; } static ya_result zdb_sanitize_rr_label_ext(zdb_sanitize_parms *parms, zdb_rr_label *label, dnsname_stack *name, u16 flags, zdb_rr_label** parent) { /** * * For all labels: check the label is right. * */ ya_result return_value; if((flags & (ZDB_RR_LABEL_DELEGATION|ZDB_RR_LABEL_UNDERDELEGATION)) != 0) { label->flags |= ZDB_RR_LABEL_UNDERDELEGATION; } else { label->flags &= ~ZDB_RR_LABEL_UNDERDELEGATION; } if(parent != NULL) { parent++; *parent = label; } if(FAIL(return_value = zdb_sanitize_rr_set_ext(parms, label, name, label->flags, parent))) { zdb_sanitize_log(name, return_value); if((return_value & SANITY_MUSTDROPZONE) != 0) { /** * Can stop here */ return ERROR; } } u16 shutdown_test_countdown = 1000; dictionary_iterator iter; dictionary_iterator_init(&label->sub, &iter); while(dictionary_iterator_hasnext(&iter)) { zdb_rr_label **sub_labelp = (zdb_rr_label**)dictionary_iterator_next(&iter); dnsname_stack_push_label(name, (*sub_labelp)->name); return_value = zdb_sanitize_rr_label_ext(parms, *sub_labelp, name, label->flags, parent); /* * If this label is under (or at) delegation * For each A/AAAA record * Ensure there are NS at delegation linked to said records. */ dnsname_stack_pop_label(name); if(FAIL(return_value)) { return return_value; } if(--shutdown_test_countdown == 0) { if(dnscore_shuttingdown()) { return STOPPED_BY_APPLICATION_SHUTDOWN; } shutdown_test_countdown = 1000; } } return SUCCESS; } ya_result zdb_sanitize_rr_label(zdb_zone *zone, zdb_rr_label *label, dnsname_stack *name) { zdb_sanitize_parms parms; zdb_sanitize_parms_init(&parms, zone); zdb_sanitize_parms_update_keys(&parms); ya_result return_code = zdb_sanitize_rr_label_ext(&parms, label, name, 0, NULL); zdb_sanitize_parms_finalise(&parms); return return_code; } ya_result zdb_sanitize_rr_label_with_parent(zdb_zone *zone, zdb_rr_label *label, dnsname_stack *name) { zdb_sanitize_parms parms; zdb_sanitize_parms_init(&parms, zone); zdb_sanitize_parms_update_keys(&parms); ya_result return_code = SUCCESS; /* * the parent is at name.size-1 * the zone starts at zone->origin_vector.size + 1 * be sure not to do it at the apex */ if(!ZDB_LABEL_ISAPEX(label)) { // note: int index = zone->origin_vector.size + 1; zdb_rr_label* label_stack[128]; #ifdef DEBUG memset(label_stack, 0xff, sizeof(label_stack)); #endif zdb_rr_label *parent_label = zdb_rr_label_stack_find(zone->apex, name->labels, name->size-1, zone->origin_vector.size + 1); if(parent_label != NULL) { label_stack[0] = NULL; label_stack[1] = parent_label; return_code = zdb_sanitize_rr_label_ext(&parms, label, name, parent_label->flags, &label_stack[1]); } #if DEBUG zdb_rr_label_stack_find(zone->apex, name->labels, name->size-1, zone->origin_vector.size + 1); #endif } else { return_code = zdb_sanitize_rr_label_ext(&parms, label, name, 0, NULL); } zdb_sanitize_parms_finalise(&parms); return return_code; } static ya_result zdb_sanitize_zone_nsec3(zdb_sanitize_parms *parms) { zdb_zone *zone = parms->zone; nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { #if DNSSEC_DEBUGLEVEL>2 u32 nsec3_count = 0; log_debug("dnssec_process_zone_nsec3_body: processing NSEC3 collection"); #endif nsec3_avl_iterator nsec3_items_iter; nsec3_avl_iterator_init(&n3->items, &nsec3_items_iter); if(nsec3_avl_iterator_hasnext(&nsec3_items_iter)) { nsec3_zone_item* first = nsec3_avl_iterator_next_node(&nsec3_items_iter); nsec3_zone_item* item = first; nsec3_zone_item* next; do { if(dnscore_shuttingdown()) { #if DNSSEC_DEBUGLEVEL>2 log_debug("dnssec_process_zone_nsec3_body: STOPPED_BY_APPLICATION_SHUTDOWN"); #endif return STOPPED_BY_APPLICATION_SHUTDOWN; } if(nsec3_avl_iterator_hasnext(&nsec3_items_iter)) { next = nsec3_avl_iterator_next_node(&nsec3_items_iter); } else { next = first; } zdb_packed_ttlrdata *rrsig = item->rrsig; // the signing key must be known while(rrsig != NULL) { u16 tag = RRSIG_KEY_TAG(rrsig); zdb_packed_ttlrdata *rrsig_next = rrsig->next; if(!zdb_sanitize_parms_has_key(parms, tag)) { log_warn("signature without key"); struct zdb_ttlrdata rrsig_record = {NULL, rrsig->ttl, ZDB_PACKEDRECORD_PTR_RDATASIZE(rrsig), 0, ZDB_PACKEDRECORD_PTR_RDATAPTR(rrsig)}; nsec3_zone_item_rrsig_del(item, &rrsig_record); } rrsig = rrsig_next; } item = next; #if DNSSEC_DEBUGLEVEL>2 nsec3_count++; #endif } while(next != first); } /* If there is a first item*/ #if DNSSEC_DEBUGLEVEL>2 log_debug("dnssec_process_zone_nsec3_body: processed NSEC3 collection (%d items)", nsec3_count); #endif n3 = n3->next; } /* while n3 != NULL */ return SUCCESS; } ya_result zdb_sanitize_zone(zdb_zone *zone) { if(zone->apex == NULL) { return ERROR; } zdb_sanitize_parms parms; zdb_sanitize_parms_init(&parms, zone); zdb_sanitize_parms_update_keys(&parms); zdb_rr_label* label_stack[256]; label_stack[0] = NULL; dnsname_stack name; dnsname_to_dnsname_stack(zone->origin, &name); ya_result return_code = zdb_sanitize_rr_label_ext(&parms, zone->apex, &name, 0, label_stack); if(zdb_zone_is_nsec3(zone)) { return_code = zdb_sanitize_zone_nsec3(&parms); } zdb_sanitize_parms_finalise(&parms); return return_code; } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb-zone-path-provider.c0000644000077100007710000000012412650131756023447 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.284344 30 ctime=1454597652.451344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb-zone-path-provider.c0000664000077100007710000002321712650131756023261 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include "dnsdb/zdb-zone-path-provider.h" static ya_result zdb_zone_path_provider_default(const u8* domain_fqdn, char *path_buffer, u32 path_buffer_size, u32 flags); static zdb_zone_path_provider_callback *zdb_zone_path_provider = zdb_zone_path_provider_default; static char *xfr_path = LOCALSTATEDIR "/zones/xfr"; static bool xfr_path_free = FALSE; /** * The hash function that gives a number from an ASCIIZ string * * @param p ASCIIZ string * * @return the hash */ static u32 zdb_zone_path_provider_copy_hash(const u8 *p) { u32 h = 0; u32 c; u8 s = 0; do { c = toupper(*p++); c &= 0x3f; h += c << (s & 15); h += 97; s += 13; } while(c != 0); return h; } /** * * Returns the hashed folder path for a zone. * * @param data_path the target buffer for the data path * @param data_path_size the target buffer size * @param base_data_path the base folder * @param origin the origin of the zone * * @return */ static ya_result zdb_zone_path_provider_get_data_path(char *data_path, u32 data_path_size, const char *base_data_path, const u8 *origin) { u32 h = zdb_zone_path_provider_copy_hash(origin); return snformat(data_path, data_path_size, "%s/%02x/%02x", base_data_path, h & 0xff, (h >> 8) & 0xff); } /** * For backward compatibility * * @param path */ void journal_set_xfr_path(const char *path) { if(xfr_path_free) { free((char*)xfr_path); } if(path == NULL) { xfr_path = LOCALSTATEDIR "/xfr"; xfr_path_free = FALSE; } else { xfr_path = strdup(path); xfr_path_free = TRUE; } } /** * For backward compatibility */ const char* journal_get_xfr_path() { return xfr_path; } static ya_result zdb_zone_path_provider_default(const u8* domain_fqdn, char *path_buffer, u32 path_buffer_size, u32 flags) { ya_result ret; char *suffix = ""; char dir_path[PATH_MAX]; if((flags & ZDB_ZONE_PATH_PROVIDER_RNDSUFFIX) != 0) { flags &= ~ZDB_ZONE_PATH_PROVIDER_RNDSUFFIX; suffix = ".part"; } if(FAIL(ret = zdb_zone_path_provider_get_data_path(dir_path, sizeof(dir_path), xfr_path, domain_fqdn))) // default path provider { return ret; } if((flags & ZDB_ZONE_PATH_PROVIDER_MKDIR) != 0) { flags &= ~ZDB_ZONE_PATH_PROVIDER_MKDIR; if(FAIL(ret = mkdir_ex(dir_path, 0755, 0))) { return ret; } } switch(flags) { case ZDB_ZONE_PATH_PROVIDER_ZONE_FILE: { ret = snformat(path_buffer, path_buffer_size, "%s/%{dnsname}%s", dir_path, domain_fqdn, suffix); break; } case ZDB_ZONE_PATH_PROVIDER_ZONE_PATH: { ret = snformat(path_buffer, path_buffer_size, "%s", dir_path); break; } case ZDB_ZONE_PATH_PROVIDER_DNSKEY_PATH: { ret = snformat(path_buffer, path_buffer_size, "%s/keys", dir_path); break; } default: { ret = ERROR; // no handled flags have been used } } return ret; } /** * Sets the provider. * * @param provider the provider or NULL to reset to the default one. */ void zdb_zone_path_set_provider(zdb_zone_path_provider_callback *provider) { if(provider == NULL) { provider = zdb_zone_path_provider_default; } zdb_zone_path_provider = provider; } /** * * @return */ static ya_result zdb_zone_info_provider_data_default(const u8 *origin, zdb_zone_info_provider_data *data, u32 flags); static zdb_zone_info_provider_callback *zdb_zone_info_provider = zdb_zone_info_provider_data_default; static ya_result zdb_zone_info_provider_data_default(const u8 *origin, zdb_zone_info_provider_data *data, u32 flags) { return FEATURE_NOT_IMPLEMENTED_ERROR; } zdb_zone_path_provider_callback * zdb_zone_path_get_provider() { return zdb_zone_path_provider; } void zdb_zone_info_set_provider(zdb_zone_info_provider_callback *data) { if(data == NULL) { data = zdb_zone_info_provider_data_default; } zdb_zone_info_provider = data; } zdb_zone_info_provider_callback * zdb_zone_info_get_provider() { return zdb_zone_info_provider; } ya_result zdb_zone_info_get_stored_serial(const u8 *origin, u32 *serial) { yassert(origin != NULL); yassert(serial != NULL); zdb_zone_info_provider_data data; ya_result ret; if(ISOK(ret = zdb_zone_info_get_provider()(origin, &data, ZDB_ZONE_INFO_PROVIDER_STORED_SERIAL))) { *serial = data._u32; } return ret; } ya_result zdb_zone_info_get_zone_max_journal_size(const u8 *origin, u32 *size) { yassert(origin != NULL); yassert(size != NULL); zdb_zone_info_provider_data data; data._u64 = *size; // known wire size / 2 ya_result ret; if(ISOK(ret = zdb_zone_info_get_provider()(origin, &data, ZDB_ZONE_INFO_PROVIDER_MAX_JOURNAL_SIZE))) { if(data._u64 > MAX_U32) { data._u64 = MAX_U32; } /// @note THX: here, if data._u64 is < 256*1024, then set to 256*1024 . *size = data._u64; } return ret; } ya_result zdb_zone_info_get_zone_type(const u8 *origin, u8 *zt) { yassert(origin != NULL); yassert(zt != NULL); zdb_zone_info_provider_data data; ya_result ret; if(ISOK(ret = zdb_zone_info_get_provider()(origin, &data, ZDB_ZONE_INFO_PROVIDER_ZONE_TYPE))) { *zt = data._u8; } return ret; } ya_result zdb_zone_info_background_store_zone(const u8 *origin) { yassert(origin != NULL); ya_result ret; ret = zdb_zone_info_get_provider()(origin, NULL, ZDB_ZONE_INFO_PROVIDER_STORE_TRIGGER); return ret; } ya_result zdb_zone_info_store_locked_zone(const u8 *origin) { yassert(origin != NULL); ya_result ret; zdb_zone_info_provider_data already_locked_by; already_locked_by._u8 = 0; ret = zdb_zone_info_get_provider()(origin, &already_locked_by, ZDB_ZONE_INFO_PROVIDER_STORE_NOW); return ret; } ya_result zdb_zone_info_background_store_zone_and_wait_for_serial(const u8 *origin, u32 minimum_serial) { // This mechanism should be improved : the zone should be unlocked, frozen, saved, unfrozen, re-locked yassert(origin != NULL); ya_result ret; ret = zdb_zone_info_get_provider()(origin, NULL, ZDB_ZONE_INFO_PROVIDER_STORE_TRIGGER); if(ISOK(ret)) { u64 start = timeus(); for(;;) { u32 serial; if(FAIL(ret = zdb_zone_info_get_stored_serial(origin, &serial))) { return ret; } if(serial_ge(serial, minimum_serial)) { return SUCCESS; } u64 now = timeus(); if(now < start) { start = now; //clock modified } if(now - start > 1000000) { zdb_zone_info_provider_data already_locked_by; already_locked_by._u8 = 0; if(FAIL(ret = zdb_zone_info_get_provider()(origin, &already_locked_by, ZDB_ZONE_INFO_PROVIDER_STORE_TRIGGER))) { return ret; } } usleep(500000); } } return ret; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_rr_label.c0000644000077100007710000000012412650131756021556 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.417344 30 ctime=1454597652.390344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_rr_label.c0000664000077100007710000007144612650131756021377 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup records_labels Internal functions for the database: zoned resource records label. * @ingroup dnsdb * @brief Internal functions for the database: zoned resource records label. * * Internal functions for the database: zoned resource records label. * * @{ */ #include #include "dnsdb/zdb_types.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_error.h" #include "dnsdb/zdb_listener.h" #include "dnsdb/dictionary.h" static void zdb_rr_label_destroy_callback(dictionary_node* rr_label_record, void* arg); /** * NSEC3: Zone possible * * @note The zdb_rr_label_free functions handles the NSEC3 extension. * */ static inline void zdb_rr_label_free(zdb_zone* zone, zdb_rr_label* label) { dictionary_destroy_ex(&(label)->sub, zdb_rr_label_destroy_callback, zone); zdb_record_destroy(&(label)->resource_record_set); /// @note not an edition, use only for cleanup/delete #ifdef DEBUG #if ZDB_HAS_NSEC_SUPPORT != 0 if((label->flags & ZDB_RR_LABEL_NSEC) != 0) { /* * Here, if there are NSEC nodes pointing to the label they MUST have been destroyed */ #if defined(DEBUG) yassert(label->nsec.nsec.node == NULL); #endif } #endif #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 if((label->flags & ZDB_RR_LABEL_NSEC3) != 0) { /* * Here, if there are NSEC3 nodes pointing to the label they MUST be destroyed */ if(label->nsec.nsec3 != NULL) { yassert(label->nsec.nsec3->self == NULL); yassert(label->nsec.nsec3->star == NULL); ZFREE(label->nsec.nsec3, nsec3_label_extension); // free the nsec3 label extension of the label being freed } } #endif u32 len = label->name[0]; /* get the memory required to store the label name */ len++; u32 pad = (len > 2)?0:2-len; ZFREE_ARRAY(label, sizeof(zdb_rr_label) - 1 + len + pad); } /** * @brief INTERNAL callback */ static void zdb_rr_label_destroy_callback(dictionary_node* rr_label_record, void* zone) { if(rr_label_record == NULL) { return; } zdb_rr_label* rr_label = (zdb_rr_label*)rr_label_record; /* detach is made by destroy */ /* dictionary destroy will take every item in the dictionary and * iterate through it calling the passed function. * * Maybe I should use the iterator directly instead. */ zdb_rr_label_free((zdb_zone*)zone, rr_label); // valid call because in a delete } /** * @brief INTERNAL callback */ /* NSEC3: Zone possible */ static int zdb_rr_label_zlabel_match(const void* label, const dictionary_node* node) { const zdb_rr_label* rr_label = (const zdb_rr_label*)node; return dnslabel_equals(rr_label->name, label); } zdb_rr_label* zdb_rr_label_new_instance(const u8* label_name) { zdb_rr_label* rr_label; u32 len = label_name[0]; /* get the memory required to store the label name */ len++; u32 pad = (len > 2)?0:2-len; ZALLOC_ARRAY_OR_DIE(zdb_rr_label*, rr_label, sizeof(zdb_rr_label) - 1 + len + pad, ZDB_RRLABEL_TAG); #ifdef DEBUG memset(rr_label, 0xac, sizeof(zdb_rr_label) - 1 + len); #endif rr_label->name[1] = (u8)0xee; // this slot is guaranteed by pad, and used by the wild card 16 bits test // specifically written a byte here avoid a valgrind check // (otherwise harmless : 8 bytes are allocated at least, no overrun is possible) MEMCOPY(rr_label->name, label_name, len); rr_label->next = NULL; btree_init(&rr_label->resource_record_set); dictionary_init(&rr_label->sub); rr_label->flags = 0; #if ZDB_HAS_DNSSEC_SUPPORT != 0 /* I have to clean this pointer, the caller will be responsible * for setting it up. */ rr_label->nsec.dnssec = NULL; #endif return rr_label; } /** * @brief INTERNAL callback */ static dictionary_node* zdb_rr_label_create_callback(const void* data) { zdb_rr_label* rr_label = zdb_rr_label_new_instance((const u8*)data); return (dictionary_node*)rr_label; } /** * @brief Destroys an rr label and its contents * * Destroys an rr label and its contents * * @param[in] zone_labep a pointer to a pointer to the label to destroy * */ /* NSEC3: Zone possible */ void zdb_rr_label_destroy(zdb_zone* zone, zdb_rr_label** rr_labelp) { yassert(rr_labelp != NULL); zdb_rr_label *rr_label = *rr_labelp; if(rr_label != NULL) { zdb_rr_label_free(zone, rr_label); // valid call because in a delete *rr_labelp = NULL; } } /** * @brief Destroys an rr label and its contents * * Destroys an rr label and its contents * * @param[in] zone_labep a pointer to a pointer to the label to destroy * */ /* NSEC3: Zone possible */ void zdb_rr_label_truncate(zdb_zone* zone, zdb_rr_label* rr_label) { if(rr_label != NULL) { dictionary_destroy_ex(&rr_label->sub, zdb_rr_label_destroy_callback, zone); zdb_record_destroy(&rr_label->resource_record_set); /// @note not an edition, use only for cleanup/delete } } /** * @brief Finds the resource record label matching a path of labels starting from another rr label * * Finds the resource record label matching a path of labels starting from another rr label * Typically the starting label is a zone cut. * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[in] path_index the index of the top of the stack * * @return the matching label or NULL if it has not been found */ zdb_rr_label* zdb_rr_label_find_exact(zdb_rr_label* apex, dnslabel_vector_reference sections, s32 index) { zdb_rr_label* rr_label = apex; /* the zone cut */ /* look into the sub level*/ while(rr_label != NULL && index >= 0) { u8* label = sections[index]; hashcode hash = hash_dnslabel(label); rr_label = (zdb_rr_label*)dictionary_find(&rr_label->sub, hash, label, zdb_rr_label_zlabel_match); index--; } return rr_label; } zdb_rr_label* zdb_rr_label_find_child(zdb_rr_label* parent, const u8* dns_label) { hashcode hash = hash_dnslabel(dns_label); zdb_rr_label *rr_label = (zdb_rr_label*)dictionary_find(&parent->sub, hash, dns_label, zdb_rr_label_zlabel_match); return rr_label; } zdb_rr_label* zdb_rr_label_stack_find(zdb_rr_label* apex, dnslabel_stack_reference sections, s32 pos, s32 index) { zdb_rr_label* rr_label = apex; /* the zone cut */ /* look into the sub level*/ while(rr_label != NULL && index <= pos) { u8* label = sections[index]; hashcode hash = hash_dnslabel(label); rr_label = (zdb_rr_label*)dictionary_find(&rr_label->sub, hash, label, zdb_rr_label_zlabel_match); index++; } return rr_label; } /** * @brief Finds the resource record label matching a path of labels starting from another rr label or the wildcard label * * Finds the resource record label matching a path of labels starting from another rr label or the wildcard label * Typically the starting label is a zone cut. * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[in] path_index the index of the top of the stack * * @return the matching label, the * label or NULL if none of them has not been found */ #if 1 zdb_rr_label* zdb_rr_label_find(zdb_rr_label* apex, dnslabel_vector_reference sections, s32 index) { yassert(apex != NULL); zdb_rr_label* rr_label = apex; /* the zone cut */ /* look into the sub level*/ while(index >= 0) { u8* label = sections[index]; hashcode hash = hash_dnslabel(label); zdb_rr_label* sub_rr_label = (zdb_rr_label*)dictionary_find(&rr_label->sub, hash, label, zdb_rr_label_zlabel_match); if(sub_rr_label == NULL) { /* If the label does not exist BUT we got a wildcard, THEN it is what we are looking for */ if((rr_label->flags & ZDB_RR_LABEL_GOT_WILD) != 0) { rr_label = (zdb_rr_label*)dictionary_find(&rr_label->sub, WILD_HASH, (void*)WILD_LABEL, zdb_rr_label_zlabel_match); return rr_label; } return sub_rr_label; /* NULL */ } rr_label = sub_rr_label; index--; } return rr_label; } #else zdb_rr_label* zdb_rr_label_find(zdb_rr_label* apex, dnslabel_vector_reference label_sections, s32 index) { yassert(apex != NULL); zdb_rr_label* rr_label = apex; /* the zone cut */ /* look into the sub level*/ u8** section = &label_sections[index]; while(section >= label_sections) { u8* label = *section--; hashcode hash = hash_dnslabel(label); zdb_rr_label* sub_rr_label = (zdb_rr_label*)dictionary_find(&rr_label->sub, hash, label, zdb_rr_label_zlabel_match); if(sub_rr_label == NULL) { if((rr_label->flags & ZDB_RR_LABEL_GOT_WILD) != 0) { rr_label = (zdb_rr_label*)dictionary_find(&rr_label->sub, WILD_HASH, (void*)WILD_LABEL, zdb_rr_label_zlabel_match); return rr_label; } return sub_rr_label; } rr_label = sub_rr_label; } return rr_label; } #endif zdb_rr_label* zdb_rr_label_find_from_name(zdb_rr_label* apex, const u8 *fqdn) { s32 top; dnslabel_vector name; top = dnsname_to_dnslabel_vector(fqdn, name); zdb_rr_label *label = zdb_rr_label_find(apex, name, top); return label; } zdb_rr_label* zdb_rr_label_find_ext(zdb_rr_label* apex, dnslabel_vector_reference sections, s32 index_, zdb_rr_label_find_ext_data *ext) { yassert(apex != NULL && sections != NULL); s32 index = index_; zdb_rr_label* rr_label = apex; /* the zone cut */ zdb_rr_label* authority = apex; zdb_rr_label* closest = apex; s32 authority_index = index_ + 1; s32 closest_index = index_ + 1; /* look into the sub level*/ while(index >= 0) { u8* label = sections[index]; hashcode hash = hash_dnslabel(label); rr_label = (zdb_rr_label*)dictionary_find(&rr_label->sub, hash, label, zdb_rr_label_zlabel_match); if(rr_label == NULL) { /* If the label does not exist BUT we got a wildcard, THEN it is what we are looking for */ if((closest->flags & ZDB_RR_LABEL_GOT_WILD) != 0) { /* got it all anyway, from previous node ... */ rr_label = (zdb_rr_label*)dictionary_find(&closest->sub, WILD_HASH, (void*)WILD_LABEL, zdb_rr_label_zlabel_match); closest_index = 0; } break; } if((rr_label->flags & ZDB_RR_LABEL_DELEGATION) != 0) { authority = rr_label; authority_index = index; } closest = rr_label; closest_index = index; index--; } ext->authority = authority; ext->closest = closest; ext->answer = rr_label; ext->authority_index = authority_index; ext->closest_index = closest_index; return rr_label; } /** * @brief Adds the resource record label matching a path of labels starting from another rr label * * Adds the resource record label matching a path of labels starting from another rr label * Typically the starting label is a zone cut. * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[in] path_index the index of the top of the stack * * @return the matching label or NULL if it has not been found */ zdb_rr_label* zdb_rr_label_add(zdb_zone* zone, dnslabel_vector_reference labels, s32 labels_top) { zdb_rr_label* rr_label = zone->apex; /* the zone cut */ /* look into the sub level*/ u16 or_flags = 0; while(labels_top >= 0) { u8* label = labels[labels_top]; hashcode hash = hash_dnslabel(label); /* If the current label is '*' (wild) then the parent is marked as owner of a wildcard. */ if(IS_WILD_LABEL(label)) { rr_label->flags |= ZDB_RR_LABEL_GOT_WILD; } rr_label = (zdb_rr_label*)dictionary_add(&rr_label->sub, hash, label, zdb_rr_label_zlabel_match, zdb_rr_label_create_callback); rr_label->flags |= or_flags; if((rr_label->flags & ZDB_RR_LABEL_DELEGATION) != 0) { /* the next one down is under a delegation */ or_flags = ZDB_RR_LABEL_UNDERDELEGATION; } labels_top--; } return rr_label; } /* once */ typedef struct zdb_rr_label_delete_record_process_callback_args zdb_rr_label_delete_record_process_callback_args; struct zdb_rr_label_delete_record_process_callback_args { dnslabel_vector_reference sections; zdb_zone* zone; s32 top; u16 type; }; /** * @brief INTERNAL callback */ static ya_result zdb_rr_label_delete_record_process_callback(void* a, dictionary_node* node) { yassert(node != NULL); zdb_rr_label* rr_label = (zdb_rr_label*)node; zdb_rr_label_delete_record_process_callback_args* args = (zdb_rr_label_delete_record_process_callback_args*)a; /* * a points to a kind of dnsname and we are going in * * we go down and down each time calling the dictionnary process for the next level * * at the last level we return the "delete" code * * from there, the dictionnary processor will remove the entry * * at that point the calling dictionnary will know if he has to delete his node or not * * and so on and so forth ... * */ s32 top = args->top; u8* label = (u8*)args->sections[top]; if(!dnslabel_equals(rr_label->name, label)) { return COLLECTION_PROCESS_NEXT; } /* match */ if(top > 0) { /* go to the next level */ label = args->sections[--args->top]; hashcode hash = hash_dnslabel(label); ya_result err; if((err = dictionary_process(&rr_label->sub, hash, args, zdb_rr_label_delete_record_process_callback)) == COLLECTION_PROCESS_DELETENODE) { /* check the node for relevance, return "delete" if irrelevant */ if(RR_LABEL_IRRELEVANT(rr_label)) { zdb_rr_label_free(args->zone, rr_label); // valid call because in a delete return COLLECTION_PROCESS_DELETENODE; } /* If the label just removed is a wildcard, then the parent is marked as not having a wildcard. */ if(IS_WILD_LABEL(label)) { rr_label->flags &= ~ZDB_RR_LABEL_GOT_WILD; } return COLLECTION_PROCESS_STOP; } /* or ... stop */ return err; } /* We are at the right place for the record */ #if ZDB_CHANGE_FEEDBACK_SUPPORT != 0 zdb_listener_notify_remove_type(args->zone, args->sections[args->top], &rr_label->resource_record_set, args->type); #endif ya_result err; if(ISOK(err = zdb_record_delete(&rr_label->resource_record_set, args->type))) /* FB done */ { if(RR_LABEL_RELEVANT(rr_label)) { /* If the type was NS, clear the delegation flag */ u16 clear_mask = 0; switch(args->type) { case TYPE_NS: clear_mask = ~ZDB_RR_LABEL_DELEGATION; // will clear "delegation" break; case TYPE_CNAME: clear_mask = ~ZDB_RR_LABEL_HASCNAME; // will clear "has cname" break; case TYPE_ANY: clear_mask = ~(ZDB_RR_LABEL_DELEGATION|ZDB_RR_LABEL_DROPCNAME|ZDB_RR_LABEL_HASCNAME); // will clear "delegation", "drop cname" and "has cname" break; case TYPE_RRSIG: case TYPE_NSEC: break; default: // checks if there are any other types than CNAME, RRSIG and NSEC, clears DROPCNAME if it's true clear_mask = ~ZDB_RR_LABEL_DROPCNAME; // will clear "drop cname" break; } rr_label->flags &= clear_mask; // clears the bits using the mask return COLLECTION_PROCESS_STOP; } /* NOTE: the 'detach' is made by destroy : do not touch to the "next" field */ /* NOTE: the freee of the node is made by destroy : do not do it */ /* dictionary destroy will take every item in the dictionary and * iterate through it calling the passed function. */ zdb_rr_label_free(args->zone, rr_label); // valid call because in a delete return COLLECTION_PROCESS_DELETENODE; } return err /*COLLECTION_PROCESS_RETURNERROR*/; } /** * @brief Deletes the resource record of the given type on the label matching a path of labels starting from another rr label * * Deletes the resource record of the given type on the label matching a path of labels starting from another rr label * Typically the starting label is a zone cut. * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[in] path_index the index of the top of the stack * * @return the matching label or NULL if it has not been found */ ya_result zdb_rr_label_delete_record(zdb_zone* zone, dnslabel_vector_reference path, s32 path_index, u16 type) { yassert(zone != NULL && path != NULL && path_index >= -1); zdb_rr_label* apex = zone->apex; if(apex == NULL) { return ZDB_ERROR_DELETEFROMEMPTY; } if(path_index < 0) { #if ZDB_CHANGE_FEEDBACK_SUPPORT != 0 zdb_listener_notify_remove_type(zone, path[0], &apex->resource_record_set, type); #endif if(ISOK(zdb_record_delete(&apex->resource_record_set, type))) /* FB done, APEX : no delegation */ { return ZDB_RR_LABEL_DELETE_NODE; } return ZDB_ERROR_KEY_NOTFOUND; } zdb_rr_label_delete_record_process_callback_args args; args.sections = path; args.zone = zone; args.top = path_index; args.type = type; hashcode hash = hash_dnslabel(args.sections[args.top]); ya_result err; if((err = dictionary_process(&apex->sub, hash, &args, zdb_rr_label_delete_record_process_callback)) == COLLECTION_PROCESS_DELETENODE) { if(RR_LABEL_IRRELEVANT(apex)) { zdb_rr_label_free(zone, apex); // valid call because in a delete zone->apex = NULL; return ZDB_RR_LABEL_DELETE_TREE; } /* If the label just removed is a wildcard, then the parent is marked as not having a wildcard. */ if(IS_WILD_LABEL(args.sections[args.top])) { apex->flags &= ~ZDB_RR_LABEL_GOT_WILD; } return ZDB_RR_LABEL_DELETE_NODE; } return err; } typedef struct zdb_rr_label_delete_record_exact_process_callback_args zdb_rr_label_delete_record_exact_process_callback_args; struct zdb_rr_label_delete_record_exact_process_callback_args { dnslabel_vector_reference sections; zdb_ttlrdata* ttlrdata; zdb_zone* zone; s32 top; u16 type; u8 flags; }; /** * @brief INTERNAL callback */ /* NSEC3: Zone possible */ static ya_result zdb_rr_label_delete_record_exact_process_callback(void* a, dictionary_node* node) { yassert(node != NULL); zdb_rr_label* rr_label = (zdb_rr_label*)node; zdb_rr_label_delete_record_exact_process_callback_args* args = (zdb_rr_label_delete_record_exact_process_callback_args*)a; /* * a points to a kind of dnsname and we are going in * * we go down and down each time calling the dictionnary process for the next level * * at the last level we return the "delete" code * * from there, the dictionnary processor will remove the entry * * at that point the calling dictionnary will know if he has to delete his node or not * * and so on and so forth ... * */ s32 top = args->top; u8* label = (u8*)args->sections[top]; if(!dnslabel_equals(rr_label->name, label)) { return COLLECTION_PROCESS_NEXT; } /* match */ if(top > 0) { /* go to the next level */ label = args->sections[--args->top]; hashcode hash = hash_dnslabel(label); ya_result return_code; if((return_code = dictionary_process(&rr_label->sub, hash, args, zdb_rr_label_delete_record_exact_process_callback)) == COLLECTION_PROCESS_DELETENODE) { /* check the node for relevance, return "delete" if irrelevant */ if(RR_LABEL_IRRELEVANT(rr_label)) { zdb_rr_label_free(args->zone, rr_label); // valid call because in a delete args->flags |= 2; return COLLECTION_PROCESS_DELETENODE; } /* If the label just removed is a wildcard, then the parent is marked as not having a wildcard. */ if(IS_WILD_LABEL(label)) { rr_label->flags &= ~ZDB_RR_LABEL_GOT_WILD; } return COLLECTION_PROCESS_STOP; } /* or ... stop */ return return_code; } /* We are at the right place for the record */ ya_result delete_return_code; if(ISOK(delete_return_code = zdb_record_delete_exact(&rr_label->resource_record_set, args->type, args->ttlrdata))) /* FB done */ { /* * @NOTE delete_return_code can be either SUCCESS_STILL_RECORDS or SUCCESS_LAST_RECORD */ #if ZDB_CHANGE_FEEDBACK_SUPPORT != 0 zdb_listener_notify_remove_record(args->zone, args->sections[args->top], args->type, args->ttlrdata); #endif if(RR_LABEL_RELEVANT(rr_label)) { /* If the type was XXXX and we deleted the last one the flag may change. * NS => not a delegation anymore * CNAME => no cname anymore * ANY => nothing anymore (and should not be relevant anymore either ...) */ if(delete_return_code == SUCCESS_LAST_RECORD) { u16 clear_mask = ~0; switch(args->type) { case TYPE_NS: clear_mask = ~ZDB_RR_LABEL_DELEGATION; // will clear "delegation" break; case TYPE_CNAME: clear_mask = ~ZDB_RR_LABEL_HASCNAME; // will clear "has cname" break; case TYPE_ANY: clear_mask = ~(ZDB_RR_LABEL_DELEGATION|ZDB_RR_LABEL_DROPCNAME|ZDB_RR_LABEL_HASCNAME); // will clear "delegation", "drop cname" and "has cname" break; case TYPE_RRSIG: case TYPE_NSEC: break; default: // checks if there are any other types than CNAME, RRSIG and NSEC, clears DROPCNAME if it's true clear_mask = ~ZDB_RR_LABEL_DROPCNAME; // will clear "drop cname" break; } rr_label->flags &= clear_mask; } return COLLECTION_PROCESS_STOP; } /* NOTE: the 'detach' is made by destroy : do not touch to the "next" field */ /* NOTE: the free of the node is made by destroy : do not do it */ /* dictionary destroy will take every item in the dictionary and * iterate through it calling the passed function. */ zdb_rr_label_free(args->zone, rr_label); // valid call because in a delete args->flags |= 1; return COLLECTION_PROCESS_DELETENODE; } return delete_return_code /*COLLECTION_PROCESS_RETURNERROR*/; } /** * @brief Deletes the resource record of the given type, ttl and rdata on the label matching a path of labels starting from another rr label * * Deletes the resource record of the given type, ttl and rdata on the label matching a path of labels starting from another rr label * Typically the starting label is a zone cut. * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[in] path_index the index of the top of the stack * * @return the matching label or NULL if it has not been found */ /* NSEC3: Zone possible */ ya_result zdb_rr_label_delete_record_exact(zdb_zone* zone, dnslabel_vector_reference path, s32 path_index, u16 type, zdb_ttlrdata* ttlrdata) { zdb_rr_label* apex = zone->apex; if(apex == NULL) { return ZDB_ERROR_DELETEFROMEMPTY; } /* Are we working on the apex ? */ if(path_index < 0) { if(ISOK(zdb_record_delete_exact(&apex->resource_record_set, type, ttlrdata))) /* FB done, APEX : no delegation */ { #if ZDB_CHANGE_FEEDBACK_SUPPORT != 0 zdb_listener_notify_remove_record(zone, path[0], type, ttlrdata); #endif if(RR_LABEL_IRRELEVANT(apex)) { zdb_rr_label_free(zone, apex); // valid call because in a delete zone->apex = NULL; return ZDB_RR_LABEL_DELETE_TREE; } return ZDB_RR_LABEL_DELETE_NODE; } return ZDB_ERROR_KEY_NOTFOUND; } /* We are not working on the apex */ zdb_rr_label_delete_record_exact_process_callback_args args; args.sections = path; args.ttlrdata = ttlrdata; args.zone = zone; args.top = path_index; args.type = type; args.flags = 0; hashcode hash = hash_dnslabel(args.sections[args.top]); ya_result err; err = dictionary_process(&apex->sub, hash, &args, zdb_rr_label_delete_record_exact_process_callback); if(ISOK(err)) // == COLLECTION_PROCESS_DELETENODE { if(err == COLLECTION_PROCESS_DELETENODE) { if(RR_LABEL_IRRELEVANT(apex)) { zdb_rr_label_free(zone, apex); // valid call because in a delete zone->apex = NULL; return COLLECTION_PROCESS_DELETENODE; } /* If the label just removed is a wildcard, then the parent is marked as not having a wildcard. */ if(IS_WILD_LABEL(args.sections[args.top])) { apex->flags &= ~ZDB_RR_LABEL_GOT_WILD; } } /* If the label just removed is a wildcard, then the parent is marked as not having a wildcard. */ if(args.flags & 1) { return COLLECTION_PROCESS_DELETENODE; // LEAF } else { return COLLECTION_PROCESS_STOP; } } return err; } #ifdef DEBUG void zdb_rr_label_print_indented(zdb_rr_label* rr_label, output_stream *os, int indent) { osformatln(os, "%tl: '%{dnslabel}'(%u) #[%08x]", indent, rr_label->name, rr_label->flags, hash_dnslabel(rr_label->name)); indent++; zdb_record_print_indented(rr_label->resource_record_set, os, indent); dictionary_iterator iter; dictionary_iterator_init(&rr_label->sub, &iter); while(dictionary_iterator_hasnext(&iter)) { zdb_rr_label** sub_labelp = (zdb_rr_label**)dictionary_iterator_next(&iter); zdb_rr_label_print_indented(*sub_labelp, os, indent); } } void zdb_rr_label_print(zdb_rr_label* rr_label, output_stream *os) { zdb_rr_label_print_indented(rr_label, os, 0); } #endif yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb-zone-arc.c0000644000077100007710000000012412650131756021430 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.470344 30 ctime=1454597652.409344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb-zone-arc.c0000664000077100007710000003654112650131756021246 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #ifdef DEBUG #include #endif #include #include #include #include "dnsdb/zdb.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb-zone-garbage.h" #include "dnsdb/zdb_zone_label.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_error.h" #include "dnsdb/dnsrdata.h" #include "dnsdb/zdb_listener.h" #if ZDB_HAS_NSEC_SUPPORT != 0 #include "dnsdb/nsec.h" #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 #include "dnsdb/nsec3.h" #endif #ifdef DEBUG #define ZONE_MUTEX_LOG 1 // set this to 0 to disable in DEBUG #define DEBUG_ARC 1 // set this to 0 do disable in DEBUG #else #define ZONE_MUTEX_LOG 0 // never enable if not in DEBUG #define DEBUG_ARC 0 // never enable if not in DEBUG #endif extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #if DEBUG_ARC static inline bool zdb_zone_change_rc(zdb_zone *zone, s32 n, const char * txt) { char prefix[64]; int old_rc = zone->rc; int new_rc = old_rc + n; log_debug7("%s: %p going from %i to %i", txt, zone, old_rc, new_rc); snformat(prefix, sizeof(prefix), "%s: %p", txt, zone); debug_log_stacktrace(g_database_logger, MSG_DEBUG7, prefix); zone->rc = new_rc; if(new_rc == 0) { log_debug7("%s: good for the garbage", txt); } return new_rc == 0; } #define ZONE_RC_INC(zone_) zdb_zone_change_rc(zone_, 1, "rc++") #define ZONE_RC_DEC(zone_) zdb_zone_change_rc(zone_, -1, "rc--") #else #define ZONE_RC_INC(zone_) (++(zone_)->rc) #define ZONE_RC_DEC(zone_) ((--(zone_)->rc) == 0) #endif /** * * Locks the database * Gets the zone * Starts locking the zone for the owner * Increment the zone RC * Unlocks the database * Resume locking the zone for the owner * returns the locked zone * * @param db * @param exact_match_origin * @param owner * @return */ static inline zdb_zone * zdb_acquire_zone_resume_lock_from_label(zdb *db, const zdb_zone_label *label, u8 owner, u8 db_locktype) { yassert(zdb_islocked(db)); if(label != NULL && label->zone != NULL) { zdb_zone *zone = label->zone; mutex_t *mutex = &zone->lock_mutex; mutex_lock(mutex); zdb_unlock(db, db_locktype); ZONE_RC_INC(zone); for(;;) { /* A simple way to ensure that a lock can be shared by similar entities or not. Sharable entities have their msb off. */ u8 co = zone->lock_owner & 0x7f; if(co == GROUP_MUTEX_NOBODY || co == owner) { yassert(zone->lock_count != 255); zone->lock_owner = owner & 0x7f; zone->lock_count++; break; } cond_wait(&zone->lock_cond, mutex); } mutex_unlock(mutex); return zone; } else { zdb_unlock(db, db_locktype); return NULL; } } static inline zdb_zone * zdb_acquire_zone_resume_trylock_from_label(zdb *db, const zdb_zone_label *label, u8 owner, u8 db_locktype) { yassert(zdb_islocked(db)); if(label != NULL && label->zone != NULL) { zdb_zone *zone = label->zone; mutex_t *mutex = &zone->lock_mutex; mutex_lock(mutex); zdb_unlock(db, db_locktype); /* A simple way to ensure that a lock can be shared by similar entities or not. Sharable entities have their msb off. */ u8 co = zone->lock_owner & 0x7f; if(co == GROUP_MUTEX_NOBODY || co == owner) { yassert(zone->lock_count != 255); zone->lock_owner = owner & 0x7f; zone->lock_count++; ZONE_RC_INC(zone); mutex_unlock(mutex); return zone; } else { mutex_unlock(mutex); return NULL; } } else { zdb_unlock(db, db_locktype); return NULL; } } static inline zdb_zone * zdb_acquire_zone_resume_double_lock_from_label(zdb *db, const zdb_zone_label *label, u8 owner, u8 nextowner, u8 db_locktype) { yassert(zdb_islocked(db)); if(label != NULL && label->zone != NULL) { zdb_zone *zone = label->zone; mutex_t *mutex = &zone->lock_mutex; mutex_lock(mutex); zdb_unlock(db, db_locktype); ZONE_RC_INC(zone); for(;;) { /* A simple way to ensure that a lock can be shared by similar entities or not. Sharable entities have their msb off. */ u8 so = zone->lock_reserved_owner & 0x7f; if(so == ZDB_ZONE_MUTEX_NOBODY || so == nextowner) { u8 co = zone->lock_owner & 0x7f; if(co == ZDB_ZONE_MUTEX_NOBODY || co == owner) { yassert(zone->lock_count != 255); zone->lock_owner = owner & 0x7f; zone->lock_count++; zone->lock_reserved_owner = nextowner & 0x7f; #if ZONE_MUTEX_LOG log_debug7("acquired lock for zone %{dnsname}@%p for %x (#%i)", zone->origin, zone, owner, zone->lock_count); #endif break; } } cond_wait(&zone->lock_cond, mutex); } mutex_unlock(mutex); return zone; } else { zdb_unlock(db, db_locktype); return NULL; } } zdb_zone * zdb_acquire_zone_read(zdb *db, dnsname_vector *exact_match_origin) { zdb_lock(db, ZDB_MUTEX_READER); zdb_zone_label *label = zdb_zone_label_find(db, exact_match_origin); if(label != NULL && label->zone != NULL) { zdb_zone *zone = label->zone; mutex_t *mutex = &zone->lock_mutex; mutex_lock(mutex); zdb_unlock(db, ZDB_MUTEX_READER); ZONE_RC_INC(zone); mutex_unlock(mutex); return zone; } else { zdb_unlock(db, ZDB_MUTEX_READER); return NULL; } } zdb_zone * zdb_acquire_zone_read_from_fqdn(zdb *db, const u8 *fqdn) { zdb_lock(db, ZDB_MUTEX_READER); zdb_zone_label *label = zdb_zone_label_find_from_dnsname(db, fqdn); if(label != NULL && label->zone != NULL) { zdb_zone *zone = label->zone; mutex_t *mutex = &zone->lock_mutex; mutex_lock(mutex); zdb_unlock(db, ZDB_MUTEX_READER); ZONE_RC_INC(zone); mutex_unlock(mutex); return zone; } else { zdb_unlock(db, ZDB_MUTEX_READER); return NULL; } } zdb_zone * zdb_acquire_zone_read_trylock(zdb *db, dnsname_vector *exact_match_origin, u8 owner) { zdb_lock(db, ZDB_MUTEX_READER); zdb_zone_label *label = zdb_zone_label_find(db, exact_match_origin); zdb_zone *zone = zdb_acquire_zone_resume_trylock_from_label(db, label, owner, ZDB_MUTEX_READER); return zone; } zdb_zone * zdb_acquire_zone_read_trylock_from_name(zdb *db, const char *name, u8 owner) { zdb_lock(db, ZDB_MUTEX_READER); zdb_zone_label *label = zdb_zone_label_find_from_name(db, name); zdb_zone *zone = zdb_acquire_zone_resume_trylock_from_label(db, label, owner, ZDB_MUTEX_READER); return zone; } zdb_zone * zdb_acquire_zone_read_trylock_from_fqdn(zdb *db, const u8 *fqdn, u8 owner) { zdb_lock(db, ZDB_MUTEX_READER); zdb_zone_label *label = zdb_zone_label_find_from_dnsname(db, fqdn); zdb_zone *zone = zdb_acquire_zone_resume_trylock_from_label(db, label, owner, ZDB_MUTEX_READER); return zone; } zdb_zone * zdb_acquire_zone_read_lock(zdb *db, dnsname_vector *exact_match_origin, u8 owner) { zdb_lock(db, ZDB_MUTEX_READER); zdb_zone_label *label = zdb_zone_label_find(db, exact_match_origin); zdb_zone *zone = zdb_acquire_zone_resume_lock_from_label(db, label, owner, ZDB_MUTEX_READER); return zone; } zdb_zone * zdb_acquire_zone_read_lock_from_name(zdb *db, const char *name, u8 owner) { zdb_lock(db, ZDB_MUTEX_READER); zdb_zone_label *label = zdb_zone_label_find_from_name(db, name); zdb_zone *zone = zdb_acquire_zone_resume_lock_from_label(db, label, owner, ZDB_MUTEX_READER); return zone; } zdb_zone * zdb_acquire_zone_read_lock_from_fqdn(zdb *db, const u8 *fqdn, u8 owner) { zdb_lock(db, ZDB_MUTEX_READER); zdb_zone_label *label = zdb_zone_label_find_from_dnsname(db, fqdn); zdb_zone *zone = zdb_acquire_zone_resume_lock_from_label(db, label, owner, ZDB_MUTEX_READER); return zone; } zdb_zone * zdb_acquire_zone_write_lock(zdb *db, dnsname_vector *exact_match_origin, u8 owner) { zdb_lock(db, ZDB_MUTEX_WRITER); zdb_zone_label *label = zdb_zone_label_find(db, exact_match_origin); zdb_zone *zone = zdb_acquire_zone_resume_lock_from_label(db, label, owner, ZDB_MUTEX_WRITER); return zone; } zdb_zone * zdb_acquire_zone_write_lock_from_name(zdb *db, const char *name, u8 owner) { zdb_lock(db, ZDB_MUTEX_WRITER); zdb_zone_label *label = zdb_zone_label_find_from_name(db, name); zdb_zone *zone = zdb_acquire_zone_resume_lock_from_label(db, label, owner, ZDB_MUTEX_WRITER); return zone; } zdb_zone * zdb_acquire_zone_write_lock_from_fqdn(zdb *db, const u8 *fqdn, u8 owner) { zdb_lock(db, ZDB_MUTEX_WRITER); zdb_zone_label *label = zdb_zone_label_find_from_dnsname(db, fqdn); zdb_zone *zone = zdb_acquire_zone_resume_lock_from_label(db, label, owner, ZDB_MUTEX_WRITER); return zone; } zdb_zone * zdb_acquire_zone_read_double_lock(zdb *db, dnsname_vector *exact_match_origin, u8 owner, u8 nextowner) { zdb_lock(db, ZDB_MUTEX_READER); zdb_zone_label *label = zdb_zone_label_find(db, exact_match_origin); zdb_zone *zone = zdb_acquire_zone_resume_double_lock_from_label(db, label, owner, nextowner, ZDB_MUTEX_READER); return zone; } zdb_zone * zdb_acquire_zone_read_double_lock_from_name(zdb *db, const char *name, u8 owner, u8 nextowner) { zdb_lock(db, ZDB_MUTEX_READER); zdb_zone_label *label = zdb_zone_label_find_from_name(db, name); zdb_zone *zone = zdb_acquire_zone_resume_double_lock_from_label(db, label, owner, nextowner, ZDB_MUTEX_READER); return zone; } zdb_zone * zdb_acquire_zone_read_double_lock_from_fqdn(zdb *db, const u8 *fqdn, u8 owner, u8 nextowner) { zdb_lock(db, ZDB_MUTEX_READER); zdb_zone_label *label = zdb_zone_label_find_from_dnsname(db, fqdn); zdb_zone *zone = zdb_acquire_zone_resume_double_lock_from_label(db, label, owner, nextowner, ZDB_MUTEX_READER); return zone; } void zdb_zone_acquire(zdb_zone *zone) { mutex_lock(&zone->lock_mutex); ZONE_RC_INC(zone); mutex_unlock(&zone->lock_mutex); } /** * * Dereference and unlocks the zone. * If the RC reached 0, enqueues it for destruction * * @param zone * @param owner */ void zdb_zone_release(zdb_zone *zone) { mutex_lock(&zone->lock_mutex); if(ZONE_RC_DEC(zone)) { zdb_zone_garbage_collect(zone); // zone mutex locked, as MUST be } mutex_unlock(&zone->lock_mutex); } void zdb_zone_release_unlock(zdb_zone *zone, u8 owner) { #if ZONE_MUTEX_LOG log_debug7("releasing lock for zone %{dnsname}@%p by %x (owned by %x)", zone->origin, zone, owner, zone->lock_owner); #endif mutex_lock(&zone->lock_mutex); #ifdef DEBUG if((zone->lock_owner != (owner & 0x7f)) || (zone->lock_count == 0)) { mutex_unlock(&zone->lock_mutex); yassert(zone->lock_owner == (owner & 0x7f)); yassert(zone->lock_count != 0); } #endif zone->lock_count--; #if ZONE_MUTEX_LOG log_debug7("released lock for zone %{dnsname}@%p by %x (#%i)", zone->origin, zone, owner, zone->lock_count); #endif if(zone->lock_count == 0) { zone->lock_owner = ZDB_ZONE_MUTEX_NOBODY; cond_notify(&zone->lock_cond); } if(ZONE_RC_DEC(zone)) { zdb_zone_garbage_collect(zone); // zone mutex locked, as MUST be } mutex_unlock(&zone->lock_mutex); } void zdb_zone_release_double_unlock(zdb_zone *zone, u8 owner, u8 nextowner) { mutex_lock(&zone->lock_mutex); #ifdef DEBUG if((zone->lock_owner != (owner & 0x7f)) || (zone->lock_count == 0)) { mutex_unlock(&zone->lock_mutex); yassert(zone->lock_owner == (owner & 0x7f)); yassert(zone->lock_count != 0); } if(zone->lock_reserved_owner != (nextowner & 0x7f)) { mutex_unlock(&zone->lock_mutex); yassert(zone->lock_reserved_owner != (nextowner & 0x7f)); } #endif zone->lock_reserved_owner = ZDB_ZONE_MUTEX_NOBODY; --zone->lock_count; #if ZONE_MUTEX_LOG log_debug7("released lock for zone %{dnsname}@%p by %x (#%i)", zone->origin, zone, owner, zone->lock_count); #endif if(zone->lock_count == 0) { zone->lock_owner = ZDB_ZONE_MUTEX_NOBODY; cond_notify(&zone->lock_cond); } if(ZONE_RC_DEC(zone)) { #if !DEBUG_ARC #ifdef DEBUG debug_log_stacktrace(MODULE_MSG_HANDLE, MSG_DEBUG6, "GC: "); #endif #endif zdb_zone_garbage_collect(zone); // zone mutex locked, as MUST be } mutex_unlock(&zone->lock_mutex); } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec.c0000644000077100007710000000012412650131756020065 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.437344 30 ctime=1454597652.554344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec.c0000664000077100007710000007560612650131756017710 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec NSEC functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include "dnscore/ptr_set.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_zone_label_iterator.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_listener.h" #include "dnsdb/rrsig.h" #include "dnsdb/nsec.h" #include "dnsdb/nsec_common.h" #include "dnsdb/zdb_zone.h" /* Note : (rfc 4034) Because every authoritative name in a zone must be part of the NSEC chain, NSEC RRs must be present for names containing a CNAME RR. This is a change to the traditional DNS specification [RFC1034], which stated that if a CNAME is present for a name, it is the only type allowed at that name. An RRSIG (see Section 3) and NSEC MUST exist for the same name as does a CNAME resource record in a signed zone. ... A sender MUST NOT use DNS name compression on the Next Domain Name field when transmitting an NSEC RR. ... Owner names of RRsets for which the given zone is not authoritative (such as glue records) MUST NOT be listed in the Next Domain Name unless at least one authoritative RRset exists at the same owner name. */ /* * The NSEC processing must be done AFTER the RRSIG one * * Assuming there are no NSEC: * * _ Explore the zone * _ Canonize names * _ Build NSEC records * _ NSEC records have to be found quicky * _ The NSEC records are either in an array, either double-linked-listed * * Label => find the nsec record * Label => NSEC HASH => find the nsec record * * If there are NSEC records ... * * (dyn-)adding a record means adding/changing a/the NSEC record * (dyn-)removing a record means removing/changing a/the NSEC record * * What's the most efficient way to do all this ? * * First issue : canonization. * --------------------------- * * The ordering of the name is by label depth. * So the best way I can think of is to sort the actual labels in the database. * But this is not possible. Records are ordered by an hash. This is one of * most important parts of the architecture. * * Still I have to have order, so it means that for each label I have to have * a sorted (canization-wise) array for the sub-labels. * * This means a new pointer for each label in a NSEC(3) zone (ARGH) * (zdb_rr_label) * * For the eu-zone and its 3M names, we are speaking of an overhead of 24MB * (64 bits) * * Ok, I can still live with that ... * * Could I also make it so that this pointer only exists in nsec-zones ? * No. Because it means that an operation on the zone would basically require * a dup and complex size checks. I don't think it's reasonable. * * * The NSEC record is stored with other records. * The NSEC3 is not stored with other records. * */ /* NSEC: * * At zone apex ... * * For each label * If there are sub-labels * Get the sub-labels. * Canonize them. * Chain them, keep the chain. * Create the NSEC record. * Insert/Update the NSEC record in the label. * Sign the NSEC record. * * The chain contains a link to the NSEC and the RRSIG * * Recurse on sub-sub-label * */ #define MODULE_MSG_HANDLE g_dnssec_logger extern logger_handle *g_dnssec_logger; /* * New version of the NSEC handling * * Take all records * Prepare an NSEC record for them (using AVL) * For each entry in the AVL * if the entry matches keep its signature and go to the next entry * if the entry does not matches remove the old one and its signature and schedule for a new signature * */ static int nsec_update_zone_count = 0; ya_result nsec_update_zone(zdb_zone *zone, bool read_only) // read_only a.k.a slave { nsec_node *nsec_tree = NULL; nsec_node *first_node; nsec_node *node; u8 *prev_name; u8 *name; soa_rdata soa; u32 missing_nsec_records = 0; u32 sibling_count = 0; u32 nsec_under_delegation = 0; ya_result return_code; u8 name_buffer[2][MAX_DOMAIN_LENGTH]; u8 inverse_name[MAX_DOMAIN_LENGTH]; u8 tmp_bitmap[256 * (1 + 1 + 32)]; /* 'max window count' * 'max window length' */ if(FAIL(return_code = zdb_zone_getsoa(zone, &soa))) { return return_code; } #ifdef DEBUG memset(name_buffer, 0xde, sizeof(name_buffer)); #endif name = name_buffer[0]; prev_name = name_buffer[1]; zdb_zone_label_iterator label_iterator; zdb_zone_label_iterator_init(zone, &label_iterator); while(zdb_zone_label_iterator_hasnext(&label_iterator)) { zdb_zone_label_iterator_nextname(&label_iterator, name); zdb_rr_label* label = zdb_zone_label_iterator_next(&label_iterator); if(zdb_rr_label_is_glue(label) || (label->resource_record_set == NULL)) { // we are under a delegation or on an empty (non-terminal) // there should not be an NSEC record here zdb_packed_ttlrdata *nsec_record; if((nsec_record = zdb_record_find(&label->resource_record_set, TYPE_NSEC)) != NULL) { nsec_under_delegation++; log_err("nsec: %{dnsname}: unexpected NSEC record under a delegation", name); } continue; } nsec_inverse_name(inverse_name, name); nsec_node *node = nsec_avl_insert(&nsec_tree, inverse_name); node->label = label; label->nsec.nsec.node = node; } /* * Now that we have the NSEC chain */ type_bit_maps_context tbmctx; nsec_avl_iterator nsec_iter; nsec_avl_iterator_init(&nsec_tree, &nsec_iter); if(nsec_avl_iterator_hasnext(&nsec_iter)) { first_node = nsec_avl_iterator_next_node(&nsec_iter); node = first_node; do { nsec_node *next_node; nsec_update_zone_count++; if(nsec_avl_iterator_hasnext(&nsec_iter)) { next_node = nsec_avl_iterator_next_node(&nsec_iter); } else { next_node = first_node; } /* * Compute the type bitmap */ zdb_rr_label *label = node->label; u32 tbm_size = type_bit_maps_initialize(&tbmctx, label, TRUE, TRUE); type_bit_maps_write(tmp_bitmap, &tbmctx); u8 *tmp_name = prev_name; prev_name = name; name = tmp_name; nsec_inverse_name(name, next_node->inverse_relative_name); /* * Get the NSEC record */ zdb_packed_ttlrdata *nsec_record; if((nsec_record = zdb_record_find(&label->resource_record_set, TYPE_NSEC)) != NULL) { /* * has record -> compare the type and the nsec next * if something does not match remove the record and its signature (no record) * */ if(nsec_record->next == NULL) // should only be one record => delete all if not the case (the rrsig is lost anyway) { const u8 *rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(nsec_record); const u16 size = ZDB_PACKEDRECORD_PTR_RDATASIZE(nsec_record); const u16 dname_len = dnsname_len(rdata); if(dname_len < size) { const u8 *type_bitmap = &rdata[dname_len]; /* * check the type bitmap */ if(memcmp(tmp_bitmap, type_bitmap, size - dname_len) == 0) { /* * check the nsec next */ if(dnsname_equals(rdata, name)) { /* All good */ label->flags |= ZDB_RR_LABEL_NSEC; node = next_node; continue; } else // else the "next fqdn" do not match (this is irrecoverable for a slave) { rdata_desc nsec_desc = {TYPE_NSEC, size, rdata}; log_debug("nsec: %{dnsname}: src: %{dnsname} %{typerdatadesc} next field do not match expected value (%{dnsname})", zone->origin, prev_name, &nsec_desc, name); } } else // else the type bitmap do not match (this is wrong) { rdata_desc nsec_desc = {TYPE_NSEC, size, rdata}; log_debug("nsec: %{dnsname}: src: %{dnsname} %{typerdatadesc} types map do not match expected value", zone->origin, prev_name, &nsec_desc); } } else // else the "next fqdn" do not match (early test, this is irrecoverable for a slave) { rdata_desc nsec_desc = {TYPE_NSEC, size, rdata}; log_debug("nsec: %{dnsname}: src: %{dnsname} %{typerdatadesc} next field do not match expected value (%{dnsname})", zone->origin, prev_name, &nsec_desc, name); } } else { sibling_count++; log_warn("nsec: %{dnsname}: %{dnsname}: multiple NSEC records where only one is expected", zone->origin, prev_name); } // wrong NSEC RRSET zdb_packed_ttlrdata *nsec_rec = nsec_record; do { zdb_ttlrdata unpacked_ttlrdata; unpacked_ttlrdata.ttl = nsec_rec->ttl; unpacked_ttlrdata.rdata_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(nsec_rec); unpacked_ttlrdata.rdata_pointer = ZDB_PACKEDRECORD_PTR_RDATAPTR(nsec_rec); rdata_desc nsec_desc = {TYPE_NSEC, unpacked_ttlrdata.rdata_size, unpacked_ttlrdata.rdata_pointer}; if(!read_only) { log_warn("nsec: %{dnsname}: del: %{dnsname} %{typerdatadesc}", zone->origin, prev_name, &nsec_desc); zdb_listener_notify_remove_record(zone, name, TYPE_NSEC, &unpacked_ttlrdata); } else { log_err("nsec: %{dnsname}: got: %{dnsname} %{typerdatadesc}", zone->origin, prev_name, &nsec_desc); } nsec_rec = nsec_rec->next; } while(nsec_rec != NULL); if(!read_only) { zdb_record_delete(&label->resource_record_set, TYPE_NSEC); rrsig_delete(zone, name, label, TYPE_NSEC); nsec_record = NULL; } } /* * no record -> create one and schedule a signature (MASTER ONLY) */ if(nsec_record == NULL) { missing_nsec_records++; zdb_packed_ttlrdata *nsec_record; u16 dname_len = nsec_inverse_name(name, next_node->inverse_relative_name); u16 rdata_size = dname_len + tbm_size; ZDB_RECORD_ZALLOC_EMPTY(nsec_record, soa.minimum, rdata_size); u8* rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(nsec_record); memcpy(rdata, name, dname_len); rdata += dname_len; memcpy(rdata, tmp_bitmap, tbm_size); rdata_desc nsec_desc = {TYPE_NSEC, ZDB_PACKEDRECORD_PTR_RDATASIZE(nsec_record), ZDB_PACKEDRECORD_PTR_RDATAPTR(nsec_record)}; if(!read_only) { zdb_record_insert(&label->resource_record_set, TYPE_NSEC, nsec_record); log_warn("nsec: %{dnsname}: add: %{dnsname} %{typerdatadesc}", zone->origin, prev_name, &nsec_desc); /* * Schedule a signature */ } else { log_warn("nsec: %{dnsname}: need: %{dnsname} %{typerdatadesc}", zone->origin, prev_name, &nsec_desc); ZDB_RECORD_ZFREE(nsec_record); } } label->flags |= ZDB_RR_LABEL_NSEC; node = next_node; } while(node != first_node); } zone->nsec.nsec = nsec_tree; if(read_only) { if(missing_nsec_records + sibling_count + nsec_under_delegation) { log_err("nsec: missing records: %u, nsec with siblings: %u, nsec under delegation: %u", missing_nsec_records, sibling_count, nsec_under_delegation); return DNSSEC_ERROR_NSEC_INVALIDZONESTATE; } } else { if(missing_nsec_records + sibling_count + nsec_under_delegation) { log_warn("nsec: missing records: %u, nsec with siblings: %u, nsec under delegation: %u", missing_nsec_records, sibling_count, nsec_under_delegation); } } return SUCCESS; } /** * Reverses the labels of the fqdn * * @param inverse_name * @param name * @return * * 3 www 5 eurid 2 eu 0 * * 3 5 2 0 */ u32 nsec_inverse_name(u8 *inverse_name, const u8 *name) { dnslabel_vector labels; s32 vtop = dnsname_to_dnslabel_vector(name, labels); u32 ret = dnslabel_stack_to_dnsname(labels, vtop, inverse_name); return ret; } /** * Verifies and, if needed, update the NSEC record. * There WILL be an NSEC record in the label at the end of the call. * It does NOT create the NSEC node (needs it created already). * It does NOT check for the relevancy of the NSEC record. * * @param label * @param node * @param next_node * @param name * @param ttl * @return */ bool nsec_update_label_record(zdb_zone *zone, zdb_rr_label *label, nsec_node *node, nsec_node *next_node, u8 *name) { type_bit_maps_context tbmctx; u8 tmp_bitmap[256 * (1 + 1 + 32)]; /* 'max window count' * 'max window length' */ u32 tbm_size = type_bit_maps_initialize(&tbmctx, label, TRUE, TRUE); u32 ttl = zone->min_ttl; type_bit_maps_write(tmp_bitmap, &tbmctx); /* * Get the NSEC record */ zdb_packed_ttlrdata *nsec_record; if((nsec_record = zdb_record_find(&label->resource_record_set, TYPE_NSEC)) != NULL) { /* * has record -> compare the type and the nsec next * if something does not match remove the record and its signature (no record) * */ log_debug("nsec_update_label_record: [%{dnsname}] %{dnsname} (=> %{dnsname}) updating record.", name, node->inverse_relative_name, next_node->inverse_relative_name); /* * If there is more than one record, clean-up */ if(nsec_record->next == NULL) { u8* rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(nsec_record); u16 size = ZDB_PACKEDRECORD_PTR_RDATASIZE(nsec_record); u16 dname_len = dnsname_len(rdata); if(dname_len < size) { u8* type_bitmap = &rdata[dname_len]; /* * check the type bitmap */ if(memcmp(tmp_bitmap, type_bitmap, size - dname_len) == 0) { /* * check the nsec next */ if(dnsname_equals(rdata, name)) { /* All good */ return FALSE; } } } } if(zdb_listener_notify_enabled()) { zdb_packed_ttlrdata *nsec_rec = nsec_record; do { zdb_ttlrdata unpacked_ttlrdata; unpacked_ttlrdata.ttl = nsec_rec->ttl; unpacked_ttlrdata.rdata_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(nsec_rec); unpacked_ttlrdata.rdata_pointer = ZDB_PACKEDRECORD_PTR_RDATAPTR(nsec_rec); zdb_listener_notify_remove_record(zone, name, TYPE_NSEC, &unpacked_ttlrdata); nsec_rec = nsec_rec->next; } while(nsec_rec != NULL); } zdb_record_delete(&label->resource_record_set, TYPE_NSEC); rrsig_delete(zone, name, label, TYPE_NSEC); nsec_record = NULL; } /* * no record -> create one and schedule a signature */ if(nsec_record == NULL) { zdb_packed_ttlrdata *nsec_record; u8 next_name[256]; log_debug("nsec_update_label_record: [%{dnsname}] %{dnsname} (=> %{dnsname}) building new record.", name, node->inverse_relative_name, next_node->inverse_relative_name); u16 dname_len = nsec_inverse_name(next_name, next_node->inverse_relative_name); u16 rdata_size = dname_len + tbm_size; ZDB_RECORD_ZALLOC_EMPTY(nsec_record, ttl, rdata_size); u8* rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(nsec_record); memcpy(rdata, next_name, dname_len); rdata += dname_len; memcpy(rdata, tmp_bitmap, tbm_size); zdb_record_insert(&label->resource_record_set, TYPE_NSEC, nsec_record); if(zdb_listener_notify_enabled()) { dnsname_vector name_path; zdb_ttlrdata unpacked_ttlrdata; unpacked_ttlrdata.ttl = ttl; unpacked_ttlrdata.rdata_size = rdata_size; unpacked_ttlrdata.rdata_pointer = ZDB_PACKEDRECORD_PTR_RDATAPTR(nsec_record); dnsname_to_dnsname_vector(name, &name_path); zdb_listener_notify_add_record(zone, name_path.labels, name_path.size, TYPE_NSEC, &unpacked_ttlrdata); } /* * Schedule a signature */ } label->flags |= ZDB_RR_LABEL_NSEC; return TRUE; } /** * Creates the NSEC node, link it to the label. * * @param zone * @param label * @param labels * @param labels_top * @return */ nsec_node * nsec_update_label_node(zdb_zone* zone, zdb_rr_label* label, dnslabel_vector_reference labels, s32 labels_top) { u8 inverse_name[MAX_DOMAIN_LENGTH]; dnslabel_stack_to_dnsname(labels, labels_top, inverse_name); nsec_node *node = nsec_avl_insert(&zone->nsec.nsec, inverse_name); node->label = label; label->nsec.nsec.node = node; log_debug("nsec_update_label_node: %{dnsname}", node->inverse_relative_name); return node; } /** * * Unlink the NSEC node from the label, then deletes said node from the chain. * * @param zone * @param label * @param labels * @param labels_top * @return */ bool nsec_delete_label_node(zdb_zone* zone, zdb_rr_label* label, dnslabel_vector_reference labels, s32 labels_top) { u8 inverse_name[MAX_DOMAIN_LENGTH]; dnslabel_stack_to_dnsname(labels, labels_top, inverse_name); nsec_node *node = nsec_avl_find(&zone->nsec.nsec, inverse_name); if(node != NULL) { node->label->nsec.nsec.node = NULL; node->label = NULL; nsec_avl_delete(&zone->nsec.nsec, inverse_name); log_debug("nsec_delete_label_node: %{dnsname}", inverse_name); return TRUE; } else { log_debug("nsec_delete_label_node: %{dnsname} has not been found", inverse_name); return FALSE; } } /** * Creates the NSEC node, creates or update the NSEC record * * @param zone * @param label * @param labels * @param labels_top */ void nsec_update_label(zdb_zone* zone, zdb_rr_label* label, dnslabel_vector_reference labels, s32 labels_top) { //soa_rdata soa; u8 name[MAX_DOMAIN_LENGTH]; //zdb_zone_getsoa(zone, &soa); /* Create or get the node */ nsec_node *node = nsec_update_label_node(zone, label, labels, labels_top); /* Get the next node */ nsec_node *next_node = nsec_avl_node_mod_next(node); dnslabel_vector_to_dnsname(labels, labels_top, name); nsec_update_label_record(zone, label, node, next_node, name); } void nsec_destroy_zone(zdb_zone *zone) { nsec_avl_iterator iter; nsec_avl_iterator_init(&zone->nsec.nsec,&iter); while(nsec_avl_iterator_hasnext(&iter)) { nsec_node *node = nsec_avl_iterator_next_node(&iter); node->label->nsec.nsec.node = NULL; node->label->flags &= ~ZDB_RR_LABEL_NSEC; } nsec_avl_destroy(&zone->nsec.nsec); } /**/ void nsec_icmtl_replay_init(nsec_icmtl_replay *replay, zdb_zone *zone) { ZEROMEMORY(replay, sizeof(nsec_icmtl_replay)); replay->nsec_add.compare = ptr_set_dnsname_node_compare; replay->nsec_del.compare = ptr_set_dnsname_node_compare; replay->zone = zone; } static void nsec3_icmtl_destroy_nsec(ptr_set *tree) { if(!ptr_set_avl_isempty(tree)) { ptr_set_avl_iterator n3p_avl_iter; ptr_set_avl_iterator_init(tree, &n3p_avl_iter); while(ptr_set_avl_iterator_hasnext(&n3p_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&n3p_avl_iter); free(node->key); node->key = NULL; node->value = NULL; } ptr_set_avl_destroy(tree); } } void nsec_icmtl_replay_destroy(nsec_icmtl_replay *replay) { nsec3_icmtl_destroy_nsec(&replay->nsec_add); nsec3_icmtl_destroy_nsec(&replay->nsec_del); replay->zone = NULL; } void nsec_icmtl_replay_nsec_del(nsec_icmtl_replay *replay, const u8* fqdn) { ptr_node *node = ptr_set_avl_insert(&replay->nsec_del, (u8*)fqdn); node->key = dnsname_dup(fqdn); node->value = NULL; } void nsec_icmtl_replay_nsec_add(nsec_icmtl_replay *replay, const u8* fqdn) { ptr_node *node = ptr_set_avl_insert(&replay->nsec_add, (u8*)fqdn); node->key = dnsname_dup(fqdn); node->value = NULL; } void nsec_icmtl_replay_execute(nsec_icmtl_replay *replay) { if(!ptr_set_avl_isempty(&replay->nsec_del)) { /* stuff to delete */ ptr_set_avl_iterator ts_avl_iter; ptr_set_avl_iterator_init(&replay->nsec_del, &ts_avl_iter); while(ptr_set_avl_iterator_hasnext(&ts_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&ts_avl_iter); u8 *fqdn = (u8*)node->key; log_debug("icmtl replay: NSEC: post/del %{dnsname}", fqdn); ptr_node *add_node; if((add_node = ptr_set_avl_find(&replay->nsec_add, fqdn)) != NULL) { /* * del and add => nothing to do (almost) * * NOTE: I have to ensure that the label link is right (if the label has ENTIERLY been destroyed, * then re-made, this will break) */ log_debug("icmtl replay: NSEC: upd %{dnsname}", fqdn); /* * */ u8* add_key = add_node->key; ptr_set_avl_delete(&replay->nsec_add, fqdn); free(add_key); } else { log_debug("icmtl replay: NSEC: del %{dnsname}", fqdn); /* * The node has to be deleted */ dnslabel_vector labels; s32 labels_top = dnsname_to_dnslabel_vector(fqdn, labels); ya_result err; zdb_rr_label* label = zdb_rr_label_find_exact(replay->zone->apex, labels, labels_top); if(label != NULL) { nsec_delete_label_node(replay->zone, label, labels, labels_top); if(RR_LABEL_IRRELEVANT(label)) { if(FAIL(err = zdb_rr_label_delete_record(replay->zone, labels, labels_top, TYPE_ANY))) { log_err("icmtl replay: NSEC: %r", err); } } } else { log_err("icmtl replay: NSEC: %{dnsname} not found in zone !", fqdn); } } free(fqdn); } ptr_set_avl_destroy(&replay->nsec_del); } if(!ptr_set_avl_isempty(&replay->nsec_add)) { /* stuff to add */ ptr_set_avl_iterator ts_avl_iter; ptr_set_avl_iterator_init(&replay->nsec_add, &ts_avl_iter); while(ptr_set_avl_iterator_hasnext(&ts_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&ts_avl_iter); u8 *fqdn = (u8*)node->key; log_debug("icmtl replay: NSEC: add %{dnsname}", fqdn); /* * The node must be added. It should not exist already. * After all changes (del/upd/add) all the added records should be matched again (check) */ dnslabel_vector labels; s32 labels_top = dnsname_to_dnslabel_vector(fqdn, labels); zdb_rr_label* label = zdb_rr_label_find_exact(replay->zone->apex, labels, labels_top - replay->zone->origin_vector.size - 1); if(label != NULL) { nsec_update_label_node(replay->zone, label, labels, labels_top); } else { log_err("icmtl replay: NSEC: %{dnsname} not found in zone !!", fqdn);; } free(fqdn); } ptr_set_avl_destroy(&replay->nsec_add); } } /** * * Find the label that has got the right NSEC interval for "nextname" * * @param zone * @param name_vector * @param dname_out * @return */ zdb_rr_label * nsec_find_interval(const zdb_zone *zone, const dnsname_vector *name_vector, u8 **out_dname_p, u8 * restrict * pool) { u8 dname_inverted[MAX_DOMAIN_LENGTH]; dnslabel_stack_to_dnsname(name_vector->labels, name_vector->size, dname_inverted); nsec_node *node = nsec_avl_find_interval_start(&zone->nsec.nsec, dname_inverted); u8 *out_dname = *pool; *out_dname_p = out_dname; u32 out_dname_len = nsec_inverse_name(out_dname, node->inverse_relative_name); *pool += ALIGN16(out_dname_len); return node->label; } /* void nsec_find_interval_and_wild(zdb_zone *zone, const dnsname_vector *name_vector, zdb_rr_label **label, u8 *dname_out, zdb_rr_label **wild_label, u8 *wild_dname_out) { u8 dname_inverted[MAX_DOMAIN_LENGTH + 2]; s32 len = dnslabel_stack_to_dnsname(name_vector->labels, name_vector->size, dname_inverted); nsec_node *node = nsec_avl_find_interval_start(&zone->nsec.nsec, dname_inverted); nsec_inverse_name(dname_out, node->inverse_relative_name); dname_inverted[len-1] = (u8)1; dname_inverted[len+0] = (u8)'*'; dname_inverted[len+1] = (u8)0; nsec_node *wild_node = nsec_avl_find_interval_start(&zone->nsec.nsec, dname_inverted); if(wild_node != node) { nsec_inverse_name(wild_dname_out, wild_node->inverse_relative_name); } *label = node->label; *wild_label = wild_node->label; } */ void nsec_name_error(const zdb_zone* zone, const dnsname_vector *name, s32 closest_index, u8 * restrict * pool, u8 **out_encloser_nsec_name_p, zdb_rr_label **out_encloser_nsec_label, u8 **out_wild_encloser_nsec_name_p, zdb_rr_label **out_wildencloser_nsec_label ) { u32 len; u8 dname_inverted[MAX_DOMAIN_LENGTH + 2]; dnslabel_stack_to_dnsname(name->labels, name->size, dname_inverted); nsec_node *node = nsec_avl_find_interval_start(&zone->nsec.nsec, dname_inverted); u8 *out_encloser_nsec_name = *pool; *out_encloser_nsec_name_p = out_encloser_nsec_name; len = nsec_inverse_name(out_encloser_nsec_name, node->inverse_relative_name); *pool += ALIGN16(len); dnslabel_stack_to_dnsname(&name->labels[closest_index], name->size - closest_index, dname_inverted); nsec_node *wild_node = nsec_avl_find_interval_start(&zone->nsec.nsec, dname_inverted); if(wild_node != node) { u8 *out_wild_encloser_nsec_name = *pool; *out_wild_encloser_nsec_name_p = out_wild_encloser_nsec_name; len = nsec_inverse_name(out_wild_encloser_nsec_name, wild_node->inverse_relative_name); *pool += ALIGN16(len); } *out_encloser_nsec_label = node->label; *out_wildencloser_nsec_label = wild_node->label; } void nsec_logdump_tree(zdb_zone *zone) { log_debug("dumping zone %{dnsname} nsec tree", zone->origin); nsec_avl_iterator iter; nsec_avl_iterator_init(&zone->nsec.nsec, &iter); while(nsec_avl_iterator_hasnext(&iter)) { nsec_node *node = nsec_avl_iterator_next_node(&iter); log_debug("%{dnsname}", node->inverse_relative_name); } log_debug("done dumping zone %{dnsname} nsec tree", zone->origin); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/xfr_copy.c0000644000077100007710000000012412650131756020766 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.438344 30 ctime=1454597652.359344534 yadifa-2.1.6-5826/lib/dnsdb/src/xfr_copy.c0000664000077100007710000001306712650131756020602 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup ### ####### * @ingroup dnscore * @brief * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include "dnsdb/zdb-zone-path-provider.h" #include "dnsdb/xfr_copy.h" /* it depends if host is DARWIN or LINUX */ #ifdef HAVE_SYS_SYSLIMITS_H #include #elif HAVE_LINUX_LIMITS_H #include #endif /* HAVE_SYS_SYSLIMITS_H */ extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger static ya_result xfr_copy_create_file(output_stream *xfrs, char *file_path, u32 file_path_len, const char* data_path, const u8 *origin, u32 serial) // should be temp { ya_result ret; yassert(xfrs != NULL); if(ISOK(ret = zdb_zone_path_get_provider()( origin, file_path, file_path_len, ZDB_ZONE_PATH_PROVIDER_AXFR_FILE|ZDB_ZONE_PATH_PROVIDER_RNDSUFFIX|ZDB_ZONE_PATH_PROVIDER_MKDIR))) { if(ISOK(ret = file_output_stream_create(file_path, 0644, xfrs))) { return ret; } } /* * We finally can create the file */ ret = file_output_stream_create(file_path, 0644, xfrs); /* * Do NOT use buffers yet. */ return ret; } ya_result xfr_delete_axfr(const u8 *origin) { ya_result ret; char file_path[PATH_MAX]; if(ISOK(ret = zdb_zone_path_get_provider()( origin, file_path, sizeof(file_path), ZDB_ZONE_PATH_PROVIDER_AXFR_FILE))) { if(unlink(file_path) < 0) { ret = ERRNO_ERROR; log_err("unlink '%s': %r", file_path, ret); } } return ret; } ya_result xfr_copy(input_stream *xis, const char *base_data_path) { output_stream xos; ya_result ret; char tmp_file_path[PATH_MAX]; char file_path[PATH_MAX]; u8 buffer[1024]; if(ISOK(ret = xfr_copy_create_file(&xos, tmp_file_path, sizeof(tmp_file_path), base_data_path, xfr_input_stream_get_origin(xis), xfr_input_stream_get_serial(xis)))) { buffer_output_stream_init(&xos, &xos, 4096); for(;;) { if(dnscore_shuttingdown()) { ret = STOPPED_BY_APPLICATION_SHUTDOWN; break; } ret = input_stream_read(xis, buffer, sizeof(buffer)); if(ret <= 0) { break; } output_stream_write(&xos, buffer, ret); } output_stream_close(&xos); if(ISOK(ret)) { u16 xfr_type = xfr_input_stream_get_type(xis); //u32 last_serial = xfr_input_stream_get_serial(xis); if(ISOK(ret = zdb_zone_path_get_provider()( xfr_input_stream_get_origin(xis), file_path, sizeof(file_path), ZDB_ZONE_PATH_PROVIDER_AXFR_FILE|ZDB_ZONE_PATH_PROVIDER_MKDIR))) { unlink(file_path); if(rename(tmp_file_path, file_path) < 0) { ret = ERRNO_ERROR; } if(ISOK(ret)) { ret = xfr_type; } } else { log_err("xfr_copy: %r", ret); } } else { unlink(tmp_file_path); } } return ret; } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/htable.c0000644000077100007710000000012412650131756020374 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.327344 30 ctime=1454597652.321344534 yadifa-2.1.6-5826/lib/dnsdb/src/htable.c0000664000077100007710000000613112650131756020202 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Hash-Table structure and functions. * * Implementation of the Hash-Table structure and functions. * It can be configured to be thread-safe. (4 modes) * * It is used in the hash-table of balanced trees structure. (htbt) * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include "dnsdb/htable.h" /** @brief Allocates an hash table of the pre-defined size * * Allocates an hash table of the pre-defined size * * @return A pointer to the htable or NULL if an error occurred */ htable_entry* htable_alloc() { htable_entry *table; MALLOC_OR_DIE(htable_entry*, table, sizeof (htable_entry) * DEFAULT_HTABLE_SIZE, HTABLE_TAG); u32 i; for(i = 0; i < DEFAULT_HTABLE_SIZE; i++) { table[i].data = NULL; } return table; } /** @brief Frees an htable * * Frees an htable * * @param[in] table a pointer to the htable to free * */ void htable_free(htable_entry* table) { yassert(table != NULL); free(table); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb-zone-answer-axfr.c0000644000077100007710000000012412650131756023120 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.461344 30 ctime=1454597652.428344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb-zone-answer-axfr.c0000664000077100007710000010660412650131756022734 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbscheduler Scheduled tasks of the database * @ingroup dnsdb * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include "dnsdb/zdb-config-features.h" #include #include #include #include #include #include #include #include #include #include #include #include "dnsdb/zdb_types.h" #include "dnsdb/zdb-zone-arc.h" #include "dnsdb/zdb-zone-journal.h" #include "dnsdb/zdb_zone_axfr_input_stream.h" #include "dnsdb/zdb-zone-answer-axfr.h" #include "dnsdb/zdb-zone-path-provider.h" #define MODULE_MSG_HANDLE g_database_logger /** * * dig -p 8053 @172.20.1.69 eu AXFR +time=3600 > eu.axfr * * Max dns packet size / Max number of records in each packet / RDATA Compression enabled * * 65535 1 1 * * ;; Query time: 150452 msec * ;; SERVER: 172.20.1.69#8053(172.20.1.69) * ;; WHEN: Thu Dec 24 09:17:57 2009 * ;; XFR size: 6657358 records (messages 6657358, bytes 417268730) * * 65535 65535 0 * * ;; Query time: 82347 msec * ;; SERVER: 172.20.1.69#8053(172.20.1.69) * ;; WHEN: Wed Dec 23 15:31:23 2009 * ;; XFR size: 6657358 records (messages 4141, bytes 271280613) * * 4096 65535 1 * * ;; Query time: 78042 msec * ;; SERVER: 172.20.1.69#8053(172.20.1.69) * ;; WHEN: Thu Dec 24 09:04:54 2009 * ;; XFR size: 6657358 records (messages 44940, bytes 182745973) * * 65535 65535 1 * * ;; Query time: 88954 msec * ;; SERVER: 172.20.1.69#8053(172.20.1.69) * ;; WHEN: Thu Dec 24 09:08:47 2009 * ;; XFR size: 6657358 records (messages 3133, bytes 205197880) * * So it was obvious but the best system is 4K packets without any record count limit and with compression enabled: * * 4096 because compression only covers the first 4K of the packet * no limit because there is no point (1 is supposed to be nicer but at what cost !) * compression enabled because it reduces the bandwidth AND the time * * With buffering enabled this increases to: * * ;; Query time: 20130 msec * ;; SERVER: 172.20.1.69#8053(172.20.1.69) * ;; WHEN: Thu Dec 24 09:48:39 2009 * ;; XFR size: 6657358 records (messages 44940, bytes 182745973) * * The same transfer to another computer (Nicolas') took only 13 seconds with a release build. * */ #define TCP_BUFFER_SIZE 4096 #define FILE_BUFFER_SIZE 4096 #define ZDB_ZONE_AXFR_MINIMUM_DUMP_PERIOD 60 // seconds extern logger_handle* g_database_logger; #ifndef MAX_PATH #define MAX_PATH 4096 #endif typedef struct scheduler_queue_zone_write_axfr_args scheduler_queue_zone_write_axfr_args; struct scheduler_queue_zone_write_axfr_args { zdb_zone *zone; message_data *mesg; struct thread_pool_s *disk_tp; ya_result return_code; u32 packet_size_limit; u32 packet_records_limit; bool compress_dname_rdata; }; typedef struct zdb_zone_answer_axfr_write_file_args zdb_zone_answer_axfr_write_file_args; struct zdb_zone_answer_axfr_write_file_args { output_stream os; // (file) output stream to the AXFR file char *path; char *pathpart; zdb_zone *zone; u32 serial; ya_result return_code; }; static void zdb_zone_answer_axfr_thread_exit(scheduler_queue_zone_write_axfr_args* data) { log_debug("zone write axfr: ended with: %r", data->return_code); zdb_zone_release(data->zone); //free(data->directory); free(data); } static void* zdb_zone_answer_axfr_write_file_thread(void* data_) { zdb_zone_answer_axfr_write_file_args* storage = (zdb_zone_answer_axfr_write_file_args*)data_; // os // zone // serial // *return_code /*-----------------------------------------------------------------------*/ #if OBSOLETE /* * And I do the cleaning here: seek for and destroy all axfr files with an older serial. */ zdb_zone_write_axfr_clean_older(storage->data_path, storage->data->zone, storage->serial); #endif //u64 now = timeus(); buffer_output_stream_init(&storage->os, &storage->os, 4096); // ALEADY LOCKED BY THE CALLER SO NO NEED TO zdb_zone_lock(data->zone, ZDB_ZONE_MUTEX_SIMPLEREADER); #if ZDB_ZONE_KEEP_RAW_SIZE u64 write_start = timeus(); output_stream counter_stream; counter_output_stream_data counter_data; counter_output_stream_init(&storage->os, &counter_stream, &counter_data); storage->return_code = zdb_zone_store_axfr(storage->zone, &counter_stream); zdb_zone_unlock(storage->zone, ZDB_ZONE_MUTEX_SIMPLEREADER); output_stream_flush(&counter_stream); output_stream_close(&counter_stream); output_stream_close(&storage->os); storage->zone->wire_size = counter_data.written_count; storage->zone->write_time_elapsed = timeus() - write_start; #else storage->return_code = zdb_zone_store_axfr(storage->data->zone, &storage->os); zdb_zone_unlock(storage->zone, ZDB_ZONE_MUTEX_SIMPLEREADER); output_stream_close(&storage->os); #endif if(ISOK(storage->return_code)) { log_info("zone write axfr: stored %{dnsname} %d", storage->zone->origin, storage->serial); if(rename(storage->pathpart, storage->path) >= 0) { storage->zone->axfr_timestamp = time(NULL); storage->zone->axfr_serial = storage->serial; } else { // cannot rename error : SERVFAIL storage->zone->axfr_timestamp = 1; storage->return_code = ERRNO_ERROR; log_err("zone write axfr: error renaming '%s' into '%s': %r", storage->pathpart, storage->path, storage->return_code); } } else { log_err("zone write axfr: error writing '%s': %r", storage->pathpart, storage->return_code); // cannot create error : SERVFAIL storage->zone->axfr_timestamp = 1; storage->zone->axfr_serial = storage->serial - 1; } zdb_zone_release(storage->zone); storage->zone = NULL; free(storage->path); free(storage->pathpart); free(storage); return NULL; } static void* zdb_zone_answer_axfr_thread(void* data_) { scheduler_queue_zone_write_axfr_args* data = (scheduler_queue_zone_write_axfr_args*)data_; message_data *mesg = data->mesg; zdb_zone *data_zone = data->zone; // already RCed ... output_stream os; input_stream fis; u64 total_bytes_sent = 0; ya_result ret; u32 serial = 0; u32 now = time(NULL); int tcpfd = data->mesg->sockfd; data->mesg->sockfd = -1; u8 data_zone_origin[MAX_DOMAIN_LENGTH]; char path[MAX_PATH + 8]; //char data_directory[MAX_PATH]; /** * The zone could already be dumping in the disk. * If it's the case, then the dump file needs to be read and sent until marked as "done". */ /* locks the zone for a reader */ #ifdef DEBUG log_debug("zone write axfr: locking for AXFR"); log_debug("zone write axfr: socket is %d", tcpfd); #endif if(tcpfd < 0) { data->return_code = ERROR; log_err("zone write axfr: %{dnsname}: invalid socket", data->zone->origin); zdb_zone_answer_axfr_thread_exit(data); free(mesg); return NULL; } MESSAGE_SET_AR(mesg->buffer, 0); zdb_zone_lock(data_zone, ZDB_ZONE_MUTEX_SIMPLEREADER); if(ZDB_ZONE_INVALID(data_zone)) { zdb_zone_unlock(data_zone, ZDB_ZONE_MUTEX_SIMPLEREADER); log_err("zone write axfr: %{dnsname}: marked as invalid", data_zone->origin); /* @todo send a servfail answer ... */ zdb_zone_answer_axfr_thread_exit(data); close_ex(tcpfd); free(mesg); return NULL; } #ifdef DEBUG log_debug("zone write axfr: checking serial number"); #endif if(FAIL(zdb_zone_getserial(data_zone, &serial))) { /** @todo error other than "does not exists" : SERVFAIL */ zdb_zone_unlock(data_zone, ZDB_ZONE_MUTEX_SIMPLEREADER); // RC decremented log_err("zone write axfr: no SOA in %{dnsname}", data_zone->origin); /* @todo send a servfail answer ... */ zdb_zone_answer_axfr_thread_exit(data); close_ex(tcpfd); free(mesg); return NULL; } u32 packet_size_limit = data->packet_size_limit; if(packet_size_limit < UDPPACKET_MAX_LENGTH) { packet_size_limit = UDPPACKET_MAX_LENGTH; } u32 packet_records_limit = data->packet_records_limit; /* If it is set to 0, it means there is no limit. */ if(packet_records_limit == 0) { packet_records_limit = 0xffffffff; } bool compress_dname_rdata = data->compress_dname_rdata; dnsname_copy(data_zone_origin, data_zone->origin); /* * The zone could be being written to the disk right now. * axfr_timestamp = 0, file exists as a .part (or as a normal file, if race) * * The file could not being written to the disk * axfr_timestamp != 0, file exists as a normal file * axfr_timestamp = 1, no idea of the status * * Whatever of these two, the file existence should be tested * If the file does not exists, it should be dumped * * The file serial on disk may be too old, in that case it should be written again * (too old: time and/or serial increment and/or journal size) * */ for(;;) { if(dnscore_shuttingdown()) { /* Yes, it means there will be a "leak" but the app is shutting down anyway ... */ ret = STOPPED_BY_APPLICATION_SHUTDOWN; zdb_zone_unlock(data_zone, ZDB_ZONE_MUTEX_SIMPLEREADER); // RC decremented log_warn("zone write axfr: %r", ret); /** @todo error other than "does not exists" : SERVFAIL */ data->return_code = ret; data_zone->axfr_timestamp = 1; /* @todo send a servfail answer ... */ zdb_zone_answer_axfr_thread_exit(data); close_ex(tcpfd); free(mesg); return NULL; } // file path and name if(FAIL(ret = zdb_zone_path_get_provider()( data_zone_origin, path, sizeof(path), ZDB_ZONE_PATH_PROVIDER_AXFR_FILE|ZDB_ZONE_PATH_PROVIDER_MKDIR))) { // failed to get the name zdb_zone_unlock(data_zone, ZDB_ZONE_MUTEX_SIMPLEREADER); // RC decremented log_err("zone write axfr: unable to get path for %{dnsname}: %r", data_zone_origin, ret); data->return_code = ret; /* @todo send a servfail answer ... */ zdb_zone_answer_axfr_thread_exit(data); // releases close_ex(tcpfd); free(mesg); return NULL; } u32 axfr_dump_age = (now >= data_zone->axfr_timestamp)?now - data_zone->axfr_timestamp:0; if((data_zone->axfr_serial != serial) && (data_zone->axfr_timestamp != 0) && (axfr_dump_age > ZDB_ZONE_AXFR_MINIMUM_DUMP_PERIOD)) { // the serial on disk is not the one in memory AND it is not being written AND it has been written a sufficient long time ago ... log_debug("AXFR serial = %d, zone serial = %d; AXFR timestamp = %d; last written %d seconds ago", data_zone->axfr_serial, serial, data_zone->axfr_timestamp, axfr_dump_age); unlink(path); // trigger a new update } if(access(path, R_OK | F_OK) >= 0) { // the file seems ok, let's start streaming it ret = zdb_zone_axfr_input_stream_open_with_path(&fis, data_zone, path); if(FAIL(ret)) { // opening failed but it should not have : try again continue; } data->return_code = SUCCESS; log_info("zone write axfr: releasing implicit write lock %{dnsname} %d (should be)", data_zone_origin, serial); zdb_zone_acquire(data_zone); zdb_zone_answer_axfr_thread_exit(data); // WARNING: From this point forward, 'data' cannot be used anymore data = NULL; // This ensures a crash if data is used zdb_zone_release_unlock(data_zone, ZDB_ZONE_MUTEX_SIMPLEREADER); // RC decremented data_zone = NULL; break; } // there is an error accessing the file if(errno != ENOENT) { // the error is not that the file does not exists : give up ret = ERRNO_ERROR; zdb_zone_unlock(data_zone, ZDB_ZONE_MUTEX_SIMPLEREADER); // RC decremented log_err("zone write axfr: error accessing '%s': %r", path, ret); /** @todo error other than "does not exists" : SERVFAIL */ data->return_code = ret; data_zone->axfr_timestamp = 1; /* @todo send a servfail answer ... */ zdb_zone_answer_axfr_thread_exit(data); close_ex(tcpfd); free(mesg); return NULL; } // the file does not exists: maybe the .part does // append ".part" to the name (re tis still the length of the path string) memcpy(&path[ret], ".part", 6); if(data_zone->axfr_timestamp != 0) { // if the part file does exists, it's not expected. // after some race checks, the zone should be written to disk log_info("zone write axfr: storing %{dnsname} %d", data_zone_origin, serial); if(FAIL(ret = file_output_stream_create(path, 0644, &os))) { zdb_zone_unlock(data_zone, ZDB_ZONE_MUTEX_SIMPLEREADER); // RC decremented log_err("zone write axfr: file create error for '%s': %r", path, serial, ret); data->return_code = ret; /** @todo cannot create error : SERVFAIL ? */ zdb_zone_answer_axfr_thread_exit(data); close_ex(tcpfd); free(mesg); return NULL; } /* * Return value check irrelevant here. It can only fail if the filtered stream has a NULL vtbl * This is not the case here since we just opened successfully the file stream. */ data_zone->axfr_timestamp = 0; /* * Now that the file has been created, the background writing thread can be called * the readers will wait "forever" that the file is written but the yneed the file to exist */ zdb_zone_answer_axfr_write_file_args *store_axfr_args; MALLOC_OR_DIE(zdb_zone_answer_axfr_write_file_args*, store_axfr_args, sizeof(zdb_zone_answer_axfr_write_file_args), GENERIC_TAG); store_axfr_args->os = os; store_axfr_args->pathpart = strdup(path); path[strlen(path) - 5] = '\0'; store_axfr_args->path = strdup(path); store_axfr_args->zone = data->zone; store_axfr_args->serial = serial; store_axfr_args->return_code = SUCCESS; /* * This is how it is supposed to be. Double lock, unlocked when the file has been stored. */ zdb_zone_acquire(data_zone); zdb_zone_lock(data_zone, ZDB_ZONE_MUTEX_SIMPLEREADER); // RC was already + 1 by the (async) caller if(data->disk_tp != NULL) { thread_pool_enqueue_call(data->disk_tp, zdb_zone_answer_axfr_write_file_thread, store_axfr_args, NULL, "zone-writer-axfr"); } else { zdb_zone_answer_axfr_write_file_thread(store_axfr_args); } // the file seems ok, let's start streaming it ret = zdb_zone_axfr_input_stream_open_with_path(&fis, data_zone, path); if(FAIL(ret)) { // opening failed but it should not have : try again continue; } data->return_code = SUCCESS; log_debug("zone write axfr: %{dnsname} with serial %d is being written on disk", data_zone_origin, serial); zdb_zone_unlock(data_zone, ZDB_ZONE_MUTEX_SIMPLEREADER); data_zone = NULL; zdb_zone_answer_axfr_thread_exit(data); data = NULL; // This ensures a crash if data is used break; } // .part should exist (except for race) if(access(path, R_OK | F_OK) >= 0) { // the part file does exists: stream it ret = zdb_zone_axfr_input_stream_open_with_path(&fis, data_zone, path); if(FAIL(ret)) { // opening failed but it should not have : try again continue; } data->return_code = SUCCESS; log_info("zone write axfr: releasing implicit write lock %{dnsname} %d (should be)", data_zone_origin, serial); zdb_zone_acquire(data_zone); zdb_zone_answer_axfr_thread_exit(data); /* WARNING: From this point forward, 'data' cannot be used anymore */ data = NULL; /* WITH THIS I ENSURE A CRASH IF I DO NOT RESPECT THE ABOVE COMMENT */ zdb_zone_release_unlock(data_zone, ZDB_ZONE_MUTEX_SIMPLEREADER); // RC decremented data_zone = NULL; break; } if(errno != ENOENT) { // the error is not that the file does not exists : give up ret = ERRNO_ERROR; zdb_zone_unlock(data_zone, ZDB_ZONE_MUTEX_SIMPLEREADER); // RC decremented /** @todo error other than "does not exists" : SERVFAIL */ data->return_code = ERRNO_ERROR; log_err("zone write axfr: error accessing '%s': %r", path, data->return_code); data_zone->axfr_timestamp = 1; /* @todo send a servfail answer ... */ zdb_zone_answer_axfr_thread_exit(data); close_ex(tcpfd); free(mesg); return NULL; } } /* open an xfr stream on it and stream it up to the client */ mesg->size_limit = 0x8000; /** * I should open the file BEFORE releasing the lock. * So every AXFR write request could cleanup the old files without any risk of race * (given that an opened file can be deleted and continue to exist until last accessor * has closed it) */ /* pool for path */ if(FAIL(ret)) /* replaces: if(FAIL(ret = file_input_stream_open(path, &fis))) */ { /** @todo cannot open error : SERVFAIL */ log_err("zone write axfr: error opening '%s': %r", path, ret); close_ex(tcpfd); free(mesg); return NULL; } /* Sends the "Write unlocked" notification */ log_info("zone write axfr: sending AXFR %{dnsname} %d", data_zone_origin, serial); output_stream tcpos; fd_output_stream_attach(&tcpos, tcpfd); buffer_input_stream_init(&fis, &fis, FILE_BUFFER_SIZE); buffer_output_stream_init(&tcpos, &tcpos, TCP_BUFFER_SIZE); MESSAGE_HIFLAGS(mesg->buffer) |= AA_BITS|QR_BITS; MESSAGE_SET_AN(mesg->buffer, NETWORK_ONE_16); packet_writer pw; u32 packet_count = 0; u16 an_records_count = 0; // @TODO: With TSIG enabled this limit will be dynamic and change to a lower bound for every 100th packet #if ZDB_HAS_TSIG_SUPPORT tsig_tcp_message_position pos = TSIG_NOWHERE; #endif packet_writer_init(&pw, mesg->buffer, mesg->received, packet_size_limit); for(;; packet_count--) /* using path as the buffer */ { struct type_class_ttl_rdlen tctrl; ya_result qname_len; ya_result n; /* Read the next DNAME from the stored AXFR */ if(FAIL(qname_len = input_stream_read_dnsname(&fis, (u8*)path))) { log_err("zone write axfr: error reading next record domain: %r", qname_len); /* qname_len is an error code */ break; } /* * NOTE: There cannot be an "EMPTY" AXFR. There is always the origin. So I don't have to * check TSIG for an empty message because there aren't any. */ /* If there are no records anymore */ if(qname_len == 0) { /* If records are still to be sent */ if(an_records_count > 0) { /* Then write them */ if(packet_count == 0) { /* TODO: TSIG: sign the packet*/ packet_count = AXFR_TSIG_PERIOD; // why ? } mesg->send_length = pw.packet_offset; /** @todo: I need to put this in a packet_writer function */ /** @TODO: if we only have 1 packet then we still need to cleanup the message * So a better way to do this is to check if pos is TSIG_START and if it does do the standard TSIG signature. */ MESSAGE_SET_AN(mesg->buffer, htons(an_records_count)); #if ZDB_HAS_TSIG_SUPPORT if(TSIG_ENABLED(mesg)) { mesg->ar_start = &pw.packet[pw.packet_offset]; if(pos != TSIG_START) { ret = tsig_sign_tcp_message(mesg, pos); } else { ret = tsig_sign_answer(mesg); } if(FAIL(ret)) { log_err("zone write axfr: failed to sign the answer: %r", ret); break; } } /* if TSIG_ENABLED */ #endif pw.packet_offset = mesg->send_length; /** @todo: I need to put this in a packet_writer function */ total_bytes_sent += mesg->send_length; if(FAIL(n = write_tcp_packet(&pw, &tcpos))) { log_err("zone write axfr: error sending AXFR packet: %r", n); } an_records_count = 0; } break; /* done */ } /* read the next type+class+ttl+rdatalen from the stored AXFR */ if(FAIL(n = input_stream_read_fully(&fis, &tctrl, 10))) { log_err("zone write axfr: error reading record: %r", n); break; } u16 rdata_len = ntohs(tctrl.rdlen); u32 record_len = qname_len + 10 + rdata_len; /* Check if we have enough room available for the next record */ if((an_records_count >= packet_records_limit) || (pw.packet_limit - pw.packet_offset) < record_len) { if(an_records_count == 0) { log_err("zone write axfr: error preparing packet: next record is too big (%d)", record_len); break; } MESSAGE_SET_AN(mesg->buffer, htons(an_records_count)); mesg->send_length = pw.packet_offset; /** @todo: I need to put this in a packet_writer function */ #if ZDB_HAS_TSIG_SUPPORT if(TSIG_ENABLED(mesg)) { mesg->ar_start = &pw.packet[pw.packet_offset]; if(FAIL(ret = tsig_sign_tcp_message(mesg, pos))) { log_err("zone write axfr: failed to sign the answer: %r", ret); break; } } #endif /* Flush the packet. */ pw.packet_offset = mesg->send_length; /** @todo: I need to put this in a packet_writer function */ total_bytes_sent += mesg->send_length; if(FAIL(n = write_tcp_packet(&pw, &tcpos))) { log_err("zone write axfr: error sending packet: %r", n); break; } #if ZDB_HAS_TSIG_SUPPORT pos = TSIG_MIDDLE; #endif an_records_count = 0; // Packet flushed ... // Reset the packet // @TODO: reset the counts (?) // @TODO: TSIG enabled means the limit changes every 100th packet /* Remove the TSIG. */ /** @todo: Keep the AR count instead of setting it to 0 */ MESSAGE_SET_AR(mesg->buffer, 0); packet_writer_init(&pw, mesg->buffer, mesg->received, packet_size_limit); } /** NOTE: if tctrl.qtype == TYPE_SOA, then we are at the beginning OR the end of the AXFR stream */ #if ZDB_HAS_TSIG_SUPPORT if(tctrl.qtype == TYPE_SOA) { /* First SOA will make the pos move from NOWHERE to BEGIN */ /* Second SOA will make the pos move from MIDDLE to END */ /* EXCEPT that if there is only 1 packet for the whole zone the value must be TSIG_START */ if(pos != TSIG_START) { pos++; } } #endif an_records_count++; packet_writer_add_fqdn(&pw, (const u8*)path); packet_writer_add_bytes(&pw, (const u8*)&tctrl, 10); if(compress_dname_rdata != 0) { u16 rdata_offset = pw.packet_offset; switch(tctrl.qtype) { case TYPE_MX: if(FAIL(n = input_stream_read_fully(&fis, path, 2))) { log_err("zone write axfr: error reading MX record: %r", n); /* * GOTO !!! (I hate this) */ goto scheduler_queue_zone_write_axfr_thread_exit; } packet_writer_add_bytes(&pw, (const u8*)path, 2); case TYPE_NS: case TYPE_CNAME: case TYPE_DNAME: case TYPE_PTR: case TYPE_MB: case TYPE_MD: case TYPE_MF: case TYPE_MG: case TYPE_MR: { if(FAIL(qname_len = input_stream_read_dnsname(&fis, (u8*)path))) { log_err("zone write axfr: error reading %{dnstype} domain: %r", &tctrl.qtype, qname_len); /* * GOTO !!! (I hate this) */ goto scheduler_queue_zone_write_axfr_thread_exit; } packet_writer_add_fqdn(&pw, (const u8*)path); SET_U16_AT(pw.packet[rdata_offset - 2], htons(pw.packet_offset - rdata_offset)); continue; } case TYPE_SOA: { if(FAIL(qname_len = input_stream_read_dnsname(&fis, (u8*)path))) { log_err("zone write axfr: error reading SOA mname: %r", qname_len); /* * GOTO !!! (I hate this) */ goto scheduler_queue_zone_write_axfr_thread_exit; } packet_writer_add_fqdn(&pw, (const u8*)path); if(FAIL(qname_len = input_stream_read_rname(&fis, (u8*)path))) { log_err("zone write axfr: error reading SOA rname: %r", qname_len); /* * GOTO !!! (I hate this) */ goto scheduler_queue_zone_write_axfr_thread_exit; } packet_writer_add_fqdn(&pw, (const u8*)path); if(FAIL(n = input_stream_read_fully(&fis, path, 20))) { log_err("zone write axfr: error reading SOA rdata: %r", n); /* * GOTO !!! (I hate this) */ goto scheduler_queue_zone_write_axfr_thread_exit; } packet_writer_add_bytes(&pw, (const u8*)path, 20); SET_U16_AT(pw.packet[rdata_offset - 2], htons(pw.packet_offset - rdata_offset)); continue; } case TYPE_RRSIG: { if(FAIL(n = input_stream_read_fully(&fis, path, 18))) { log_err("zone write axfr: error reading RRSIG rdata: %r", n); /* * GOTO !!! (I hate this) */ goto scheduler_queue_zone_write_axfr_thread_exit; } rdata_len -= 18; packet_writer_add_bytes(&pw, (const u8*)path, 18); if(FAIL(qname_len = input_stream_read_dnsname(&fis, (u8*)path))) { log_err("zone write axfr: error reading RRSIG signer's name: %r", qname_len); /* * GOTO !!! (I hate this) */ goto scheduler_queue_zone_write_axfr_thread_exit; } packet_writer_add_fqdn(&pw, (const u8*)path); rdata_len -= qname_len; if(FAIL(n = input_stream_read_fully(&fis, path, rdata_len))) { log_err("zone write axfr: error reading RRSIG signature: %r", n); /* * GOTO !!! (I hate this) */ goto scheduler_queue_zone_write_axfr_thread_exit; } packet_writer_add_bytes(&pw, (const u8*)path, rdata_len); SET_U16_AT(pw.packet[rdata_offset - 2], htons(pw.packet_offset - rdata_offset)); continue; } case TYPE_NSEC: { if(FAIL(qname_len = input_stream_read_dnsname(&fis, (u8*)path))) { log_err("zone write axfr: error reading NSEC next domain name: %r", qname_len); /* * GOTO !!! (I hate this) */ goto scheduler_queue_zone_write_axfr_thread_exit; } packet_writer_add_fqdn(&pw, (const u8*)path); rdata_len -= qname_len; if(FAIL(n = input_stream_read_fully(&fis, path, rdata_len))) { log_err("zone write axfr: error reading NSEC type map: %r", n); /* * GOTO !!! (I hate this) */ goto scheduler_queue_zone_write_axfr_thread_exit; } packet_writer_add_bytes(&pw, (const u8*)path, rdata_len); SET_U16_AT(pw.packet[rdata_offset - 2], htons(pw.packet_offset - rdata_offset)); continue; } case TYPE_NSEC3PARAM: { break; } } } while(rdata_len > 0) { if((n = input_stream_read(&fis, (u8*)path, MIN(rdata_len, sizeof (path)))) <= 0) { if(n == 0) { break; } log_err("zone write axfr: error reading %{dnstype} rdata: %r", &tctrl.qtype, n); /* * GOTO !!! (I hate this) */ goto scheduler_queue_zone_write_axfr_thread_exit; } packet_writer_add_bytes(&pw, (const u8*)path, n); rdata_len -= n; } } /** * GOTO !!! */ scheduler_queue_zone_write_axfr_thread_exit: log_info("zone write axfr: closing file for %{dnsname}, %llu bytes sent", data_zone_origin, total_bytes_sent); #ifdef DEBUG log_debug("zone write axfr: closing socket %i", tcpfd); #endif output_stream_close(&tcpos); input_stream_close(&fis); free(mesg); return NULL; } void zdb_zone_answer_axfr(zdb_zone *zone, message_data *mesg, struct thread_pool_s *network_tp, struct thread_pool_s *disk_tp, u16 max_packet_size, u16 max_record_by_packet, bool compress_packets) { scheduler_queue_zone_write_axfr_args* args; log_info("zone write axfr: queueing %{dnsname}", zone->origin); MALLOC_OR_DIE(scheduler_queue_zone_write_axfr_args*, args, sizeof(scheduler_queue_zone_write_axfr_args), GENERIC_TAG); zdb_zone_acquire(zone); args->zone = zone; args->disk_tp = disk_tp; message_data *mesg_clone; MALLOC_OR_DIE(message_data*, mesg_clone, sizeof (message_data), MESGDATA_TAG); memcpy(mesg_clone, mesg, sizeof (message_data)); args->mesg = mesg_clone; args->packet_size_limit = max_packet_size; args->packet_records_limit = max_record_by_packet; args->compress_dname_rdata = compress_packets; if(network_tp != NULL) { thread_pool_enqueue_call(network_tp, zdb_zone_answer_axfr_thread, args, NULL, "zone-answer-axfr"); } else { zdb_zone_answer_axfr_thread(args); } } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec_common.c0000644000077100007710000000012412650131756021435 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.398344 30 ctime=1454597652.489344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec_common.c0000664000077100007710000001257412650131756021253 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec NSEC functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include "dnsdb/btree.h" #include "dnsdb/zdb_record.h" #include "dnsdb/nsec_common.h" /* * Force RRSIG: because the signatures could not be available yet. * Force NSEC: because the NSEC record is not available at first init. * */ u32 type_bit_maps_initialize(type_bit_maps_context *context, zdb_rr_label* label, bool force_nsec, bool force_rrsig) { u8 *type_bitmap_field = context->type_bitmap_field; u8 *window_size = context->window_size; ZEROMEMORY(window_size, sizeof (context->window_size)); context->last_type_window = -1; bool has_records = !zdb_record_isempty(&label->resource_record_set); /* If there are no records, nor forced ones ... */ if(!(force_nsec||force_rrsig||has_records)) { return 0; } ZEROMEMORY(type_bitmap_field, sizeof (context->type_bitmap_field)); btree_iterator types_iter; btree_iterator_init(label->resource_record_set, &types_iter); while(btree_iterator_hasnext(&types_iter)) { btree_node *node = btree_iterator_next_node(&types_iter); u16 type = node->hash; /** @note : NATIVETYPE */ /** * domain.tld. NS domain.tld. * A domain.tld. * NSEC further.tld. NS RRSIG NSEC * RRSIG ... * * Because this is possible, I have to filter out (I should maybe filter in instead) */ if((label->flags & (ZDB_RR_LABEL_DELEGATION|ZDB_RR_LABEL_UNDERDELEGATION)) != 0) { if(type == TYPE_A || type == TYPE_AAAA) { continue; } } type = (u16)ntohs(type); /* Network bit order */ type_bitmap_field[type >> 3] |= 1 << (7 - (type & 7)); window_size[type >> 8] = ((type & 0xf8) >> 3) + 1; context->last_type_window = MAX(type >> 8, context->last_type_window); } /* * Add the forced types : NSEC, RRSIG * They all are on window 0 */ /* * HHHHHHHH LLLLLlll * * TBF[ HHHHHHHH LLLLL ] |= 1 << 7 - (lll) * * => * * * LLLLLlll HHHHHHHH * * TBF[ HHHHHHHH LLLLL ] |= 1 << ((0x700 - (lll00000000)) >> 8) * * * Given that I can't get rid of the >> 8 in the above statement, a swap will work better * */ if(force_rrsig) { type_bitmap_field[(NU16(TYPE_RRSIG) >> 3)] |= 1 << (7 - (NU16(TYPE_RRSIG) & 7)); /** @note : NATIVETYPE */ window_size[0] = MAX(((NU16(TYPE_RRSIG) & 0xf8) >> 3) + 1, window_size[0]); /** @note : NATIVETYPE */ context->last_type_window = MAX(0, context->last_type_window); } if(force_nsec) { type_bitmap_field[(NU16(TYPE_NSEC) >> 3)] |= 1 << (7 - (NU16(TYPE_NSEC) & 7)); /** @note : NATIVETYPE */ window_size[0] = MAX(((NU16(TYPE_NSEC) & 0xf8) >> 3) + 1, window_size[0]); /** @note : NATIVETYPE */ context->last_type_window = MAX(0, context->last_type_window); } u32 type_bit_maps_size = 0; for(s32 i = 0; i <= context->last_type_window; i++) { u8 ws = window_size[i]; if(ws > 0) { type_bit_maps_size += 1 + 1 + ws; } } context->type_bit_maps_size = type_bit_maps_size; return type_bit_maps_size; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/rr_canonize.c0000644000077100007710000000012412650131756021446 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.258344 30 ctime=1454597652.493344534 yadifa-2.1.6-5826/lib/dnsdb/src/rr_canonize.c0000664000077100007710000002657312650131756021270 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup rrsig RRSIG functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include "dnsdb/zdb_error.h" #include "dnsdb/rrsig.h" #include "dnsdb/rr_canonize.h" #define ZDB_GUARANTEED_LOWCASE_RDATA 1 /* The zone loader guarantees that dnames in the rdata are stored lo-case */ #define RR_CANONIZE_TWONAMES_TAG 0x4e324e4f4e4143 /* CANON2N */ #define RR_CANONIZE_ONENAME_TAG 0x4e314e4f4e4143 /* CANON1N */ #define RR_CANONIZE_MX_TAG 0x584d4e4f4e4143 /* CANONMX */ #define RR_CANONIZE_SOA_TAG 0x414f534e4f4e4143 /* CANONSOA */ #define RR_CANONIZE_NSEC1_TAG 0x31534e4e4f4e4143 /* CANONNS1 */ #define RR_CANONIZE_NOP_TAG 0x504f4e4e4f4e4143 /* CANONNOP */ /* * */ static int rr_canonize_sort_rdata_compare(const void* a, const void* b) { zdb_canonized_packed_ttlrdata* rr_a = *(zdb_canonized_packed_ttlrdata**)a; zdb_canonized_packed_ttlrdata* rr_b = *(zdb_canonized_packed_ttlrdata**)b; u16 rr_a_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(rr_a); u16 rr_b_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(rr_b); int ret; u8* ptr_a = &rr_a->rdata_start[0]; u8* ptr_b = &rr_b->rdata_start[0]; int diff_len = rr_a_size - rr_b_size; if(diff_len != 0) { u16 len = MIN(rr_a_size, rr_b_size); ret = memcmp(ptr_a, ptr_b, len); if(ret == 0) { ret = diff_len; } } else { ret = memcmp(ptr_a, ptr_b, rr_a_size); } return ret; } #if ZDB_GUARANTEED_LOWCASE_RDATA == 0 static void rr_canonize_twonames(zdb_packed_ttlrdata* rr, ptr_vector* v) { while(rr != NULL) { zdb_canonized_packed_ttlrdata* c_rr; u32 c_rr_size = sizeof (zdb_canonized_packed_ttlrdata) - 1 + ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); MALLOC_OR_DIE(zdb_canonized_packed_ttlrdata*, c_rr, c_rr_size, RR_CANONIZE_TWONAMES_TAG); ZDB_PACKEDRECORD_PTR_RDATASIZE(c_rr) = ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); c_rr->rdata_canonized_size = htons(ZDB_PACKEDRECORD_PTR_RDATASIZE(rr)); u8* src = &rr->rdata_start[0]; u8* dst = &c_rr->rdata_start[0]; u32 n; n = dnsname_canonize(src, dst); src += n; dst += n; dnsname_canonize(src, dst); ptr_vector_append(v, c_rr); rr = rr->next; } } static void rr_canonize_onename(zdb_packed_ttlrdata* rr, ptr_vector* v) { while(rr != NULL) { zdb_canonized_packed_ttlrdata* c_rr; u32 c_rr_size = sizeof (zdb_canonized_packed_ttlrdata) - 1 + ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); MALLOC_OR_DIE(zdb_canonized_packed_ttlrdata*, c_rr, c_rr_size, RR_CANONIZE_ONENAME_TAG); ZDB_PACKEDRECORD_PTR_RDATASIZE(c_rr) = ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); c_rr->rdata_canonized_size = htons(ZDB_PACKEDRECORD_PTR_RDATASIZE(rr)); u8* src = &rr->rdata_start[0]; u8* dst = &c_rr->rdata_start[0]; dnsname_canonize(src, dst); ptr_vector_append(v, c_rr); rr = rr->next; } } static void rr_canonize_mx(zdb_packed_ttlrdata* rr, ptr_vector* v) { while(rr != NULL) { zdb_canonized_packed_ttlrdata* c_rr; u32 c_rr_size = sizeof (zdb_canonized_packed_ttlrdata) - 1 + ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); MALLOC_OR_DIE(zdb_canonized_packed_ttlrdata*, c_rr, c_rr_size, RR_CANONIZE_MX_TAG); ZDB_PACKEDRECORD_PTR_RDATASIZE(c_rr) = ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); c_rr->rdata_canonized_size = htons(ZDB_PACKEDRECORD_PTR_RDATASIZE(rr)); c_rr->rdata_start[0] = rr->rdata_start[0]; c_rr->rdata_start[1] = rr->rdata_start[1]; u8* src = &rr->rdata_start[2]; u8* dst = &c_rr->rdata_start[2]; dnsname_canonize(src, dst); ptr_vector_append(v, c_rr); rr = rr->next; } } static void rr_canonize_soa(zdb_packed_ttlrdata* rr, ptr_vector* v) { yassert(rr != NULL && rr->next == NULL); zdb_canonized_packed_ttlrdata* c_rr; u32 c_rr_size = sizeof (zdb_canonized_packed_ttlrdata) - 1 + ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); MALLOC_OR_DIE(zdb_canonized_packed_ttlrdata*, c_rr, c_rr_size, RR_CANONIZE_SOA_TAG); ZDB_PACKEDRECORD_PTR_RDATASIZE(c_rr) = ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); c_rr->rdata_canonized_size = htons(ZDB_PACKEDRECORD_PTR_RDATASIZE(rr)); u8* src = &rr->rdata_start[0]; u8* dst = &c_rr->rdata_start[0]; u32 n; n = dnsname_canonize(src, dst); src += n; dst += n; n = dnsname_canonize(src, dst); src += n; dst += n; MEMCOPY(dst, src, 4 + 4 + 4 + 4 + 4); ptr_vector_append(v, c_rr); } static void rr_canonize_nsec(zdb_packed_ttlrdata* rr, ptr_vector* v) { while(rr != NULL) { zdb_canonized_packed_ttlrdata* c_rr; u32 c_rr_size = sizeof (zdb_canonized_packed_ttlrdata) - 1 + ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); MALLOC_OR_DIE(zdb_canonized_packed_ttlrdata*, c_rr, c_rr_size, RR_CANONIZE_NSEC1_TAG); ZDB_PACKEDRECORD_PTR_RDATASIZE(c_rr) = ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); c_rr->rdata_canonized_size = htons(ZDB_PACKEDRECORD_PTR_RDATASIZE(rr)); u8* src = &rr->rdata_start[0]; u8* dst = &c_rr->rdata_start[0]; dnsname_canonize(src, dst); ptr_vector_append(v, c_rr); rr = rr->next; } } #endif /* ZDB_GUARANTEED_LOWCASE_RDATA */ static void rr_canonize_nsec3param(zdb_packed_ttlrdata* rr, ptr_vector* v) { while(rr != NULL) { zdb_canonized_packed_ttlrdata* c_rr; u32 c_rr_size = sizeof (zdb_canonized_packed_ttlrdata) - 1 + ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); MALLOC_OR_DIE(zdb_canonized_packed_ttlrdata*, c_rr, c_rr_size, RR_CANONIZE_NOP_TAG); ZDB_PACKEDRECORD_PTR_RDATASIZE(c_rr) = ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); c_rr->rdata_canonized_size = htons(ZDB_PACKEDRECORD_PTR_RDATASIZE(rr)); MEMCOPY(&c_rr->rdata_start[0], ZDB_PACKEDRECORD_PTR_RDATAPTR(rr), ZDB_PACKEDRECORD_PTR_RDATASIZE(rr)); c_rr->rdata_start[1] = 0; /* The signed NSEC3PARAM has its flags to 0 */ ptr_vector_append(v, c_rr); rr = rr->next; } } static void rr_canonize_nop(zdb_packed_ttlrdata* rr, ptr_vector* v) { while(rr != NULL) { zdb_canonized_packed_ttlrdata* c_rr; u32 c_rr_size = sizeof (zdb_canonized_packed_ttlrdata) - 1 + ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); MALLOC_OR_DIE(zdb_canonized_packed_ttlrdata*, c_rr, c_rr_size, RR_CANONIZE_NOP_TAG); ZDB_PACKEDRECORD_PTR_RDATASIZE(c_rr) = ZDB_PACKEDRECORD_PTR_RDATASIZE(rr); c_rr->rdata_canonized_size = htons(ZDB_PACKEDRECORD_PTR_RDATASIZE(rr)); /** @todo CHECK: If we don't lo-case anymore maybe I could grab some * more cycles here. Not for the A-records on a 64bits arch, * but for any case where the rdata is (much) bigger than 8 bytes */ MEMCOPY(&c_rr->rdata_start[0], ZDB_PACKEDRECORD_PTR_RDATAPTR(rr), ZDB_PACKEDRECORD_PTR_RDATASIZE(rr)); ptr_vector_append(v, c_rr); rr = rr->next; } } void rr_canonize_rrset(u16 type, zdb_packed_ttlrdata* rr_sll, ptr_vector* rrsp) { switch(type) { #if ZDB_GUARANTEED_LOWCASE_RDATA == 0 case TYPE_NS: case TYPE_CNAME: case TYPE_DNAME: case TYPE_PTR: case TYPE_MB: case TYPE_MD: case TYPE_MF: case TYPE_MG: case TYPE_MR: /* ONE NAME record */ rr_canonize_onename(rr_sll, rrsp); break; case TYPE_MX: rr_canonize_mx(rr_sll, rrsp); break; case TYPE_SOA: /* NOTE: NO NEED TO SORT (There is only one) */ rr_canonize_soa(rr_sll, rrsp); break; case TYPE_SIG: rr_canonize_notsupported(rr_sll, rrsp, TYPE_SIG); break; case TYPE_RRSIG: /* * A signature must not be signed ... */ rr_canonize_notsupported(rr_sll, rrsp, TYPE_RRSIG); break; case TYPE_A6: rr_canonize_notsupported(rr_sll, rrsp, TYPE_A6); break; case TYPE_NSEC: rr_canonize_nsec(rr_sll, rrsp); break; case TYPE_AFSDB: rr_canonize_notsupported(rr_sll, rrsp, TYPE_AFSDB); break; case TYPE_SRV: rr_canonize_notsupported(rr_sll, rrsp, TYPE_SRV); break; case TYPE_A: case TYPE_HINFO: case TYPE_MINFO: case TYPE_AAAA: case TYPE_DS: case TYPE_TXT: case TYPE_WKS: case TYPE_DNSKEY: case TYPE_NSEC3: case TYPE_LOC: /* NO CANONIZATION record : copy */ rr_canonize_nop(rr_sll, rrsp); break; default: rr_canonize_notsupported(rr_sll, rrsp, type); break; #else default: rr_canonize_nop(rr_sll, rrsp); break; #endif case TYPE_NSEC3PARAM: rr_canonize_nsec3param(rr_sll, rrsp); break; } /* */ ptr_vector_qsort(rrsp, rr_canonize_sort_rdata_compare); } /* * MUST wrap the free function because free could be a macro. */ static void rr_free_canonized_free(void* ptr) { free(ptr); } void rr_canonize_free(ptr_vector* rrsp) { ptr_vector_free_empties(rrsp, rr_free_canonized_free); /* DO NOT DO NOT DO NOT : ptr_vector_destroy(rrsp); */ } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb-zone-lock.c0000644000077100007710000000012412650131756021613 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.298344 30 ctime=1454597652.424344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb-zone-lock.c0000664000077100007710000004634512650131756021434 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include "dnsdb/zdb.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_zone_label.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_error.h" #include "dnsdb/dnsrdata.h" #include "dnsdb/zdb_listener.h" #if ZDB_HAS_NSEC_SUPPORT != 0 #include "dnsdb/nsec.h" #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 #include "dnsdb/nsec3.h" #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT #include #endif #ifdef DEBUG #define ZONE_MUTEX_LOG 1 // set this to 0 to disable in DEBUG #else #define ZONE_MUTEX_LOG 0 #endif extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #define MUTEX_LOCKED_TOO_MUCH_TIME_US 5000000 #define MUTEX_WAITED_TOO_MUCH_TIME_US 2000000 #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT static pthread_mutex_t zdb_zone_lock_set_mtx = PTHREAD_MUTEX_INITIALIZER; static ptr_set zdb_zone_lock_set = PTR_SET_PTR_EMPTY; void zdb_zone_lock_set_add(zdb_zone *zone) { pthread_mutex_lock(&zdb_zone_lock_set_mtx); ptr_node *node = ptr_set_avl_insert(&zdb_zone_lock_set, zone); node->value = zone; pthread_mutex_unlock(&zdb_zone_lock_set_mtx); } void zdb_zone_lock_set_del(zdb_zone *zone) { pthread_mutex_lock(&zdb_zone_lock_set_mtx); ptr_set_avl_delete(&zdb_zone_lock_set, zone); pthread_mutex_unlock(&zdb_zone_lock_set_mtx); } static s64 zdb_zone_lock_set_monitor_last_duration = 0; static s64 zdb_zone_lock_set_monitor_last_time = 0; #ifdef DEBUG const char* zdb_zone_lock_names[11]= { "NOBODY", // 0x00 "SIMPLEREADER", // 0x01 non-conflicting "RRSIG_UPDATER",// 0x82 conflicting "3?", "XFR", // 0x84 conflicting "REFRESH", // 0x85 conflicting "DYNUPDATE", // 0x86 conflicting "UNFREEZE", // 0x87 conflicting "INVALIDATE", // 0x88 conflicting "REPLACE", // 0x89 conflicting "LOAD" // 0x8a conflicting // "DESTROY" // 0xFF conflicting, can never be launched more than once. The zone will be destroyed before unlock. }; #endif void zdb_zone_lock_set_monitor() { u64 now = timeus(); if(now - zdb_zone_lock_set_monitor_last_time < zdb_zone_lock_set_monitor_last_duration) { return; } zdb_zone_lock_set_monitor_last_time = now; pthread_mutex_lock(&zdb_zone_lock_set_mtx); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&zdb_zone_lock_set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); zdb_zone *zone = (zdb_zone*)node->key; u8 owner = zone->lock_owner; if(owner == GROUP_MUTEX_NOBODY) { continue; } u64 ts = zone->lock_timestamp; stacktrace trace = zone->lock_trace; pthread_t id = zone->lock_id; if(ts < now) { u64 dt = now - ts; if(dt > MUTEX_LOCKED_TOO_MUCH_TIME_US) { // locked for 5 seconds ... trouble #ifndef DEBUG log_warn("zdb_zone_lock@%p: %{dnsname}: locked by %x for %lluus by %p", zone, zone->origin, owner, dt, (intptr)id); #else if(owner <= 10) { log_warn("zdb_zone_lock@%p: %{dnsname}: locked by %s for %lluus by %p", zone, zone->origin, zdb_zone_lock_names[owner], dt, (intptr)id); } else { log_warn("zdb_zone_lock@%p: %{dnsname}: locked by %x for %lluus by %p", zone, zone->origin, owner, dt, (intptr)id); } #endif debug_stacktrace_log(MODULE_MSG_HANDLE, MSG_WARNING, trace); } } } pthread_mutex_unlock(&zdb_zone_lock_set_mtx); u64 after = timeus(); if(after - now > zdb_zone_lock_set_monitor_last_duration) { zdb_zone_lock_set_monitor_last_duration = after - now; } } #endif void zdb_zone_lock(zdb_zone *zone, u8 owner) { #if ZONE_MUTEX_LOG log_debug7("acquiring lock for zone %{dnsname}@%p for %x", zone->origin, zone, owner); #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT u64 start = timeus(); #endif mutex_t *mutex = &zone->lock_mutex; mutex_lock(mutex); for(;;) { /* A simple way to ensure that a lock can be shared by similar entities or not. Sharable entities have their msb off. */ u8 co = zone->lock_owner & 0x7f; if(co == GROUP_MUTEX_NOBODY || co == owner) { yassert(zone->lock_count != 255); zone->lock_owner = owner & 0x7f; zone->lock_count++; break; } #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT s64 d = timeus() - start; if(d > MUTEX_WAITED_TOO_MUCH_TIME_US) { log_warn("zdb_zone_lock(%{dnsname},%x) : waited for %llius already ...", zone->origin, owner, d); debug_log_stacktrace(MODULE_MSG_HANDLE, MSG_WARNING, "zdb_zone_lock:"); } cond_timedwait(&zone->lock_cond, mutex, MUTEX_WAITED_TOO_MUCH_TIME_US); #else cond_wait(&zone->lock_cond, mutex); #endif } mutex_unlock(mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT zone->lock_trace = debug_stacktrace_get(); zone->lock_id = pthread_self(); zone->lock_timestamp = timeus(); zdb_zone_lock_set_add(zone); #endif } bool zdb_zone_trylock(zdb_zone *zone, u8 owner) { #if ZONE_MUTEX_LOG log_debug7("trying to acquire lock for zone %{dnsname}@%p for %x", zone->origin, zone, owner); #endif mutex_lock(&zone->lock_mutex); u8 co = zone->lock_owner & 0x7f; if(co == ZDB_ZONE_MUTEX_NOBODY || co == owner) { yassert(zone->lock_count != 255); zone->lock_owner = owner & 0x7f; zone->lock_count++; #if ZONE_MUTEX_LOG log_debug7("acquired lock for zone %{dnsname}@%p for %x (#%i)", zone->origin, zone, owner, zone->lock_count); #endif mutex_unlock(&zone->lock_mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT zone->lock_trace = debug_stacktrace_get(); zone->lock_id = pthread_self(); zone->lock_timestamp = timeus(); zdb_zone_lock_set_add(zone); #endif return TRUE; } mutex_unlock(&zone->lock_mutex); #if ZONE_MUTEX_LOG log_debug7("failed to acquire lock for zone %{dnsname}@%p for %x", zone->origin, zone, owner); #endif return FALSE; } void zdb_zone_unlock(zdb_zone *zone, u8 owner) { #if ZONE_MUTEX_LOG log_debug7("releasing lock for zone %{dnsname}@%p by %x (owned by %x)", zone->origin, zone, owner, zone->lock_owner); #endif mutex_lock(&zone->lock_mutex); #ifdef DEBUG if((zone->lock_owner != (owner & 0x7f)) || (zone->lock_count == 0)) { mutex_unlock(&zone->lock_mutex); yassert(zone->lock_owner == (owner & 0x7f)); yassert(zone->lock_count != 0); } #endif --zone->lock_count; #if ZONE_MUTEX_LOG log_debug7("released lock for zone %{dnsname}@%p by %x (#%i)", zone->origin, zone, owner, zone->lock_count); #endif if(zone->lock_count == 0) { zone->lock_owner = ZDB_ZONE_MUTEX_NOBODY; cond_notify(&zone->lock_cond); } #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT zone->lock_trace = NULL; zone->lock_id = 0; zone->lock_timestamp = 0; zdb_zone_lock_set_del(zone); #endif mutex_unlock(&zone->lock_mutex); } void zdb_zone_double_lock(zdb_zone *zone, u8 owner, u8 secondary_owner) { #if ZONE_MUTEX_LOG log_debug7("acquiring lock for zone %{dnsname}@%p for %x", zone->origin, zone, owner); #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT u64 start = timeus(); #endif mutex_lock(&zone->lock_mutex); for(;;) { /* * A simple way to ensure that a lock can be shared * by similar entities or not. * Sharable entities have their msb off. */ u8 so = zone->lock_reserved_owner & 0x7f; if(so == ZDB_ZONE_MUTEX_NOBODY || so == secondary_owner) { u8 co = zone->lock_owner & 0x7f; if(co == ZDB_ZONE_MUTEX_NOBODY || co == owner) { yassert(zone->lock_count != 255); zone->lock_owner = owner & 0x7f; zone->lock_count++; zone->lock_reserved_owner = secondary_owner & 0x7f; #if ZONE_MUTEX_LOG log_debug7("acquired lock for zone %{dnsname}@%p for %x (#%i)", zone->origin, zone, owner, zone->lock_count); #endif break; } } else { // the secondary owner is already taken } #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT s64 d = timeus() - start; if(d > MUTEX_WAITED_TOO_MUCH_TIME_US) { log_warn("zdb_zone_double_lock(%{dnsname},%x,%x) : waited for %llius already ...", zone->origin, owner, secondary_owner, d); debug_log_stacktrace(MODULE_MSG_HANDLE, MSG_WARNING, "zdb_zone_double_lock:"); } cond_timedwait(&zone->lock_cond, &zone->lock_mutex, MUTEX_WAITED_TOO_MUCH_TIME_US); #else cond_wait(&zone->lock_cond, &zone->lock_mutex); #endif } mutex_unlock(&zone->lock_mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT zone->lock_trace = debug_stacktrace_get(); zone->lock_id = pthread_self(); zone->lock_timestamp = timeus(); zdb_zone_lock_set_add(zone); #endif } bool zdb_zone_try_double_lock(zdb_zone *zone, u8 owner, u8 secondary_owner) { #if ZONE_MUTEX_LOG log_debug7("trying to acquire lock for zone %{dnsname}@%p for %x", zone->origin, zone, owner); #endif mutex_lock(&zone->lock_mutex); u8 so = zone->lock_reserved_owner & 0x7f; if(so == ZDB_ZONE_MUTEX_NOBODY || so == secondary_owner) { u8 co = zone->lock_owner & 0x7f; if(co == ZDB_ZONE_MUTEX_NOBODY || co == owner) { yassert(zone->lock_count != 255); zone->lock_owner = owner & 0x7f; zone->lock_count++; zone->lock_reserved_owner = secondary_owner & 0x7f; #if ZONE_MUTEX_LOG log_debug7("acquired lock for zone %{dnsname}@%p for %x (#%i)", zone->origin, zone, owner, zone->lock_count); #endif mutex_unlock(&zone->lock_mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT zone->lock_trace = debug_stacktrace_get(); zone->lock_id = pthread_self(); zone->lock_timestamp = timeus(); zdb_zone_lock_set_add(zone); #endif return TRUE; } } /* else { // already double-owned } */ mutex_unlock(&zone->lock_mutex); #if ZONE_MUTEX_LOG log_debug7("failed to acquire lock for zone %{dnsname}@%p for %x", zone->origin, zone, owner); #endif return FALSE; } void zdb_zone_double_unlock(zdb_zone *zone, u8 owner, u8 secondary_owner) { #if ZONE_MUTEX_LOG log_debug7("releasing lock for zone %{dnsname}@%p by %x (owned by %x)", zone->origin, zone, owner, zone->lock_owner); #endif mutex_lock(&zone->lock_mutex); #ifdef DEBUG if((zone->lock_owner != (owner & 0x7f)) || (zone->lock_count == 0)) { mutex_unlock(&zone->lock_mutex); yassert(zone->lock_owner == (owner & 0x7f)); yassert(zone->lock_count != 0); } if(zone->lock_reserved_owner != (secondary_owner & 0x7f)) { mutex_unlock(&zone->lock_mutex); yassert(zone->lock_reserved_owner != (secondary_owner & 0x7f)); } #endif zone->lock_reserved_owner = ZDB_ZONE_MUTEX_NOBODY; --zone->lock_count; #if ZONE_MUTEX_LOG log_debug7("released lock for zone %{dnsname}@%p by %x (#%i)", zone->origin, zone, owner, zone->lock_count); #endif if(zone->lock_count == 0) { zone->lock_owner = ZDB_ZONE_MUTEX_NOBODY; cond_notify(&zone->lock_cond); } #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT zone->lock_trace = NULL; zone->lock_id = 0; zone->lock_timestamp = 0; zdb_zone_lock_set_del(zone); #endif mutex_unlock(&zone->lock_mutex); } void zdb_zone_transfer_lock(zdb_zone *zone, u8 owner, u8 secondary_owner) { #if ZONE_MUTEX_LOG log_debug7("transferring lock for zone %{dnsname}@%p from %x to %x (owned by %x:%x)", zone->origin, zone, owner, secondary_owner, zone->lock_owner, zone->lock_reserved_owner); #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT u64 start = timeus(); #endif mutex_lock(&zone->lock_mutex); #ifdef DEBUG if((zone->lock_owner != (owner & 0x7f)) || (zone->lock_count == 0)) { mutex_unlock(&zone->lock_mutex); yassert(zone->lock_owner == (owner & 0x7f)); yassert(zone->lock_count != 0); } if(zone->lock_reserved_owner != (secondary_owner & 0x7f)) { mutex_unlock(&zone->lock_mutex); yassert(zone->lock_reserved_owner != (secondary_owner & 0x7f)); } #endif // wait to be the last one while(zone->lock_count != 1) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT s64 d = timeus() - start; if(d > MUTEX_WAITED_TOO_MUCH_TIME_US) { log_warn("zdb_zone_transfer_lock(%{dnsname},%x,%x) : waited for %llius already ...", zone->origin, owner, secondary_owner, d); debug_log_stacktrace(MODULE_MSG_HANDLE, MSG_WARNING, "zdb_zone_transfer_lock:"); } #endif cond_timedwait(&zone->lock_cond, &zone->lock_mutex, 100); } zone->lock_owner = secondary_owner & 0x7f; zone->lock_reserved_owner = ZDB_ZONE_MUTEX_NOBODY; #if ZONE_MUTEX_LOG log_debug7("transferred lock for zone %{dnsname}@%p from %x to %x (#%i)", zone->origin, zone, owner, secondary_owner, zone->lock_count); #endif if((secondary_owner & 0x80) == 0) { cond_notify(&zone->lock_cond); } mutex_unlock(&zone->lock_mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT zone->lock_trace = debug_stacktrace_get(); zone->lock_id = pthread_self(); zone->lock_timestamp = timeus(); zdb_zone_lock_set_add(zone); #endif } bool zdb_zone_try_transfer_lock(zdb_zone *zone, u8 owner, u8 secondary_owner) { #if ZONE_MUTEX_LOG log_debug7("transferring lock for zone %{dnsname}@%p from %x to %x (owned by %x:%x)", zone->origin, zone, owner, secondary_owner, zone->lock_owner, zone->lock_reserved_owner); #endif mutex_lock(&zone->lock_mutex); #ifdef DEBUG if((zone->lock_owner != (owner & 0x7f)) || (zone->lock_count == 0)) { mutex_unlock(&zone->lock_mutex); yassert(zone->lock_owner == (owner & 0x7f)); yassert(zone->lock_count != 0); } if(zone->lock_reserved_owner != (secondary_owner & 0x7f)) { mutex_unlock(&zone->lock_mutex); yassert(zone->lock_reserved_owner != (secondary_owner & 0x7f)); } #endif // wait to be the last one if(zone->lock_count == 1) { zone->lock_owner = secondary_owner & 0x7f; zone->lock_reserved_owner = ZDB_ZONE_MUTEX_NOBODY; if((secondary_owner & 0x80) == 0) { cond_notify(&zone->lock_cond); } mutex_unlock(&zone->lock_mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT zone->lock_trace = debug_stacktrace_get(); zone->lock_id = pthread_self(); zone->lock_timestamp = timeus(); zdb_zone_lock_set_add(zone); #endif return TRUE; } mutex_unlock(&zone->lock_mutex); return FALSE; } void zdb_zone_exchange_locks(zdb_zone *zone, u8 owner, u8 secondary_owner) { #if ZONE_MUTEX_LOG log_debug7("exchanging locks for zone %{dnsname}@%p from %x to %x (owned by %x:%x)", zone->origin, zone, owner, secondary_owner, zone->lock_owner, zone->lock_reserved_owner); #endif #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT u64 start = timeus(); #endif mutex_lock(&zone->lock_mutex); #ifdef DEBUG if((zone->lock_owner != (owner & 0x7f)) || (zone->lock_count == 0)) { mutex_unlock(&zone->lock_mutex); yassert(zone->lock_owner == (owner & 0x7f)); yassert(zone->lock_count != 0); } if(zone->lock_reserved_owner != (secondary_owner & 0x7f)) { mutex_unlock(&zone->lock_mutex); yassert(zone->lock_reserved_owner != (secondary_owner & 0x7f)); } #endif // wait to be the last one while(zone->lock_count != 1) { #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT s64 d = timeus() - start; if(d > MUTEX_WAITED_TOO_MUCH_TIME_US) { log_warn("zdb_zone_transfer_lock(%{dnsname},%x,%x) : waited for %llius already ...", zone->origin, owner, secondary_owner, d); debug_log_stacktrace(MODULE_MSG_HANDLE, MSG_WARNING, "zdb_zone_transfer_lock:"); } #endif cond_timedwait(&zone->lock_cond, &zone->lock_mutex, 100); } zone->lock_owner = secondary_owner & 0x7f; zone->lock_reserved_owner = owner & 0x7f; #if ZONE_MUTEX_LOG log_debug7("exchanged locks for zone %{dnsname}@%p from %x to %x (#%i)", zone->origin, zone, owner, secondary_owner, zone->lock_count); #endif if((secondary_owner & 0x80) == 0) { cond_notify(&zone->lock_cond); } mutex_unlock(&zone->lock_mutex); #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT zone->lock_trace = debug_stacktrace_get(); zone->lock_id = pthread_self(); zone->lock_timestamp = timeus(); zdb_zone_lock_set_add(zone); #endif } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_query_ex.c0000644000077100007710000000012412650131756021635 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.345344 30 ctime=1454597652.378344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_query_ex.c0000664000077100007710000032303312650131756021446 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup query_ex Database top-level query function * @ingroup dnsdb * @brief Database top-level query function * * Database top-level query function * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #define DEBUG_LEVEL 0 #include #include #include #include #include #include #include "dnsdb/zdb.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_zone_label.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_record.h" #include "dnsdb/dictionary.h" #if ZDB_HAS_NSEC_SUPPORT != 0 #include "dnsdb/nsec.h" #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 #include "dnsdb/nsec3.h" #endif #if ZDB_HAS_DNSSEC_SUPPORT != 0 #include "dnsdb/rrsig.h" #endif #if ZDB_EXPLICIT_READER_ZONE_LOCK == 1 #define LOCK(a_) zdb_zone_lock((a_), ZDB_ZONE_MUTEX_SIMPLEREADER) #define UNLOCK(a_) zdb_zone_unlock((a_), ZDB_ZONE_MUTEX_SIMPLEREADER) #else #define LOCK(a_) #define UNLOCK(a_) #endif /** * In order to optimise-out the class parameter that is not required if ZDB_RECORDS_MAX_CLASS == 1 ... */ #if ZDB_RECORDS_MAX_CLASS != 1 #define DECLARE_ZCLASS_PARAMETER u16 zclass, #define PASS_ZCLASS_PARAMETER zclass, #define PASS_ZONE_ZCLASS_PARAMETER zone->zclass, #else #define DECLARE_ZCLASS_PARAMETER #define PASS_ZCLASS_PARAMETER #define PASS_ZONE_ZCLASS_PARAMETER #endif extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #ifndef HAS_DYNAMIC_PROVISIONING #error "MISSING HAS_DYNAMIC_PROVISIONING" #endif /** @brief Creates a answer node from a database record * * @param source a pointer to the ttlrdata to put into the node * @param name the owner of the record * @param zclass (if more than one class is supported in the database) * @param rtype the type of the record * @param pool the memory pool * * @return a resource record suitable for network serialisation * * 5 uses * */ static inline zdb_resourcerecord* zdb_query_ex_answer_make(const zdb_packed_ttlrdata* source, const u8* name, DECLARE_ZCLASS_PARAMETER u16 rtype, u8 * restrict * pool) { yassert(source != NULL && name != NULL); zdb_resourcerecord* node = (zdb_resourcerecord*) * pool; #ifdef DEBUG memset(node, 0xff, ALIGN16(sizeof(zdb_resourcerecord))); #endif *pool += ALIGN16(sizeof(zdb_resourcerecord)); node->next = NULL; node->ttl_rdata = (zdb_packed_ttlrdata*)source; /** @note I should not need to clone the name * It comes either from the query, either from an rdata in the database. */ node->name = name; #if ZDB_RECORDS_MAX_CLASS != 1 node->zclass = zclass; #else node->zclass = CLASS_IN; #endif node->rtype = rtype; node->ttl = source->ttl; return node; } /** @brief Creates a answer node from a database record with a specific TTL * * @param source a pointer to the ttlrdata to put into the node * @param name the owner of the record * @param zclass (if more than one class is supported in the database) * @param rtype the type of the record * @param ttl the TTL that replaces the one in the record * @param pool the memory pool * * @return a resource record suitable for network serialisation * * 5 uses */ static inline zdb_resourcerecord* zdb_query_ex_answer_make_ttl(const zdb_packed_ttlrdata* source, const u8* name, DECLARE_ZCLASS_PARAMETER u16 rtype, u32 ttl, u8 * restrict * pool) { yassert(source != NULL && name != NULL); zdb_resourcerecord* node = (zdb_resourcerecord*) * pool; #ifdef DEBUG memset(node, 0xff, ALIGN16(sizeof(zdb_resourcerecord))); #endif *pool += ALIGN16(sizeof(zdb_resourcerecord)); node->next = NULL; node->ttl_rdata = (zdb_packed_ttlrdata*)source; /** @note I should not need to clone the name * It comes either from the query, either from an rdata in the database. */ node->name = name; #if ZDB_RECORDS_MAX_CLASS != 1 node->zclass = zclass; #else node->zclass = CLASS_IN; #endif node->rtype = rtype; node->ttl = ttl; return node; } /** @brief Appends a list of database records to a list of nodes at a random position * * @param source a pointer to the ttlrdata to put into the node * @param name the owner of the record * @param zclass (if more than one class is supported in the database) * @param rtype the type of the record * @param headp a pointer to the section list * @param pool the memory pool * * 6 uses */ static void zdb_query_ex_answer_appendrndlist(const zdb_packed_ttlrdata* source, const u8* label, DECLARE_ZCLASS_PARAMETER u16 type, zdb_resourcerecord** headp, u8 * restrict * pool) { yassert(source != NULL && label != NULL); zdb_resourcerecord* head = zdb_query_ex_answer_make(source, label, PASS_ZCLASS_PARAMETER type, pool); head->next = *headp; source = source->next; if(source != NULL) { random_ctx rndctx = thread_pool_get_random_ctx(); int rnd = random_next(rndctx); do { zdb_resourcerecord* node = zdb_query_ex_answer_make(source, label, PASS_ZCLASS_PARAMETER type, pool); if(rnd & 1) { /* put the new node in front of the head, * and assign the head to node */ node->next = head; head = node; } else { /* put the new node next to the head */ node->next = head->next; head->next = node; } rnd >>= 1; /** * @note: After 32 entries it will not be so randomized at all ... */ source = source->next; } while(source != NULL); } *headp = head; } /** @brief Appends a list of database records to a list of nodes * * @param source a pointer to the ttlrdata to put into the node * @param name the owner of the record * @param zclass (if more than one class is supported in the database) * @param rtype the type of the record * @param headp a pointer to the section list * @param headp a pointer to the section list * @param pool the memory pool * * 10 uses */ static void zdb_query_ex_answer_appendlist(const zdb_packed_ttlrdata* source, const u8* label, DECLARE_ZCLASS_PARAMETER u16 rtype, zdb_resourcerecord** headp, u8 * restrict * pool) { yassert(source != NULL && label != NULL); zdb_resourcerecord* head = *headp; while(source != NULL) { zdb_resourcerecord* node = zdb_query_ex_answer_make(source, label, PASS_ZCLASS_PARAMETER rtype, pool); node->next = head; head = node; source = source->next; } *headp = head; } /** @brief Appends a list of database records to a list of nodes with a specific TTL * * @param source a pointer to the ttlrdata to put into the node * @param name the owner of the record * @param zclass (if more than one class is supported in the database) * @param rtype the type of the record * @param ttl the ttl of the record set * @param headp a pointer to the section list * @param pool the memory pool * * 12 uses */ static void zdb_query_ex_answer_appendlist_ttl(const zdb_packed_ttlrdata* source, const u8* label, DECLARE_ZCLASS_PARAMETER u16 rtype, u32 ttl, zdb_resourcerecord** headp, u8 * restrict * pool) { yassert(source != NULL && label != NULL); zdb_resourcerecord* next = *headp; while(source != NULL) { zdb_resourcerecord* node = zdb_query_ex_answer_make_ttl(source, label, PASS_ZCLASS_PARAMETER rtype, ttl, pool); node->next = next; next = node; source = source->next; } *headp = next; } /** @brief Appends a list of database records to a list of nodes * * At the end * * @param source a pointer to the ttlrdata to put into the node * @param name the owner of the record * @param zclass (if more than one class is supported in the database) * @param rtype the type of the record * @param headp a pointer to the section list * @param pool the memory pool * * 5 uses */ static void zdb_query_ex_answer_append(const zdb_packed_ttlrdata* source, const u8* label, DECLARE_ZCLASS_PARAMETER u16 type, zdb_resourcerecord** headp, u8 * restrict * pool) { yassert(source != NULL); yassert(label != NULL); zdb_resourcerecord* next = *headp; zdb_resourcerecord* head = zdb_query_ex_answer_make(source, label, PASS_ZCLASS_PARAMETER type, pool); if(next != NULL) { while(next->next != NULL) { next = next->next; } next->next = head; } else { *headp = head; } } /** @brief Appends a list of database records to a list of nodes with a specific TTL * * At the end * * @param source a pointer to the ttlrdata to put into the node * @param name the owner of the record * @param zclass (if more than one class is supported in the database) * @param rtype the type of the record * @param ttl the ttl of the record * @param headp a pointer to the section list * @param pool the memory pool * * 16 uses */ static void zdb_query_ex_answer_append_ttl(const zdb_packed_ttlrdata* source, const u8* label, DECLARE_ZCLASS_PARAMETER u16 rtype, u32 ttl, zdb_resourcerecord** headp, u8 * restrict * pool) { yassert(source != NULL); yassert(label != NULL); zdb_resourcerecord* next = *headp; zdb_resourcerecord* head = zdb_query_ex_answer_make_ttl(source, label, PASS_ZCLASS_PARAMETER rtype, ttl, pool); if(next != NULL) { while(next->next != NULL) /* look for the last node */ { next = next->next; } next->next = head; /* set the value */ } else { *headp = head; /* set the head */ } } /** @brief Appends an RRSIG record set to a list of nodes with a specific TTL * * At the end * * @param source a pointer to the ttlrdata to put into the node * @param name the owner of the record * @param zclass (if more than one class is supported in the database) * @param ttl the ttl of the record * @param headp a pointer to the section list * @param pool the memory pool * * @return a resource record suitable for network serialisation * * 2 uses */ static inline void zdb_query_ex_answer_append_rrsig(const zdb_packed_ttlrdata *source, const u8 *label, DECLARE_ZCLASS_PARAMETER u32 ttl, zdb_resourcerecord **headp, u8 * restrict * pool) { zdb_query_ex_answer_append_ttl(source, label, PASS_ZCLASS_PARAMETER TYPE_RRSIG, ttl, headp, pool); } #if ZDB_HAS_DNSSEC_SUPPORT != 0 /** @brief Appends the RRSIG rrset that covers the given type * * At the end * * @param label the database label that owns the rrset * @param label_fqdn the owner of the records * @param zclass (if more than one class is supported in the database) * @param ttl the ttl of the record * @param headp a pointer to the section list * @param pool the memory pool * * 20 uses */ static void zdb_query_ex_answer_append_type_rrsigs(const zdb_rr_label *label, const u8 *label_fqdn, u16 rtype, DECLARE_ZCLASS_PARAMETER u32 ttl, zdb_resourcerecord **headp, u8 * restrict * pool) { const zdb_packed_ttlrdata *type_rrsig = rrsig_find_first(label, rtype); while(type_rrsig != NULL) { zdb_query_ex_answer_append_rrsig(type_rrsig, label_fqdn, PASS_ZCLASS_PARAMETER ttl, headp, pool); type_rrsig = rrsig_find_next(type_rrsig, rtype); } } /** @brief Appends the RRSIG rrset that covers the given type * * At the end * * @param rrsig_list an RRSIG rrset to take the signatures from * @param label_fqdn the owner of the records * @param zclass (if more than one class is supported in the database) * @param ttl the ttl of the record * @param headp a pointer to the section list * @param pool the memory pool * * 2 uses */ static void zdb_query_ex_answer_append_type_rrsigs_from(const zdb_packed_ttlrdata *rrsig_list, const u8 *label_fqdn, u16 rtype, DECLARE_ZCLASS_PARAMETER u32 ttl, zdb_resourcerecord **headp, u8 * restrict * pool) { const zdb_packed_ttlrdata *rrsig = rrsig_list; do { if(RRSIG_TYPE_COVERED(rrsig) == rtype) { zdb_query_ex_answer_append_rrsig(rrsig, label_fqdn, PASS_ZCLASS_PARAMETER ttl, headp, pool); } rrsig = rrsig->next; } while(rrsig != NULL); } /** @brief Appends the NSEC interval for the given name * * At the end * * @param zone the zone * @param name the name path * @param dups the label that cannot be added (used for wildcards) * @param headp a pointer to the section list * @param pool the memory pool * * 3 uses */ static void zdb_query_ex_add_nsec_interval(const zdb_zone *zone, const dnsname_vector* name, zdb_rr_label* dups, zdb_resourcerecord** headp, u8 * restrict * pool) { zdb_rr_label *nsec_interval_label; u8* nsec_dnsname = NULL; u32 min_ttl; zdb_zone_getminttl(zone, &min_ttl); nsec_interval_label = nsec_find_interval(zone, name, &nsec_dnsname, pool); yassert(nsec_interval_label != NULL); if(/*(nsec_interval_label != NULL) && */(nsec_interval_label != dups)) { zdb_packed_ttlrdata *nsec_interval_label_nsec = zdb_record_find(&nsec_interval_label->resource_record_set, TYPE_NSEC); if(nsec_interval_label_nsec != NULL) { zdb_packed_ttlrdata *nsec_interval_label_nsec_rrsig = rrsig_find_first(nsec_interval_label, TYPE_NSEC); if(nsec_interval_label_nsec_rrsig != NULL) { zdb_query_ex_answer_append_ttl(nsec_interval_label_nsec, nsec_dnsname, PASS_ZONE_ZCLASS_PARAMETER TYPE_NSEC, min_ttl, headp, pool); do { zdb_query_ex_answer_append_ttl(nsec_interval_label_nsec_rrsig, nsec_dnsname, PASS_ZONE_ZCLASS_PARAMETER TYPE_RRSIG, min_ttl, headp, pool); nsec_interval_label_nsec_rrsig = rrsig_find_next(nsec_interval_label_nsec_rrsig, TYPE_NSEC); } while(nsec_interval_label_nsec_rrsig != NULL); } } } } #endif /** @brief Appends the SOA negative ttl record * * At the end * * @param zone the zone * @param headp a pointer to the section list * @param pool the memory pool * * 3 uses */ static void zdb_query_ex_answer_append_soa_nttl(const zdb_zone *zone, zdb_resourcerecord **headp,u8 * restrict * pool) { yassert(zone != NULL); const u8* label = zone->origin; #if ZDB_RECORDS_MAX_CLASS != 1 u16 zclass = zone->zclass; #endif zdb_rr_collection* apex_records = &zone->apex->resource_record_set; zdb_packed_ttlrdata* zone_soa = zdb_record_find(apex_records, TYPE_SOA); zdb_resourcerecord* next = *headp; u32 ttl; zdb_zone_getminttl(zone, &ttl); zdb_resourcerecord* node = zdb_query_ex_answer_make_ttl(zone_soa, label, PASS_ZCLASS_PARAMETER TYPE_SOA, ttl, pool); if(next != NULL) { while(next->next != NULL) { next = next->next; } next->next = node; } else { *headp = node; } } /** @brief Appends the SOA negative ttl record and its signature * * At the end * * @param zone the zone * @param headp a pointer to the section list * @param pool the memory pool * * @returns the minimum TTL (OBSOLETE !) * * 3 uses */ static u32 zdb_query_ex_answer_append_soa_rrsig_nttl(const zdb_zone *zone, zdb_resourcerecord **headp, u8 * restrict * pool) { yassert(zone != NULL); const u8* label_fqdn = zone->origin; #if ZDB_RECORDS_MAX_CLASS != 1 u16 zclass = zone->zclass; #endif zdb_rr_collection* apex_records = &zone->apex->resource_record_set; zdb_packed_ttlrdata* zone_soa = zdb_record_find(apex_records, TYPE_SOA); zdb_resourcerecord* next = *headp; u32 ttl; zdb_zone_getminttl(zone, &ttl); zdb_resourcerecord* node = zdb_query_ex_answer_make_ttl(zone_soa, label_fqdn, PASS_ZCLASS_PARAMETER TYPE_SOA, ttl, pool); if(next != NULL) { while(next->next != NULL) { next = next->next; } next->next = node; } else { *headp = node; } zdb_query_ex_answer_append_type_rrsigs(zone->apex, label_fqdn, TYPE_SOA, PASS_ZCLASS_PARAMETER ttl, headp, pool); return ttl; } /** * @brief Returns the label for the dns_name, relative to the apex of the zone * * @param zone the zone * @param dns_name the name of the label to find * * @return a pointer the label * * 2 uses */ static zdb_rr_label* zdb_query_rr_label_find_relative(const zdb_zone* zone, const u8* dns_name) { /* * Get the relative path */ const dnslabel_vector_reference origin = (const dnslabel_vector_reference)zone->origin_vector.labels; s32 origin_top = zone->origin_vector.size; dnslabel_vector name; s32 name_top = dnsname_to_dnslabel_vector(dns_name, name); s32 i; for(i = 0; i <= origin_top; i++) { if(!dnslabel_equals(origin[origin_top - i], name[name_top - i])) { return NULL; } } /* * At this point we got the relative path, get the label * */ zdb_rr_label* rr_label = zdb_rr_label_find(zone->apex, name, (name_top - origin_top) - 1); return rr_label; } /** * @brief Appends all the IPs (A & AAAA) under a name on the given zone * * @param zone the zone * @param dns_name the name of the label to find * @param zclass (if more than one class is supported in the database) * @param headp a pointer to the section list * @param pool the memory pool * @param dnssec dnssec enabled or not * * 1 use */ static inline void zdb_query_ex_answer_append_ips(const zdb_zone* zone, const u8* dns_name, DECLARE_ZCLASS_PARAMETER zdb_resourcerecord** headp, u8 * restrict * pool, bool dnssec) { /* Find relatively from the zone */ yassert(dns_name != NULL); zdb_rr_label* rr_label = zdb_query_rr_label_find_relative(zone, dns_name); if(rr_label != NULL) { /* Get the label, instead of the type in the label */ zdb_packed_ttlrdata* a = zdb_record_find(&rr_label->resource_record_set, TYPE_A); if(a != NULL) { zdb_query_ex_answer_appendlist(a, dns_name, PASS_ZCLASS_PARAMETER TYPE_A, headp, pool); #if ZDB_HAS_DNSSEC_SUPPORT != 0 if(dnssec) { zdb_query_ex_answer_append_type_rrsigs(rr_label, dns_name, TYPE_A, PASS_ZCLASS_PARAMETER a->ttl, headp, pool); } #endif } zdb_packed_ttlrdata* aaaa = zdb_record_find(&rr_label->resource_record_set, TYPE_AAAA); if(aaaa != NULL) { zdb_query_ex_answer_appendlist(aaaa, dns_name, PASS_ZCLASS_PARAMETER TYPE_AAAA, headp, pool); #if ZDB_HAS_DNSSEC_SUPPORT != 0 if(dnssec) { zdb_query_ex_answer_append_type_rrsigs(rr_label, dns_name, TYPE_AAAA, PASS_ZCLASS_PARAMETER aaaa->ttl, headp, pool); } #endif } } } /** * @brief Update a name set with the name found in an RDATA * * @param source the record rdata containing the name to add * @param headp a pointer to the section list * @param rtype the type of the record * @param set collection where to add the name * * 10 use */ static void update_additionals_dname_set(const zdb_packed_ttlrdata* source, DECLARE_ZCLASS_PARAMETER u16 rtype, dnsname_set* set) { if(source == NULL) { return; } u32 offset = 0; switch(rtype) { case TYPE_MX: { offset = 2; /* fallthrough */ } case TYPE_NS: { do { /* ADD NS "A/AAAA" TO ADDITIONAL */ const u8 *dns_name = ZDB_PACKEDRECORD_PTR_RDATAPTR(source); dns_name += offset; if(!dnsname_set_insert(set, dns_name)) { break; } source = source->next; } while(source != NULL); break; } } } /** * @brief Update a name set with the name found in an RDATA * * @param zone * @param zclass (if more than one class is supported in the database) * @param set collection where to add the name * @param headp a pointer to the section list * @param pool the memory pool * @param dnssec dnssec enabled or not * * 10 use */ static void append_additionals_dname_set(const zdb_zone* zone, DECLARE_ZCLASS_PARAMETER dnsname_set* set, zdb_resourcerecord** headp, u8 * restrict * pool, bool dnssec) { dnsname_set_iterator iter; dnsname_set_iterator_init(set, &iter); while(dnsname_set_iterator_hasnext(&iter)) { /* ADD NS "A/AAAA" TO ADDITIONAL */ const u8* dns_name = dnsname_set_iterator_next_node(&iter)->key; zdb_query_ex_answer_append_ips(zone, dns_name, PASS_ZCLASS_PARAMETER headp, pool, dnssec); } } /** * @brief Appends NS records to a section * * Appends NS records from the label to the referenced section * Also appends RRSIG for these NS * * @param qname * @param rr_label_info * @param headp a pointer to the section list * @param pool the memory pool * @param dnssec dnssec enabled or not * * 3 uses */ static zdb_packed_ttlrdata* append_authority(const u8 * qname, DECLARE_ZCLASS_PARAMETER const zdb_rr_label_find_ext_data* rr_label_info, zdb_resourcerecord** headp, u8 * restrict * pool, bool dnssec) { zdb_packed_ttlrdata* authority = zdb_record_find(&rr_label_info->authority->resource_record_set, TYPE_NS); if(authority != NULL) { s32 i = rr_label_info->authority_index; while(i > 0) { qname += qname[0] + 1; i--; } zdb_query_ex_answer_appendrndlist(authority, qname, PASS_ZCLASS_PARAMETER TYPE_NS, headp, pool); #if ZDB_HAS_DNSSEC_SUPPORT != 0 if(dnssec) { zdb_query_ex_answer_append_type_rrsigs(rr_label_info->authority, qname, TYPE_NS, PASS_ZCLASS_PARAMETER authority->ttl, headp, pool); zdb_packed_ttlrdata* dsset = zdb_record_find(&rr_label_info->authority->resource_record_set, TYPE_DS); if(dsset != NULL) { zdb_query_ex_answer_appendlist(dsset, qname, PASS_ZCLASS_PARAMETER TYPE_DS, headp, pool); zdb_query_ex_answer_append_type_rrsigs(rr_label_info->authority, qname, TYPE_DS, PASS_ZCLASS_PARAMETER dsset->ttl, headp, pool); } } #endif } return authority; } #if ZDB_HAS_NSEC3_SUPPORT != 0 /** * @brief Appends the NSEC3 - NODATA answer to the section * * @param zone the zone * @param rr_label the covered label * @param name the owner name * @param apex_index the index of the apex in the name * @param type the type of record required * @param zclass (if more than one class is supported in the database) * @param headp a pointer to the section list * @param pool the memory pool * * 2 uses */ static inline void zdb_query_ex_append_nsec3_nodata(const zdb_zone *zone, const zdb_rr_label *rr_label, const dnsname_vector *name, s32 apex_index, u16 rtype, DECLARE_ZCLASS_PARAMETER zdb_resourcerecord** headp, u8 * restrict * pool) { //nsec3_zone* n3 = zone->nsec.nsec3; u8 *nsec3_owner = NULL; u8 *closest_nsec3_owner = NULL; u32 min_ttl; zdb_zone_getminttl(zone, &min_ttl); zdb_packed_ttlrdata* nsec3 = NULL; const zdb_packed_ttlrdata* nsec3_rrsig; zdb_packed_ttlrdata* closest_nsec3; const zdb_packed_ttlrdata* closest_nsec3_rrsig; if(!IS_WILD_LABEL(rr_label->name)) { if(rtype != TYPE_DS) { nsec3_nodata_error(zone, rr_label, name, apex_index, pool, &nsec3_owner, &nsec3, &nsec3_rrsig, &closest_nsec3_owner, &closest_nsec3, &closest_nsec3_rrsig); } else // type is DS { closest_nsec3 = NULL; closest_nsec3_rrsig = NULL; if((rr_label->nsec.dnssec != NULL)) { nsec3_zone_item *owner_nsec3 = rr_label->nsec.nsec3->self; nsec3_zone *n3 = zone->nsec.nsec3; if(owner_nsec3 != NULL) { nsec3_zone_item_to_new_zdb_packed_ttlrdata_parm nsec3_parms = { n3, owner_nsec3, zone->origin, pool, min_ttl }; nsec3_zone_item_to_new_zdb_packed_ttlrdata( &nsec3_parms, &nsec3_owner, &nsec3, &nsec3_rrsig); } } else { u8 *wild_closest_nsec3_owner = NULL; zdb_packed_ttlrdata* wild_closest_nsec3; const zdb_packed_ttlrdata* wild_closest_nsec3_rrsig; /* closest encloser proof */ nsec3_wild_nodata_error(zone, rr_label, name, apex_index, pool, &nsec3_owner, &nsec3, &nsec3_rrsig, &closest_nsec3_owner, &closest_nsec3, &closest_nsec3_rrsig, &wild_closest_nsec3_owner, &wild_closest_nsec3, &wild_closest_nsec3_rrsig); if((closest_nsec3 != NULL) && (closest_nsec3_rrsig != NULL)) { #ifdef DEBUG log_debug("zdb_query_ex: nsec3_nodata_error: closest_nsec3_owner: %{dnsname}", closest_nsec3_owner); #endif zdb_query_ex_answer_append_ttl(closest_nsec3, closest_nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_NSEC3, min_ttl, headp, pool); zdb_query_ex_answer_appendlist_ttl(closest_nsec3_rrsig, closest_nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_RRSIG, min_ttl, headp, pool); if(NSEC3_RDATA_IS_OPTOUT(ZDB_PACKEDRECORD_PTR_RDATAPTR(closest_nsec3)) && (nsec3 != NULL) && (nsec3_rrsig != NULL)) { #ifdef DEBUG log_debug("zdb_query_ex: nsec3_nodata_error: nsec3_owner: %{dnsname}", nsec3_owner); #endif zdb_query_ex_answer_append_ttl(nsec3, nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_NSEC3, min_ttl, headp, pool); zdb_query_ex_answer_appendlist_ttl(nsec3_rrsig, nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_RRSIG, min_ttl, headp, pool); } } return; } } } else { u8 *wild_closest_nsec3_owner = NULL; zdb_packed_ttlrdata* wild_closest_nsec3; const zdb_packed_ttlrdata* wild_closest_nsec3_rrsig; nsec3_wild_nodata_error(zone, rr_label, name, apex_index, pool, &nsec3_owner, &nsec3, &nsec3_rrsig, &closest_nsec3_owner, &closest_nsec3, &closest_nsec3_rrsig, &wild_closest_nsec3_owner, &wild_closest_nsec3, &wild_closest_nsec3_rrsig); if((wild_closest_nsec3 != NULL) && (wild_closest_nsec3_rrsig != NULL)) { #ifdef DEBUG log_debug("zdb_query_ex: nsec3_nodata_error: closest_nsec3_owner: %{dnsname}", closest_nsec3_owner); #endif zdb_query_ex_answer_append_ttl(wild_closest_nsec3, wild_closest_nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_NSEC3, min_ttl, headp, pool); zdb_query_ex_answer_appendlist_ttl(wild_closest_nsec3_rrsig, wild_closest_nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_RRSIG, min_ttl, headp, pool); } } if((nsec3 != NULL) && (nsec3_rrsig != NULL)) { #ifdef DEBUG log_debug("zdb_query_ex: nsec3_nodata_error: nsec3_owner: %{dnsname}", nsec3_owner); #endif zdb_query_ex_answer_append_ttl(nsec3, nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_NSEC3, min_ttl, headp, pool); zdb_query_ex_answer_appendlist_ttl(nsec3_rrsig, nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_RRSIG, min_ttl, headp, pool); } if((closest_nsec3 != NULL) && (closest_nsec3_rrsig != NULL)) { #ifdef DEBUG log_debug("zdb_query_ex: nsec3_nodata_error: closest_nsec3_owner: %{dnsname}", closest_nsec3_owner); #endif zdb_query_ex_answer_append_ttl(closest_nsec3, closest_nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_NSEC3, min_ttl, headp, pool); zdb_query_ex_answer_appendlist_ttl(closest_nsec3_rrsig, closest_nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_RRSIG, min_ttl, headp, pool); } } /** * @brief Appends the wildcard NSEC3 - DATA answer to the section * * @param zone the zone * @param rr_label the covered label * @param name the owner name * @param apex_index the index of the apex in the name * @param zclass (if more than one class is supported in the database) * @param headp a pointer to the section list * @param pool the memory pool * * 2 uses */ static inline void zdb_query_ex_append_wild_nsec3_data(const zdb_zone *zone, const zdb_rr_label *rr_label, const dnsname_vector *name, s32 apex_index, DECLARE_ZCLASS_PARAMETER zdb_resourcerecord** headp, u8 * restrict * pool) { yassert(IS_WILD_LABEL(rr_label->name)); //nsec3_zone* n3 = zone->nsec.nsec3; u8 *nsec3_owner = NULL; u8 *closest_nsec3_owner = NULL; u8 *wild_closest_nsec3_owner = NULL; u32 min_ttl; zdb_zone_getminttl(zone, &min_ttl); zdb_packed_ttlrdata* nsec3; const zdb_packed_ttlrdata* nsec3_rrsig; zdb_packed_ttlrdata* closest_nsec3; const zdb_packed_ttlrdata* closest_nsec3_rrsig; zdb_packed_ttlrdata* wild_closest_nsec3; const zdb_packed_ttlrdata* wild_closest_nsec3_rrsig; nsec3_wild_nodata_error(zone, rr_label, name, apex_index, pool, &nsec3_owner, &nsec3, &nsec3_rrsig, &closest_nsec3_owner, &closest_nsec3, &closest_nsec3_rrsig, &wild_closest_nsec3_owner, &wild_closest_nsec3, &wild_closest_nsec3_rrsig); if((nsec3 != NULL) && (nsec3_rrsig != NULL)) { #ifdef DEBUG log_debug("zdb_query_ex: nsec3_nodata_error: nsec3_owner: %{dnsname}", nsec3_owner); #endif zdb_query_ex_answer_append_ttl(nsec3, nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_NSEC3, min_ttl, headp, pool); zdb_query_ex_answer_appendlist_ttl(nsec3_rrsig, nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_RRSIG, min_ttl, headp, pool); } if((closest_nsec3 != NULL) && (closest_nsec3_rrsig != NULL)) { #ifdef DEBUG log_debug("zdb_query_ex: nsec3_nodata_error: closest_nsec3_owner: %{dnsname}", closest_nsec3_owner); #endif zdb_query_ex_answer_append_ttl(closest_nsec3, closest_nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_NSEC3, min_ttl, headp, pool); zdb_query_ex_answer_appendlist_ttl(closest_nsec3_rrsig, closest_nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_RRSIG, min_ttl, headp, pool); } } /** * @brief Appends the NSEC3 delegation answer to the section * * @param zone the zone * @param rr_label the covered label * @param name the owner name * @param apex_index the index of the apex in the name * @param zclass (if more than one class is supported in the database) * @param headp a pointer to the section list * @param pool the memory pool * * 3 uses */ static inline void zdb_query_ex_append_nsec3_delegation(const zdb_zone *zone, const zdb_rr_label_find_ext_data *rr_label_info, const dnsname_vector *name, s32 apex_index, DECLARE_ZCLASS_PARAMETER zdb_resourcerecord **headp, u8 * restrict * pool) { zdb_rr_label *authority = rr_label_info->authority; u32 min_ttl; zdb_zone_getminttl(zone, &min_ttl); if((authority->nsec.nsec3 != NULL) && (authority->nsec.nsec3->self != NULL)) { /* add it */ u8 *authority_nsec3_owner = NULL; nsec3_zone* n3 = zone->nsec.nsec3; zdb_packed_ttlrdata *authority_nsec3; const zdb_packed_ttlrdata *authority_nsec3_rrsig; nsec3_zone_item_to_new_zdb_packed_ttlrdata_parm nsec3_parms = { n3, authority->nsec.nsec3->self, zone->origin, pool, min_ttl }; nsec3_zone_item_to_new_zdb_packed_ttlrdata( &nsec3_parms, &authority_nsec3_owner, &authority_nsec3, &authority_nsec3_rrsig); zdb_query_ex_answer_append_ttl(authority_nsec3, authority_nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_NSEC3, min_ttl, headp, pool); if(authority_nsec3_rrsig != NULL) { zdb_query_ex_answer_appendlist_ttl(authority_nsec3_rrsig, authority_nsec3_owner, PASS_ZCLASS_PARAMETER TYPE_RRSIG, min_ttl, headp, pool); } } else { // add closest provable encloser proof zdb_query_ex_append_nsec3_nodata(zone, authority, name, apex_index, 0, PASS_ZCLASS_PARAMETER headp, pool); } } #endif #if ZDB_HAS_NSEC_SUPPORT != 0 /** * @brief Appends the NSEC records of a label to the section * * @param rr_label the covered label * @param qname the owner name * @param min_ttl the minimum ttl (OBSOLETE) * @param zclass (if more than one class is supported in the database) * @param headp a pointer to the section list * @param pool the memory pool * * 2 uses */ static inline void zdb_query_ex_append_nsec_records(const zdb_rr_label *rr_label, const u8 * restrict qname, u32 min_ttl, DECLARE_ZCLASS_PARAMETER zdb_resourcerecord **headp, u8 * restrict * pool) { zdb_packed_ttlrdata *rr_label_nsec_record = zdb_record_find(&rr_label->resource_record_set, TYPE_NSEC); if(rr_label_nsec_record != NULL) { zdb_query_ex_answer_append(rr_label_nsec_record, qname, PASS_ZCLASS_PARAMETER TYPE_NSEC, headp, pool); zdb_query_ex_answer_append_type_rrsigs(rr_label, qname, TYPE_NSEC, PASS_ZCLASS_PARAMETER rr_label_nsec_record->ttl, headp, pool); } } #endif /** @brief Destroys a zdb_resourcerecord* single linked list. * * Destroys a zdb_resourcerecord* single linked list created by a zdb_query* * * @param[in] rr the head of the sll. * * 3 uses */ void zdb_destroy_resourcerecord_list(zdb_resourcerecord *rr) { } /** * @brief Handles what to do when a record has not been found (NXRRSET) * * @param zone the zone * @param rr_label_info details about the labels on the path of the query * @param qname name of the query * @param name name of the query (vector) * @param sp index of the label in the name (vector) * @param top * @param type * @param zclass (if more than one class is supported in the database) * @param ans_auth_add a pointer to the section list * @param pool the memory pool * @param additionals_dname_set * * 3 uses */ static inline ya_result zdb_query_ex_record_not_found(const zdb_zone *zone, const zdb_rr_label_find_ext_data *rr_label_info, const u8* qname, const dnsname_vector *name, s32 sp_label_index, s32 top, u16 type, DECLARE_ZCLASS_PARAMETER u8 * restrict * pool, bool dnssec, zdb_query_ex_answer *ans_auth_add, dnsname_set *additionals_dname_set) { zdb_rr_label *rr_label = rr_label_info->answer; // NXRRSET #if ZDB_HAS_NSEC3_SUPPORT != 0 if(dnssec && ZONE_NSEC3_AVAILABLE(zone)) { zdb_packed_ttlrdata *zone_soa = zdb_record_find(&zone->apex->resource_record_set, TYPE_SOA); u32 min_ttl; zdb_zone_getminttl(zone, &min_ttl); if( ((type == TYPE_DS) && ((rr_label->flags & (ZDB_RR_LABEL_UNDERDELEGATION)) != 0 )) || ((type != TYPE_DS) && ((rr_label->flags & (ZDB_RR_LABEL_DELEGATION|ZDB_RR_LABEL_UNDERDELEGATION)) != 0 )) ) { /* * Add all the NS and their signature */ zdb_rr_label *authority = rr_label_info->authority; zdb_packed_ttlrdata* rr_label_ns = zdb_record_find(&authority->resource_record_set, TYPE_NS); if(rr_label_ns != NULL) { const u8* auth_name = name->labels[rr_label_info->authority_index]; zdb_query_ex_answer_appendlist(rr_label_ns, auth_name, PASS_ZCLASS_PARAMETER TYPE_NS, &ans_auth_add->authority, pool); zdb_query_ex_answer_append_type_rrsigs(rr_label, auth_name, PASS_ZCLASS_PARAMETER TYPE_NS, rr_label_ns->ttl, &ans_auth_add->authority, pool); update_additionals_dname_set(rr_label_ns, PASS_ZCLASS_PARAMETER TYPE_NS, additionals_dname_set); append_additionals_dname_set(zone, PASS_ZCLASS_PARAMETER additionals_dname_set, &ans_auth_add->additional, pool, FALSE); zdb_packed_ttlrdata* label_ds = zdb_record_find(&authority->resource_record_set, TYPE_DS); if(label_ds != NULL) { zdb_query_ex_answer_appendlist(label_ds, auth_name, PASS_ZCLASS_PARAMETER TYPE_DS, &ans_auth_add->authority, pool); zdb_query_ex_answer_append_type_rrsigs(authority, auth_name, TYPE_DS, PASS_ZCLASS_PARAMETER label_ds->ttl, &ans_auth_add->authority, pool); /* ans_auth_add->is_delegation = TRUE; later */ return FP_BASIC_RECORD_NOTFOUND; } } } else { zdb_query_ex_answer_append_ttl(zone_soa, zone->origin, PASS_ZCLASS_PARAMETER TYPE_SOA, min_ttl, &ans_auth_add->authority, pool); zdb_query_ex_answer_append_type_rrsigs(zone->apex, zone->origin, TYPE_SOA, PASS_ZCLASS_PARAMETER min_ttl, &ans_auth_add->authority, pool); } if(type != 0) { zdb_query_ex_append_nsec3_nodata(zone, rr_label, name, top, type, PASS_ZCLASS_PARAMETER &ans_auth_add->authority, pool); } else { /* * If there is an NSEC3 RR that matches the delegation name, then that * NSEC3 RR MUST be included in the response. The DS bit in the type * bit maps of the NSEC3 RR MUST NOT be set. * * If the zone is Opt-Out, then there may not be an NSEC3 RR * corresponding to the delegation. In this case, the closest provable * encloser proof MUST be included in the response. The included NSEC3 * RR that covers the "next closer" name for the delegation MUST have * the Opt-Out flag set to one. (Note that this will be the case unless * something has gone wrong). */ zdb_query_ex_append_nsec3_delegation(zone, rr_label_info, name, top, PASS_ZCLASS_PARAMETER &ans_auth_add->authority, pool); } #ifdef DEBUG log_debug("zdb_query_ex: FP_NSEC3_RECORD_NOTFOUND (NSEC3)"); #endif return FP_NSEC3_RECORD_NOTFOUND; } else /* We had the label, not the record, it's not NSEC3 : */ #endif { /** Got label but no record : show the authority * AA */ /* * Gets the NS from, ie: a.nic.eu ... this is wrong. zdb_packed_ttlrdata* authority = zdb_record_find(&rr_label->resource_record_set, TYPE_NS); */ if((rr_label_info->authority->flags & ZDB_RR_LABEL_APEX) == 0) { zdb_packed_ttlrdata* authority; if( ( ((type == TYPE_DS) && ((rr_label->flags & (ZDB_RR_LABEL_UNDERDELEGATION)) != 0 )) || ((type != TYPE_DS) && ((rr_label->flags & (ZDB_RR_LABEL_DELEGATION|ZDB_RR_LABEL_UNDERDELEGATION)) != 0 )) ) && ( ((authority = zdb_record_find(&rr_label_info->authority->resource_record_set, TYPE_NS)) != NULL) ) ) { const u8* auth_name = name->labels[rr_label_info->authority_index]; zdb_query_ex_answer_appendrndlist(authority, auth_name, PASS_ZCLASS_PARAMETER TYPE_NS, &ans_auth_add->authority, pool); update_additionals_dname_set(authority, PASS_ZCLASS_PARAMETER TYPE_NS, additionals_dname_set); append_additionals_dname_set(zone, PASS_ZCLASS_PARAMETER additionals_dname_set, &ans_auth_add->additional, pool, FALSE); /* ans_auth_add->is_delegation = TRUE; later */ } else { /* append the SOA */ if(!dnssec) { zdb_query_ex_answer_append_soa_nttl(zone, &ans_auth_add->authority, pool); } else { zdb_query_ex_answer_append_soa_rrsig_nttl(zone, &ans_auth_add->authority, pool); } } } else { /* append the SOA */ if(!dnssec) { zdb_query_ex_answer_append_soa_nttl(zone, &ans_auth_add->authority, pool); } else { zdb_query_ex_answer_append_soa_rrsig_nttl(zone, &ans_auth_add->authority, pool); } } #if ZDB_HAS_NSEC_SUPPORT != 0 if(dnssec && ZONE_NSEC_AVAILABLE(zone)) { zdb_rr_label* rr_label_authority = rr_label_info->authority; zdb_packed_ttlrdata *delegation_signer = zdb_record_find(&rr_label_authority->resource_record_set, TYPE_DS); if(delegation_signer != NULL) { const u8 * authority_qname = zdb_rr_label_info_get_authority_qname(qname, rr_label_info); zdb_query_ex_answer_appendlist(delegation_signer , authority_qname, PASS_ZCLASS_PARAMETER TYPE_DS, &ans_auth_add->authority, pool); zdb_query_ex_answer_append_type_rrsigs(rr_label_authority, authority_qname, TYPE_DS, PASS_ZCLASS_PARAMETER delegation_signer->ttl, &ans_auth_add->authority, pool); } else { u8 *wild_name = (u8*)qname; if(IS_WILD_LABEL(rr_label->name)) { wild_name = *pool; *pool += ALIGN16(MAX_DOMAIN_LENGTH + 2); wild_name[0] = 1; wild_name[1] = (u8)'*'; dnslabel_vector_to_dnsname(&name->labels[name->size - sp_label_index], sp_label_index, &wild_name[2]); } zdb_packed_ttlrdata *rr_label_nsec_record = zdb_record_find(&rr_label->resource_record_set, TYPE_NSEC); if(rr_label_nsec_record != NULL) { zdb_query_ex_answer_append(rr_label_nsec_record, wild_name, PASS_ZCLASS_PARAMETER TYPE_NSEC, &ans_auth_add->authority, pool); zdb_query_ex_answer_append_type_rrsigs(rr_label, wild_name, TYPE_NSEC, PASS_ZCLASS_PARAMETER rr_label_nsec_record->ttl, &ans_auth_add->authority, pool); } zdb_query_ex_add_nsec_interval(zone, name, rr_label, &ans_auth_add->authority, pool); } } #endif } return FP_BASIC_RECORD_NOTFOUND; } /** * @brief destroys an answer made by zdb_query* * * @param ans_auth_add a pointer to the answer structure * */ #ifndef zdb_query_ex_answer_destroy void zdb_query_ex_answer_destroy(zdb_query_ex_answer* ans_auth_add) { zdb_destroy_resourcerecord_list(ans_auth_add->answer); ans_auth_add->answer = NULL; zdb_destroy_resourcerecord_list(ans_auth_add->authority); ans_auth_add->authority = NULL; zdb_destroy_resourcerecord_list(ans_auth_add->additional); ans_auth_add->additional = NULL; } #endif /** * @brief Queries the database given a message * * @param db the database * @param mesg the message * @param ans_auth_add the structure that will contain the sections of the answer * @param pool_buffer a big enough buffer used for the memory pool * * @return the status of the message (probably useless) */ finger_print zdb_query_ex(zdb *db, message_data *mesg, zdb_query_ex_answer *ans_auth_add, u8 * restrict pool_buffer) { yassert(ans_auth_add != NULL); //const u8 * restrict qname = mesg->qname; u8 *qname = mesg->qname; #if ZDB_RECORDS_MAX_CLASS != 1 const u16 zclass = mesg->qclass; #endif zdb_rr_label_find_ext_data rr_label_info; u16 type = mesg->qtype; const process_flags_t flags = mesg->process_flags; /** Check that we are even allowed to handle that class */ #if ZDB_RECORDS_MAX_CLASS == 1 if(mesg->qclass != CLASS_IN) { #ifdef DEBUG log_debug("zdb_query_ex: FP_CLASS_NOTFOUND"); #endif return FP_CLASS_NOTFOUND; } #endif #if HAS_DYNAMIC_PROVISIONING zdb_lock(db, ZDB_MUTEX_READER); #endif #if ZDB_RECORDS_MAX_CLASS != 1 u16 host_zclass = ntohs(zclass); /* no choice */ if(host_zclass > ZDB_RECORDS_MAX_CLASS) { return FP_CLASS_NOTFOUND; } #endif bool dnssec = (mesg->rcode_ext & RCODE_EXT_DNSSEC) != 0; /** * MANDATORY, INITIALISES A LOCAL MEMORY POOL * * This is actually a macro found in dnsname_set.h */ dnsname_vector name; DEBUG_RESET_dnsname(name); dnsname_to_dnsname_vector(qname, &name); u8 * restrict * pool = &pool_buffer; /* * Find closest matching label * Should return a stack of zones */ zdb_zone_label_pointer_array zone_label_stack; s32 top = zdb_zone_label_match(db, &name, zone_label_stack); s32 sp = top; zdb_packed_ttlrdata* answer; /* This flag means that there HAS to be an authority section */ bool authority_required = flags & PROCESS_FL_AUTHORITY_AUTH; /* This flag means the names in the authority must be (internally) resolved if possible */ bool additionals_required = flags & PROCESS_FL_ADDITIONAL_AUTH; switch(type) { case TYPE_DNSKEY: { authority_required = FALSE; additionals_required = FALSE; break; } } /* Got a stack of zone labels with and without zone cuts */ /* Search the label on the zone files */ /* While we have labels along the path */ if(type == TYPE_DS) // This is the only type that can only be found outside of the zone { // In order to avoid to hit said zone, I skip the last label. if(name.size == sp - 1) // we have a perfect match (DS for an APEX), try to get outside ... { s32 parent_sp = sp; while(--parent_sp >= 0) { /* Get the "bottom" label (top being ".") */ zdb_zone_label* zone_label = zone_label_stack[parent_sp]; /* Is there a zone file at this level ? If yes, search into it. */ if(zone_label->zone != NULL) { // got it. sp = parent_sp; MESSAGE_HIFLAGS(mesg->buffer) |= AA_BITS; break; } } authority_required = FALSE; } } while(sp >= 0) { /* Get the "bottom" label (top being ".") */ zdb_zone_label* zone_label = zone_label_stack[sp]; /* Is there a zone file at this level ? If yes, search into it. */ if(zone_label->zone != NULL) { zdb_zone *zone = zone_label->zone; /// @todo edf 20141016 -- see if locking + RC can be avoided. (locking alone probably cannot) /* * lock */ LOCK(zone); #ifdef DEBUG log_debug("zdb_query_ex: zone %{dnsname}, flags=%x", zone->origin, zone->apex->flags); #endif /* * We know the zone, and its extension here ... */ { /* * Filter handling (ACL) * NOTE: the return code has to be fingerprint-based */ if(FAIL(zone->query_access_filter(mesg, zone->extension))) { #ifdef DEBUG log_debug("zdb_query_ex: FP_ACCESS_REJECTED"); #endif UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_ACCESS_REJECTED; } } /** * The ACL have been passed so ... now check that the zone is valid */ if(ZDB_ZONE_INVALID(zone)) { /** * @note the blocks could be reversed and jump if the zone is invalid (help the branch prediction) */ #ifdef DEBUG log_debug("zdb_query_ex: FP_ZONE_EXPIRED"); #endif UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_INVALID_ZONE; } //MESSAGE_HIFLAGS(mesg->buffer) |= AA_BITS; dnsname_set additionals_dname_set; dnsname_set_init(&additionals_dname_set); /* * In one query, get the authority and the closest (longest) path to the domain we are looking for. */ zdb_rr_label *rr_label = zdb_rr_label_find_ext(zone->apex, name.labels, name.size - sp, &rr_label_info); /* Has a label been found ? */ if(rr_label != NULL) { /* * Got the label. I will not find anything relevant by going * up to another zone file. * * We set the AA bit iff we are not at or under a delegation. * * The ZDB_RR_LABEL_DELEGATION flag means the label is a delegation. * This means that it only contains NS & DNSSEC records + may have sub-labels for glues * * ZDB_RR_LABEL_UNDERDELEGATION means we are below a ZDB_RR_LABEL_DELEGATION label * */ /* * CNAME alias handling */ if(((rr_label->flags & ZDB_RR_LABEL_HASCNAME) != 0) && (type != TYPE_CNAME) && (type != TYPE_ANY)) { /* * The label is an alias: * * Add the CNAME and restart the query from the alias */ if(ans_auth_add->depth >= ZDB_CNAME_LOOP_MAX) { log_warn("CNAME depth at %{dnsname} is bigger than allowed %d>=%d", qname, ans_auth_add->depth, ZDB_CNAME_LOOP_MAX); MESSAGE_HIFLAGS(mesg->buffer) |= AA_BITS; UNLOCK(zone); // stop there #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_CNAME_MAXIMUM_DEPTH; } ans_auth_add->depth++; if((answer = zdb_record_find(&rr_label->resource_record_set, TYPE_CNAME)) != NULL) { /* The RDATA in answer is the fqdn to a label with an A record (list) */ /* There can only be one cname for a given owner */ /* Append all A/AAAA records associated to the CNAME AFTER the CNAME record */ zdb_resourcerecord *rr = ans_auth_add->answer; u32 cname_depth_count = 0; /* I don't want to allocate that globally for now */ while(rr != NULL) { if((rr->rtype == TYPE_CNAME) && (ZDB_PACKEDRECORD_PTR_RDATAPTR(rr->ttl_rdata) == ZDB_PACKEDRECORD_PTR_RDATAPTR(answer))) { /* LOOP */ log_warn("CNAME loop at %{dnsname}", qname); MESSAGE_HIFLAGS(mesg->buffer) |= AA_BITS; #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_CNAME_LOOP; } cname_depth_count++; rr = rr->next; } u8* cname_owner = *pool; *pool += ALIGN16(dnsname_copy(*pool, qname)); /* ONE record */ zdb_query_ex_answer_append(answer, cname_owner, PASS_ZCLASS_PARAMETER TYPE_CNAME, &ans_auth_add->answer, pool); if(dnssec) { zdb_query_ex_answer_append_type_rrsigs(rr_label, cname_owner, TYPE_CNAME, PASS_ZCLASS_PARAMETER answer->ttl, &ans_auth_add->answer, pool); } dnsname_copy(mesg->qname, ZDB_PACKEDRECORD_PTR_RDATAPTR(answer)); finger_print fp = zdb_query_ex(db, mesg, ans_auth_add, pool_buffer); UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return fp; } else { /* * We expected a CNAME record but found none. * This is NOT supposed to happen. * */ UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_CNAME_BROKEN; } } if((rr_label->flags & (ZDB_RR_LABEL_DELEGATION|ZDB_RR_LABEL_UNDERDELEGATION) ) == 0) { MESSAGE_HIFLAGS(mesg->buffer) |= AA_BITS; } else { /* * we are AT or UNDER a delegation * We can only find (show) NS, DS, RRSIG, NSEC records from the query * * The answer WILL be a referral ... */ ans_auth_add->delegation = 1; switch(type) { /* for these ones : give the rrset for the type and clear AA */ case TYPE_DS: { if((rr_label->flags & ZDB_RR_LABEL_DELEGATION) != 0) { MESSAGE_HIFLAGS(mesg->buffer) |= AA_BITS; } else if((rr_label->flags & ZDB_RR_LABEL_UNDERDELEGATION) != 0) { MESSAGE_HIFLAGS(mesg->buffer) &= ~AA_BITS; } authority_required = FALSE; break; } case TYPE_NSEC: { if((rr_label->flags & ZDB_RR_LABEL_UNDERDELEGATION) == 0) { MESSAGE_HIFLAGS(mesg->buffer) |= AA_BITS; } break; } /* for these ones : give the rrset for the type */ case TYPE_NS: break; /* for this one : present the delegation */ case TYPE_ANY: authority_required = FALSE; break; /* for the rest : NSEC ? */ default: /* * do not try to look for it * * faster: go to label but no record, but let's avoid gotos ... */ type = 0; break; } } /* * First let's handle "simple" cases. ANY will be handled in another part of the code. */ if(type != TYPE_ANY) { /* * From the label that has been found, get the RRSET for the required type (zdb_packed_ttlrdata*) */ if((answer = zdb_record_find(&rr_label->resource_record_set, type)) != NULL) { /* A match has been found */ /* NS case */ if(type == TYPE_NS) { zdb_resourcerecord **section; /* * If the label is a delegation, the NS have to be added into authority, * else they have to be added into answer. * */ if((rr_label->flags & ZDB_RR_LABEL_DELEGATION) != 0) { section = &ans_auth_add->authority; /* ans_auth_add->is_delegation = TRUE; later */ } else { section = &ans_auth_add->answer; } /* * Add the NS records in random order in the right section * */ zdb_query_ex_answer_appendrndlist(answer, qname, PASS_ZCLASS_PARAMETER type, section, pool); #if ZDB_HAS_DNSSEC_SUPPORT != 0 /* * Append all the RRSIG of NS from the label */ if(dnssec) { zdb_query_ex_answer_append_type_rrsigs(rr_label, qname, TYPE_NS, PASS_ZCLASS_PARAMETER answer->ttl, section, pool); if((rr_label->flags & ZDB_RR_LABEL_DELEGATION) != 0) { zdb_packed_ttlrdata* label_ds = zdb_record_find(&rr_label->resource_record_set, TYPE_DS); if(label_ds != NULL) { zdb_query_ex_answer_appendlist(label_ds, qname, PASS_ZCLASS_PARAMETER TYPE_DS, &ans_auth_add->authority, pool); zdb_query_ex_answer_append_type_rrsigs(rr_label, qname, TYPE_DS, PASS_ZCLASS_PARAMETER label_ds->ttl, &ans_auth_add->authority, pool); } else if(ZONE_NSEC3_AVAILABLE(zone)) { /** * If there is an NSEC3 RR that matches the delegation name, then that * NSEC3 RR MUST be included in the response. The DS bit in the type * bit maps of the NSEC3 RR MUST NOT be set. * * If the zone is Opt-Out, then there may not be an NSEC3 RR * corresponding to the delegation. In this case, the closest provable * encloser proof MUST be included in the response. The included NSEC3 * RR that covers the "next closer" name for the delegation MUST have * the Opt-Out flag set to one. (Note that this will be the case unless * something has gone wrong). * */ zdb_query_ex_append_nsec3_delegation(zone, &rr_label_info, &name, top, PASS_ZCLASS_PARAMETER &ans_auth_add->authority, pool); } else if(ZONE_NSEC_AVAILABLE(zone)) { /* * Append the NSEC of rr_label and all its signatures */ u32 min_ttl = 900; zdb_zone_getminttl(zone, &min_ttl); zdb_query_ex_append_nsec_records(rr_label, qname, min_ttl, PASS_ZCLASS_PARAMETER &ans_auth_add->authority, pool); } } } #endif /* * authority is never required since we have it already * */ /* * fetch all the additional records for the required type (NS and MX types) * add them to the additional section */ if(additionals_required) { update_additionals_dname_set(answer, PASS_ZCLASS_PARAMETER type, &additionals_dname_set); append_additionals_dname_set(zone, PASS_ZCLASS_PARAMETER &additionals_dname_set, &ans_auth_add->additional, pool, dnssec); } } else /* general case */ { /* * Add the records from the answer in random order to the answer section */ zdb_query_ex_answer_appendrndlist(answer, qname, PASS_ZCLASS_PARAMETER type, &ans_auth_add->answer, pool); #if ZDB_HAS_DNSSEC_SUPPORT != 0 /* * Append all the RRSIG of NS from the label */ if(dnssec) { zdb_query_ex_answer_append_type_rrsigs(rr_label, qname, type, PASS_ZCLASS_PARAMETER answer->ttl, &ans_auth_add->answer, pool); if(IS_WILD_LABEL(rr_label->name)) { /** * If there is a wildcard match for QNAME and QTYPE, then, in addition * to the expanded wildcard RRSet returned in the answer section of the * response, proof that the wildcard match was valid must be returned. * * This proof is accomplished by proving that both QNAME does not exist * and that the closest encloser of the QNAME and the immediate ancestor * of the wildcard are the same (i.e., the correct wildcard matched). * * To this end, the NSEC3 RR that covers the "next closer" name of the * immediate ancestor of the wildcard MUST be returned. * It is not necessary to return an NSEC3 RR that matches the closest * encloser, as the existence of this closest encloser is proven by * the presence of the expanded wildcard in the response. */ if(ZONE_NSEC3_AVAILABLE(zone)) { zdb_query_ex_append_wild_nsec3_data(zone, rr_label, &name, top, PASS_ZCLASS_PARAMETER &ans_auth_add->authority, pool); } else if(ZONE_NSEC_AVAILABLE(zone)) { /* add the NSEC of the wildcard and its signature(s) */ zdb_query_ex_add_nsec_interval(zone, &name, NULL, &ans_auth_add->authority, pool); } } } #endif /* * if authority required */ if(authority_required) { if((type == TYPE_NSEC || type == TYPE_DS) && (rr_label_info.authority != zone->apex)) { rr_label_info.authority = zone->apex; rr_label_info.authority_index = sp - 1; } zdb_packed_ttlrdata* authority = append_authority(qname, PASS_ZCLASS_PARAMETER &rr_label_info, &ans_auth_add->authority, pool, dnssec); if(additionals_required) { update_additionals_dname_set(authority, PASS_ZCLASS_PARAMETER TYPE_NS, &additionals_dname_set); } } /* * fetch all the additional records for the required type (NS and MX types) * add them to the additional section */ if(additionals_required) { update_additionals_dname_set(answer, PASS_ZCLASS_PARAMETER type, &additionals_dname_set); append_additionals_dname_set(zone, PASS_ZCLASS_PARAMETER &additionals_dname_set, &ans_auth_add->additional, pool, dnssec); } /* resolve authority */ } #ifdef DEBUG log_debug("zdb_query_ex: FP_BASIC_RECORD_FOUND"); #endif UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_BASIC_RECORD_FOUND; } /* if found the record of the requested type */ else { /* label but no record */ /** * Got the label, but not the record. * This should branch to NSEC3 if it is supported. */ ya_result return_value = zdb_query_ex_record_not_found(zone, &rr_label_info, qname, &name, sp, top, type, PASS_ZCLASS_PARAMETER pool, dnssec, ans_auth_add, &additionals_dname_set); #ifdef DEBUG log_debug("zdb_query_ex: FP_BASIC_RECORD_NOTFOUND (done)"); #endif UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return (finger_print)return_value; } } else /* We got the label BUT type == TYPE_ANY */ { if((rr_label->flags & (ZDB_RR_LABEL_DELEGATION|ZDB_RR_LABEL_UNDERDELEGATION) ) == 0) { zdb_packed_ttlrdata *soa = NULL; zdb_packed_ttlrdata *rrsig_list = zdb_record_find(&rr_label->resource_record_set, TYPE_RRSIG); bool answers = FALSE; /* We do iterate on ALL the types of the label */ btree_iterator iter; btree_iterator_init(rr_label->resource_record_set, &iter); while(btree_iterator_hasnext(&iter)) { btree_node* nodep = btree_iterator_next_node(&iter); u16 type = nodep->hash; answers = TRUE; zdb_packed_ttlrdata* ttlrdata = (zdb_packed_ttlrdata*)nodep->data; /** * @note: doing the list once may be faster ... * And YES maybe, because of the jump and because the list is supposed to * be VERY small (like 1-3) */ switch(type) { case TYPE_SOA: { soa = ttlrdata; continue; } case TYPE_NS: { /* NO NEED FOR AUTHORITY */ authority_required = FALSE; /* fallthrough is EXPECTED */ } case TYPE_MX: case TYPE_CNAME: { /* ADD MX "A/AAAA/GLUE" TO ADDITIONAL */ if(additionals_required) { update_additionals_dname_set(ttlrdata, PASS_ZCLASS_PARAMETER type, &additionals_dname_set); } break; } case TYPE_RRSIG: { // signatures will be added by type continue; } default: { break; } } zdb_query_ex_answer_appendrndlist(ttlrdata, qname, PASS_ZCLASS_PARAMETER type, &ans_auth_add->answer, pool); if(rrsig_list != NULL) { zdb_query_ex_answer_append_type_rrsigs_from(rrsig_list, qname, type, PASS_ZCLASS_PARAMETER ttlrdata->ttl, &ans_auth_add->answer, pool); } } /* now we can insert the soa, if any has been found, at the head of the list */ if(soa != NULL) { zdb_resourcerecord* soa_rr = zdb_query_ex_answer_make(soa, qname, PASS_ZCLASS_PARAMETER TYPE_SOA, pool); soa_rr->next = ans_auth_add->answer; ans_auth_add->answer = soa_rr; if(rrsig_list != NULL) { zdb_query_ex_answer_append_type_rrsigs_from(rrsig_list, qname, TYPE_SOA, PASS_ZCLASS_PARAMETER soa_rr->ttl, &ans_auth_add->answer, pool); } } if(answers) { if(authority_required) { // not at or under a delegation zdb_packed_ttlrdata* authority = append_authority(qname, PASS_ZCLASS_PARAMETER &rr_label_info, &ans_auth_add->authority, pool, dnssec); if(additionals_required) { update_additionals_dname_set(authority, PASS_ZCLASS_PARAMETER TYPE_NS, &additionals_dname_set); } } /* if authority required */ if(additionals_required) { append_additionals_dname_set(zone, PASS_ZCLASS_PARAMETER &additionals_dname_set, &ans_auth_add->additional, pool, dnssec); } if(dnssec && IS_WILD_LABEL(rr_label->name)) { /** * If there is a wildcard match for QNAME and QTYPE, then, in addition * to the expanded wildcard RRSet returned in the answer section of the * response, proof that the wildcard match was valid must be returned. * * This proof is accomplished by proving that both QNAME does not exist * and that the closest encloser of the QNAME and the immediate ancestor * of the wildcard are the same (i.e., the correct wildcard matched). * * To this end, the NSEC3 RR that covers the "next closer" name of the * immediate ancestor of the wildcard MUST be returned. * It is not necessary to return an NSEC3 RR that matches the closest * encloser, as the existence of this closest encloser is proven by * the presence of the expanded wildcard in the response. */ if(ZONE_NSEC3_AVAILABLE(zone)) { zdb_query_ex_append_wild_nsec3_data(zone, rr_label, &name, top, PASS_ZCLASS_PARAMETER &ans_auth_add->authority, pool); } else if(ZONE_NSEC_AVAILABLE(zone)) { /* add the NSEC of the wildcard and its signature(s) */ zdb_query_ex_add_nsec_interval(zone, &name, NULL, &ans_auth_add->authority, pool); } } #ifdef DEBUG log_debug("zdb_query_ex: FP_BASIC_RECORD_FOUND (any)"); #endif UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_BASIC_RECORD_FOUND; } else { /* no records found ... */ finger_print fp = (finger_print)zdb_query_ex_record_not_found(zone, &rr_label_info, qname, &name, sp, top, TYPE_ANY, PASS_ZCLASS_PARAMETER pool, dnssec, ans_auth_add, &additionals_dname_set); UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return fp; } } else { /* ANY, at or under a delegation */ zdb_query_ex_record_not_found(zone, &rr_label_info, qname, &name, sp, top, 0, PASS_ZCLASS_PARAMETER pool, dnssec, ans_auth_add, &additionals_dname_set); UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_BASIC_RECORD_FOUND; } } } /* end of if rr_label!=NULL => */ else /* rr_label == NULL */ { zdb_rr_label* rr_label_authority = rr_label_info.authority; if(rr_label_authority != zone->apex) { MESSAGE_HIFLAGS(mesg->buffer) &= ~AA_BITS; zdb_packed_ttlrdata *authority = zdb_record_find(&rr_label_authority->resource_record_set, TYPE_NS); if(authority != NULL) { const u8 * authority_qname = zdb_rr_label_info_get_authority_qname(qname, &rr_label_info); zdb_query_ex_answer_appendrndlist(authority, authority_qname, PASS_ZCLASS_PARAMETER TYPE_NS, &ans_auth_add->authority, pool); update_additionals_dname_set(authority, PASS_ZCLASS_PARAMETER TYPE_NS, &additionals_dname_set); append_additionals_dname_set(zone, PASS_ZCLASS_PARAMETER &additionals_dname_set, &ans_auth_add->additional, pool, FALSE); if(dnssec) { zdb_query_ex_answer_append_type_rrsigs(rr_label_authority, authority_qname, TYPE_NS, PASS_ZCLASS_PARAMETER authority->ttl, &ans_auth_add->authority, pool); zdb_packed_ttlrdata *delegation_signer = zdb_record_find(&rr_label_authority->resource_record_set, TYPE_DS); if(delegation_signer != NULL) { zdb_query_ex_answer_appendlist(delegation_signer , authority_qname, PASS_ZCLASS_PARAMETER TYPE_DS, &ans_auth_add->authority, pool); zdb_query_ex_answer_append_type_rrsigs(rr_label_authority, authority_qname, TYPE_DS, PASS_ZCLASS_PARAMETER delegation_signer->ttl, &ans_auth_add->authority, pool); } else { if(ZONE_NSEC3_AVAILABLE(zone)) { // add ... ? it looks like the record that covers the path that has been found in the zone // is used for the digest, then the interval is shown // add apex NSEC3 (wildcard) zdb_query_ex_append_nsec3_delegation(zone, &rr_label_info, &name, top, PASS_ZCLASS_PARAMETER &ans_auth_add->authority, pool); } else if(ZONE_NSEC_AVAILABLE(zone)) { /* * Append the NSEC of rr_label and all its signatures */ u32 min_ttl = 900; zdb_zone_getminttl(zone, &min_ttl); zdb_query_ex_append_nsec_records(rr_label_authority, authority_qname, min_ttl, PASS_ZCLASS_PARAMETER &ans_auth_add->authority, pool); } } } ans_auth_add->delegation = 1; #ifdef DEBUG log_debug("zdb_query_ex: FP_BASIC_LABEL_NOTFOUND (done)"); #endif /* ans_auth_add->is_delegation = TRUE; later */ UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_BASIC_LABEL_DELEGATION; } } else { MESSAGE_HIFLAGS(mesg->buffer) |= AA_BITS; } } /* LABEL NOT FOUND: We stop the processing and falltrough NSEC(3) or the basic case. */ UNLOCK(zone); /* Stop looking, skip cache */ break; } /* if(zone!=NULL) */ sp--; } /* while ... */ /************************************************* * * * At this point we are not an authority anymore. * * * *************************************************/ /*if(authority_required) { */ /* * Get the most relevant label (lowest zone). * Try to do NSEC3 or NSEC with it. */ zdb_zone* zone; sp = top; // top >= 0, so we can enter here and zone is assigned yassert(sp >= 0); while(sp >= 0) // scan-build false positive: we ALWAYS get into this loop at least once { zdb_zone_label* zone_label = zone_label_stack[sp--]; if((zone = zone_label->zone) != NULL) { /* if type == DS && zone->origin = qname then the return value is NOERROR instead of NXDOMAIN */ break; } } if(zone == NULL) // zone is ALWAYS assigned because top is >= 0 { #ifdef DEBUG log_debug("zdb_query_ex: FP_NOZONE_FOUND (2)"); #endif // ??? zone_pointer_out->apex->flags |= ZDB_RR_LABEL_MASTER_OF; #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_NOZONE_FOUND; } LOCK(zone); if(!ZDB_ZONE_INVALID(zone)) { /* zone is the most relevant zone */ #if ZDB_HAS_NSEC3_SUPPORT != 0 if(dnssec) { if(ZONE_NSEC3_AVAILABLE(zone)) { //nsec3_zone* n3 = zone->nsec.nsec3; u8 *next_closer_owner = NULL; zdb_packed_ttlrdata* next_closer; const zdb_packed_ttlrdata* next_closer_rrsig; u8 *closer_encloser_owner = NULL; zdb_packed_ttlrdata* closer_encloser; const zdb_packed_ttlrdata* closer_encloser_rrsig; u8 *wild_closer_encloser_owner = NULL; zdb_packed_ttlrdata* wild_closer_encloser; const zdb_packed_ttlrdata* wild_closer_encloser_rrsig; #ifdef DEBUG log_debug("nsec3_name_error"); #endif nsec3_name_error( zone, &name, top, pool, &next_closer_owner, &next_closer, &next_closer_rrsig, &closer_encloser_owner, &closer_encloser, &closer_encloser_rrsig, &wild_closer_encloser_owner, &wild_closer_encloser, &wild_closer_encloser_rrsig); int min_ttl = zdb_query_ex_answer_append_soa_rrsig_nttl(zone, &ans_auth_add->authority, pool); #ifdef DEBUG log_debug("zdb_query_ex: nsec3_name_error: next_closer_owner: %{dnsname}", next_closer_owner); #endif if(next_closer != NULL /*&& next_closer_rrsig != NULL*/) { zdb_query_ex_answer_append_ttl(next_closer, next_closer_owner, PASS_ZCLASS_PARAMETER TYPE_NSEC3, min_ttl, &ans_auth_add->authority, pool); if(next_closer_rrsig != NULL) { zdb_query_ex_answer_appendlist_ttl(next_closer_rrsig, next_closer_owner, PASS_ZCLASS_PARAMETER TYPE_RRSIG, min_ttl, &ans_auth_add->authority, pool); } } if(closer_encloser != NULL/* && closer_encloser_rrsig != NULL*/) { #ifdef DEBUG log_debug("zdb_query_ex: nsec3_name_error: closer_encloser_owner: %{dnsname}", closer_encloser_owner); #endif zdb_query_ex_answer_append_ttl(closer_encloser, closer_encloser_owner, PASS_ZCLASS_PARAMETER TYPE_NSEC3, min_ttl, &ans_auth_add->authority, pool); if(closer_encloser_rrsig != NULL) { zdb_query_ex_answer_appendlist_ttl(closer_encloser_rrsig, closer_encloser_owner, PASS_ZCLASS_PARAMETER TYPE_RRSIG, min_ttl, &ans_auth_add->authority, pool); } } if(wild_closer_encloser != NULL) { #ifdef DEBUG log_debug("zdb_query_ex: nsec3_name_error: wild_closer_encloser_owner: %{dnsname}", wild_closer_encloser_owner); #endif zdb_query_ex_answer_append_ttl(wild_closer_encloser, wild_closer_encloser_owner, PASS_ZCLASS_PARAMETER TYPE_NSEC3, min_ttl, &ans_auth_add->authority, pool); if(wild_closer_encloser_rrsig != NULL) { zdb_query_ex_answer_appendlist_ttl(wild_closer_encloser_rrsig, wild_closer_encloser_owner, PASS_ZCLASS_PARAMETER TYPE_RRSIG, min_ttl, &ans_auth_add->authority, pool); } } #ifdef DEBUG log_debug("zdb_query_ex: FP_NSEC3_LABEL_NOTFOUND (done)"); #endif UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_NSEC3_LABEL_NOTFOUND; } else /* Following will be either the NSEC answer or just the SOA added in the authority */ #endif /* ZDB_HAS_NSEC3_SUPPORT != 0 */ /* NSEC, if possible */ #if ZDB_HAS_NSEC_SUPPORT != 0 /* TODO */ if(ZONE_NSEC_AVAILABLE(zone)) { /* * Unknown and not in the cache : NSEC * */ /* * zone label stack * * #0 : top * #1 : com, org, ... * #2 : example, ... * * Which is the inverse of the dnslabel stack * * dnslabel stack * * #0 : example * #1 : com * #2 : NOTHING ("." is not stored) * * */ /* * Get the SOA + NSEC + RRIGs for the zone */ //zdb_rr_label *apex_label = zone->apex; zdb_query_ex_answer_append_soa_rrsig_nttl(zone, &ans_auth_add->authority, pool); u8 *encloser_nsec_name = NULL; u8 *wild_encloser_nsec_name = NULL; zdb_rr_label *encloser_nsec_label; zdb_rr_label *wildencloser_nsec_label; nsec_name_error(zone, &name, rr_label_info.closest_index, pool, &encloser_nsec_name, &encloser_nsec_label, &wild_encloser_nsec_name, &wildencloser_nsec_label); if(encloser_nsec_label != NULL) { zdb_packed_ttlrdata *encloser_nsec_rr = zdb_record_find(&encloser_nsec_label->resource_record_set, TYPE_NSEC); if(encloser_nsec_rr != NULL) { zdb_query_ex_answer_append(encloser_nsec_rr, encloser_nsec_name, DECLARE_ZCLASS_PARAMETER TYPE_NSEC, &ans_auth_add->authority, pool); zdb_query_ex_answer_append_type_rrsigs(encloser_nsec_label, encloser_nsec_name, TYPE_NSEC, DECLARE_ZCLASS_PARAMETER encloser_nsec_rr->ttl, &ans_auth_add->authority, pool); if(wildencloser_nsec_label != encloser_nsec_label) { zdb_packed_ttlrdata *wildencloser_nsec_rr = zdb_record_find(&wildencloser_nsec_label->resource_record_set, TYPE_NSEC); if(wildencloser_nsec_rr != NULL) { zdb_query_ex_answer_append(wildencloser_nsec_rr, wild_encloser_nsec_name, DECLARE_ZCLASS_PARAMETER TYPE_NSEC, &ans_auth_add->authority, pool); zdb_query_ex_answer_append_type_rrsigs(wildencloser_nsec_label, wild_encloser_nsec_name, TYPE_NSEC, DECLARE_ZCLASS_PARAMETER wildencloser_nsec_rr->ttl, &ans_auth_add->authority, pool); } } } } #ifdef DEBUG log_debug("zdb_query_ex: FP_NSEC_LABEL_NOTFOUND (done)"); #endif UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_NSEC_LABEL_NOTFOUND; } } #endif /* ZDB_HAS_NSEC_SUPPORT != 0 */ zdb_query_ex_answer_append_soa_nttl(zone, &ans_auth_add->authority, pool); #ifdef DEBUG log_debug("zdb_query_ex: FP_BASIC_LABEL_NOTFOUND (done)"); #endif UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_BASIC_LABEL_NOTFOUND; } else // if(!ZDB_ZONE_INVALID(zone)) { #ifdef DEBUG log_debug("zdb_query_ex: FP_ZONE_EXPIRED (2)"); #endif UNLOCK(zone); #if HAS_DYNAMIC_PROVISIONING zdb_unlock(db, ZDB_MUTEX_READER); #endif return FP_INVALID_ZONE; } } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_zone_write_text.c0000644000077100007710000000012412650131756023225 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.434344 30 ctime=1454597652.470344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_zone_write_text.c0000664000077100007710000004072012650131756023035 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include #include #include #include "dnsdb/zdb_zone_write.h" #include "dnsdb/zdb_error.h" #include "dnsdb/zdb_zone_label_iterator.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_zone.h" extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #if ZDB_HAS_NSEC3_SUPPORT!=0 #include "dnsdb/nsec3.h" #endif #define OUTPUT_BUFFER_SIZE 4096 #define DEFAULT_TTL 86400 #define FILE_RIGHTS 0644 #define TAB_SIZE 8 #define TTL_SIZE 8 #define INDENT_SPACES 40 #define INDENT_TABS (INDENT_SPACES/TAB_SIZE) /* * 0 1 * 1 1 * 2 1 * 3 1 * 4 2 */ static const char __TAB__[1] = {'\t'}; static const char __LF__[1] = {'\n'}; static void osprint_tab_padded(output_stream* os, char* str, u32 len, s32 tabs) { output_stream_write(os, (u8*)str, len); tabs -= (len / TAB_SIZE) + 1; while(tabs-- > 0) { output_stream_write(os, (u8*)__TAB__, 1); } } #ifdef DEBUG static void zdb_zone_rr_label_flags_format(const void *value, output_stream *os, s32 padding, char pad_char, bool left_justified, void* reserved_for_method_parameters) { (void)padding; (void)pad_char; (void)left_justified; (void)reserved_for_method_parameters; u32 flags = *((u16*)value); if((flags & ZDB_RR_LABEL_APEX) != 0) { output_stream_write(os, "A", 1); } if((flags & ZDB_RR_LABEL_NSEC) != 0) { output_stream_write(os, "1", 1); } if((flags & ZDB_RR_LABEL_NSEC3) != 0) { output_stream_write(os, "3", 1); } if((flags & ZDB_RR_LABEL_NSEC3_OPTOUT) != 0) { output_stream_write(os, "O", 1); } if((flags & ZDB_RR_LABEL_DNSSEC_EDIT) != 0) { output_stream_write(os, "E", 1); } if((flags & ZDB_RR_APEX_LABEL_FROZEN) != 0) { output_stream_write(os, "F", 1); } if((flags & ZDB_RR_LABEL_GOT_WILD) != 0) { output_stream_write(os, "*", 1); } if((flags & ZDB_RR_LABEL_UPDATING) != 0) { output_stream_write(os, "U", 1); } if((flags & ZDB_RR_LABEL_DELEGATION) != 0) { output_stream_write(os, "D", 1); } if((flags & ZDB_RR_LABEL_UNDERDELEGATION) != 0) { output_stream_write(os, "d", 1); } if((flags & ZDB_RR_LABEL_HASCNAME) != 0) { output_stream_write(os, "C", 1); } if((flags & ZDB_RR_LABEL_DROPCNAME) != 0) { output_stream_write(os, "c", 1); } if((flags & ZDB_RR_LABEL_INVALID_ZONE) != 0) { output_stream_write(os, "I", 1); } } #endif ya_result zdb_zone_write_text(const zdb_zone* zone, output_stream* fos, bool force_label) { output_stream bos; ya_result ret; u32 current_ttl = DEFAULT_TTL; u32 soa_nttl = zone->min_ttl; u32 label_len; u32 origin_len; u32 dot_origin_len; if(FAIL(ret = buffer_output_stream_init(fos, &bos, OUTPUT_BUFFER_SIZE))) { return ret; } #ifdef DEBUG format_writer status_flags_fw = {zdb_zone_rr_label_flags_format, NULL}; osprintln(&bos, "; A=apex 1=NSEC 3=NSEC3 O=NSEC3-OPTOUT E=dnssec-edited F=frozen/loading *=wildcard present U=updating D=at-delegation d=under-delegation C=has-CNAME c=no-CNAME-allowed I=invalid-zone"); #endif char label_cstr[2 + MAX_DOMAIN_LENGTH + 1]; origin_len = dnsname_len(zone->origin); { zdb_packed_ttlrdata* soa_ttlrdata = zdb_record_find(&zone->apex->resource_record_set, TYPE_SOA); if(soa_ttlrdata != NULL) { current_ttl = soa_ttlrdata->ttl; } } char dot_origin[1 + MAX_DOMAIN_LENGTH + 1]; dot_origin[0] = '.'; dot_origin_len = dnsname_to_cstr(&dot_origin[1], zone->origin) + 1; osformat(&bos, "$ORIGIN %{dnsname}\n$TTL %u\n", zone->origin, current_ttl); zdb_zone_label_iterator iter; btree_iterator records_iter; zdb_zone_label_iterator_init(zone, &iter); /* * Save each label, and its records. */ while(zdb_zone_label_iterator_hasnext(&iter)) { u32 len = zdb_zone_label_iterator_nextname_to_cstr(&iter, label_cstr); if(len != origin_len) { u32 n = len - origin_len; label_cstr[n] = '\0'; label_len = n; if((n > 0) && (label_cstr[n - 1] == '.')) { label_cstr[n - 1] = '\0'; label_len--; } } else { label_len = dnsname_to_cstr(label_cstr, zone->origin); } zdb_rr_label* label = zdb_zone_label_iterator_next(&iter); bool print_label = TRUE; zdb_packed_ttlrdata* soa_ttlrdata = zdb_record_find(&label->resource_record_set, TYPE_SOA); if(soa_ttlrdata != NULL) { if(print_label) { osprint_tab_padded(&bos, label_cstr, label_len, INDENT_TABS); u16 zclass = zdb_zone_getclass(zone); osformat(&bos, "\t%{dnsclass}%tSOA%t", &zclass, (TTL_SIZE/TAB_SIZE) + 1, TTL_SIZE/TAB_SIZE); } else { osprint_tab_padded(&bos, NULL, 0, INDENT_TABS); } ret = osprint_rdata(&bos, TYPE_SOA, ZDB_PACKEDRECORD_PTR_RDATAPTR(soa_ttlrdata), ZDB_PACKEDRECORD_PTR_RDATASIZE(soa_ttlrdata)); #ifdef DEBUG status_flags_fw.value = &label->flags; osformatln(&bos, " ; flags=%w", &status_flags_fw); #else output_stream_write(&bos, (const u8*)__LF__, 1); #endif if(FAIL(ret)) { osprintln(&bos, ";; ABOVE RECORD IS CORRUPTED"); } print_label = force_label; } if(dnscore_shuttingdown()) { output_stream_close(&bos); return STOPPED_BY_APPLICATION_SHUTDOWN; } btree_iterator_init(label->resource_record_set, &records_iter); while(btree_iterator_hasnext(&records_iter)) { btree_node* node = btree_iterator_next_node(&records_iter); u16 type = (u16)node->hash; if(type == TYPE_SOA) { continue; } zdb_packed_ttlrdata* ttlrdata_sll = (zdb_packed_ttlrdata*)node->data; u32 rrset_ttl = ttlrdata_sll->ttl; while(ttlrdata_sll != NULL) { if(print_label) { osprint_tab_padded(&bos, label_cstr, label_len, INDENT_TABS); } else { osprint_tab_padded(&bos, NULL, 0, INDENT_TABS); } if(current_ttl != rrset_ttl) { current_ttl = rrset_ttl; osformat(&bos, "\t%-" TOSTRING(TTL_SIZE) "u\t", current_ttl); } else { osformat(&bos, "%t", 1 + (TTL_SIZE/TAB_SIZE) + 1); } osformat(&bos, "%{dnstype}%t", &type, (TTL_SIZE/TAB_SIZE)); ret = osprint_rdata(&bos, type, ZDB_PACKEDRECORD_PTR_RDATAPTR(ttlrdata_sll), ZDB_PACKEDRECORD_PTR_RDATASIZE(ttlrdata_sll)); #ifdef DEBUG status_flags_fw.value = &label->flags; osformatln(&bos, " ; flags=%w", &status_flags_fw); #else output_stream_write(&bos, (const u8*)__LF__, 1); #endif if(FAIL(ret)) { osprintln(&bos, ";; ABOVE RECORD IS CORRUPTED"); } print_label = force_label; ttlrdata_sll = ttlrdata_sll->next; } } } #if ZDB_HAS_NSEC3_SUPPORT != 0 /* * If the zone is NSEC3, print the nsec3 data */ if(zdb_record_find(&zone->apex->resource_record_set, TYPE_NSEC3PARAM) != NULL) { const nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { u8 rdata[TYPE_BIT_MAPS_MAX_RDATA_SIZE]; u32 rdata_hash_offset = NSEC3_ZONE_RDATA_SIZE(n3); MEMCOPY(rdata, &n3->rdata[0], NSEC3_ZONE_RDATA_SIZE(n3)); nsec3_avl_iterator nsec3_items_iter; nsec3_avl_iterator_init(&n3->items, &nsec3_items_iter); if(nsec3_avl_iterator_hasnext(&nsec3_items_iter)) { nsec3_zone_item* first = nsec3_avl_iterator_next_node(&nsec3_items_iter); nsec3_zone_item* item = first; nsec3_zone_item* next_item; u8 digest_len = NSEC3_NODE_DIGEST_SIZE(first); do { if(dnscore_shuttingdown()) { output_stream_close(&bos); return STOPPED_BY_APPLICATION_SHUTDOWN; } if(nsec3_avl_iterator_hasnext(&nsec3_items_iter)) { next_item = nsec3_avl_iterator_next_node(&nsec3_items_iter); } else { next_item = first; } rdata[1] = item->flags; #if DEBUG if(item->rc == 1) { if(item->rc != 0) { if(item->label.owner != NSEC3_ZONE_FAKE_OWNER) { osformatln(&bos, ";; Owner: %{dnslabel}", item->label.owner->name); } else { osprintln(&bos, ";; Owner: FAKE (Owned by the parents of the zone)"); } } else { osprintln(&bos, ";; Owner: ERROR : RC=0"); } } else { if(item->rc > 0) { u16 i = item->rc - 1; do { if(item->label.owners[i] != NSEC3_ZONE_FAKE_OWNER) { osformatln(&bos, ";; Owner: %{dnslabel}", item->label.owners[i]->name); } else { osprintln(&bos, ";; Owner: FAKE (Owned by the parents of the zone)"); } } while(i-- > 0); } else { osprintln(&bos, ";; NO OWNER"); } } if(item->sc <= 1) { if(item->sc != 0) { osformatln(&bos, ";; Star: %{dnslabel}", item->star_label.owner->name); } } else { u16 i = item->sc - 1; do { osformatln(&bos, ";; Star: %{dnslabel}", item->star_label.owners[i]->name); } while(i-- > 0); } #endif u32 rdata_size = rdata_hash_offset; MEMCOPY(&rdata[rdata_size], next_item->digest, digest_len + 1); rdata_size += digest_len + 1; MEMCOPY(&rdata[rdata_size], item->type_bit_maps, item->type_bit_maps_size); rdata_size += item->type_bit_maps_size; ya_result hex32_len; if(FAIL(hex32_len = output_stream_write_base32hex(&bos, NSEC3_NODE_DIGEST_PTR(item), digest_len))) { return hex32_len; } output_stream_write(&bos, (const u8*)dot_origin, dot_origin_len); output_stream_write_u8(&bos, (u8)'\t'); osformat(&bos, "%-" TOSTRING(TTL_SIZE) "u\tNSEC3\t", soa_nttl); osprint_rdata(&bos, TYPE_NSEC3, rdata, rdata_size); osprintln(&bos, ""); zdb_packed_ttlrdata* rrsig = item->rrsig; while(rrsig != NULL) { u32 tabs = ((hex32_len+ dot_origin_len) / TAB_SIZE) + 1 + (TTL_SIZE/TAB_SIZE) + 1; osformat(&bos, "%tRRSIG\t", tabs); /* ${} requires a pointer to the data */ osprint_rdata(&bos, TYPE_RRSIG, ZDB_PACKEDRECORD_PTR_RDATAPTR(rrsig), ZDB_PACKEDRECORD_PTR_RDATASIZE(rrsig)); osprintln(&bos, ""); rrsig = rrsig->next; } item = next_item; } while(next_item != first); } /* If there is a first item*/ n3 = n3->next; } /* while n3 != NULL */ } #endif /* The filter closes the filtered */ output_stream_close(&bos); return SUCCESS; } /* * Without buffering: * * zdb_zone_write_text: 1245933248000 -> 1245933499739 (251739) * * With buffering: * * zdb_zone_write_text: 1245933590000 -> 1245933597877 (7877) * */ ya_result zdb_zone_write_text_file(const zdb_zone* zone, const char* output_file, bool force_label) { output_stream fos; ya_result ret; if(file_is_link(output_file) > 0) { if(unlink(output_file) < 0) { log_warn("could not delete symbolic link %s: %r", output_file, ERRNO_ERROR); } } if(ISOK(ret = file_output_stream_create(output_file, FILE_RIGHTS, &fos))) { if(FAIL(ret = zdb_zone_write_text(zone, &fos, force_label))) { unlink(output_file); } } return ret; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_zone_store_axfr.c0000644000077100007710000000012412650131756023203 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.442344 30 ctime=1454597652.462344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_zone_store_axfr.c0000664000077100007710000002550012650131756023012 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include "dnsdb/zdb_types.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_zone_label.h" #include "dnsdb/zdb_zone_label_iterator.h" #include "dnsdb/zdb_record.h" #include #include #if ZDB_HAS_NSEC3_SUPPORT!=0 #include "dnsdb/nsec3.h" #endif #include #include #include "dnsdb/zdb_utils.h" #include // With this set to 1, AXFR storage on disk will be extremely slow. // Meant to debug network faster than disk speeds. // The value is expressed in ms // // Keep this to 0 except if you need it to be slow #define DEBUG_SLOW_STORAGE_MS 0 // 100 #ifndef DEBUG #undef DEBUG_SLOW_STORAGE_MS #define DEBUG_SLOW_STORAGE_MS 0 #endif /* * */ struct type_class_ttl_size { u16 rtype; u16 rclass; u32 rttl; u16 rsize; }; #define TCTS_SIZE 10 static const u8 wild_wire[2] = {1, '*'}; ya_result zdb_zone_store_axfr(zdb_zone* zone, output_stream* os) { zdb_rr_label* label; u32 fqdn_len; ya_result err = SUCCESS; u8 fqdn[MAX_DOMAIN_LENGTH]; zdb_zone_label_iterator iter; btree_iterator type_iter; struct type_class_ttl_size rec; yassert((((u8*) & rec.rtype - (u8*) & rec) == 0) && (((u8*) & rec.rclass - (u8*) & rec) == 2) && (((u8*) & rec.rttl - (u8*) & rec) == 4) && (((u8*) & rec.rsize - (u8*) & rec) == 8) ); /* Else the struct is "aligned" ... and broken */ rec.rclass = zdb_zone_getclass(zone); /** @note: NATIVECLASS */ zdb_packed_ttlrdata* soa = zdb_record_find(&zone->apex->resource_record_set, TYPE_SOA); if(soa == NULL) { return ZDB_ERROR_GENERAL; } u32 minimum_ttl; zdb_zone_getminttl(zone, &minimum_ttl); rec.rtype = (TYPE_SOA); /** @note: NATIVETYPE */ rec.rttl = htonl(soa->ttl); rec.rsize = htons(soa->rdata_size); output_stream_write(os, zone->origin, dnsname_len(zone->origin)); output_stream_write(os, (u8*) & rec, TCTS_SIZE); output_stream_write(os, soa->rdata_start, soa->rdata_size); zdb_zone_label_iterator_init(zone, &iter); while(zdb_zone_label_iterator_hasnext(&iter)) { #if DEBUG_SLOW_STORAGE_MS > 0 usleep(DEBUG_SLOW_STORAGE_MS * 1000); #endif fqdn_len = zdb_zone_label_iterator_nextname(&iter, fqdn); label = zdb_zone_label_iterator_next(&iter); btree_iterator_init(label->resource_record_set, &type_iter); while(btree_iterator_hasnext(&type_iter)) { btree_node* type_node = btree_iterator_next_node(&type_iter); if(type_node->hash == TYPE_SOA) { continue; } rec.rtype = ((u16)type_node->hash); /** @note: NATIVETYPE */ zdb_packed_ttlrdata* rr_sll = (zdb_packed_ttlrdata*)type_node->data; do { rec.rttl = htonl(rr_sll->ttl); rec.rsize = htons(rr_sll->rdata_size); if(FAIL(err = output_stream_write(os, fqdn, fqdn_len))) { return err; } if(FAIL(err = output_stream_write(os, (u8*) & rec, TCTS_SIZE))) { return err; } if(FAIL(err = output_stream_write(os, rr_sll->rdata_start, rr_sll->rdata_size))) { return err; } rr_sll = rr_sll->next; } while(rr_sll != NULL); } } #if ZDB_HAS_NSEC3_SUPPORT != 0 /* * NSEC3 part of the DB */ if((zone->apex->flags & ZDB_RR_LABEL_NSEC3) != 0) { u32 origin_len = dnsname_len(zone->origin); /* * For each NSEC3PARAM struct ... */ nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { /* * Iterate the NSEC3 nodes */ nsec3_avl_iterator nsec3_items_iter; nsec3_avl_iterator_init(&n3->items, &nsec3_items_iter); if(nsec3_avl_iterator_hasnext(&nsec3_items_iter)) { nsec3_zone_item *first = nsec3_avl_iterator_next_node(&nsec3_items_iter); nsec3_zone_item *item = first; nsec3_zone_item *next_item; u8 digest_len = NSEC3_NODE_DIGEST_SIZE(first); u32 rdata_hash_offset = NSEC3_ZONE_RDATA_SIZE(n3); u32 encoded_digest_len = BASE32HEX_ENCODED_LEN(digest_len); do { if(nsec3_avl_iterator_hasnext(&nsec3_items_iter)) { next_item = nsec3_avl_iterator_next_node(&nsec3_items_iter); } else { next_item = first; } /* Writes the nsec3 item, wire format, to an output stream */ u32 rdata_size = rdata_hash_offset + digest_len + 1 + item->type_bit_maps_size; if(rdata_size > RDATA_MAX_LENGTH) { return ZDB_ERROR_GENERAL; } /* FQDN */ fqdn[0] = encoded_digest_len; base32hex_encode(NSEC3_NODE_DIGEST_PTR(item), digest_len, (char*)&fqdn[1]); if(FAIL(err = output_stream_write(os, fqdn, encoded_digest_len + 1))) { return err; } if(FAIL(err = output_stream_write(os, zone->origin, origin_len))) { return err; } if(FAIL(err = output_stream_write_u16(os, TYPE_NSEC3))) /** @note NATIVETYPE */ { return err; } if(FAIL(err = output_stream_write_u16(os, CLASS_IN))) /** @note NATIVECLASS */ { return err; } if(FAIL(err = output_stream_write_nu32(os, minimum_ttl))) { return err; } /* Write the data */ if(FAIL(err = output_stream_write_nu16(os, rdata_size))) { return err; } if(FAIL(err = output_stream_write_u8(os, n3->rdata[0]))) { return err; } if(FAIL(err = output_stream_write_u8(os, item->flags))) { return err; } if(FAIL(err = output_stream_write(os, &n3->rdata[2], rdata_hash_offset - 2))) { return err; } if(FAIL(err = output_stream_write(os, next_item->digest, digest_len + 1))) { return err; } if(FAIL(err = output_stream_write(os, item->type_bit_maps, item->type_bit_maps_size))) { return err; } zdb_packed_ttlrdata* rrsig = item->rrsig; while(rrsig != NULL) { output_stream_write(os, fqdn, encoded_digest_len + 1); output_stream_write(os, zone->origin, origin_len); output_stream_write_u16(os, TYPE_RRSIG); /** @note NATIVETYPE */ output_stream_write_u16(os, CLASS_IN); /** @note NATIVECLASS */ output_stream_write_nu32(os, rrsig->ttl); output_stream_write_nu16(os, rrsig->rdata_size); output_stream_write(os, rrsig->rdata_start, rrsig->rdata_size); rrsig = rrsig->next; } /* * nsec3 item written with its signatures * * Wire format * */ item = next_item; } while(next_item != first); } /* If there is a first item*/ n3 = n3-> next; } } #endif rec.rtype = (TYPE_SOA); /** @note: NATIVETYPE */ rec.rttl = htonl(soa->ttl); rec.rsize = htons(soa->rdata_size); output_stream_write(os, zone->origin, dnsname_len(zone->origin)); output_stream_write(os, (u8*) & rec, TCTS_SIZE); output_stream_write(os, soa->rdata_start, soa->rdata_size); return err; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec3_nodata_error.c0000644000077100007710000000012412650131756022707 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.408344 30 ctime=1454597652.535344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec3_nodata_error.c0000664000077100007710000001636412650131756022526 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include "dnsdb/nsec3_types.h" #include "dnsdb/nsec3_item.h" #include "dnsdb/nsec3_name_error.h" #include "dnsdb/rrsig.h" #include "dnsdb/zdb_zone.h" /* * It is assumed that zone is NSEC3. * The caller must ensure this is the case. */ /** * @note No Data Responses, QTYPE is not DS * * The server MUST include the NSEC3 RR that matches QNAME. This NSEC3 * RR MUST NOT have the bits corresponding to either the QTYPE or CNAME * set in its Type Bit Maps field. */ void nsec3_nodata_error(const zdb_zone *zone, const zdb_rr_label* owner, const dnsname_vector *qname, s32 apex_index, u8 * restrict * pool, u8 **out_owner_nsec3_owner, zdb_packed_ttlrdata** out_owner_nsec3, const zdb_packed_ttlrdata** out_owner_nsec3_rrsig, u8 **out_closest_encloser_nsec3_owner, zdb_packed_ttlrdata** out_closest_encloser_nsec3, const zdb_packed_ttlrdata** out_closest_encloser_nsec3_rrsig) { yassert(out_owner_nsec3_owner != NULL && out_owner_nsec3 != NULL && out_owner_nsec3_rrsig != NULL); yassert(out_closest_encloser_nsec3_owner != NULL && out_closest_encloser_nsec3 != NULL && out_closest_encloser_nsec3_rrsig != NULL); const nsec3_zone_item *owner_nsec3; nsec3_zone* n3 = zone->nsec.nsec3; u32 min_ttl = 900; zdb_zone_getminttl(zone, &min_ttl); nsec3_zone_item_to_new_zdb_packed_ttlrdata_parm nsec3_parms = { n3, NULL, zone->origin, pool, min_ttl }; if(owner->nsec.dnssec == NULL) { nsec3_closest_encloser_proof(zone, qname, apex_index, &owner_nsec3, &nsec3_parms.item, // closest_provable_encloser_nsec3 NULL ); nsec3_zone_item_to_new_zdb_packed_ttlrdata( &nsec3_parms, out_closest_encloser_nsec3_owner, out_closest_encloser_nsec3, out_closest_encloser_nsec3_rrsig); } else { owner_nsec3 = owner->nsec.nsec3->self; *out_closest_encloser_nsec3 = NULL; *out_closest_encloser_nsec3_rrsig = NULL; } /* Append all items + sig to the authority * Don't do dups */ nsec3_parms.item = owner_nsec3; nsec3_zone_item_to_new_zdb_packed_ttlrdata( &nsec3_parms, out_owner_nsec3_owner, out_owner_nsec3, out_owner_nsec3_rrsig); } /** * * @note Wildcard No Data Responses * * If there is a wildcard match for QNAME, but QTYPE is not present at * that name, the response MUST include a closest encloser proof for * QNAME and MUST include the NSEC3 RR that matches the wildcard. This * combination proves both that QNAME itself does not exist and that a * wildcard that matches QNAME does exist. Note that the closest * encloser to QNAME MUST be the immediate ancestor of the wildcard RR * (if this is not the case, then something has gone wrong). */ void nsec3_wild_nodata_error(const zdb_zone *zone, const zdb_rr_label *owner, const dnsname_vector *qname, u32 apex_index, u8 * restrict * pool, u8 **out_next_closer_nsec3_owner_p, zdb_packed_ttlrdata** out_encloser_nsec3, const zdb_packed_ttlrdata** out_encloser_nsec3_rrsig, u8 **out_closest_encloser_nsec3_owner_p, zdb_packed_ttlrdata** out_closest_encloser_nsec3, const zdb_packed_ttlrdata** out_closest_encloser_nsec3_rrsig, u8 **out_wild_closest_encloser_nsec3_owner_p, zdb_packed_ttlrdata** out_wild_closest_encloser_nsec3, const zdb_packed_ttlrdata** out_wild_closest_encloser_nsec3_rrsig) { yassert(out_next_closer_nsec3_owner_p != NULL && out_encloser_nsec3 != NULL && out_encloser_nsec3_rrsig != NULL); yassert(out_closest_encloser_nsec3_owner_p != NULL && out_closest_encloser_nsec3 != NULL && out_closest_encloser_nsec3_rrsig != NULL); yassert(out_wild_closest_encloser_nsec3_owner_p != NULL && out_wild_closest_encloser_nsec3 != NULL && out_wild_closest_encloser_nsec3_rrsig != NULL); nsec3_name_error(zone, qname, apex_index, pool, out_next_closer_nsec3_owner_p, out_encloser_nsec3, out_encloser_nsec3_rrsig, out_closest_encloser_nsec3_owner_p, out_closest_encloser_nsec3, out_closest_encloser_nsec3_rrsig, out_wild_closest_encloser_nsec3_owner_p, out_wild_closest_encloser_nsec3, out_wild_closest_encloser_nsec3_rrsig); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec3_owner.c0000644000077100007710000000012412650131756021362 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.325344 30 ctime=1454597652.538344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec3_owner.c0000664000077100007710000005210112650131756021166 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * Owners & Stars * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include "dnsdb/zdb_types.h" #include "dnsdb/nsec3_owner.h" #define NSEC3_OWNER_DEBUG 0 //#if NSEC3_OWNER_DEBUG #include #define MODULE_MSG_HANDLE g_dnssec_logger extern logger_handle *g_dnssec_logger; //#endif #define OWNER_NAME(owner_) (((owner_) != NULL) && ((owner_) != NSEC3_ZONE_FAKE_OWNER))?(owner_)->name:(u8*)"\004FAKE" #define ITEM_DIGEST(item__) (((item__) != NULL)?(item__)->digest:NULL) /****************************************************************************** * * NSEC3 - tools : owners & stars * *****************************************************************************/ static void nsec3_label_extension_set_self(nsec3_label_extension* n3ext, nsec3_zone_item* item, nsec3_zone_item* value) { /* * This loops should only be run once or twice * Still it annoys me a lot. * * I'll have to find a better, dynamic, way to handle * multiple NSEC3PARAM. * (And of course memory usage and framentation is the * first ennemy) */ #if NSEC3_OWNER_DEBUG log_debug("nsec3_label_extension_set_self: %p, %{digest32h} @ %p, %{digest32h} @ %p", n3ext, ITEM_DIGEST(item), item, ITEM_DIGEST(value), value); #endif do { if(n3ext->self == item) { yassert((value != NULL) || (n3ext->self != NULL)); n3ext->self = value; /* Official way to change the "self" */ return; } #if NSEC3_OWNER_DEBUG if(n3ext->self == value) { yassert((value != NULL) || (n3ext->self != NULL)); log_debug("nsec3_label_extension_set_self: already %{digest32h} @ %p ???", ITEM_DIGEST(n3ext->star), n3ext->star); return; } log_debug("nsec3_label_extension_set_self: skipped %{digest32h} @ %p", ITEM_DIGEST(n3ext->self), n3ext->self); #endif n3ext = n3ext->next; } while(n3ext != NULL); /* NULL means we didn't found the link back */ log_err("nsec3_label_extension_set_self: reference not found (internal error)"); logger_flush(); abort(); } static void nsec3_label_extension_set_star(nsec3_label_extension* n3ext, nsec3_zone_item* item, nsec3_zone_item* value) { #if NSEC3_OWNER_DEBUG log_debug("nsec3_label_extension_set_star: %p, %{digest32h} @ %p, %{digest32h} @ %p", n3ext, ITEM_DIGEST(item), item, ITEM_DIGEST(value), value); #endif do { if(n3ext->star == item) { n3ext->star = value; return; } #if NSEC3_OWNER_DEBUG if(n3ext->star == value) { log_debug("nsec3_label_extension_set_star: already %{digest32h} @ %p ???", ITEM_DIGEST(n3ext->star), n3ext->star); return; } log_debug("nsec3_label_extension_set_star: skipped %{digest32h} @ %p", ITEM_DIGEST(n3ext->star), n3ext->star); #endif n3ext = n3ext->next; } while(n3ext != NULL); /* NULL means we didn't found the link back */ log_err("nsec3_label_extension_set_star: reference not found (internal error)"); logger_flush(); abort(); } /* * Adds an entry to the "owner" array (of an item) */ static void nsec3_label_add(nsec3_label_pointer_array* ownersp, u16* countp, const zdb_rr_label* owner) { if(*countp == 0) { (*ownersp).owner = (zdb_rr_label*)owner; *countp = 1; #if NSEC3_OWNER_DEBUG log_debug("nsec3_label_add: 1 '%{dnslabel}'", OWNER_NAME(owner)); #endif } else if(*countp == 1) { /* * We had one item : adding one will require using an array */ *countp = 2; nsec3_label_pointer_array owners; ZALLOC_ARRAY_OR_DIE(zdb_rr_label**, owners.owners, sizeof (zdb_rr_label*) * 2, NSEC3_LABELPTRARRAY_TAG); owners.owners[0] = (*ownersp).owner; owners.owners[1] = (zdb_rr_label*)owner; (*ownersp).owners = owners.owners; #if NSEC3_OWNER_DEBUG log_debug("nsec3_label_add: 2 '%{dnslabel}' '%{dnslabel}'", OWNER_NAME(owners.owners[0]), OWNER_NAME(owners.owners[1])); #endif } else { /* * Just resize the current array to contain ONE more pointer */ u16 count = *countp; /** @note ZALLOC_ARRAY_RESIZE does change the value of "count" to "count+1" */ ZALLOC_ARRAY_RESIZE(zdb_rr_label*, (*ownersp).owners, count, count + 1); (*ownersp).owners[count-1] = (zdb_rr_label*)owner; /** @note count is already set to count + 1 */ *countp = count; #if NSEC3_OWNER_DEBUG log_debug("nsec3_label_add: %u ", count); u16 i; for(i = 0; i < count; i++) { log_debug(" + '%{dnslabel}'", OWNER_NAME((*ownersp).owners[i])); } #endif } } /* * Removes an entry from the "owner" array (of an item) */ static void nsec3_label_remove(nsec3_label_pointer_array* ownersp, u16* countp, zdb_rr_label* owner) { yassert(*countp > 0); if(*countp == 1) { /* * We had one item, We will have none. * Set the pointer to NULL and the RC to 0 * * Also, the label's reference will have to be set to NULL * If the label's star reference was NULL already, then * free the owner->nsec.nsec3 */ yassert((*ownersp).owner == owner); (*ownersp).owner = NULL; *countp = 0; } else if(*countp == 2) { /* * We had one item, we will get one. * Keep the last pointer instead of the array. * Destroy the array */ zdb_rr_label* last_owner; if((*ownersp).owners[0] == owner) { last_owner = (*ownersp).owners[1]; } else { last_owner = (*ownersp).owners[0]; } ZFREE_ARRAY((*ownersp).owners, sizeof (zdb_rr_label*) * 2); (*ownersp).owner = last_owner; *countp = 1; } else { /* * We had more than 2 * * Find it, * replace it by the last one in the array, * shrink the array (resize) * */ u32 idx; u32 n = *countp; /* * Look for the owner */ for(idx = 0; idx < n; idx++) { if((*ownersp).owners[idx] == owner) { /* * Overwrite it by the next owner. * Move all following owners one step down */ n--; while(idx < n) { (*ownersp).owners[idx] = (*ownersp).owners[idx + 1]; idx++; } break; } } /* * Reduce the memory used by one count * Note : this macro will also set *countp to *countp - 1 */ ZALLOC_ARRAY_RESIZE(zdb_rr_label*, (*ownersp).owners, *countp, *countp - 1); } } /** * Returns TRUE if item is owned by owner */ bool nsec3_owned_by(const nsec3_zone_item* item, const zdb_rr_label* owner) { if(item->rc == 1) { return (item->label.owner == owner); } else if(item->rc != 0) { zdb_rr_label* const * ownerp = item->label.owners; u16 i = item->rc; do { if(*ownerp++ == owner) { return TRUE; } } while(--i > 0); } return FALSE; } /* * Adds an owner to the NSEC3 item */ void nsec3_add_owner(nsec3_zone_item* item, const zdb_rr_label* owner) { #if NSEC3_OWNER_DEBUG log_debug("nsec3_add_owner: %{digest32h} @ %p, '%{dnslabel}' RC=%hu", ITEM_DIGEST(item), item, OWNER_NAME(owner), item->rc); u16 rc = item->rc; #endif nsec3_label_add(&item->label, &item->rc, owner); #if NSEC3_OWNER_DEBUG if(item->rc - rc != 1) { log_debug("nsec3_add_owner: %{digest32h} @ %p, '%{dnslabel}' RC went from %hu to %hu", ITEM_DIGEST(item), item, OWNER_NAME(owner), rc, item->rc); } #endif } /* * Removes an owner from the NSEC3 item * * The entry MUST have been set before */ void nsec3_remove_owner(nsec3_zone_item* item, zdb_rr_label* owner) { #if NSEC3_OWNER_DEBUG log_debug("nsec3_remove_owner: %{digest32h} @ %p, '%{dnslabel}' RC=%hu", ITEM_DIGEST(item), item, OWNER_NAME(owner), item->rc); u16 rc = item->rc; #endif nsec3_label_remove(&item->label, &item->rc, owner); #if NSEC3_OWNER_DEBUG if(rc - item->rc != 1) { log_debug("nsec3_remove_owner: %{digest32h} @ %p, '%{dnslabel}' RC went from %hu to %hu", ITEM_DIGEST(item), item, OWNER_NAME(owner), rc, item->rc); } #endif } /* * Removes all owners from the NSEC3 item * * The entry MUST have been set before */ void nsec3_remove_all_owners(nsec3_zone_item* item) { #if NSEC3_OWNER_DEBUG log_debug("nsec3_remove_all_owners: %{digest32h} @ %p", ITEM_DIGEST(item), item); #endif if(item->rc > 0) { if(item->rc == 1) { zdb_rr_label* label = item->label.owner; if(label != NULL) { if(label != NSEC3_ZONE_FAKE_OWNER) { #if NSEC3_OWNER_DEBUG log_debug("nsec3_remove_all_owners: 1 : %p '%{dnslabel}'", item, label->name); #endif if(label->nsec.nsec3 != NULL) { nsec3_label_extension_set_self(label->nsec.nsec3, item, NULL); if(label->nsec.nsec3->star != NULL) { nsec3_remove_star(label->nsec.nsec3->star, label); nsec3_label_extension_set_star(label->nsec.nsec3, label->nsec.nsec3->star, NULL); } /* * Remove the NSEC3 link */ ZFREE(label->nsec.nsec3, nsec3_label_extension); // free the nsec3 label extension (in the process of removign all owners) label->nsec.nsec3 = NULL; } else { log_warn("nsec3_remove_all_owners: label %{dnslabel} has no NSEC3 (flags=%04x)", label->name, label->flags); } label->flags &= ~ZDB_RR_LABEL_NSEC3; /** @note edf 20150204 -- that's what's missing to avoid the empty terminal, but doing so requires both the zone and the fqdn : not possible here if(RR_LABEL_IRRELEVANT(label)) { if(FAIL(err = zdb_rr_label_delete_record(zone, labels, labels_top, TYPE_ANY))) { log_err("icmtl replay: NSEC3: %r", err); } } */ } item->label.owner = NULL; } } else { u32 n = item->rc; #if NSEC3_OWNER_DEBUG log_debug("nsec3_remove_all_owners: n : %p (%u)", item, n); #endif for(u32 i = 0; i < n; i++) { zdb_rr_label* label = item->label.owners[i]; if(label != NULL) { if(label != NSEC3_ZONE_FAKE_OWNER) { #if NSEC3_OWNER_DEBUG log_debug("nsec3_remove_all_owners: n : %p '%{dnslabel}'", item, label->name); #endif yassert(label->nsec.dnssec != NULL); nsec3_label_extension_set_self(label->nsec.nsec3, item, NULL); nsec3_remove_star(label->nsec.nsec3->star, label); nsec3_label_extension_set_star(label->nsec.nsec3, label->nsec.nsec3->star, NULL); ZFREE(label->nsec.nsec3, nsec3_label_extension); // free the nsec3 label extension (in the process of removign all stars) label->nsec.nsec3 = NULL; label->flags &= ~ZDB_RR_LABEL_NSEC3; } item->label.owners[i] = NULL; } } ZFREE_ARRAY(item->label.owners, sizeof (zdb_rr_label*) * n); item->label.owners = NULL; } item->rc = 0; } } zdb_rr_label* nsec3_owner_get(nsec3_zone_item* item, u16 idx) { if(item->rc == 1) { return item->label.owner; } else if(idx < item->rc) { return item->label.owners[idx]; } return NULL; } /* * Adds a "star" to the NSEC3 item */ void nsec3_add_star(nsec3_zone_item* item, const zdb_rr_label* owner) { #if NSEC3_OWNER_DEBUG log_debug("nsec3_add_star: %{digest32h} @ %p, %p '%{dnslabel}' SC=%hu", ITEM_DIGEST(item), item, owner, owner->name, item->sc); u16 sc = item->sc; #endif nsec3_label_add(&item->star_label, &item->sc, owner); #if NSEC3_OWNER_DEBUG if(item->sc - sc != 1) { log_debug("nsec3_add_star: %{digest32h} @ %p, %p '%{dnslabel}' SC went from %hu to %hu", ITEM_DIGEST(item), item, owner, owner->name, sc, item->sc); } #endif } /* * Removes a star from the NSEC3 item * * The entry MUST have been set before */ void nsec3_remove_star(nsec3_zone_item* item, zdb_rr_label* owner) { #if NSEC3_OWNER_DEBUG log_debug("nsec3_remove_star: %{digest32h}@ @ %p '%{dnslabel}' SC=%hu", ITEM_DIGEST(item), item, owner->name, item->sc); u16 sc = item->sc; #endif nsec3_label_remove(&item->star_label, &item->sc, owner); #if NSEC3_OWNER_DEBUG if(sc - item->sc != 1) { log_debug("nsec3_remove_star: %{digest32h}@ @ %p '%{dnslabel}' SC went from %hu to %hu", ITEM_DIGEST(item), item, owner->name, sc, item->sc); } #endif } /* * Removes all stars from the NSEC3 item * * The entry MUST have been set before */ void nsec3_remove_all_star(nsec3_zone_item* item) { #if NSEC3_OWNER_DEBUG log_debug("nsec3_remove_all_star(%{digest32h} @ %p)", ITEM_DIGEST(item), item); #endif if(item->sc > 0) { if(item->sc == 1) { zdb_rr_label* label = item->star_label.owner; if(label != NULL) { #if NSEC3_OWNER_DEBUG log_debug("nsec3_remove_all_star: n = 1 : %p '%{dnslabel}'", label, label->name); #endif if(label->nsec.nsec3 != NULL) { if(label != NSEC3_ZONE_FAKE_OWNER) { nsec3_label_extension_set_star(label->nsec.nsec3, item, NULL); } #if NSEC3_OWNER_DEBUG else { log_debug("nsec3_remove_all_star: n = 1 : FAKE'", label, label->name); } #endif } else { log_warn("nsec3_remove_all_star: label %{dnslabel} has no NSEC3 (flags=%04x)", label->name, label->flags); } item->star_label.owner = NULL; } } else { u32 n = item->sc; #if NSEC3_OWNER_DEBUG log_debug("nsec3_remove_all_star: n = %u", n); for(u32 i = 0; i < n; i++) { log_debug("\tlabel[%i] = %p '%{dnslabel}'", i, item->star_label.owners[i], item->star_label.owners[i]->name); } #endif for(u32 i = 0; i < n; i++) { zdb_rr_label* label = item->star_label.owners[i]; if(label != NULL) { if(label->nsec.nsec3 != NULL) { if(label != NSEC3_ZONE_FAKE_OWNER) { #if NSEC3_OWNER_DEBUG log_debug("nsec3_remove_all_star: %i/%i %p '%{dnslabel}'", i, n, label, label->name); #endif nsec3_label_extension_set_star(label->nsec.nsec3, item, NULL); } #if NSEC3_OWNER_DEBUG else { log_debug("nsec3_remove_all_star: %i/%i : FAKE'", i, n); } #endif } item->star_label.owners[i] = NULL; } } ZFREE_ARRAY(item->star_label.owners, sizeof (zdb_rr_label*) * n); item->star_label.owners = NULL; } item->sc = 0; } } /* * Moves all stars from one NSEC3 item to another. * * This is used when an NSEC3 item is removed: All its NSEC3 must be moved * to his predecessor. */ void nsec3_move_all_star(nsec3_zone_item* src, nsec3_zone_item* dst) { #if NSEC3_OWNER_DEBUG log_debug("nsec3_move_all_star(%{digest32h} @ %p SC=%i, %{digest32h} @ %p SC=%i)", ITEM_DIGEST(src), src, src->sc, ITEM_DIGEST(dst), dst, dst->sc); u16 sum = src->sc + dst->sc; #endif yassert(src != dst); if(src->sc == 0) { /* nothing to move */ return; } /* If there were no star in the dest : just move the star collection and update the referrenced labels */ if(dst->sc == 0) { dst->star_label.owner = src->star_label.owner; dst->sc = src->sc; for(u16 i = 0; i < src->sc; i++) { zdb_rr_label *label = nsec3_star_get(src, i); nsec3_label_extension_set_star(label->nsec.nsec3, src, dst); } } else { nsec3_label_pointer_array owners; int total = src->sc + dst->sc; /* * rc > 0 and sc > 0, so total of 2 means rc = 1 and sc = 1 */ ZALLOC_ARRAY_OR_DIE(zdb_rr_label**, owners.owners, sizeof (zdb_rr_label*) * total, NSEC3_LABELPTRARRAY_TAG); for(u16 i = 0; i < dst->sc; i++) { zdb_rr_label *label = nsec3_star_get(dst, i); owners.owners[i] = label; } if(dst->sc > 1) { s32 len = dst->sc * sizeof(zdb_rr_label*); ZFREE_ARRAY(dst->star_label.owners, len); } /* change the star link of each label from src to dst */ for(u16 i = 0; i < src->sc; i++) { zdb_rr_label *label = nsec3_star_get(src, i); nsec3_label_extension_set_star(label->nsec.nsec3, src, dst); owners.owners[dst->sc + i] = label; } if(src->sc > 1) { s32 len = src->sc * sizeof(zdb_rr_label*); ZFREE_ARRAY(src->star_label.owners, len); } dst->star_label.owner = owners.owner; // owner when 1 item, owners when multiple. False positives from static analysers. dst->sc = total; } src->star_label.owners = NULL; src->sc = 0; #if NSEC3_OWNER_DEBUG if(dst->sc != sum) { log_debug("nsec3_move_all_star(%{digest32h} @ %p, %{digest32h} @ %p SC went %i instead of %i)", ITEM_DIGEST(src), src, ITEM_DIGEST(dst), dst, dst->sc, sum); } #endif } zdb_rr_label* nsec3_star_get(const nsec3_zone_item* item, u16 idx) { if(item->sc == 1) { return item->star_label.owner; } else if(idx < item->sc) { return item->star_label.owners[idx]; } return NULL; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_error.c0000644000077100007710000000012412650131756021125 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.438344 30 ctime=1454597652.367344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_error.c0000664000077100007710000001137612650131756020742 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup error Database error handling * @ingroup dnsdb * @brief Database error handling * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include "dnsdb/zdb_error.h" /* * */ static bool zdb_register_errors_done = FALSE; void zdb_register_errors() { if(zdb_register_errors_done) { return; } zdb_register_errors_done = TRUE; error_register(ZDB_ERROR_BASE, "An error occurred in the database."); error_register(ZDB_ERROR_KEY_NOTFOUND, "No match has been found for the current operation"); error_register(ZDB_ERROR_DELETEFROMEMPTY, "Delete from an empty collection."); error_register(ZDB_ERROR_NOSUCHCLASS, "There is no such class in the database."); error_register(ZDB_READER_WRONGNAMEFORZONE, "A name in the zone does not match the origin."); error_register(ZDB_READER_ZONENOTLOADED, "The zone has not been loaded."); error_register(ZDB_ERROR_NOSOAATAPEX, "ZDB_ERROR_NOSOAATAPEX"); error_register(ZDB_ERROR_CORRUPTEDSOA, "ZDB_ERROR_CORRUPTEDSOA"); error_register(ZDB_ERROR_ICMTL_NOTFOUND, "ZDB_ERROR_ICMTL_NOTFOUND"); error_register(ZDB_ERROR_ICMTL_STATUS_INVALID,"ZDB_ERROR_ICMTL_STATUS_INVALID"); error_register(ZDB_ERROR_ICMTL_FOLDERPATHTOOLONG,"ZDB_ERROR_ICMTL_FOLDERPATHTOOLONG"); error_register(ZDB_ERROR_ZONE_IS_NOT_SIGNED, "ZDB_ERROR_ZONE_IS_NOT_SIGNED"); error_register(ZDB_ERROR_ZONE_IS_ALREADY_BEING_SIGNED, "ZDB_ERROR_ZONE_IS_ALREADY_BEING_SIGNED"); error_register(ZDB_ERROR_ZONE_INVALID, "ZDB_ERROR_ZONE_INVALID"); error_register(ZDB_ERROR_ZONE_IS_NOT_DNSSEC, "ZDB_ERROR_ZONE_IS_NOT_DNSSEC"); error_register(ZDB_ERROR_ZONE_NO_ZSK_PRIVATE_KEY_FILE, "ZDB_ERROR_ZONE_NO_ZSK_PRIVATE_KEY_FILE"); error_register(ZDB_READER_FIRST_RECORD_NOT_SOA, "ZDB_READER_FIRST_RECORD_NOT_SOA"); error_register(ZDB_READER_ANOTHER_DOMAIN_WAS_EXPECTED, "ZDB_READER_ANOTHER_DOMAIN_WAS_EXPECTED"); error_register(ZDB_READER_NSEC3WITHOUTNSEC3PARAM, "ZDB_READER_NSEC3WITHOUTNSEC3PARAM"); error_register(ZDB_READER_MIXED_DNSSEC_VERSIONS, "ZDB_READER_MIXED_DNSSEC_VERSIONS"); error_register(ZDB_READER_ALREADY_LOADED, "ZDB_READER_ALREADY_LOADED"); error_register(ZDB_READER_NSEC3PARAMWITHOUTNSEC3, "ZDB_READER_NSEC3PARAMWITHOUTNSEC3"); error_register(ZDB_JOURNAL_WRONG_PARAMETERS, "ZDB_JOURNAL_WRONG_PARAMETERS"); error_register(ZDB_JOURNAL_READING_DID_NOT_FOUND_SOA, "ZDB_JOURNAL_READING_DID_NOT_FOUND_SOA"); error_register(ZDB_JOURNAL_SOA_RECORD_EXPECTED, "ZDB_JOURNAL_SOA_RECORD_EXPECTED"); error_register(ZDB_JOURNAL_SERIAL_OUT_OF_KNOWN_RANGE, "ZDB_JOURNAL_SERIAL_OUT_OF_KNOWN_RANGE"); error_register(ZDB_JOURNAL_FEATURE_NOT_SUPPORTED, "ZDB_JOURNAL_FEATURE_NOT_SUPPORTED"); error_register(ZDB_JOURNAL_ERROR_READING_JOURNAL, "ZDB_JOURNAL_ERROR_READING_JOURNAL"); error_register(ZDB_JOURNAL_IXFR_SERIAL_OUT_OF_KNOWN_RANGE, "ZDB_JOURNAL_IXFR_SERIAL_OUT_OF_KNOWN_RANGE"); } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb-zone-garbage.c0000644000077100007710000000012412650131756022253 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.297344 30 ctime=1454597652.416344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb-zone-garbage.c0000664000077100007710000001426012650131756022063 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #include "dnsdb/dnsdb-config.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb-zone-garbage.h" #define ZDB_JOURNAL_CODE 1 // to be allowed to close it #include "dnsdb/journal.h" #if HAS_TRACK_ZONES_DEBUG_SUPPORT #include #endif extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger static threaded_dll_cw zone_garbage_queue; #if HAS_TRACK_ZONES_DEBUG_SUPPORT extern smp_int g_zone_instanciated_count; extern ptr_set g_zone_instanciated_set; #endif void zdb_zone_garbage_run(); static bool zdb_zone_garbage_initialised = FALSE; void zdb_zone_garbage_init() { if(!zdb_zone_garbage_initialised) { threaded_dll_cw_init(&zone_garbage_queue, 0x100000); // 1M zones zdb_zone_garbage_initialised = TRUE; } } void zdb_zone_garbage_finalize() { if(zdb_zone_garbage_initialised) { log_debug("zdb_zone_garbage_finalize: releasing zones "); zdb_zone_garbage_run(); #if HAS_TRACK_ZONES_DEBUG_SUPPORT int count; if((count = smp_int_get(&g_zone_instanciated_count)) > 0) { log_err("zdb_zone_garbage_finalize: there are still %i zones instanciated (leaked?)", count); logger_flush(); ptr_set_avl_iterator iter; ptr_set_avl_iterator_init(&g_zone_instanciated_set, &iter); while(ptr_set_avl_iterator_hasnext(&iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&iter); zdb_zone *zone = (zdb_zone*)node->key; log_err("%p: %{dnsname} is referenced %i times",zone, zone->origin, zone->rc); } } #endif threaded_dll_cw_finalize(&zone_garbage_queue); zdb_zone_garbage_initialised = FALSE; } } void zdb_zone_garbage_collect(zdb_zone *zone) { yassert((zone->apex->flags & ZDB_RR_LABEL_APEX) != 0); yassert(zone->rc == 0); zone->apex->flags &= ~ZDB_RR_LABEL_APEX; journal *jh = zone->journal; //zone->journal = NULL; journal_close(jh); if(zdb_zone_garbage_initialised) { #ifdef DEBUG log_debug("zdb_zone_garbage_collect: queuing zone %{dnsname}@%p for the collector", zone->origin, zone); #endif threaded_dll_cw_enqueue(&zone_garbage_queue, zone); } else { log_warn("zdb_zone_garbage_collect: collector disabled, destroying zone %{dnsname}@%p now", zone->origin, zone); logger_flush(); zdb_zone_destroy(zone); } } zdb_zone * zdb_zone_garbage_get() { if(zdb_zone_garbage_initialised) { zdb_zone *zone = (zdb_zone*)threaded_dll_cw_try_dequeue(&zone_garbage_queue); return zone; } else { log_warn("zdb_zone_garbage_get: collector disabled"); return NULL; } } bool zdb_zone_garbage_empty() { return threaded_dll_cw_size(&zone_garbage_queue) == 0; } void zdb_zone_garbage_run() { if(zdb_zone_garbage_initialised) { while(threaded_dll_cw_size(&zone_garbage_queue) > 0) { zdb_zone *zone = (zdb_zone*)threaded_dll_cw_try_dequeue(&zone_garbage_queue); if(zone != NULL) { #ifdef DEBUG log_debug("zdb_zone_garbage_run: %{dnsname}@%p", zone->origin, zone); //logger_flush(); #endif zdb_zone_destroy(zone); } } } else { log_warn("zdb_zone_garbage_run: collector disabled"); } } void zdb_zone_garbage_run_ex(zdb_zone_garbage_run_cb *destroyer) { if(zdb_zone_garbage_initialised) { if(destroyer == NULL) { destroyer = zdb_zone_destroy; } while(threaded_dll_cw_size(&zone_garbage_queue) > 0) { zdb_zone *zone = (zdb_zone*)threaded_dll_cw_try_dequeue(&zone_garbage_queue); if(zone != NULL) { #ifdef DEBUG log_debug("zdb_zone_garbage_run: %{dnsname}", zone->origin); //logger_flush(); #endif destroyer(zone); } } } else { log_warn("zdb_zone_garbage_run: collector disabled"); } } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/dictionary.c0000644000077100007710000000012412650131756021302 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.255344 30 ctime=1454597652.290344534 yadifa-2.1.6-5826/lib/dnsdb/src/dictionary.c0000664000077100007710000001075712650131756021121 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Hash-based collection designed to change it's structure to improve speed. * * Hash-based collection designed to change it's structure to improve speed. * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #include "dnsdb/zdb_config.h" #include "dnsdb/dictionary.h" #define ZDB_HASHTABLE_THRESHOLD_DISABLE (~0) void dictionary_btree_init(dictionary* dico); void dictionary_htbt_init(dictionary* dico); struct dictionary_mutation_table_entry { u32 threshold; /* Up to that number of items in the collection */ dictionary_init_method* init; }; static struct dictionary_mutation_table_entry dictionary_mutation_table[2] = { { ZDB_HASHTABLE_THRESHOLD, dictionary_btree_init}, { MAX_U32, dictionary_htbt_init}, }; static struct dictionary_mutation_table_entry* dictionary_get_mutation_entry(dictionary* dico) { struct dictionary_mutation_table_entry* entry = dictionary_mutation_table; for(; dico->count > entry->threshold; entry++); return entry; } /* * I could avoid this hook, the signature is almost the same * */ static void dictionary_bucket_record_callback(void* bucket_data, hashcode key, dictionary_node* node) { dictionary_fills((dictionary*)bucket_data, key, node); } static void dictionary_destroy_record_callback(dictionary_node* node) { /* This should NEVER be called */ assert(FALSE); /* NOT zassert ! */ } void dictionary_init(dictionary* dico) { dictionary_mutation_table[0].init(dico); dico->threshold = dictionary_mutation_table[0].threshold; } void dictionary_mutate(dictionary* dico) { struct dictionary_mutation_table_entry* entry = dictionary_get_mutation_entry(dico); /* Check the mutation condition */ if(dico->threshold == entry->threshold) { return; } /* Mutate */ dictionary new_dico; entry->init(&new_dico); /* Update the default (MAX_UNSIGNED_INT) threshold */ new_dico.threshold = entry->threshold; dictionary_empties(dico, &new_dico, dictionary_bucket_record_callback); dictionary_destroy(dico, dictionary_destroy_record_callback); MEMCOPY(dico, &new_dico, sizeof (dictionary)); } static bool dictionary_empty_iterator_hasnext(dictionary_iterator* dico) { (void)dico; return FALSE; } static void** dictionary_empty_iterator_next(dictionary_iterator* dico) { (void)dico; return NULL; } static const struct dictionary_iterator_vtbl no_element_iterator = { dictionary_empty_iterator_hasnext, dictionary_empty_iterator_next }; void dictionary_empty_iterator_init(dictionary_iterator *iter) { iter->vtbl = &no_element_iterator; } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec3_icmtl.c0000644000077100007710000000012412650131756021340 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.354344 30 ctime=1454597652.523344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec3_icmtl.c0000664000077100007710000011521312650131756021150 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/nsec3_icmtl.h" #include "dnsdb/nsec3_item.h" #include "dnsdb/nsec3_owner.h" #include "dnsdb/nsec3_zone.h" #include "dnsdb/zdb_zone_label_iterator.h" #include "dnsdb/rrsig.h" #include "dnsdb/nsec3.h" #define MODULE_MSG_HANDLE g_dnssec_logger extern logger_handle *g_dnssec_logger; /* * Finds the nsec3param's alter-ego and removes all the nsec3 records associated to it. * (icmtl) * */ void nsec3_remove_nsec3param_by_record(zdb_zone* zone, zdb_packed_ttlrdata* nsec3param) { nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { if(nsec3_zone_rdata_compare(n3->rdata, nsec3param->rdata_start) == 0) { nsec3_zone_destroy(zone, n3); break; } n3 = n3->next; } } void nsec3_add_nsec3param_by_record(zdb_zone* zone, zdb_packed_ttlrdata* nsec3param) { nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { if(nsec3_zone_rdata_compare(n3->rdata, nsec3param->rdata_start) == 0) { // already exists break; } n3 = n3->next; } } /* * Remove an NSEC3 without touching any of its siblings (icmtl) */ void nsec3_remove_nsec3(zdb_zone* zone, zdb_packed_ttlrdata* nsec3param) { nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { if(nsec3_zone_rdata_compare(n3->rdata, nsec3param->rdata_start) == 0) { u8 digest[256]; ya_result digest_len = base32hex_decode((char*)&nsec3param->rdata_start[1], (u32)nsec3param->rdata_start[0], digest); if(ISOK(digest_len)) { digest[0] = digest_len; nsec3_zone_item* item = nsec3_avl_find(&n3->items, digest); if(item != NULL) { nsec3_zone_item_empties(item); nsec3_avl_delete(&n3->items, item->digest); } } break; } n3 = n3->next; } } void nsec3_remove_nsec3_by_name(zdb_zone* zone, const u8 *nsec3_label, const u8* nsec3_rdata, u16 nsec3_rdata_size) { nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { if(nsec3_zone_rdata_compare(n3->rdata, nsec3_rdata) == 0) { u8 digest[256]; #ifdef DEBUG memset(digest, 0xd1, sizeof(digest)); #endif ya_result digest_len = base32hex_decode((char*)&nsec3_label[1], nsec3_label[0], &digest[1]); if(ISOK(digest_len)) { digest[0] = digest_len; nsec3_zone_item* item = nsec3_avl_find(&n3->items, digest); if(item != NULL) { log_debug("nsec3_remove_nsec3_by_name: destroying %{digest32h}", item->digest); /* GOT IT : AN NSEC3 RECORD IS REMOVED BY IXFR BUT THE LABEL HAS NOT BEEN CHANGED I PRESUME IT IS BECAUSE THE AXFR CHAIN IS CHANGED I NEED A REPLACE FUNCTION, I NEED TO SORT THE IXFR NSEC(3) OPERATIONS */ if(item->sc > 0) { nsec3_zone_item* prev = nsec3_avl_node_mod_prev(item); yassert(prev != NULL); if(prev != item) { nsec3_move_all_star(item, prev); } else { nsec3_remove_all_star(item); } } nsec3_remove_all_owners(item); yassert(item->rc == 0 && item->sc == 0); ZFREE_ARRAY(item->type_bit_maps, item->type_bit_maps_size); item->type_bit_maps = NULL; item->type_bit_maps_size = 0; nsec3_zone_item_rrsig_delete_all(item); nsec3_avl_delete(&n3->items, item->digest); } } break; } n3 = n3->next; } } void nsec3_remove_nsec3_by_digest(zdb_zone* zone, const u8 *nsec3_digest, const u8* nsec3_rdata, u16 nsec3_rdata_size) { nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { if(nsec3_zone_rdata_compare(n3->rdata, nsec3_rdata) == 0) { nsec3_zone_item* item = nsec3_avl_find(&n3->items, nsec3_digest); if(item != NULL) { log_debug("nsec3_remove_nsec3_by_name: destroying %{digest32h}", item->digest); /* GOT IT : AN NSEC3 RECORD IS REMOVED BY IXFR BUT THE LABEL HAS NOT BEEN CHANGED I PRESUME IT IS BECAUSE THE AXFR CHAIN IS CHANGED I NEED A REPLACE FUNCTION, I NEED TO SORT THE IXFR NSEC(3) OPERATIONS */ if(item->sc > 0) { nsec3_zone_item* prev = nsec3_avl_node_mod_prev(item); if(prev != NULL) { nsec3_move_all_star(item, prev); } else { nsec3_remove_all_star(item); } } nsec3_remove_all_owners(item); yassert(item->rc == 0 && item->sc == 0); ZFREE_ARRAY(item->type_bit_maps, item->type_bit_maps_size); item->type_bit_maps = NULL; item->type_bit_maps_size = 0; nsec3_zone_item_rrsig_delete_all(item); nsec3_avl_delete(&n3->items, item->digest); } break; } n3 = n3->next; } } nsec3_zone_item* nsec3_get_nsec3_by_name(zdb_zone* zone, const u8 *nsec3_label, const u8* nsec3_rdata, u16 nsec3_rdata_size) { nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { if(nsec3_zone_rdata_compare(n3->rdata, nsec3_rdata) == 0) { u8 digest[256]; #ifdef DEBUG memset(digest, 0xd1, sizeof(digest)); #endif ya_result digest_len = base32hex_decode((char*)&nsec3_label[1], nsec3_label[0], &digest[1]); if(ISOK(digest_len)) { digest[0] = digest_len; nsec3_zone_item* item = nsec3_avl_find(&n3->items, digest); return item; } break; } n3 = n3->next; } return NULL; } /* * Remove the RRSIG of an NSEC3 (icmtl) */ void nsec3_remove_rrsig(zdb_zone* zone, zdb_packed_ttlrdata* nsec3param) { nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { if(nsec3_zone_rdata_compare(n3->rdata, nsec3param->rdata_start) == 0) { u8 digest[256]; ya_result digest_len = base32hex_decode((char*)&nsec3param->rdata_start[1], (u32)nsec3param->rdata_start[0], digest); if(ISOK(digest_len)) { digest[0] = digest_len; nsec3_zone_item* item = nsec3_avl_find(&n3->items, digest); if(item != NULL) { nsec3_zone_item_rrsig_delete_all(item); } } break; } n3 = n3->next; } } void nsec3_add_nsec3_by_name(zdb_zone* zone, const u8 *nsec3_label, const u8* nsec3_rdata, u16 nsec3_rdata_size) { nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { if(nsec3_zone_rdata_compare(n3->rdata, nsec3_rdata) == 0) { u8 digest[256]; #ifdef DEBUG memset(digest, 0xd1, sizeof(digest)); #endif ya_result digest_len = base32hex_decode((char*)&nsec3_label[1], nsec3_label[0], &digest[1]); if(ISOK(digest_len)) { digest[0] = digest_len; nsec3_zone_item* item = nsec3_avl_find(&n3->items, digest); if(item == NULL) { nsec3_zone_item *self = nsec3_avl_insert(&n3->items, (u8*)digest); self->flags = nsec3_rdata[1]; /* self->rc = 0; self->sc = 0; self->type_bit_maps = NULL; self->type_bit_maps_size = 0; */ nsec3_zone_item_update_bitmap(self, nsec3_rdata, nsec3_rdata_size); } else { /* exists already */ assert(FALSE); } } break; } n3 = n3->next; } } /**/ static int nsec3_icmtl_ptr_set_nsec3param_compare(const void *a, const void *b) { u8 *nsec3_rdata_a = (u8*)a; u8 *nsec3_rdata_b = (u8*)b; return nsec3_zone_rdata_compare(nsec3_rdata_a, nsec3_rdata_b); } void nsec3_icmtl_replay_init(nsec3_icmtl_replay *replay, zdb_zone *zone) { ZEROMEMORY(replay, sizeof(nsec3_icmtl_replay)); replay->nsec3_add.compare = ptr_set_dnsname_node_compare; replay->nsec3_del.compare = ptr_set_dnsname_node_compare; replay->nsec3rrsig_add.compare = ptr_set_dnsname_node_compare; replay->nsec3rrsig_del.compare = ptr_set_dnsname_node_compare; replay->nsec3_labels.compare = ptr_set_dnsname_node_compare; replay->nsec3param_add.compare = nsec3_icmtl_ptr_set_nsec3param_compare; replay->nsec3param_del.compare = nsec3_icmtl_ptr_set_nsec3param_compare; replay->zone = zone; } static void nsec3_icmtl_destroy_nsec3(ptr_set *tree) { if(!ptr_set_avl_isempty(tree)) { /* stuff to delete */ ptr_set_avl_iterator ts_avl_iter; ptr_set_avl_iterator_init(tree, &ts_avl_iter); while(ptr_set_avl_iterator_hasnext(&ts_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&ts_avl_iter); u8 *fqdn = (u8*)node->key; zdb_ttlrdata *ttlrdata = (zdb_ttlrdata*)node->value; free(fqdn); if(ttlrdata != NULL) { zdb_ttlrdata_delete(ttlrdata); } } ptr_set_avl_destroy(tree); } } static void nsec3_icmtl_destroy_nsec3rrsig_add(ptr_set *tree) { if(!ptr_set_avl_isempty(tree)) { /* stuff to delete */ ptr_set_avl_iterator ts_avl_iter; ptr_set_avl_iterator_init(tree, &ts_avl_iter); while(ptr_set_avl_iterator_hasnext(&ts_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&ts_avl_iter); u8 *fqdn = (u8*)node->key; zdb_ttlrdata *ttlrdata = (zdb_ttlrdata*)node->value; free(fqdn); while(ttlrdata != NULL) { zdb_ttlrdata *tmp = ttlrdata->next; ZDB_RECORD_ZFREE(ttlrdata); ttlrdata = tmp; } } ptr_set_avl_destroy(tree); } } static void nsec3_icmtl_destroy_nsec3rrsig_del(ptr_set *tree) { if(!ptr_set_avl_isempty(tree)) { /* stuff to delete */ ptr_set_avl_iterator ts_avl_iter; ptr_set_avl_iterator_init(tree, &ts_avl_iter); while(ptr_set_avl_iterator_hasnext(&ts_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&ts_avl_iter); u8 *fqdn = (u8*)node->key; zdb_ttlrdata *ttlrdata = (zdb_ttlrdata*)node->value; free(fqdn); while(ttlrdata != NULL) { zdb_ttlrdata *tmp = ttlrdata->next; zdb_ttlrdata_delete(ttlrdata); ttlrdata = tmp; } } ptr_set_avl_destroy(tree); } } static void nsec3_icmtl_destroy_nsec3param(ptr_set *tree) { if(!ptr_set_avl_isempty(tree)) { ptr_set_avl_iterator n3p_avl_iter; ptr_set_avl_iterator_init(tree, &n3p_avl_iter); while(ptr_set_avl_iterator_hasnext(&n3p_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&n3p_avl_iter); zdb_ttlrdata* nsec3param = (zdb_ttlrdata*)node->value; if(nsec3param != NULL) { zdb_ttlrdata_delete(nsec3param); } node->key = NULL; node->value = NULL; } ptr_set_avl_destroy(tree); } } void nsec3_icmtl_replay_destroy(nsec3_icmtl_replay *replay) { nsec3_icmtl_destroy_nsec3(&replay->nsec3_add); nsec3_icmtl_destroy_nsec3(&replay->nsec3_del); nsec3_icmtl_destroy_nsec3rrsig_add(&replay->nsec3rrsig_add); nsec3_icmtl_destroy_nsec3rrsig_del(&replay->nsec3rrsig_del); nsec3_icmtl_destroy_nsec3param(&replay->nsec3param_add); nsec3_icmtl_destroy_nsec3param(&replay->nsec3param_del); replay->zone = NULL; } void nsec3_icmtl_replay_nsec3param_del(nsec3_icmtl_replay *replay, const zdb_ttlrdata *ttlrdata) { assert(ttlrdata->next == NULL); #if DEBUG rdata_desc nsec3param_rdata = { TYPE_NSEC3PARAM, ttlrdata->rdata_size, ttlrdata->rdata_pointer}; log_debug("journal: %{dnsname}: will del %{typerdatadesc}", replay->zone->origin, &nsec3param_rdata); #endif ptr_node *node = ptr_set_avl_find(&replay->nsec3param_del, ttlrdata->rdata_pointer); if(node == NULL) { zdb_ttlrdata* clone = zdb_ttlrdata_clone(ttlrdata); ptr_node *node = ptr_set_avl_insert(&replay->nsec3param_del, clone->rdata_pointer); node->value = clone; /* If the node was previously added, don't add it anymore */ ptr_node *added_node = ptr_set_avl_find(&replay->nsec3param_add, ttlrdata->rdata_pointer); if(added_node != NULL) { #if DEBUG log_debug("journal: %{dnsname}: would not add %{typerdatadesc} anymore", replay->zone->origin, &nsec3param_rdata); #endif ptr_set_avl_delete(&replay->nsec3param_add, ttlrdata->rdata_pointer); zdb_ttlrdata* nsec3param = (zdb_ttlrdata*)added_node->value; #if DEBUG nsec3param_rdata.len = nsec3param->rdata_size; nsec3param_rdata.rdata = nsec3param->rdata_pointer; log_debug("journal: %{dnsname}: would not add %{typerdatadesc} anymore", replay->zone->origin, &nsec3param_rdata); #endif ptr_set_avl_delete(&replay->nsec3param_add, nsec3param->rdata_pointer); zdb_ttlrdata_delete(nsec3param); } } } void nsec3_icmtl_replay_nsec3param_add(nsec3_icmtl_replay *replay, const zdb_ttlrdata *ttlrdata) { assert(ttlrdata->next == NULL); #if DEBUG rdata_desc nsec3param_rdata = { TYPE_NSEC3PARAM, ttlrdata->rdata_size, ttlrdata->rdata_pointer}; log_debug("journal: %{dnsname}: will add %{typerdatadesc}", replay->zone->origin, &nsec3param_rdata); #endif ptr_node *node = ptr_set_avl_find(&replay->nsec3param_add, ttlrdata->rdata_pointer); if(node == NULL) { zdb_ttlrdata* clone = zdb_ttlrdata_clone(ttlrdata); ptr_node *node = ptr_set_avl_insert(&replay->nsec3param_add, clone->rdata_pointer); node->value = clone; /* If the node was previously marked as deleted, don't delete it anymore */ ptr_node *added_node = ptr_set_avl_find(&replay->nsec3param_del, ttlrdata->rdata_pointer); if(added_node != NULL) { zdb_ttlrdata* nsec3param = (zdb_ttlrdata*)added_node->value; #if DEBUG log_debug("journal: %{dnsname}: would not delete %{typerdatadesc} anymore", replay->zone->origin, &nsec3param_rdata); nsec3param_rdata.len = nsec3param->rdata_size; nsec3param_rdata.rdata = nsec3param->rdata_pointer; log_debug("journal: %{dnsname}: would not delete %{typerdatadesc} anymore", replay->zone->origin, &nsec3param_rdata); #endif ptr_set_avl_delete(&replay->nsec3param_del, ttlrdata->rdata_pointer); ptr_set_avl_delete(&replay->nsec3param_del, nsec3param->rdata_pointer); zdb_ttlrdata_delete(nsec3param); } } } void nsec3_icmtl_replay_nsec3_del(nsec3_icmtl_replay *replay, const u8* fqdn, const zdb_ttlrdata *ttlrdata) { assert(ttlrdata->next == NULL); ptr_node *node = ptr_set_avl_insert(&replay->nsec3_del, (u8*)fqdn); if(node->value == NULL) { node->key = dnsname_dup(fqdn); node->value = zdb_ttlrdata_clone(ttlrdata); } else { zdb_ttlrdata_delete(node->value); node->value = zdb_ttlrdata_clone(ttlrdata); } } void nsec3_icmtl_replay_nsec3_add(nsec3_icmtl_replay *replay, const u8* fqdn, const zdb_ttlrdata *ttlrdata) { assert(ttlrdata->next == NULL); ptr_node *node; node = ptr_set_avl_find(&replay->nsec3param_add, ttlrdata->rdata_pointer); if(node == NULL) { // log_debug1("nsec3_icmtl_replay_nsec3_add(%p, %{dnsname}, %{typerdatadesc}) : no NSEC3PARAM for this NSEC3 : deducing new chain", replay, fqdn, &rdata); nsec3_icmtl_replay_nsec3param_add(replay, ttlrdata); // log_debug1("nsec3_icmtl_replay_nsec3_add(%p, %{dnsname}, %{typerdatadesc}) : resuming", replay, fqdn, &rdata); } node = ptr_set_avl_insert(&replay->nsec3_add, (u8*)fqdn); if(node->value == NULL) { node->key = dnsname_dup(fqdn); node->value = zdb_ttlrdata_clone(ttlrdata); } else { zdb_ttlrdata_delete(node->value); node->value = zdb_ttlrdata_clone(ttlrdata); } } void nsec3_icmtl_replay_nsec3_rrsig_del(nsec3_icmtl_replay *replay, const u8* fqdn, const zdb_ttlrdata *ttlrdata) { assert(ttlrdata->next == NULL); ptr_node *node; // ensure we are not working for no good reason node = ptr_set_avl_find(&replay->nsec3rrsig_add, (u8*)fqdn); if(node != NULL) { // there are signatures for this fqdn // if the one we are about to add is also deleted, let's cancel them both zdb_packed_ttlrdata **nsec3_rrsig_ptr = (zdb_packed_ttlrdata **)&node->value; zdb_packed_ttlrdata *nsec3_rrsig = (zdb_packed_ttlrdata *)node->value; while(nsec3_rrsig != NULL) { if((nsec3_rrsig->rdata_size == ttlrdata->rdata_size) && (RRSIG_KEY_NATIVETAG(nsec3_rrsig) == GET_U16_AT(((u8*)ttlrdata->rdata_pointer)[16]))) { /* got a match ? */ if(memcmp(&nsec3_rrsig->rdata_start[0], ttlrdata->rdata_pointer, nsec3_rrsig->rdata_size) == 0) { // got a match ! delete the addition and forget the removal *nsec3_rrsig_ptr = nsec3_rrsig->next; ZDB_RECORD_ZFREE(nsec3_rrsig); return; } } nsec3_rrsig_ptr = &nsec3_rrsig->next; nsec3_rrsig = nsec3_rrsig->next; } } // done checking for jobs cancelling each-other node = ptr_set_avl_insert(&replay->nsec3rrsig_del, (u8*)fqdn); if(node->value == NULL) { node->key = dnsname_dup(fqdn); node->value = zdb_ttlrdata_clone(ttlrdata); } else { // insert in front zdb_ttlrdata *newone = zdb_ttlrdata_clone(ttlrdata); newone->next = (zdb_ttlrdata*)node->value; node->value = newone; } } /* * No chaining, this is only to add the key in the pool ... and that's the problem. */ void nsec3_icmtl_replay_nsec3_rrsig_add(nsec3_icmtl_replay *replay, const u8* fqdn, zdb_packed_ttlrdata *packed_ttlrdata) { ptr_node *node; node = ptr_set_avl_find(&replay->nsec3rrsig_del, (u8*)fqdn); if(node != NULL) { zdb_ttlrdata **ttlrdata_ptr = (zdb_ttlrdata**)&node->value; zdb_ttlrdata *ttlrdata = (zdb_ttlrdata*)node->value; while(ttlrdata != NULL) { if((ttlrdata->rdata_size == packed_ttlrdata->rdata_size) && ((GET_U16_AT(((u8*)ttlrdata->rdata_pointer)[16])) == RRSIG_KEY_NATIVETAG(packed_ttlrdata))) { /* got a match ? */ if(memcmp(ttlrdata->rdata_pointer, &packed_ttlrdata->rdata_start[0], packed_ttlrdata->rdata_size) == 0) { // got a match ! delete the addition and forget the removal *ttlrdata_ptr = ttlrdata->next; zdb_ttlrdata_delete(ttlrdata); ZDB_RECORD_ZFREE(packed_ttlrdata); return; } } ttlrdata_ptr = &ttlrdata->next; ttlrdata = ttlrdata->next; } } node = ptr_set_avl_insert(&replay->nsec3rrsig_add, (u8*)fqdn); if(node->value == NULL) { // new entry node->key = dnsname_dup(fqdn); node->value = packed_ttlrdata; } else { // already had this entry: append at the end zdb_packed_ttlrdata **nsec3_rrsig_ptr = (zdb_packed_ttlrdata **)&node->value; zdb_packed_ttlrdata *nsec3_rrsig = (zdb_packed_ttlrdata *)node->value; while(nsec3_rrsig != NULL) { if((nsec3_rrsig->rdata_size == packed_ttlrdata->rdata_size) && (RRSIG_KEY_NATIVETAG(nsec3_rrsig) == RRSIG_KEY_NATIVETAG(packed_ttlrdata))) { /* got a match ? */ if(memcmp(&nsec3_rrsig->rdata_start[0], &packed_ttlrdata->rdata_start[0], nsec3_rrsig->rdata_size) == 0) { /* got a match ! delete the previous one (?) */ packed_ttlrdata->next = nsec3_rrsig->next; ZDB_RECORD_ZFREE(nsec3_rrsig); break; } } nsec3_rrsig_ptr = &nsec3_rrsig->next; nsec3_rrsig = nsec3_rrsig->next; } *nsec3_rrsig_ptr = packed_ttlrdata; } } void nsec3_icmtl_replay_label_add(nsec3_icmtl_replay *replay, const u8 *fqdn, dnslabel_vector_reference labels, s32 label_top) { zdb_rr_label *rr_label = zdb_rr_label_add(replay->zone, labels, label_top); u16 flags = rr_label->flags; if((flags & ZDB_RR_LABEL_UNDERDELEGATION) == 0) /** @todo !zdb_rr_label_is_glue(label) */ { /* APEX or NS+DS */ if( ((flags & ZDB_RR_LABEL_APEX) != 0) || (((flags & ZDB_RR_LABEL_DELEGATION) != 0) && (zdb_record_find(&rr_label->resource_record_set, TYPE_DS) != NULL) ) ) { ptr_node *node = ptr_set_avl_insert(&replay->nsec3_labels, (u8*)fqdn); if(node->value == NULL) { #ifdef DEBUG log_debug("journal: NSEC3: queue: %{dnsname} for NSEC3 update", fqdn); #endif node->key = dnsname_dup(fqdn); node->value = rr_label; } } } } ya_result nsec3_icmtl_replay_execute(nsec3_icmtl_replay *replay) { bool nsec3param_added = FALSE; if(!ptr_set_avl_isempty(&replay->nsec3param_add)) { ptr_set_avl_iterator n3p_avl_iter; ptr_set_avl_iterator_init(&replay->nsec3param_add, &n3p_avl_iter); while(ptr_set_avl_iterator_hasnext(&n3p_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&n3p_avl_iter); zdb_ttlrdata* nsec3param = (zdb_ttlrdata*)node->value; nsec3_zone* n3 = nsec3_zone_get_from_rdata(replay->zone, nsec3param->rdata_size, nsec3param->rdata_pointer); if(n3 == NULL) { /* * add the record */ zdb_packed_ttlrdata *packed_ttlrdata; ZDB_RECORD_ZALLOC(packed_ttlrdata, 0, nsec3param->rdata_size ,nsec3param->rdata_pointer); zdb_record_insert(&replay->zone->apex->resource_record_set, TYPE_NSEC3PARAM, packed_ttlrdata); nsec3_zone_add_from_rdata(replay->zone, nsec3param->rdata_size, nsec3param->rdata_pointer); //nsec3_load_chain_init(nsec3param->rdata_pointer, nsec3param->rdata_size); nsec3param_added = TRUE; } zdb_ttlrdata_delete(nsec3param); node->key = NULL; node->value = NULL; } ptr_set_avl_destroy(&replay->nsec3param_add); } if(!ptr_set_avl_isempty(&replay->nsec3_del)) { /* stuff to delete */ ptr_set_avl_iterator ts_avl_iter; ptr_set_avl_iterator_init(&replay->nsec3_del, &ts_avl_iter); while(ptr_set_avl_iterator_hasnext(&ts_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&ts_avl_iter); u8 *fqdn = (u8*)node->key; zdb_ttlrdata *ttlrdata = (zdb_ttlrdata*)node->value; #ifdef DEBUG log_debug("journal: NSEC3: post/del %{dnsname}", fqdn); #endif ptr_node *add_node; if((add_node = ptr_set_avl_find(&replay->nsec3_add, fqdn)) != NULL) { /* replace */ #ifdef DEBUG log_debug("journal: NSEC3: upd %{dnsname}", fqdn); rdata_desc type_len_rdata = {TYPE_NSEC3, ttlrdata->rdata_size, ttlrdata->rdata_pointer }; log_debug("journal: NSEC3: - %{typerdatadesc}", &type_len_rdata); #endif zdb_ttlrdata *add_ttlrdata = (zdb_ttlrdata *)add_node->value; #ifdef DEBUG rdata_desc add_type_len_rdata = {TYPE_NSEC3, add_ttlrdata->rdata_size, add_ttlrdata->rdata_pointer }; log_debug("journal: NSEC3: + %{typerdatadesc}", &add_type_len_rdata); #endif /* * The node may need an update of the type bitmap * After all changes (del/upd/add) all the added records should be matched again (check) * * nsec3_zone_item_get_by_name(); * nsec3_zone_item_update_bitmap(item, rdata, rdata_len) */ nsec3_zone_item *add_item = nsec3_zone_item_find_by_record(replay->zone, fqdn, ttlrdata->rdata_size, ttlrdata->rdata_pointer); if(add_item != NULL) { nsec3_zone_item_update_bitmap(add_item, add_ttlrdata->rdata_pointer, add_ttlrdata->rdata_size); u8* add_key = add_node->key; ptr_set_avl_delete(&replay->nsec3_add, fqdn); zdb_ttlrdata_delete(add_ttlrdata); free(add_key); } else { log_err("journal: NSEC3: %{dnsname} has not been found in the NSEC3 database (del/add)", fqdn); return ZDB_JOURNAL_NSEC3_LABEL_NOT_FOUND_IN_DB; } } else { #ifdef DEBUG log_debug("journal: NSEC3: del %{dnsname}", fqdn); rdata_desc type_len_rdata = {TYPE_NSEC3, ttlrdata->rdata_size, ttlrdata->rdata_pointer }; log_debug("journal: NSEC3: - %{typerdatadesc}", &type_len_rdata); #endif /* delete */ nsec3_zone_item *add_item = nsec3_zone_item_find_by_record(replay->zone, fqdn, ttlrdata->rdata_size, ttlrdata->rdata_pointer); if(add_item != NULL) { nsec3_remove_nsec3_by_name(replay->zone, fqdn, ttlrdata->rdata_pointer, ttlrdata->rdata_size); } else { log_err("journal: NSEC3: %{dnsname} has not been found in the NSEC3 database (del)", fqdn); } /* * The node has to be deleted */ } zdb_ttlrdata_delete(ttlrdata); free(fqdn); node->key = NULL; node->value = NULL; } ptr_set_avl_destroy(&replay->nsec3_del); } if(!ptr_set_avl_isempty(&replay->nsec3_add)) { /* stuff to add */ ptr_set_avl_iterator ts_avl_iter; ptr_set_avl_iterator_init(&replay->nsec3_add, &ts_avl_iter); while(ptr_set_avl_iterator_hasnext(&ts_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&ts_avl_iter); u8 *fqdn = (u8*)node->key; #ifdef DEBUG log_debug("journal: NSEC3: post/add %{dnsname}", fqdn); #endif zdb_ttlrdata *ttlrdata = (zdb_ttlrdata*)node->value; #ifdef DEBUG log_debug("journal: NSEC3: add %{dnsname}", fqdn); rdata_desc type_len_rdata = {TYPE_NSEC3, ttlrdata->rdata_size, ttlrdata->rdata_pointer }; log_debug("journal: NSEC3: + %{typerdatadesc}", &type_len_rdata); #endif /* * The node must be added. It should not exist already. * After all changes (del/upd/add) all the added records should be matched again (check) */ nsec3_zone_item *add_item = nsec3_zone_item_find_by_record(replay->zone, fqdn, ttlrdata->rdata_size, ttlrdata->rdata_pointer); if(add_item != NULL) { log_err("journal: NSEC3: already exists"); nsec3_zone *n3 = replay->zone->nsec.nsec3; if(n3 != NULL ) { #ifdef DEBUG zdb_packed_ttlrdata *nsec3; const zdb_packed_ttlrdata *nsec3_rrsig; u8 *owner; u8 *pool; u8 pool_buffer[NSEC3_ZONE_ITEM_TO_NEW_ZDB_PACKED_TTLRDATA_SIZE]; pool = pool_buffer; nsec3_zone_item_to_new_zdb_packed_ttlrdata_parm nsec3_parms = { n3, add_item, replay->zone->origin, &pool, 600 }; nsec3_zone_item_to_new_zdb_packed_ttlrdata( &nsec3_parms, &owner, &nsec3, &nsec3_rrsig); rdata_desc type_len_rdata = {TYPE_NSEC3, nsec3->rdata_size, nsec3->rdata_start }; log_debug("journal: NSEC3: ? %{typerdatadesc}", &type_len_rdata); #endif nsec3_remove_nsec3_by_digest(replay->zone, add_item->digest, ttlrdata->rdata_pointer, ttlrdata->rdata_size); } } // only adds the NSEC3, does not link with the label nsec3_add_nsec3_by_name(replay->zone, fqdn, ttlrdata->rdata_pointer, ttlrdata->rdata_size); zdb_ttlrdata_delete(ttlrdata); free(fqdn); node->key = NULL; node->value = NULL; } ptr_set_avl_destroy(&replay->nsec3_add); } if(!ptr_set_avl_isempty(&replay->nsec3rrsig_del)) { /* stuff to add */ ptr_set_avl_iterator ts_avl_iter; ptr_set_avl_iterator_init(&replay->nsec3rrsig_del, &ts_avl_iter); while(ptr_set_avl_iterator_hasnext(&ts_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&ts_avl_iter); u8 *fqdn = (u8*)node->key; #ifdef DEBUG log_debug("journal: NSEC3: post/add %{dnsname}", fqdn); #endif zdb_ttlrdata *nsec3_rrsig = (zdb_ttlrdata*)node->value; #ifdef DEBUG log_debug("journal: NSEC3: add %{dnsname}", fqdn); rdata_desc type_len_rdata = {TYPE_RRSIG, ZDB_RECORD_PTR_RDATASIZE(nsec3_rrsig), ZDB_RECORD_PTR_RDATAPTR(nsec3_rrsig) }; log_debug("journal: NSEC3: + %{typerdatadesc}", &type_len_rdata); #endif /* * The node must be added. It should not exist already. * After all changes (del/upd/add) all the added records should be matched again (check) */ nsec3_zone_item *item = nsec3_zone_item_find_by_name_ext(replay->zone, fqdn, NULL); if(item != NULL) { nsec3_zone_item_rrsig_del(item, nsec3_rrsig); } zdb_ttlrdata_delete(nsec3_rrsig); free(fqdn); node->key = NULL; node->value = NULL; } ptr_set_avl_destroy(&replay->nsec3rrsig_del); } if(!ptr_set_avl_isempty(&replay->nsec3rrsig_add)) { /* stuff to add */ ptr_set_avl_iterator ts_avl_iter; ptr_set_avl_iterator_init(&replay->nsec3rrsig_add, &ts_avl_iter); while(ptr_set_avl_iterator_hasnext(&ts_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&ts_avl_iter); u8 *fqdn = (u8*)node->key; #ifdef DEBUG log_debug("journal: NSEC3: post/add %{dnsname}", fqdn); #endif zdb_packed_ttlrdata *nsec3_rrsig = (zdb_packed_ttlrdata*)node->value; #ifdef DEBUG log_debug("journal: NSEC3: add %{dnsname}", fqdn); rdata_desc type_len_rdata = {TYPE_RRSIG, ZDB_PACKEDRECORD_PTR_RDATASIZE(nsec3_rrsig), ZDB_PACKEDRECORD_PTR_RDATAPTR(nsec3_rrsig) }; log_debug("journal: NSEC3: + %{typerdatadesc}", &type_len_rdata); #endif /* * The node must be added. It should not exist already. * After all changes (del/upd/add) all the added records should be matched again (check) */ nsec3_zone_item *item = nsec3_zone_item_find_by_name_ext(replay->zone, fqdn, NULL); if(item != NULL) { nsec3_zone_item_rrsig_add(item, nsec3_rrsig); } else { ZDB_RECORD_ZFREE(nsec3_rrsig); } free(fqdn); node->key = NULL; node->value = NULL; } ptr_set_avl_destroy(&replay->nsec3rrsig_add); } if(!ptr_set_avl_isempty(&replay->nsec3_labels)) { /* labels to update */ ptr_set_avl_iterator ts_avl_iter; ptr_set_avl_iterator_init(&replay->nsec3_labels, &ts_avl_iter); while(ptr_set_avl_iterator_hasnext(&ts_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&ts_avl_iter); u8 *fqdn = (u8*)node->key; zdb_rr_label *rr_label = (zdb_rr_label*)node->value; #ifdef DEBUG log_debug("journal: NSEC3: lbl %{dnsname} (%{dnslabel})", fqdn, rr_label->name); #endif /* * The fqdn/label should be updated for self & star match. */ if(rr_label->nsec.nsec3 == NULL) { nsec3_label_link(replay->zone, rr_label, fqdn); } free(fqdn); node->key = NULL; node->value = NULL; } ptr_set_avl_destroy(&replay->nsec3_labels); } /**/ if(nsec3param_added) { /* * ALL the labels of the zone have to be linked again. */ zdb_zone_label_iterator label_iterator; u8 fqdn[MAX_DOMAIN_LENGTH]; zdb_zone_label_iterator_init(replay->zone, &label_iterator); while(zdb_zone_label_iterator_hasnext(&label_iterator)) { zdb_zone_label_iterator_nextname(&label_iterator, fqdn); zdb_rr_label* label = zdb_zone_label_iterator_next(&label_iterator); nsec3_label_link(replay->zone, label, fqdn); } } if(!ptr_set_avl_isempty(&replay->nsec3param_del)) { ptr_set_avl_iterator n3p_avl_iter; ptr_set_avl_iterator_init(&replay->nsec3param_del, &n3p_avl_iter); while(ptr_set_avl_iterator_hasnext(&n3p_avl_iter)) { ptr_node *node = ptr_set_avl_iterator_next_node(&n3p_avl_iter); zdb_ttlrdata* nsec3param = (zdb_ttlrdata*)node->value; nsec3_zone* n3 = nsec3_zone_get_from_rdata(replay->zone, nsec3param->rdata_size, nsec3param->rdata_pointer); if(n3 != NULL) { nsec3_zone_destroy(replay->zone, n3); zdb_record_delete_exact(&replay->zone->apex->resource_record_set, TYPE_NSEC3PARAM, nsec3param); } zdb_ttlrdata_delete(nsec3param); node->key = NULL; node->value = NULL; } ptr_set_avl_destroy(&replay->nsec3param_del); } return SUCCESS; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb-zone-answer-ixfr.c0000644000077100007710000000012412650131756023130 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.475344 30 ctime=1454597652.432344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb-zone-answer-ixfr.c0000664000077100007710000004577212650131756022754 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbixfr IXFR answers * @ingroup dnsdb * @brief * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include "dnsdb/zdb-config-features.h" #include #include #include #include #include #include #include #include #include #include #include "dnsdb/zdb-zone-journal.h" #include "dnsdb/zdb_icmtl.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_types.h" #include "dnsdb/zdb-zone-answer-axfr.h" #define TCP_BUFFER_SIZE 4096 #define FILE_BUFFER_SIZE 4096 #define RECORD_MODE_DELETE 0 #define RECORD_MODE_ADD 1 #define ZAIXFRRB_TAG 0x425252465849415a /* * Typically it goes 4 3 [2,1]+ 0 */ #define MODULE_MSG_HANDLE g_database_logger extern logger_handle* g_database_logger; #define TCP_BUFFER_SIZE 4096 #define FILE_BUFFER_SIZE 4096 #define RECORD_MODE_DELETE 0 #define RECORD_MODE_ADD 1 #define ZAIXFRRB_TAG 0x425252465849415a /* * Typically it goes 4 3 [2,1]+ 0 */ extern logger_handle* g_database_logger; #ifndef MAX_PATH #define MAX_PATH 4096 #endif typedef struct zdb_zone_answer_ixfr_args zdb_zone_answer_ixfr_args; #define ZAIXFRA_TAG 0x4152465849415a struct zdb_zone_answer_ixfr_args { zdb_zone *zone; //char *directory; message_data *mesg; struct thread_pool_s *disk_tp; ya_result return_code; u32 packet_size_limit; u32 packet_records_limit; u32 from_serial; bool compress_dname_rdata; }; static void zdb_zone_answer_ixfr_thread_exit(zdb_zone_answer_ixfr_args* data) { log_debug("zone write ixfr: ended with: %r", data->return_code); if(data->mesg != NULL) { free(data->mesg); } //free(data->directory); free(data); } static ya_result zdb_zone_answer_ixfr_read_record(input_stream *is, u8 *qname, u32 *qname_sizep, struct type_class_ttl_rdlen *tctrlp, u8 *rdata_buffer, u32 *rdata_sizep) { ya_result return_code; /* Read the next DNAME from the stored INCREMENTAL */ if(FAIL(return_code = input_stream_read_dnsname(is, qname))) { log_err("zone write ixfr: error reading IXFR qname: %r", return_code); return return_code; } *qname_sizep = return_code; if(return_code > 0) { /* read the next type+class+ttl+rdatalen from the stored IXFR */ tctrlp->qtype = 0; tctrlp->rdlen = 0; if(FAIL(return_code = input_stream_read_fully(is, tctrlp, 10))) { log_err("zone write ixfr: error reading IXFR record: %r", return_code); return return_code; } if(FAIL(return_code = input_stream_read_fully(is, rdata_buffer, ntohs(tctrlp->rdlen)))) { log_err("zone write ixfr: error reading IXFR record rdata: %r", return_code); return return_code; } *rdata_sizep = return_code; return_code = *qname_sizep + 10 + *rdata_sizep; } return return_code; } /* * mesg is needed for TSIG */ extern u16 edns0_maxsize; #if ZDB_HAS_TSIG_SUPPORT static ya_result zdb_zone_answer_ixfr_send_message(output_stream *tcpos, packet_writer *pw, message_data *mesg, tsig_tcp_message_position pos) #else static ya_result zdb_zone_answer_ixfr_send_message(output_stream *tcpos, packet_writer *pw, message_data *mesg) #endif { ya_result return_code; /* * Flush and stop */ #ifdef DEBUG log_debug("zone write ixfr: sending message for %{dnsname} to %{sockaddr}", mesg->qname, &mesg->other); #endif if(mesg->edns) // Dig does a TCP query with EDNS0 { /* 00 00 29 SS SS rr vv 80 00 00 00 */ memset(&pw->packet[pw->packet_offset], 0, EDNS0_RECORD_SIZE); pw->packet_offset += 2; pw->packet[pw->packet_offset++] = 0x29; packet_writer_add_u16(pw, htons(edns0_maxsize)); packet_writer_add_u32(pw, mesg->rcode_ext); pw->packet_offset += 2; } mesg->send_length = pw->packet_offset; /** @todo: I need to put this in a packet_writer function */ #if ZDB_HAS_TSIG_SUPPORT if(TSIG_ENABLED(mesg)) { mesg->ar_start = &pw->packet[pw->packet_offset]; if(FAIL(return_code = tsig_sign_tcp_message(mesg, pos))) { log_err("zone write ixfr: failed to sign the answer: %r", return_code); return return_code; } } #endif pw->packet_offset = mesg->send_length; /** @todo: I need to put this in a packet_writer function */ if(FAIL(return_code = write_tcp_packet(pw, tcpos))) { log_err("zone write ixfr: error sending IXFR packet to %{sockaddr}: %r", &mesg->other, return_code); } return return_code; } /* * writes the filtered stream to a file, then adds it to the journal * the journal needs to give fast access to the last SOA in it ... * */ static void* zdb_zone_answer_ixfr_thread(void* data_) { zdb_zone_answer_ixfr_args* data = (zdb_zone_answer_ixfr_args*)data_; message_data *mesg = data->mesg; /* The TCP output stream */ output_stream tcpos; /* The incremental file input stream */ input_stream fis; /* The packet writer */ /* Current SOA */ u32 current_soa_rdata_size; //u16 target_soa_rdata_size = MAX_SOA_RDATA_LENGTH; struct type_class_ttl_rdlen current_soa_tctrl; /* */ u8 *rdata_buffer = NULL; struct type_class_ttl_rdlen tctrl; u32 qname_size; u32 rdata_size; packet_writer pw; u8 current_soa_rdata_buffer[MAX_SOA_RDATA_LENGTH]; u8 target_soa_rdata_buffer[MAX_SOA_RDATA_LENGTH]; u8 fqdn[MAX_DOMAIN_LENGTH]; /* */ ya_result return_value; u32 serial = 0; u16 an_record_count = 0; u32 packet_size_limit; u32 packet_size_trigger; #if ZDB_HAS_TSIG_SUPPORT tsig_tcp_message_position pos = TSIG_START; #endif /* * relevant data for when data is not usable anymore */ u8 origin[MAX_DOMAIN_LENGTH]; /* */ log_info("zone write ixfr: sending %{dnsname} journal file", data->zone->origin); /***********************************************************************/ if(data->mesg->sockfd < 0) { log_err("zone write ixfr: no tcp: %{dnsname} %d", data->zone->origin, data->from_serial); data->return_code = ERROR; zdb_zone_answer_ixfr_thread_exit(data); return NULL; } /***********************************************************************/ /* Keep a snapshot of the current SOA */ zdb_packed_ttlrdata* soa = zdb_record_find(&data->zone->apex->resource_record_set, TYPE_SOA); if(soa == NULL) { /** @todo error other than "does not exists" : SERVFAIL */ /** * @note This does an exit with error. */ data->return_code = ZDB_ERROR_NOSOAATAPEX; zdb_zone_answer_ixfr_thread_exit(data); log_crit("zone write ixfr: startup: no SOA"); /* will ultimately lead to the end of the program */ return NULL; } current_soa_rdata_size = soa->rdata_size; memcpy(current_soa_rdata_buffer, ZDB_PACKEDRECORD_PTR_RDATAPTR(soa), current_soa_rdata_size); current_soa_tctrl.qtype = TYPE_SOA; current_soa_tctrl.qclass = CLASS_IN; current_soa_tctrl.ttl = htonl(soa->ttl); current_soa_tctrl.rdlen = htons(soa->rdata_size); /***********************************************************************/ /* * Adjust the message received size * get the queried serial number * Set the answer bit and clean the NS count */ packet_unpack_reader_data purd; purd.packet = mesg->buffer; purd.packet_size = mesg->received; purd.offset = 12; /* Keep only the query */ packet_reader_skip_fqdn(&purd); purd.offset += 4; mesg->received = purd.offset; /* Get the queried serial */ packet_reader_skip_fqdn(&purd); purd.offset += 2 + 2 + 4 + 2; packet_reader_skip_fqdn(&purd); packet_reader_skip_fqdn(&purd); packet_reader_read(&purd, (u8*)&serial, 4); serial = ntohl(serial); log_debug("zone write ixfr: client requested from serial %08x (%d)", serial, serial); MESSAGE_HIFLAGS(mesg->buffer) |= AA_BITS|QR_BITS; MESSAGE_SET_NS(mesg->buffer, 0); dns_resource_record rr; dns_resource_record_init(&rr); if(FAIL(return_value = zdb_zone_journal_get_ixfr_stream_at_serial(data->zone, serial, &fis, &rr))) { log_err("zone write ixfr: unable to open journal for %{dnsname}: %r", data->zone->origin, return_value); dns_resource_record_clear(&rr); zdb_zone_answer_axfr(data->zone, mesg, NULL, data->disk_tp, data->packet_size_limit, data->packet_records_limit, data->compress_dname_rdata); data->return_code = return_value; zdb_zone_answer_ixfr_thread_exit(data); return NULL; } if(FAIL(return_value) || (sizeof(target_soa_rdata_buffer) < rr.rdata_size)) { log_err("zone write ixfr: unable to read journal from serial %d for %{dnsname}: %r", serial, data->zone->origin, return_value); zdb_zone_answer_axfr(data->zone, mesg, NULL, data->disk_tp, data->packet_size_limit, data->packet_records_limit, data->compress_dname_rdata); dns_resource_record_clear(&rr); if(ISOK(return_value)) { return_value = ERROR; } data->return_code = return_value; zdb_zone_answer_ixfr_thread_exit(data); return NULL; } MEMCOPY(target_soa_rdata_buffer, rr.rdata, rr.rdata_size); // note: target_soa_rdata_size = rr.rdata_size; dns_resource_record_clear(&rr); /* fis points to the IX stream */ MALLOC_OR_DIE(u8*, rdata_buffer, RDATA_MAX_LENGTH, ZAIXFRRB_TAG); /* rdata max size */ /***********************************************************************/ /* * We will need to output the current SOA * But first, we have some setup to do. */ /* It's TCP, my limit is 16 bits */ packet_size_limit = DNSPACKET_MAX_LENGTH; packet_size_trigger = packet_size_limit / 2; // so, ~32KB, also : guarantees that there will be room for SOA & TSIG mesg->size_limit = packet_size_limit; int tcpfd = data->mesg->sockfd; data->mesg->sockfd = -1; dnsname_copy(origin, data->zone->origin); /* Sends the "Write unlocked" notification */ log_info("zone write ixfr: releasing implicit write lock %{dnsname} %d", data->zone->origin, serial); data->mesg = NULL; // still need the message. do not destroy it data->return_code = SUCCESS; zdb_zone_answer_ixfr_thread_exit(data); /* WARNING: From this point forward, 'data' cannot be used anymore */ data = NULL; /* WITH THIS I ENSURE A CRASH IF I DO NOT RESPECT THE ABOVE COMMENT */ /***********************************************************************/ log_info("zone write ixfr: sending journal %{dnsname} %d", origin, serial); /* attach the tcp descriptor and put a buffer filter in front of the input and the output*/ fd_output_stream_attach(&tcpos, tcpfd); buffer_input_stream_init(&fis, &fis, FILE_BUFFER_SIZE); buffer_output_stream_init(&tcpos, &tcpos, TCP_BUFFER_SIZE); packet_writer_init(&pw, mesg->buffer, mesg->received, packet_size_limit - 780); /* * Init * * Write the final SOA (start of the IXFR stream) */ packet_writer_add_fqdn(&pw, (const u8*)origin); packet_writer_add_bytes(&pw, (const u8*)¤t_soa_tctrl, 8); /* not 10 ? */ packet_writer_add_rdata(&pw, TYPE_SOA, current_soa_rdata_buffer, current_soa_rdata_size); an_record_count = 1 /*2*/; bool end_of_stream = FALSE; for(;;) { if(FAIL(return_value = zdb_zone_answer_ixfr_read_record(&fis, fqdn, &qname_size, &tctrl, rdata_buffer, &rdata_size))) { // critical error. log_err("zone write ixfr: read record #%d failed %{dnsname} %d: %r", an_record_count, origin, serial, return_value); break; } u32 record_lenght = return_value; #if 0 // DEBUG { rdata_desc rr_desc = {tctrl.qtype, rdata_size, rdata_buffer}; log_debug("zone write ixfr: %{dnsname}: peek: (%3i) %{dnsname} %{typerdatadesc}", origin, record_lenght, fqdn, &rr_desc); } #endif if(record_lenght == 0) { #if DEBUG log_debug("zone write ixfr: %{dnsname}: end of stream", origin); #endif #if ZDB_HAS_TSIG_SUPPORT if(pos != TSIG_START) { pos = TSIG_END; } else { pos = TSIG_WHOLE; } #endif // Last SOA // There is no need to check for remaining space as packet_size_trigger guarantees there is still room packet_writer_add_fqdn(&pw, (const u8*)origin); packet_writer_add_bytes(&pw, (const u8*)¤t_soa_tctrl, 8); /* not 10 ? */ packet_writer_add_rdata(&pw, TYPE_SOA, current_soa_rdata_buffer, current_soa_rdata_size); ++an_record_count; end_of_stream = TRUE; } else if(record_lenght > MAX_U16) // technically possible: a record too big to fit in an update (not likely) { // this is technically possible with an RDATA of 64K log_err("zone write ixfr: %{dnsname}: ignoring record of size %u", origin, record_lenght); rdata_desc rr_desc = {tctrl.qtype, rdata_size, rdata_buffer}; log_err("zone write ixfr: %{dnsname}: record is: %{dnsname} %{typerdatadesc}", origin, return_value, fqdn, &rr_desc); continue; } // if the record puts us above the trigger, or if there is no more record to read, send the message if(pw.packet_offset + record_lenght >= packet_size_trigger || end_of_stream) { // flush MESSAGE_SET_AN(mesg->buffer, htons(an_record_count)); mesg->send_length = pw.packet_offset; #if ZDB_HAS_TSIG_SUPPORT if(FAIL(return_value = zdb_zone_answer_ixfr_send_message(&tcpos, &pw, mesg, pos))) #else if(FAIL(return_value = zdb_zone_answer_ixfr_send_message(&tcpos, &pw, mesg))) #endif { log_err("zone write ixfr: send message failed %{dnsname}: %r", origin, return_value); break; } #if ZDB_HAS_TSIG_SUPPORT pos = TSIG_MIDDLE; #endif packet_writer_init(&pw, mesg->buffer, mesg->received, packet_size_limit - 780); an_record_count = 0; if(end_of_stream) { break; } } packet_writer_add_fqdn(&pw, (const u8*)fqdn); packet_writer_add_bytes(&pw, (const u8*)&tctrl, 8); packet_writer_add_rdata(&pw, tctrl.qtype, rdata_buffer, rdata_size); ++an_record_count; } if(ISOK(return_value)) { log_info("zone write ixfr: %{dnsname} ixfr stream sent", origin); } else { log_err("zone write ixfr: %{dnsname} ixfr stream not sent", origin); } output_stream_close(&tcpos); if(input_stream_valid(&fis)) { input_stream_close(&fis); } free(rdata_buffer); free(mesg); return NULL; } /** * * Replies an (I)XFR stream to a slave. * * @param zone The zone * @param mesg The original query * @param network_tp The network thread pool to use * @param disk_tp The disk thread pool to use * @param packet_size_limit the maximum size of a packet/message in the stream * @param packet_records_limit The maximum number of records in a single message (1 for very old servers) * @param compress_dname_rdata Allow fqdn compression * */ void zdb_zone_answer_ixfr(zdb_zone* zone, message_data *mesg, struct thread_pool_s *network_tp, struct thread_pool_s *disk_tp, u32 packet_size_limit, u32 packet_records_limit, bool compress_dname_rdata) { zdb_zone_answer_ixfr_args* args; log_info("zone write ixfr: queueing %{dnsname}", zone->origin); MALLOC_OR_DIE(zdb_zone_answer_ixfr_args*, args, sizeof(zdb_zone_answer_ixfr_args), ZAIXFRA_TAG); args->zone = zone; //args->directory = "/tmp"; // strdup(journal_get_xfr_path()); message_data *mesg_clone; MALLOC_OR_DIE(message_data*, mesg_clone, sizeof(message_data), MESGDATA_TAG); memcpy(mesg_clone, mesg, sizeof(message_data)); args->mesg = mesg_clone; args->disk_tp = disk_tp; args->packet_size_limit = packet_size_limit; args->packet_records_limit = packet_records_limit; args->compress_dname_rdata = compress_dname_rdata; if(network_tp != NULL) { thread_pool_enqueue_call(network_tp, zdb_zone_answer_ixfr_thread, args, NULL, "zone-answer-ixfr"); } else { zdb_zone_answer_ixfr_thread(args); } } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec3.c0000644000077100007710000000012412650131756020150 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.450344 30 ctime=1454597652.508344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec3.c0000664000077100007710000012603512650131756017764 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include /* * RFC 5155 * * Server Response to a Run-Time Collision * * If the hash of a non-existing QNAME collides with the owner name of * an existing NSEC3 RR, then the server will be unable to return a * response that proves that QNAME does not exist. In this case, the * server MUST return a response with an RCODE of 2 (server failure). * * Note that with the hash algorithm specified in this document, SHA-1, * such collisions are highly unlikely. * */ #include "dnsdb/zdb_types.h" #if ZDB_HAS_NSEC3_SUPPORT == 0 #error nsec3.c should not be compiled when ZDB_HAS_NSEC3_SUPPORT == 0 #endif #include #include #include #include #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_zone_label_iterator.h" #include "dnsdb/zdb_record.h" #include "dnsdb/nsec3.h" #include "dnsdb/nsec_common.h" #include "dnsdb/nsec3_owner.h" #include "dnsdb/zdb_listener.h" #include "dnsdb/rrsig.h" #define MODULE_MSG_HANDLE g_dnssec_logger extern logger_handle *g_dnssec_logger; static group_mutex_t nsec3_owners_readers_write_locks = GROUP_MUTEX_INITIALIZER; bool nsec3_update_label(zdb_zone *zone, zdb_rr_label* label, dnslabel_vector_reference labels, s32 labels_top) { /* * If label has no nsec3 -> nsec3_add_label * * Else * * Check the types, change if required. */ /* * NOTE: This could be one of the best places to use the scheduler */ if(label->nsec.nsec3 == NULL) { nsec3_add_label(zone, label, labels, labels_top); return TRUE; } nsec3_zone_item *nsec3_item = label->nsec.nsec3->self; if(nsec3_item == NULL) { yassert((label->nsec.nsec3->self == NULL) && (label->nsec.nsec3->star == NULL) && (label->nsec.nsec3->next == NULL)); ZFREE(label->nsec.nsec3, nsec3_label_extension); // there is no nsec3 label extension item linked to this label->nsec.nsec3 = NULL; nsec3_add_label(zone, label, labels, labels_top); return TRUE; } type_bit_maps_context type_context; u16 type_bit_maps_size = type_bit_maps_initialize(&type_context, label, FALSE, TRUE); if(type_bit_maps_size > 0) { u8 *type_bit_maps; ZALLOC_ARRAY_OR_DIE(u8*, type_bit_maps, type_bit_maps_size, NSEC3_TYPEBITMAPS_TAG); type_bit_maps_write(type_bit_maps, &type_context); bool type_map_did_change = TRUE; if(nsec3_item->type_bit_maps_size == type_bit_maps_size) { if(memcmp(nsec3_item->type_bit_maps, type_bit_maps, type_bit_maps_size) == 0) { type_map_did_change = FALSE; } } if(type_map_did_change) { // notify the removal of NSEC3 before going further nsec3_zone* n3 = nsec3_zone_from_item(zone, nsec3_item); zdb_listener_notify_update_nsec3rrsig(zone, nsec3_item->rrsig, NULL, nsec3_item); zdb_listener_notify_remove_nsec3(zone, nsec3_item, n3, 0); nsec3_zone_item_rrsig_delete_all(nsec3_item); type_bit_maps_merge(&type_context, nsec3_item->type_bit_maps, nsec3_item->type_bit_maps_size, type_bit_maps, type_bit_maps_size); /* * Try to re-use one of the buffers */ if(type_context.type_bit_maps_size == nsec3_item->type_bit_maps_size) { ZFREE_ARRAY(type_bit_maps, type_bit_maps_size); } else if(type_context.type_bit_maps_size == type_bit_maps_size) { ZFREE_ARRAY(nsec3_item->type_bit_maps, nsec3_item->type_bit_maps_size); nsec3_item->type_bit_maps = type_bit_maps; nsec3_item->type_bit_maps_size = type_bit_maps_size; } else { ZFREE_ARRAY(type_bit_maps, type_bit_maps_size); ZFREE_ARRAY(nsec3_item->type_bit_maps, nsec3_item->type_bit_maps_size); ZALLOC_ARRAY_OR_DIE(u8*, nsec3_item->type_bit_maps, type_bit_maps_size, NSEC3_TYPEBITMAPS_TAG); nsec3_item->type_bit_maps_size = type_bit_maps_size; } type_bit_maps_write(nsec3_item->type_bit_maps, &type_context); return TRUE; } else { // nothing to do ZFREE_ARRAY(type_bit_maps, type_bit_maps_size); return FALSE; } } else { /* * Empty terminator ... * @TODO The NSEC3 should be removed along with its signature. */ log_quit("nsec3_update_label called on an empty terminator. nsec3_remove_label should have been called instead."); return FALSE; /* NEVER REACHED */ } } /* * Adds NSEC3 records to a label. This is NOT an update. * We assume that the labels are not a fqdn bigger than MAX_DOMAIN_LENGTH */ void nsec3_add_label(zdb_zone *zone, zdb_rr_label* label, dnslabel_vector_reference labels, s32 labels_top) { /* * All the intermediary labels are supposed to be ready, the caller * MUST call this function each time it adds a new label * * Compute the stuff * Create/Link the NSEC3 * From the PREVIOUS NSEC3 record, recompute the ones that are now * supposed to be put in the new one * Increase the relevant SC * A signature should be ordered for this one and for the previous one * */ type_bit_maps_context type_context; /* * All the labels from (included) the root to the zone have to be added */ u32 name_len; u8 name[2 + MAX_DOMAIN_LENGTH]; u8 digest[1 + MAX_DIGEST_LENGTH]; name[0] = 1; name[1] = '*'; /* NOTE: the final 0 is taken in account in the returned length */ /* - 1 because of said final 0 */ name_len = dnslabel_vector_to_dnsname(labels, labels_top, &name[2])/* - 1*/; log_debug("nsec3_add_label: %{dnsname}: adding", &name[2]); bool opt_out = ((zone->apex->flags & ZDB_RR_LABEL_NSEC3_OPTOUT) != 0); u8 default_flags = (opt_out)?1:0; bool force_rrsig; if(ZDB_LABEL_UNDERDELEGATION(label)) { force_rrsig = FALSE; } else { /* opt-in */ if(!opt_out) { force_rrsig = TRUE; } else /* opt-out */ { if(ZDB_LABEL_ATDELEGATION(label)) { force_rrsig = (zdb_record_find(&label->resource_record_set, TYPE_DS) != NULL); /* Has NS & DS */ } else { force_rrsig = TRUE; } } } /* * These two slots are for the owner label but have to be stored in * (and owned by) the NSEC3 item. */ u16 type_bit_maps_size = type_bit_maps_initialize(&type_context, label, FALSE, force_rrsig); nsec3_zone* n3 = zone->nsec.nsec3; nsec3_label_extension* next_n3_ext = NULL; yassert(n3 != NULL); do { nsec3_compute_digest_from_fqdn_with_len(n3, &name[2], name_len, digest, FALSE); log_debug("nsec3_add_label: %{dnsname}: NSEC3 name is %{digest32h}", &name[2], digest); /* * Creates or return the existing nsec3 node for the digest * */ nsec3_zone_item *self = nsec3_avl_insert(&n3->items, digest); // self->type_bit_maps is NULL => new one /* * Destroy the previous NSEC3's signature */ nsec3_zone_item *self_prev = nsec3_avl_node_mod_prev(self); yassert(self_prev != NULL); if(self_prev->rrsig != NULL) { ZDB_RECORD_ZFREE(self_prev->rrsig); self_prev->rrsig = NULL; } /* * Destroy the prev's star references. */ #ifdef DEBUG if(self_prev->sc > 0) { log_debug("nsec3_add_label: %{dnsname}: clearing %{digest32h} (predecessor)", &name[2], self_prev->digest); } #endif nsec3_remove_all_star(self_prev); /** @todo self_prev needs to be signed */ /* * self -> rc++ * self -> owner += label (list + 1 item) */ #ifdef DEBUG if(self->rc != 0) { log_debug("nsec3_add_label: %{dnsname}: %{digest32h} has got owner collisions", &name[2], self->digest); } #endif nsec3_add_owner(self, label); /* * Note: the self is edited later */ self->flags = default_flags; if(self->type_bit_maps_size == 0) { /* * Set the bitmap */ self->type_bit_maps = NULL; self->type_bit_maps_size = type_bit_maps_size; if(type_bit_maps_size > 0) { ZALLOC_ARRAY_OR_DIE(u8*, self->type_bit_maps, type_bit_maps_size, NSEC3_TYPEBITMAPS_TAG); type_bit_maps_write(self->type_bit_maps, &type_context); } zdb_listener_notify_add_nsec3(zone, self, n3, zone->min_ttl); } else { /* Merge the existing bitmap with the new one */ u8* tmp_type_bit_maps; ZALLOC_ARRAY_OR_DIE(u8*, tmp_type_bit_maps, type_bit_maps_size, NSEC3_TYPEBITMAPS_TAG); /* type_bit_maps_size > 0 */ type_bit_maps_write(tmp_type_bit_maps, &type_context); if(type_bit_maps_merge(&type_context, self->type_bit_maps, self->type_bit_maps_size, tmp_type_bit_maps, type_bit_maps_size)) { /* TRUE : a merge occurred */ /** * @todo: nsec3_update has got this operation added: * * Check if this is a mistake to have not put it here * * If it was, do the requested factorization (nsec3_update) if((node->flags&NSEC3_FLAGS_MARKED_FOR_ICMTL_ADD)==0) { zdb_listener_notify_remove_nsec3(zone, node, n3); node->flags|=NSEC3_FLAGS_MARKED_FOR_ICMTL_ADD; } */ yassert(type_bit_maps_size > 0); type_bit_maps_size = type_context.type_bit_maps_size; ZFREE_ARRAY(self->type_bit_maps, self->type_bit_maps_size); ZALLOC_ARRAY_OR_DIE(u8*, self->type_bit_maps, type_bit_maps_size, NSEC3_TYPEBITMAPS_TAG); self->type_bit_maps_size = type_bit_maps_size; type_bit_maps_write(self->type_bit_maps, &type_context); /* * This case does not exist: A merge of something of size > 0 * with anything will always give a size > 0 * * else * { * self->type_bit_maps_size = 0; * } * */ } ZFREE_ARRAY(tmp_type_bit_maps, type_bit_maps_size); } /* nsec3_set_label_extension */ if(next_n3_ext == NULL) { yassert(label->nsec.nsec3 == NULL); ZALLOC_OR_DIE(nsec3_label_extension*, next_n3_ext, nsec3_label_extension, NSEC3_LABELEXT_TAG); // in nsec3_add_label #ifdef DEBUG memset(next_n3_ext, 0xac, sizeof(nsec3_label_extension)); #endif label->nsec.nsec3 = next_n3_ext; } else { yassert(next_n3_ext->next == NULL); ZALLOC_OR_DIE(nsec3_label_extension*, next_n3_ext->next, nsec3_label_extension, NSEC3_LABELEXT_TAG); // in nsec3_add_label #ifdef DEBUG memset(next_n3_ext->next, 0xca, sizeof(nsec3_label_extension)); #endif next_n3_ext = next_n3_ext->next; } /* * Are an array (More than one NSEC3PARAM) */ yassert(self != NULL); next_n3_ext->self = self; /** @todo self needs to be signed */ nsec3_compute_digest_from_fqdn_with_len(n3, name, name_len + 2, digest, FALSE); //digestname(name, name_len + 2, NSEC3_ZONE_SALT(n3), NSEC3_ZONE_SALT_LEN(n3), nsec3_zone_get_iterations(n3), &digest[1], FALSE); nsec3_zone_item* star = nsec3_avl_find_interval_start(&n3->items, digest); nsec3_add_star(star, label); next_n3_ext->star = star; next_n3_ext->next = NULL; n3 = n3->next; } while(n3 != NULL); label->flags |= ZDB_RR_LABEL_NSEC3; } /** * used by nsec3_label_link * * It will find if the label has got a matching NSEC3 record (by digest) * If so, it will link to it. */ static nsec3_zone_item * nsec3_label_link_seeknode(nsec3_zone* n3, const u8 *fqdn, s32 fqdn_len, u8 *digest) { nsec3_compute_digest_from_fqdn_with_len(n3, fqdn, fqdn_len, digest, FALSE); #if DEBUG log_debug("nsec3: seeking node for %{dnsname} with %{digest32h}", fqdn, digest); #endif nsec3_zone_item *self = nsec3_avl_find(&n3->items, digest); return self; } /** * used by nsec3_label_link * * It will find if the *.label has got a matching NSEC3 record (by digest) * If so, it will link to it. */ static nsec3_zone_item * nsec3_label_link_seekstar(nsec3_zone* n3, const u8 *fqdn, s32 fqdn_len, u8 *digest) { nsec3_compute_digest_from_fqdn_with_len(n3, fqdn, fqdn_len, digest, TRUE); #if DEBUG log_debug("nsec3: seeking star for %{dnsname} with %{digest32h}", fqdn, digest); #endif nsec3_zone_item* star = nsec3_avl_find_interval_start(&n3->items, digest); return star; } /** * * Links a label to already existing nsec3 items * * This function is for when a label has been added "without intelligence". * It will find if the function has got a matching NSEC3 record (by digest) * If so, it will link to it. * * @param zone * @param label * @param fqdn * */ void nsec3_label_link(zdb_zone *zone, zdb_rr_label* label, const u8 *fqdn) { nsec3_zone* n3 = zone->nsec.nsec3; #ifdef DEBUG if(n3 == NULL) { log_err("zone %{dnsname} has invalid NSEC3 data"); return; } #endif nsec3_label_extension **n3lep = &label->nsec.nsec3; u8 digest[1 + MAX_DIGEST_LENGTH]; // yassert(label->nsec.nsec3 == NULL); yassert(n3 != NULL); s32 fqdn_len = dnsname_len(fqdn); s32 add_count = 0; bool linked = FALSE; do { nsec3_label_extension *n3le = *n3lep; if(n3le == NULL) { nsec3_zone_item *self = nsec3_label_link_seeknode(n3, fqdn, fqdn_len, digest); if(self == NULL) { /* no associated node */ log_debug("nsec3_label_link: %{dnsname} => %{digest32h}: no NSEC3", fqdn, digest); } /**/ ZALLOC_OR_DIE(nsec3_label_extension*, *n3lep, nsec3_label_extension, NSEC3_LABELEXT_TAG); // in nsec3_label_link n3le = *n3lep; memset(n3le, 0, sizeof(nsec3_label_extension)); //n3le->next = NULL; if(self != NULL) { /**/ nsec3_add_owner(self, label); n3le->self = self; /**/ nsec3_zone_item* star = nsec3_label_link_seekstar(n3, fqdn, fqdn_len, digest); nsec3_add_star(star, label); n3le->star = star; /**/ linked = TRUE; add_count++; } n3lep = &n3le->next; } else { nsec3_label_extension *n3le = *n3lep; /* a node exists already, maybe it's not associated yet */ if(n3le->self == NULL) { nsec3_zone_item *self = nsec3_label_link_seeknode(n3, fqdn, fqdn_len, digest); if(self != NULL) { nsec3_add_owner(self, label); n3le->self = self; nsec3_zone_item* star = nsec3_label_link_seekstar(n3, fqdn, fqdn_len, digest); assert(star != NULL); nsec3_add_star(star, label); n3le->star = star; linked = TRUE; } } n3lep = &n3le->next; } n3 = n3->next; } while(n3 != NULL); /* Partial update = BAD */ yassert((n3 == NULL) || (n3 != NULL && add_count == 0)); if(linked) { label->flags |= ZDB_RR_LABEL_NSEC3; } } /** * Unlinks the label from the NSEC3 * * Destroy everything NSEC3 from the label * * @param zone * @param label */ void nsec3_remove_label(zdb_zone *zone, zdb_rr_label* label) { /* * * 1) * * Decrease the RC * Decrease the SC * * 2) * * If RC == 0 (most likely) * Move all star references to the PREVIOUS NSEC3 record * destroy the NSEC3 record */ nsec3_label_extension* n3le = label->nsec.nsec3; yassert(n3le != NULL); //assert_mallocated(n3le); log_debug("nsec3_remove_label: %{dnslabel} . %{dnsname}", label->name, zone->origin); /* 1) */ do { nsec3_zone_item *item = n3le->self; if(n3le->star != NULL) { log_debug("nsec3_remove_label: releasing star %{digest32h}", n3le->star->digest); nsec3_remove_star(n3le->star, label); n3le->star = NULL; } if(item != NULL) /* item = n3le->self */ { log_debug("nsec3_remove_label: releasing self %{digest32h}", item->digest); nsec3_remove_owner(item, label); n3le->self = NULL; /* 2) */ if(item->rc == 0) { if(item->sc > 0) { nsec3_zone_item* prev = nsec3_avl_node_mod_prev(item); yassert(prev != NULL); /* * Take all the star nodes from item * * For each of these nodes, update the NSEC3 reference to "prev" * * Add all the star nodes of item to prev, in one go */ if(prev != item) { nsec3_move_all_star(item, prev); } else { nsec3_remove_all_star(item); } } yassert(item->rc == 0 && item-> sc == 0 && label->nsec.nsec3->self == NULL); /* Destroy item */ /* First, get the root */ nsec3_zone* n3 = nsec3_zone_from_item(zone, item); yassert(n3 != NULL); ZFREE_ARRAY(item->type_bit_maps, item->type_bit_maps_size); item->type_bit_maps = NULL; nsec3_avl_delete(&n3->items, item->digest); /** @todo if incremental is on, feedback */ } } nsec3_label_extension *n3le_tmp = n3le; n3le = n3le->next; ZFREE(n3le_tmp, nsec3_label_extension); // free the nsec3 label extension of the label being removed } while(n3le != NULL); label->nsec.nsec3 = NULL; } /** * Initializes an RDATA for an NSEC3PARAM using an hash algorithm, flags, iterations, salt length and salt. */ static ya_result nsec3_build_nsec3param_rdata(u8* nsec3param_rdata, const u8* origin, u8 default_hash_alg, u8 default_flags, u16 default_iterations, u8 default_salt_len, const u8* default_salt) { /* Size of the digest in Base32 Hex */ u32 b32h_hash_len = ((nsec3_hash_len(default_hash_alg) + 4) / 5) << 3; if((b32h_hash_len == 0) || (1 + b32h_hash_len + dnsname_len(origin)) > MAX_DOMAIN_LENGTH - 2) /* - 2 for the '*.' */ { return DNSSEC_ERROR_NSEC3_DIGESTORIGINOVERFLOW; /* name would be too big */ } nsec3param_rdata[0] = default_hash_alg; nsec3param_rdata[1] = default_flags; SET_U16_AT(nsec3param_rdata[2], htons(default_iterations)); nsec3param_rdata[4] = default_salt_len; MEMCOPY(NSEC3PARAM_RDATA_SALT(nsec3param_rdata), default_salt, default_salt_len); return NSEC3PARAM_MINIMUM_LENGTH + default_salt_len; } /** * Adds an nsec3param in the zone (both "DB" and "NSEC3" sides). * * Delegates to nsec3_zone_add_from_rdata * */ ya_result nsec3_add_nsec3param(zdb_zone *zone, u8 default_hash_alg, u8 default_flags, u16 default_iterations, u8 default_salt_len, u8* default_salt) { yassert(default_hash_alg == 1); ya_result return_code; u16 nsec3param_rdata_size; u8 nsec3param_rdata[NSEC3PARAM_MINIMUM_LENGTH + MAX_SALT_LENGTH]; if(FAIL(return_code = nsec3_build_nsec3param_rdata(nsec3param_rdata, zone->origin, default_hash_alg, default_flags, default_iterations, default_salt_len, default_salt))) { return return_code; } nsec3param_rdata_size = (u16)return_code; nsec3_zone* n3 = nsec3_zone_get_from_rdata(zone, nsec3param_rdata_size, nsec3param_rdata); if(n3 == NULL) { /*n3 =*/nsec3_zone_add_from_rdata(zone, nsec3param_rdata_size, nsec3param_rdata); zdb_packed_ttlrdata* nsec3param; ZDB_RECORD_ZALLOC(nsec3param, NSEC3PARAM_DEFAULT_TTL, nsec3param_rdata_size, nsec3param_rdata); /** @todo: NSEC3PARAM_DEFAULT_TTL : put the real value here*/ /* * Add the NSEC3PARAM to the zone apex * Don't do dups */ if(zdb_record_insert_checked(&zone->apex->resource_record_set, TYPE_NSEC3PARAM, nsec3param)) /* FB done (and yes: this returns a boolean) */ { #if ZDB_CHANGE_FEEDBACK_SUPPORT != 0 /* * Update ICMTL. * * NOTE: the zdb_rr_label set of functions are zdb_listener-aware but the zdb_record ones are not. * That's why this one needs a call to the listener. * */ zdb_ttlrdata unpacked_ttlrdata; unpacked_ttlrdata.rdata_pointer = &nsec3param->rdata_start[0]; unpacked_ttlrdata.rdata_size = nsec3param->rdata_size; unpacked_ttlrdata.ttl = nsec3param->ttl; u8 * origin_vector[1] = {zone->origin}; zdb_listener_notify_add_record(zone, origin_vector, 0, TYPE_NSEC3PARAM, &unpacked_ttlrdata); #endif } /** @note if we add an nsec3param, we are about to edit the zone. * @todo have an "atomic" way to do all this (mark edit + add param + update nsec3 + update sigs + unmark edit) */ nsec3_edit_zone_start(zone); } return SUCCESS; } /** * * Removes an NSEC3PARAM record and its associated structure. * * @todo: Test nsec3_remove_nsec3param */ ya_result nsec3_remove_nsec3param(zdb_zone *zone, u8 hash_alg, u8 flags, u16 iterations, u8 salt_len, const u8* salt) { ya_result return_code; /* Build the wire */ u16 nsec3param_rdata_size; u8 nsec3param_rdata[NSEC3PARAM_MINIMUM_LENGTH + MAX_SALT_LENGTH]; if(FAIL(return_code = nsec3_build_nsec3param_rdata(nsec3param_rdata, zone->origin, hash_alg, flags, iterations, salt_len, salt))) { return return_code; } nsec3param_rdata_size = (u16)return_code; /* Remove the NSEC3PARAM record */ zdb_ttlrdata nsec3param_record; nsec3param_record.next = NULL; nsec3param_record.rdata_size = nsec3param_rdata_size; nsec3param_record.rdata_pointer = nsec3param_rdata; nsec3param_record.ttl = NSEC3PARAM_DEFAULT_TTL; if(ISOK(zdb_record_delete_exact(&zone->apex->resource_record_set, TYPE_NSEC3PARAM, &nsec3param_record))) { #if ZDB_CHANGE_FEEDBACK_SUPPORT != 0 /* * Update ICMTL. * * NOTE: the zdb_rr_label set of functions are zdb_listener-aware but the zdb_record ones are not. * That's why this one needs a call to the listener. * */ zdb_listener_notify_remove_record(zone, zone->origin, TYPE_NSEC3PARAM, &nsec3param_record); #endif } /* Retrieve the NSEC3PARAM structure from the zone */ nsec3_zone* n3 = nsec3_zone_get_from_rdata(zone, nsec3param_rdata_size, nsec3param_rdata); if(n3 != NULL) { /* Destroy said structure and all its associations (NSEC3 item + label's references to it) */ nsec3_zone_destroy(zone, n3); } return SUCCESS; } /* * This destroy all the NSEC3 structures from the zone, starting from the NSEC3PARAM. * The zdb_rr_label are also affected by the call. */ void nsec3_destroy_zone(zdb_zone *zone) { if((zone->apex->flags & ZDB_RR_LABEL_NSEC3) != 0) { while(zone->nsec.nsec3 != NULL) { nsec3_zone_destroy(zone, zone->nsec.nsec3); } } } /****************************************************************************** * * NSEC3 - queries * *****************************************************************************/ /** * This sets the flags of each NSEC3PARAM of the zone * */ void nsec3_set_nsec3param_flags(zdb_zone *zone, u8 flags) { if(zdb_zone_is_nsec3(zone)) { zdb_packed_ttlrdata* rr_sll = zdb_record_find(&zone->apex->resource_record_set, TYPE_NSEC3PARAM); while(rr_sll != NULL) { rr_sll->rdata_start[1] = flags; rr_sll = rr_sll->next; } } } /** * This sets the flags of each NSEC3PARAM of the zone to 1 * This should be called before modifying an NSEC3 zone. * Note that NSEC3PARAM signature are not affected : the signed version has * alsways the flags set to 0 * * If an NSEC3PARAM RR is present at the apex of a zone with a Flags * field value of zero, then there MUST be an NSEC3 RR using the same * hash algorithm, iterations, and salt parameters present at every * hashed owner name in the zone. That is, the zone MUST contain a * complete set of NSEC3 RRs with the same hash algorithm, iterations, * and salt parameters. */ void nsec3_edit_zone_start(zdb_zone *zone) { zone->apex->flags |= ZDB_RR_LABEL_DNSSEC_EDIT; nsec3_set_nsec3param_flags(zone, 1); } /** * This sets the flags of each NSEC3PARAM of the zone to 0 * This should be called after modifying an NSEC3 zone. * */ void nsec3_edit_zone_end(zdb_zone *zone) { nsec3_set_nsec3param_flags(zone, 0); zone->apex->flags &= ~ZDB_RR_LABEL_DNSSEC_EDIT; } /** * @brief Finds the provable resource record label matching a path of labels starting from another rr label * * Finds the resource record label matching a path of labels starting from another rr label * Typically the starting label is a zone cut. * The starting point MUST be provable (ie: the apex in NSEC and in NSEC3 zones) * * @param[in] apex the starting label * @param[in] path a stack of labels * @param[in] path_index the index of the top of the stack * * @return the matching label or NULL if it has not been found */ /* NSEC3: Zone possible */ static int dnssec_label_zlabel_match(const void *label, const dictionary_node *node) { zdb_rr_label* rr_label = (zdb_rr_label*) node; return dnslabel_equals(rr_label->name, label); } /** * * Finds what is the closest provable encloser for a label in a zone * * @param apex * @param sections * @param sections_topp * @return */ const zdb_rr_label* nsec3_get_closest_provable_encloser(const zdb_rr_label *apex, const_dnslabel_vector_reference sections, s32 *sections_topp) { yassert(apex != NULL && sections != NULL && sections_topp != NULL); s32 index = *sections_topp; const zdb_rr_label* rr_label = apex; /* the zone cut */ const zdb_rr_label* provable = apex; /* * the apex is already known, so we don't loop for it */ index--; /* look into the sub level*/ while(index >= 0) { const u8* label = sections[index]; hashcode hash = hash_dnslabel(label); rr_label = (zdb_rr_label*) dictionary_find(&rr_label->sub, hash, label, dnssec_label_zlabel_match); if(rr_label == NULL) { index++; break; } if(rr_label->nsec.dnssec != NULL) { provable = rr_label; *sections_topp = index; } index--; } return provable; } /** * Computes the closest closer proof for a name in a zone * Results are returned in 3 pointers * The last one of them can be set NULL if the information is not needed. * * @param zone * @param qname the fqdn of the query * @param apex_index the index of the apex in qname * @param encloser_nsec3p will point to the encloser * @param closest_provable_encloser_nsec3p will point to the closest provable encloser * @param wild_closest_provable_encloser_nsec3p will point to the *.closest provable encloser * */ void nsec3_closest_encloser_proof( const zdb_zone *zone, const dnsname_vector *qname, s32 apex_index, const nsec3_zone_item **encloser_nsec3p, const nsec3_zone_item **closest_provable_encloser_nsec3p, const nsec3_zone_item **wild_closest_provable_encloser_nsec3p ) { u8 closest_provable_encloser[MAX_DOMAIN_LENGTH]; u8 encloser[MAX_DOMAIN_LENGTH]; u8 digest[64 + 1]; digest[0] = 20; yassert(encloser_nsec3p != NULL); yassert(closest_provable_encloser_nsec3p != NULL); // wild_closest_provable_encloser_nsec3p can be NULL const_dnslabel_vector_reference qname_sections = qname->labels; s32 closest_encloser_index_limit = qname->size - apex_index + 1; /* not "+1'" because it starts at the apex */ nsec3_zone* n3 = zone->nsec.nsec3; #ifdef DEBUG if((n3 == NULL) || (n3->items == NULL)) { log_err("zone %{dnsname} has invalid NSEC3 data"); return; } #endif if(closest_encloser_index_limit > 0) { const zdb_rr_label* closest_provable_encloser_label = nsec3_get_closest_provable_encloser(zone->apex, qname_sections, &closest_encloser_index_limit); //log_debug("closest_provable_encloser_label: %{dnslabel}: %{digest32h}", closest_provable_encloser_label->name, closest_provable_encloser_label->nsec.nsec3->self->digest); //log_debug("*.closest_provable_encloser_label: %{dnslabel}: %{digest32h}", closest_provable_encloser_label->name, closest_provable_encloser_label->nsec.nsec3->star->digest); /* * Convert from closest_encloser_label_bottom to name.size into a dnslabel */ /* Get ZONE NSEC3PARAM */ u16 iterations = nsec3_zone_get_iterations(n3); u8 salt_len = NSEC3_ZONE_SALT_LEN(n3); u8* salt = NSEC3_ZONE_SALT(n3); nsec3_hash_function* digestname = nsec3_hash_get_function(NSEC3_ZONE_ALGORITHM(n3)); /// @note edf 20150917 -- do not use nsec3_compute_digest_from_fqdn_with_len /** @note log_* cannot be used here (except yassert because if that one logs it will abort anyway ...) */ // encloser_nsec3p if(closest_encloser_index_limit > 0) // if the closest encloser is itself, we should not be here { yassert(closest_provable_encloser_label != NULL); nsec3_zone_item* encloser_nsec3; dnsname_vector_sub_to_dnsname(qname, closest_encloser_index_limit - 1, encloser); digestname(encloser, dnsname_len(encloser), salt, salt_len, iterations, &digest[1], FALSE); //OSDEBUG("nsec3_closest_encloser_proof: next digest %{dnsname}: %{digest32h}", encloser, encloser_nsec3->digest); encloser_nsec3 = nsec3_zone_item_find(n3, digest); *encloser_nsec3p = encloser_nsec3; //OSDEBUG("nsec3_closest_encloser_proof: next encloser %{dnsname}: %{digest32h}", encloser, encloser_nsec3->digest); } else { *encloser_nsec3p = NULL; } // closest_provable_encloser_nsec3p dnsname_vector_sub_to_dnsname(qname, closest_encloser_index_limit , closest_provable_encloser); nsec3_zone_item* closest_provable_encloser_nsec3; if((closest_provable_encloser_nsec3 = closest_provable_encloser_label->nsec.nsec3->self) == NULL) { /* * @note edf 20150910 -- IMPORTANT: at this point, the database is locked for the readers. * Calling nsec3_add_owner betrays this. * Re-locking as writer may lead to starvation. * All that's needed is to ensure that no two nsec3_add_owner calls are made at the same time from here. * Two (not very pretty) ways that should have minimal impact: a global mutex OR a global mutex and a set. * nsec3_add_owner is at most a couple ZALLOC and a few assignations. The mutex seems a good compromise. */ digestname(closest_provable_encloser, dnsname_len(closest_provable_encloser), salt, salt_len, iterations, &digest[1], FALSE); if((closest_provable_encloser_nsec3 = nsec3_avl_find(&n3->items, digest)) != NULL) { group_mutex_lock(&nsec3_owners_readers_write_locks, GROUP_MUTEX_WRITE); if(closest_provable_encloser_label->nsec.nsec3->self == NULL) { nsec3_add_owner(closest_provable_encloser_nsec3, closest_provable_encloser_label); closest_provable_encloser_label->nsec.nsec3->self = closest_provable_encloser_nsec3; /* @TODO check multiples */ } group_mutex_unlock(&nsec3_owners_readers_write_locks, GROUP_MUTEX_WRITE); } } *closest_provable_encloser_nsec3p = closest_provable_encloser_nsec3; //OSDEBUG("nsec3_closest_encloser_proof: closest_provable_encloser %{dnsname}: %{digest32h}",closest_provable_encloser,closest_provable_encloser_nsec3->digest); // wild_closest_provable_encloser_nsec3p if(wild_closest_provable_encloser_nsec3p != NULL) { if(closest_provable_encloser_nsec3p == NULL) { dnsname_vector_sub_to_dnsname(qname, closest_encloser_index_limit , closest_provable_encloser); } nsec3_zone_item* wild_closest_provable_encloser_nsec3; if((wild_closest_provable_encloser_nsec3 = closest_provable_encloser_label->nsec.nsec3->star) == NULL) { /* * @note edf 20150910 -- IMPORTANT: at this point, the database is locked for the readers. * Calling nsec3_add_owner betrays this. * Re-locking as writer may lead to starvation. * All that's needed is to ensure that no two nsec3_add_owner calls are made at the same time from here. * Two (not very pretty) ways that should have minimal impact: a global mutex OR a global mutex and a set. * nsec3_add_owner is at most a couple ZALLOC and a few assignations. The mutex seems a good compromise. */ digestname(closest_provable_encloser, dnsname_len(closest_provable_encloser), salt, salt_len, iterations, &digest[1], TRUE); if((wild_closest_provable_encloser_nsec3 = nsec3_avl_find_interval_start(&n3->items, digest)) != NULL) { group_mutex_lock(&nsec3_owners_readers_write_locks, GROUP_MUTEX_WRITE); if(closest_provable_encloser_label->nsec.nsec3->star == NULL) { nsec3_add_star(wild_closest_provable_encloser_nsec3, closest_provable_encloser_label); closest_provable_encloser_label->nsec.nsec3->star = wild_closest_provable_encloser_nsec3; /* @TODO check multiples */ } group_mutex_unlock(&nsec3_owners_readers_write_locks, GROUP_MUTEX_WRITE); } } *wild_closest_provable_encloser_nsec3p = wild_closest_provable_encloser_nsec3; //OSDEBUG("nsec3_closest_encloser_proof: *.closest_provable_encloser *.%{dnsname}: %{digest32h}",closest_provable_encloser,wild_closest_provable_encloser_nsec3->digest); } } else // the closest is the item itself ... { *encloser_nsec3p = zone->apex->nsec.nsec3->self; *closest_provable_encloser_nsec3p = zone->apex->nsec.nsec3->self; if(wild_closest_provable_encloser_nsec3p != NULL) { *wild_closest_provable_encloser_nsec3p = zone->apex->nsec.nsec3->self; } } } void nsec3_check_item_dump_label(zdb_rr_label *label) { log_debug("%{dnslabel} %04x", label->name, label->flags); int n3i = 0; nsec3_label_extension *n3le = label->nsec.nsec3; while(n3le != NULL) { log_debug("NSEC3PARAM #%i", n3i); if(n3le->self != NULL) { log_debug("\tself: %{digest32h}", n3le->self->digest); } if(n3le->star != NULL) { log_debug("\tstar: %{digest32h}", n3le->star->digest); } n3i++; n3le = n3le->next; } } bool nsec3_check_item(nsec3_zone_item *item, u32 param_index_base) { yassert(item != NULL); u16 n = nsec3_owner_count(item); for(u16 i = 0; i < n; i++) { zdb_rr_label *label = nsec3_owner_get(item, i); yassert(label != NULL && label->nsec.nsec3 != NULL); if(ZDB_LABEL_UNDERDELEGATION(label)) { log_debug("nsec3_check: %{digest32h} label nsec3 reference under a delegation (%{dnslabel})", item->digest, label); } nsec3_label_extension *n3le = label->nsec.nsec3; u32 param_index = param_index_base; while(param_index > 0) { yassert(n3le != NULL); n3le = n3le->next; param_index--; } yassert(n3le != NULL); // the nsec3 structure reference to the item linked to the label does not links back to the item #if 0 /* fix */ #else yassert(n3le->self == item); #endif } n = nsec3_star_count(item); for(u16 i = 0; i < n; i++) { zdb_rr_label *label = nsec3_star_get(item, i); if(!((label != NULL) && (label->nsec.nsec3 != NULL))) { log_debug("nsec3_check: %{digest32h} (#self=%d/#star=%d) corrupted", item->digest, item->rc, item->sc); } yassert(label != NULL && label->nsec.nsec3 != NULL); if(ZDB_LABEL_UNDERDELEGATION(label)) { log_debug("nsec3_check: %{digest32h} *.label nsec3 reference under a delegation (%{dnslabel})", item->digest, label); } nsec3_label_extension *n3le = label->nsec.nsec3; u32 param_index = param_index_base; while(param_index > 0) { yassert(n3le != NULL); n3le = n3le->next; param_index--; } yassert(n3le != NULL); if(n3le->star != item) { if(n3le->star != NULL) { log_debug("nsec3_check: %{digest32h} (#self=%d/#star=%d) failing %{dnslabel} expected %{digest32h}", item->digest, item->rc, item->sc, label->name, n3le->star->digest); } else { log_debug("nsec3_check: %{digest32h} (#self=%d/#star=%d) *.%{dnslabel} is NULL", item->digest, item->rc, item->sc, label->name, n3le->star->digest); } } if(n3le->self == NULL) { log_debug("nsec3_check: %{digest32h} (#self=%d/#star=%d) failing %{dnslabel}: no self", item->digest, item->rc, item->sc, label->name); } #if 0 /* fix */ #else yassert(n3le->star == item); yassert(n3le->self != NULL); #endif } return TRUE; } bool nsec3_check(zdb_zone *zone) { log_debug("nsec3_check: %{dnsname}", zone->origin); const nsec3_zone *n3 = zone->nsec.nsec3; if(n3 == NULL) { log_debug("nsec3_check: %{dnsname} : no NSEC3", zone->origin); return TRUE; } /* * For each node, check if the owners and stars are coherent */ u32 param_index = 0; while(n3 != NULL) { nsec3_avl_iterator n3iter; nsec3_avl_iterator_init(&n3->items, &n3iter); while(nsec3_avl_iterator_hasnext(&n3iter)) { nsec3_zone_item* item = nsec3_avl_iterator_next_node(&n3iter); nsec3_check_item(item, param_index); } param_index++; n3 = n3->next; } log_debug("nsec3_check: %{dnsname} : done", zone->origin); return TRUE; } void nsec3_compute_digest_from_fqdn_with_len(const nsec3_zone *n3, const u8 *fqdn, u32 fqdn_len, u8 *digest, bool isstar) { digest[0] = nsec3_hash_len(NSEC3_ZONE_ALGORITHM(n3)); nsec3_hash_get_function(NSEC3_ZONE_ALGORITHM(n3))( fqdn, fqdn_len, NSEC3_ZONE_SALT(n3), NSEC3_ZONE_SALT_LEN(n3), nsec3_zone_get_iterations(n3), &digest[1], isstar); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/journal_ix.c0000644000077100007710000000012412650131756021307 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.276344 30 ctime=1454597652.336344534 yadifa-2.1.6-5826/lib/dnsdb/src/journal_ix.c0000664000077100007710000010603112650131756021115 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ /*------------------------------------------------------------------------------ * STATIC PROTOTYPES */ /*------------------------------------------------------------------------------ * FUNCTIONS */ /** @brief Function ... * * ... * * @param ... * * @retval OK * @retval NOK */ #define ZDB_JOURNAL_CODE 1 #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dnsdb/zdb_error.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/journal.h" #include "dnsdb/xfr_copy.h" #define JOURNAL_FORMAT_NAME "ix" #define VERSION_HI 0 #define VERSION_LO 1 #define JOURNAL_CLASS_NAME "journal_ix" #define LOCK_NONE 0 #define LOCK_READ 1 #define LOCK_WRITE 2 #define IX_EXT "ix" #define IX_EXT_STRLEN 2 #define DEBUG_JOURNAL 1 #ifndef DEBUG #undef DEBUG_JOURNAL #define DEBUG_JOURNAL 0 #endif extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #define JRNLIX_TAG 0x58494c4e524a /* * Contains the removed records */ #define IX_REMOVE_FILE_FORMAT "%s/%{dnsname}%08x-%08x.ir" /* * Contains the added records */ #define IX_ADD_FILE_FORMAT "%s/%{dnsname}%08x-%08x.ia" /* * Contains the summary (SOA from / SOA to) */ #define IX_SUMMARY_FILE_FORMAT "%s/%{dnsname}%08x-%08x.is" /* * Contains the wire IX (almost: not the matching start and end SOA) */ #define IX_WIRE_FILE_FORMAT "%s/%{dnsname}%08x-%08x." IX_EXT #define FIRST_FROM_END (IX_EXT_STRLEN + (1 + 8 + 1 + 8)) #define LAST_FROM_END (IX_EXT_STRLEN + (1 + 8)) /*****************************************************************************/ /** * reads the stream for pairs of SOA and return the last odd SOA offset from the * initial position of the stream. */ static s64 journal_ix_find_last_soa_record(input_stream *is) { dns_resource_record rr; dns_resource_record_init(&rr); ya_result record_len; s64 offset = 0; s64 last_page_offset = 0; s64 valid_page_offset = -1; bool good_one = FALSE; while((record_len = dns_resource_record_read(&rr, is)) > 0 ) { if(rr.tctr.qtype == TYPE_SOA) { if(good_one) { valid_page_offset = last_page_offset; } else { last_page_offset = offset; } good_one = !good_one; } offset += record_len; } if(valid_page_offset != last_page_offset) { log_err("journal: ix: end of journal seems corrupted. A page started at %lld, after %lld", last_page_offset, valid_page_offset); } if(FAIL(record_len)) { log_err("journal: ix: trouble finding the end of the journal : %r", record_len); valid_page_offset = record_len; } else if(valid_page_offset < 0) { valid_page_offset = (s32)ZDB_JOURNAL_READING_DID_NOT_FOUND_SOA; } dns_resource_record_clear(&rr); return valid_page_offset; } /*****************************************************************************/ typedef struct journal_ix journal_ix; struct journal_ix { /* common points with journal base */ volatile struct journal_vtbl *vtbl; volatile zdb_zone *zone; volatile struct journal *next; volatile struct journal *prev; volatile bool mru; /* ******************************* */ volatile u32 read_lock_count; volatile u8 flags; u8 reserved_1; u16 journal_name_len; u32 first_serial; u32 last_serial; s64 last_page_offset; char *journal_name; int fd; }; static void journal_ix_writelock(journal_ix *jix); static void journal_ix_writeunlock(journal_ix *jix); static void journal_ix_readlock(journal_ix *jix); static void journal_ix_readunlock(journal_ix *jix); static ya_result journal_ix_ensure_opened(journal_ix *jix) { return SUCCESS; } static const char * journal_ix_get_format_name() { return JOURNAL_FORMAT_NAME; } static u32 journal_ix_get_format_version() { return VERSION_U32(VERSION_HI,VERSION_LO); } /** * Appends the uncompressed IXFR stream (SOA RR RR SOA RR RR) to the journal * Only checks that the first SOA serial is the current last serial * Should also check that the stream is complete before adding it */ static ya_result journal_ix_append_ixfr_stream(journal *jh, input_stream *ixfr_wire_is) { journal_ix *jix = (journal_ix*)jh; journal_ix_writelock(jix); /* * Move at the end of the file * Check that the wire starts with the last soa/serial * Append the wire * update the last serial */ // read the record ya_result return_value; dns_resource_record rr; dns_resource_record_init(&rr); if((return_value = dns_resource_record_read(&rr, ixfr_wire_is)) <= 0) { /* FAIL or EOF */ dns_resource_record_clear(&rr); journal_ix_writeunlock(jix); log_err("journal: ix: unable to read record: %r", return_value); return return_value; } /* * The first record is an SOA and our starting point (to be deleted) */ #ifdef DEBUG rdata_desc rdatadesc = {rr.tctr.qtype, rr.rdata_size, rr.rdata}; log_debug("journal: ix: DEL %{dnsname} %{typerdatadesc}", rr.name, &rdatadesc); #endif if(rr.tctr.qtype != TYPE_SOA) { u16 rtype = rr.tctr.qtype; dns_resource_record_clear(&rr); journal_ix_writeunlock(jix); log_err("journal: ix: expected SOA record but got %{dnstype} instead", &rtype); return ZDB_JOURNAL_SOA_RECORD_EXPECTED; } /* * check the journal file exists/is defined * do it now if not * proceed */ if(((jix->first_serial == 0) && (jix->last_serial == 0)) || (jix->fd == -1)) { /* the file does not exists yet */ if(FAIL(return_value = rr_soa_get_serial(rr.rdata, rr.rdata_size, &jix->first_serial))) { dns_resource_record_clear(&rr); journal_ix_writeunlock(jix); log_err("journal: ix: unable to read record: %r", return_value); return return_value; } int fd = open_create_ex(jix->journal_name, O_RDWR|O_CREAT, 0644); if(fd < 0) { return_value = ERRNO_ERROR; dns_resource_record_clear(&rr); journal_ix_writeunlock(jix); log_err("journal: ix: unable to open journal file '%s': %r", jix->journal_name, return_value); return return_value; } log_info("journal: ix: journal file created '%s'", jix->journal_name); jix->fd = fd; } if(FAIL(return_value = journal_ix_ensure_opened(jix))) { return return_value; } u64 valid_offset = lseek(jix->fd, 0, SEEK_END); u64 current_offset = valid_offset; u32 valid_serial = jix->last_serial; u32 potential_serial = valid_serial; s64 valid_page_offset = jix->last_page_offset; s64 potential_page_offset = current_offset; #ifdef DEBUG log_debug("journal: ix: ready to append to journal after serial %08x (%d) at offset %lld", valid_serial, valid_serial, valid_offset); #endif u8 mode = 0; /* 0: del, 1: add */ output_stream fos; fd_output_stream_attach(&fos, jix->fd); output_stream bos; buffer_output_stream_init(&fos, &bos, 512); for(;;) { /* write the first */ if(FAIL(return_value = dns_resource_record_write(&rr, &bos))) { /* this is VERY bad */ log_err("journal: ix: error writing a record to the journal: %r", return_value); break; } /* update the current offset */ current_offset += return_value; if((return_value = dns_resource_record_read(&rr, ixfr_wire_is)) <= 0) /* no bytes read OR error, there is no macro for this */ { /* error or end of stream */ if(return_value == 0) /* end of stream */ { if(mode != 0) /* on add mode so everything should be fine */ { valid_offset = current_offset; valid_serial = potential_serial; valid_page_offset = potential_page_offset; } else /* but on delete mode instead of add mode */ { log_err("journal: ix: ixfr stream unexpected eof"); return_value = UNEXPECTED_EOF; /* we have an error */ } } break; } if(rr.tctr.qtype == TYPE_SOA) { mode ^= 1; #ifdef DEBUG rdata_desc rdatadesc = {rr.tctr.qtype, rr.rdata_size, rr.rdata}; log_debug("journal: ix: %s %{dnsname} %{typerdatadesc}", (mode!=0)?"add":"del", rr.name, &rdatadesc); #endif if(mode == 0) { /* * new SOA to delete * * it's a new "page" (delete -> add) * * the offset before we write this record is the highest valid one in the file * so the error correcting truncation will be made at that offset */ valid_offset = current_offset; /* * the serial number that has been added with the previous page */ valid_serial = potential_serial; /* * the offset of the previous page */ valid_page_offset = potential_page_offset; /* * the new page starts here : update */ potential_page_offset = current_offset; } else { /* * new SOA add * * this is the second half of the page, we know what serial it is about */ if(FAIL(return_value = rr_soa_get_serial(rr.rdata, rr.rdata_size, &potential_serial))) { break; } } } #ifdef DEBUG else { rdata_desc rdatadesc = {rr.tctr.qtype, rr.rdata_size, rr.rdata}; log_debug("journal: ix: %s %{dnsname} %{typerdatadesc}", (mode!=0)?"add":"del", rr.name, &rdatadesc); } #endif } if(FAIL(return_value)) { /* * The journal is only valid up to valid_offset with serial ... */ log_err("journal: ix: rewinding journal up to last valid point (%lld)", valid_offset); ftruncate(jix->fd, valid_offset); } #ifdef DEBUG log_debug("journal: ix: page offset got from %d to %d", jix->last_page_offset, valid_page_offset); log_debug("journal: ix: serial got from %d to %d", jix->last_serial, valid_serial); #endif jix->last_page_offset = valid_page_offset; jix->last_serial = valid_serial; /* * rename the file */ if(ISOK(return_value)) { char new_name[PATH_MAX]; memcpy(new_name, jix->journal_name, jix->journal_name_len); snformat(&new_name[jix->journal_name_len - FIRST_FROM_END], 8 + 1 + 8 + 1 + IX_EXT_STRLEN + 1, "%08x-%08x." IX_EXT , jix->first_serial, jix->last_serial); if(rename(jix->journal_name, new_name) >= 0) { memcpy(jix->journal_name, new_name, jix->journal_name_len); } } /* */ #ifdef DEBUG log_debug("journal: ix: fd=%i from=%08x to=%08x soa@%lld file=%s", jix->fd, jix->first_serial, jix->last_serial, jix->last_page_offset, (jix->journal_name!=NULL)?jix->journal_name:"NONE-YET"); #endif output_stream_flush(&bos); fd_output_stream_detach(buffer_output_stream_get_filtered(&bos)); output_stream_close(&bos); dns_resource_record_clear(&rr); journal_ix_writeunlock(jix); if(ISOK(return_value)) { #ifdef DEBUG log_debug("journal: ix: page added (fd=%i from=%08x to=%08x soa@%lld file=%s): %r", jix->fd, jix->first_serial, jix->last_serial, jix->last_page_offset, (jix->journal_name!=NULL)?jix->journal_name:"NONE-YET", return_value); #endif return TYPE_IXFR; /* that's what the caller expects to handle the new journal pages */ } else { log_err("journal: ix: failed to add page"); return return_value; } } /* * the last_soa_rr is used for IXFR transfers (it has to be a prefix & suffix to the returned stream) */ static ya_result journal_ix_get_ixfr_stream_at_serial(journal *jh, u32 serial_from, input_stream *out_input_stream, dns_resource_record *last_soa_rr) { journal_ix *jix = (journal_ix*)jh; ya_result return_value = SUCCESS; journal_ix_readlock(jix); /* * check that serial_from in in the journal range * set the file descriptor to the position * create a stream that'll stop at the current end of the stream */ if(serial_lt(serial_from, jix->first_serial) || serial_ge(serial_from, jix->last_serial) || ((jix->first_serial == 0) && (jix->last_serial == 0))) { /* out of known range */ journal_ix_readunlock(jix); if(serial_from == jix->last_serial) { return SUCCESS; } else { return ZDB_JOURNAL_SERIAL_OUT_OF_KNOWN_RANGE; } } /* * On success, dup() returns a new file descriptor that has the following in common with the original: * * _ Same open file (or pipe) * _ Same file pointer (both file descriptors share one file pointer) <= THIS is a problem * _ Same access mode (read, write, or read/write) * * So this is wrong: * * cloned_fd = dup(jix->fd); */ int cloned_fd; while((cloned_fd = open_ex(jix->journal_name, O_RDONLY)) < 0) { int err = errno; if(err == EINTR) { continue; } return_value = MAKE_ERRNO_ERROR(err); #ifdef DEBUG log_debug("journal: ix: unable to clone the file descriptor: %r", return_value); #endif journal_ix_readunlock(jix); return return_value; } /* * given that I use a clone of the fd and * given that only appends are done in the file and * given that the limit of the file has already been processed (should be at this point) * * THEN * * there is no point keeping the lock for reading (on unix systems) */ struct stat journal_stat; s64 last_page_offset = jix->last_page_offset; if(fstat(cloned_fd, &journal_stat) < 0) { return_value = ERRNO_ERROR; log_err("journal: ix: unable to get journal file status", return_value); close_ex(cloned_fd); return return_value; } s64 file_size = journal_stat.st_size; #if DEBUG_JOURNAL != 0 log_debug("journal: ix: the last page starts at position %lld", last_page_offset); #endif journal_ix_readunlock(jix); jix = NULL; input_stream fis; fd_input_stream_attach(&fis, cloned_fd); if(last_soa_rr != NULL) { /* seek and store the last SOA print*/ last_soa_rr->tctr.qtype = 0; // clear type if(lseek(cloned_fd, last_page_offset, SEEK_SET) >= 0) { /* deleted SOA */ if((return_value = dns_resource_record_read(last_soa_rr, &fis)) > 0 ) // Not FAIL nor EOF { if(last_soa_rr->tctr.qtype == TYPE_SOA) { /* DEL records */ last_soa_rr->tctr.qtype = 0; // clear type /* scan until added SOA found */ while((return_value = dns_resource_record_read(last_soa_rr, &fis)) > 0 ) // Not FAIL nor EOF { if(last_soa_rr->tctr.qtype == TYPE_SOA) { break; } } } } // if the SOA has not been found, it's an error (EOF has been reached is covered by this) if(ISOK(return_value)) { if(last_soa_rr->tctr.qtype != TYPE_SOA) { return_value = ZDB_JOURNAL_SOA_RECORD_EXPECTED; } } } else { return_value = ERRNO_ERROR; } if(FAIL(return_value)) { input_stream_close(&fis); return return_value; } } /* * this format has no indexing so we scan for a page that STARTS with a DELETE of the SOA with serial = serial_from */ if(lseek(cloned_fd, 0, SEEK_SET) != 0) /* the resulting offset MUST be zero */ { return_value = ERRNO_ERROR; if(ISOK(return_value)) { return_value = ERROR; } input_stream_close(&fis); return return_value; } input_stream bis; dns_resource_record rr; dns_resource_record_init(&rr); buffer_input_stream_init(&fis, &bis, 512); s64 offset = 0; /* skip until the right serial is found */ u32 soa_count = 0; #ifdef DEBUG_JOURNAL u32 rr_count = 0; #endif for(;;) { if( (return_value = dns_resource_record_read(&rr, &bis)) <= 0 ) // FAIL or nothing to { return_value = ZDB_JOURNAL_ERROR_READING_JOURNAL; /* is the journal file broken ? */ break; } #ifdef DEBUG_JOURNAL rr_count++; #endif u32 record_size = return_value; if(rr.tctr.qtype == TYPE_SOA) { // ((0+1)&1) != 0 => Y N Y N if((++soa_count & 1) != 0) // 1 2 3 4 { u8 *p = rr.rdata; if(FAIL(return_value = dnsname_len(p))) { break; } p += return_value; if(FAIL(return_value = dnsname_len(p))) { break; } p += return_value; u32 serial = ntohl(GET_U32_AT(*p)); if(serial_ge(serial, serial_from)) { if(serial == serial_from) { /* setup the serial to be from 'offset' up to the current length of the stream */ return_value = SUCCESS; } else { /* the serial does not exist in the range */ return_value = ZDB_JOURNAL_SERIAL_OUT_OF_KNOWN_RANGE; } break; } } } offset += record_size; } #if DEBUG_JOURNAL != 0 log_debug("journal: ix: serial %08x (%d) is at offset %lld. %d records parsed", serial_from, serial_from, offset, rr_count); #endif dns_resource_record_clear(&rr); /* * detach the file descriptor from the file stream in the buffer stream * I do it like this because the streams are not needed anymore but the * file descriptor still is (if no error occurred) */ fd_input_stream_detach(buffer_input_stream_get_filtered(&bis)); input_stream_close(&bis); if(ISOK(return_value)) { // offset is the start of the page we are looking for if(lseek(cloned_fd, offset, SEEK_SET) >= 0) { fd_input_stream_attach(&fis, cloned_fd); limited_input_stream_init(&fis, out_input_stream, file_size - offset); } else { return_value = ERRNO_ERROR; close_ex(cloned_fd); } } else { close_ex(cloned_fd); } return return_value; } static ya_result journal_ix_get_first_serial(journal *jh, u32 *serial) { journal_ix *jix = (journal_ix*)jh; journal_ix_readlock(jix); if(serial != NULL) { *serial = jix->first_serial; } journal_ix_readunlock(jix); return SUCCESS; } static ya_result journal_ix_get_last_serial(journal *jh, u32 *serial) { journal_ix *jix = (journal_ix*)jh; journal_ix_readlock(jix); if(serial != NULL) { *serial = jix->last_serial; } journal_ix_readunlock(jix); return SUCCESS; } static ya_result journal_ix_get_serial_range(journal *jh, u32 *serial_start, u32 *serial_end) { journal_ix *jix = (journal_ix*)jh; journal_ix_readlock(jix); if(serial_start != NULL) { *serial_start = jix->first_serial; } if(serial_end != NULL) { *serial_end = jix->last_serial; } journal_ix_readunlock(jix); return SUCCESS; } static ya_result journal_ix_truncate_to_size(journal *jh, u32 size_) { /* * lock for a reader (block any new append) * create a new file to have roughly the right size * open the new file and use it * close the old file */ journal_ix *jix = (journal_ix*)jh; if(size_ == 0) { log_debug("journal: ix: truncate to size 0 = delete", size_); if(jix->journal_name != NULL) { unlink(jix->journal_name); free(jix->journal_name); jix->journal_name = NULL; if(jix->fd >= 0) { close_ex(jix->fd); jix->fd = -1; } } return SUCCESS; } else { log_debug("journal: ix: truncate to size != 0 not implemented"); return ZDB_JOURNAL_FEATURE_NOT_SUPPORTED; } } static ya_result journal_ix_truncate_to_serial(journal *jh, u32 serial_) { /* * lock for a reader (block any new append) * create a new file to start at the serial * open the new file and use it * close the old file */ log_debug("journal: ix: truncate to serial not implemented (serial=%u)", serial_); return ZDB_JOURNAL_FEATURE_NOT_SUPPORTED; } static ya_result journal_ix_close(journal *jh) { journal_ix *jix = (journal_ix*)jh; journal_ix_writelock(jix); free(jix->journal_name); close_ex(jix->fd); jix->fd = -1; // don't do it "properly" //journal_ix_writeunlock(jix); // instead keep the write owner (preventing further use) assert(jix->flags == LOCK_WRITE); jix->vtbl = NULL; // and finally free it free(jix); return SUCCESS; } static void journal_ix_log_dump(journal *jh) { journal_ix *jix = (journal_ix*)jh; const u8 *origin; if(jh->zone != NULL) { origin = FQDNNULL(jix->zone->origin); } else { origin = (const u8*)"\012NOT-LINKED"; } log_debug("domain='%{dnsname}' mru=%i file='%s' fd=%i range=%u:%u lpo=%llu", origin, (jix->mru)?1:0, STRNULL(jix->journal_name), jix->fd, jix->first_serial, jix->last_serial, jix->last_page_offset); } static ya_result journal_ix_get_domain(journal *jh, u8 *out_domain) { if(jh->zone != NULL) { dnsname_copy(out_domain, jh->zone->origin); return SUCCESS; } return ERROR; } static void journal_ix_destroy(journal *jh) { free(jh); } static void journal_ix_link_zone(journal *jh, zdb_zone *zone) { yassert(jh->zone == NULL); yassert(zone->journal == NULL); journal_ix *jix = (journal_ix*)jh; journal_ix_writelock(jix); jix->zone = zone; zone->journal = jh; journal_ix_writeunlock(jix); } struct journal_vtbl journal_ix_vtbl = { journal_ix_get_format_name, journal_ix_get_format_version, journal_ix_close, journal_ix_append_ixfr_stream, journal_ix_get_ixfr_stream_at_serial, journal_ix_get_first_serial, journal_ix_get_last_serial, journal_ix_get_serial_range, journal_ix_truncate_to_size, journal_ix_truncate_to_serial, journal_ix_log_dump, journal_ix_get_domain, journal_ix_destroy, journal_ix_link_zone, JOURNAL_CLASS_NAME }; static mutex_t journal_ix_mtx = MUTEX_INITIALIZER; static void journal_ix_writelock(journal_ix *jix) { #if DEBUG_JOURNAL != 0 log_debug("journal_ix_writelock: locking"); #endif for(;;) { mutex_lock(&journal_ix_mtx); u8 f = jix->flags; if(f == LOCK_NONE) // nobody has the lock { jix->flags = LOCK_WRITE; // so one writer can mutex_unlock(&journal_ix_mtx); break; } mutex_unlock(&journal_ix_mtx); usleep(1000); } #if DEBUG_JOURNAL != 0 log_debug("journal_ix_writelock: locked"); #endif } static void journal_ix_writeunlock(journal_ix *jix) { #if DEBUG_JOURNAL != 0 log_debug("journal_ix_writeunlock: unlocking"); #endif mutex_lock(&journal_ix_mtx); if(jix->flags == LOCK_WRITE) // the writer has the lock (hopefully this one) { jix->flags = LOCK_NONE; // so we can unlock mutex_unlock(&journal_ix_mtx); #if DEBUG_JOURNAL != 0 log_debug("journal_ix_writeunlock: unlocked"); #endif } else // else there is something really wrong happening { // bug log_err("journal: ix: write-unlock non-writer"); mutex_unlock(&journal_ix_mtx); return; } } static void journal_ix_readlock(journal_ix *jix) { /* jix->rc++; */ for(;;) { mutex_lock(&journal_ix_mtx); u8 f = jix->flags; if(f != LOCK_WRITE) // either nobody or the reader has the lock { jix->flags = LOCK_READ; jix->read_lock_count++; // count the readers mutex_unlock(&journal_ix_mtx); break; } mutex_unlock(&journal_ix_mtx); usleep(1000); } } static void journal_ix_readunlock(journal_ix *jix) { mutex_lock(&journal_ix_mtx); if(jix->flags == LOCK_READ) // a reader has the lock { if((--jix->read_lock_count) == 0) // count the readers { jix->flags = LOCK_NONE; // if there are no readers anymore, nobody has the lock } mutex_unlock(&journal_ix_mtx); } else { mutex_unlock(&journal_ix_mtx); // bug log_err("journal: ix: read-unlock non-reader"); } /* jix->rc--; */ } /** * * Should not be called directly (only by journal_* functions. * * Opens or create a journal handling structure. * If the journal did not exist, the structure is returned without a file opened * * @param jh * @param origin * @param workingdir * @param create * * @return */ ya_result journal_ix_open(journal **jh, const u8* origin, const char *workingdir, bool create) { /* * try to open the journal file * if it exists, create the structure for the handle */ #ifdef DEBUG log_debug("journal: ix: open(%p, '%{dnsname}', \"%s\", %d)", jh, origin, workingdir, (create)?1:0); #endif struct dirent entry; struct dirent *result; DIR *dir; u32 from; u32 to; char fqdn[MAX_DOMAIN_LENGTH + 1]; char filename[PATH_MAX]; if((jh == NULL) || (origin == NULL) || (workingdir == NULL)) { return ZDB_JOURNAL_WRONG_PARAMETERS; } #ifdef DEBUG log_debug("journal: ix: trying to open journal for %{dnsname} in '%s'", origin, workingdir); #endif /* get the soa of the loaded zone */ *jh = NULL; // open the working directory dir = opendir(workingdir); if(dir == NULL) { #ifdef DEBUG log_debug("journal: ix: trying to open directory for %{dnsname} in '%s' failed: %r", origin, workingdir, ERRNO_ERROR); #endif return ZDB_ERROR_ICMTL_NOTFOUND; } u32 fqdn_len = dnsname_to_cstr(fqdn, origin); result = NULL; // scan for the journal file ya_result return_value = SUCCESS; do { readdir_r(dir, &entry, &result); if(result == NULL) { return_value = ZDB_ERROR_ICMTL_NOTFOUND; break; } u8 d_type = dirent_get_file_type(workingdir, result); if(d_type != DT_REG ) { /* not a regular file */ continue; } if(memcmp(result->d_name, fqdn, fqdn_len) != 0) { continue; } const char *serials = &result->d_name[fqdn_len]; if(strlen(serials) != 8 + 1 + 8 + 1 + IX_EXT_STRLEN) { continue; } int converted = sscanf(serials, "%08x-%08x", &from, &to); if(converted != 2) { continue; } snprintf(filename, sizeof(filename), "%s/%s", workingdir, result->d_name); /* got a valid one : * open the file */ int fd = open_ex(filename, O_RDWR); if(fd >= 0) { return_value = SUCCESS; /* * Got a journal file, initialise the handling structure */ journal_ix *jix; MALLOC_OR_DIE(journal_ix*, jix, sizeof(journal_ix), JRNLIX_TAG); ZEROMEMORY(jix, sizeof(journal_ix)); jix->vtbl = &journal_ix_vtbl; jix->flags = LOCK_NONE; jix->first_serial = from; jix->last_serial = to; jix->journal_name = strdup(filename); jix->journal_name_len = strlen(filename); jix->fd = fd; // file opened // get the information from the file #ifdef DEBUG log_debug("journal: ix: got a journal file"); #endif input_stream fis; input_stream bis; if(ISOK(return_value = fd_input_stream_attach(&fis, jix->fd))) { buffer_input_stream_init(&fis, &bis, BUFFER_INPUT_STREAM_DEFAULT_BUFFER_SIZE); s64 soa_offset = journal_ix_find_last_soa_record(&bis); if(soa_offset >= 0) { jix->last_page_offset = soa_offset; } else { return_value = (s32)soa_offset; // an error occurred } fd_input_stream_detach(buffer_input_stream_get_filtered(&bis)); input_stream_close(&bis); } if(FAIL(return_value)) // mostly: unable to open the file or unable to find the SOA in the file { /* parsing for SOA failed */ journal_ix_close((journal*)jix); jix = NULL; } *jh = (journal*)jix; } else { /* something is wrong with this one */ log_err("journal: ix: an error occurred opening journal file '%s': %r", filename, ERRNO_ERROR); } } while(*jh == NULL); closedir(dir); // if the journal was not found and we can create it if((*jh == NULL) && create) { // create the structure #ifdef DEBUG log_debug("journal: ix: no file found, creating an empty structure"); #endif journal_ix *jix; char journal_name[PATH_MAX]; MALLOC_OR_DIE(journal_ix*, jix, sizeof(journal_ix), JRNLIX_TAG); ZEROMEMORY(jix, sizeof(journal_ix)); jix->vtbl = &journal_ix_vtbl; jix->flags = LOCK_NONE; jix->first_serial = 0; jix->last_serial = 0; jix->journal_name = NULL; jix->fd = -1; // no file opened jix->journal_name_len = snformat(journal_name, sizeof(journal_name), IX_WIRE_FILE_FORMAT, workingdir, origin, 0, 0); jix->journal_name = strdup(journal_name); *jh = (journal*)jix; return_value = SUCCESS; /* newly created journal structure */ } #ifdef DEBUG log_debug("journal: ix: returning %r", return_value); #endif return return_value; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/journal-cjf-page-cache.c0000644000077100007710000000012412650131756023322 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.395344 30 ctime=1454597652.352344534 yadifa-2.1.6-5826/lib/dnsdb/src/journal-cjf-page-cache.c0000664000077100007710000005645712650131756023150 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ /*------------------------------------------------------------------------------ * STATIC PROTOTYPES */ /*------------------------------------------------------------------------------ * FUNCTIONS */ /** @brief Function ... * * ... * * @param ... * * @retval OK * @retval NOK */ #define ZDB_JOURNAL_CODE 1 #define JOURNAL_CJF_BASE 1 #include "dnsdb/dnsdb-config.h" #include "dnsdb/journal-cjf-page-cache.h" #include "dnsdb/journal-cjf-common.h" #include "dnsdb/journal-cjf.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "dnsdb/zdb_error.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/journal.h" #include "dnsdb/zdb_types.h" #include "dnsdb/xfr_copy.h" #include "dnsdb/zdb-zone-path-provider.h" #define DEBUG_JOURNAL 1 #ifndef DEBUG #undef DEBUG_JOURNAL #define DEBUG_JOURNAL 0 #endif #define LOCK_NONE 0 #define LOCK_READ 1 #define LOCK_WRITE 2 #define CJF_EXT "cjf" #define CJF_EXT_STRLEN 3 #define SOA_RDATA_SIZE_MAX 532 #define DO_SYNC 1 extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #define JRNLCJF_TAG 0x58494c4e524a /* * Contains the journal (almost: not the matching start and end SOA) */ #define CJF_SECTION_INDEX_SLOT_HEAD 16 #define CJF_SECTION_INDEX_SLOT_SIZE 8 #define CJF_SECTION_INDEX_SLOT_COUNT 510 #define CJF_SECTION_INDEX_SIZE (CJF_SECTION_INDEX_SLOT_HEAD + CJF_SECTION_INDEX_SLOT_SIZE * CJF_SECTION_INDEX_SLOT_COUNT) // 4KB #define CJF_PAGE_SIZE_IN_BYTE (CJF_SECTION_INDEX_SLOT_HEAD + (CJF_SECTION_INDEX_SLOT_COUNT * CJF_SECTION_INDEX_SLOT_SIZE)) #define CJF_PAGE_ARBITRARY_UPDATE_SIZE 512 /* * PAGE * * Serial Number Stream Offset * * The table of serials streams (IXFR) and their offset * The value stored is of the serial ending the IXFR */ #define CJF_PAGE_MAGIC MAGIC4('P','A','G','E') #define PAGE_INITIALIZER {CJF_PAGE_MAGIC, 0, 0, CJF_SECTION_INDEX_SLOT_COUNT, 0, 0} static bool empty_page_tbl_header_and_zeroes_initialised = FALSE; static u8 empty_page_tbl_header_and_zeroes[CJF_SECTION_INDEX_SIZE]; static u32 journal_cfj_page_mru_size = 64; // struct journal_cjf_page_tbl { journal_cjf_page_tbl_header hdr; journal_cjf_page_tbl_item items[CJF_SECTION_INDEX_SLOT_COUNT]; }; // PAGE are all over the place, going back to write into or read from one is a drag // the first idea would be to have the current PAGE along with the journal, and it would solve MOST problems // but PAGE may be needed at more than one place. // So the idea is to have them cached: // An PAGE cache entry is: // _ maybe a reference count // _ a file descriptor // _ a file position // _ a dirty flag, or a last_written offset // _ maybe a count // _ a 4K buffer // _ maybe an MRU entry ? // _ maybe a mutex // the key ... // // one should be able to // _ load an PAGE from the disk // _ flush an PAGE back to the disk // _ flush all PAGE linked to a file descriptor to the disk (KEY!) // _ update the PAGE of a given position in a file to the disk (KEY!) // // there should not be a lot of PAGE per file descriptor, and PAGE should be flushed back at key times // ie: closing the file descriptor, too many PAGE flush the least used ones, ... // // they should be pooled, I think struct journal_cjf_page_cache_item { u64 file_offset; journal_cjf_page_tbl_item *buffer; int fd; s16 first_written_entry; s16 last_written_entry; // set to the end means not dirty }; typedef struct journal_cjf_page_cache_item journal_cjf_page_cache_item; // fd => list_dl(page_cache_item) static u32_set page_cache_item_by_fd = U32_SET_EMPTY; static list_dl_s page_cache_mru = {{NULL, NULL}, {NULL, NULL}, 0}; static group_mutex_t page_cache_mtx = GROUP_MUTEX_INITIALIZER; void journal_cjf_page_cache_init() { if(empty_page_tbl_header_and_zeroes_initialised) { return; } journal_cjf_page_tbl_header head = PAGE_INITIALIZER; ZEROMEMORY(empty_page_tbl_header_and_zeroes, sizeof(empty_page_tbl_header_and_zeroes)); memcpy(empty_page_tbl_header_and_zeroes, &head, CJF_SECTION_INDEX_SLOT_HEAD); list_dl_init(&page_cache_mru); empty_page_tbl_header_and_zeroes_initialised = TRUE; //page_cache_mru.size } static void journal_cjf_page_cache_item_undirty(journal_cjf_page_cache_item *sci) { sci->first_written_entry = (1 + CJF_SECTION_INDEX_SLOT_COUNT); sci->last_written_entry = -1; } /** * @param sci * @return */ static void journal_cjf_page_cache_item_flush(journal_cjf_page_cache_item *sci) { yassert(group_mutex_islocked(&page_cache_mtx)); if(sci != NULL) { if(sci->first_written_entry <= sci->last_written_entry) { int fd = sci->fd; u64 here = lseek(fd, 0, SEEK_CUR); // at file_offset, write from first to last entries off_t first_offset = sci->file_offset + (sci->first_written_entry * CJF_SECTION_INDEX_SLOT_SIZE); log_debug5("journal_cjf_page_cache_flush_item fd=%i offset=%lli=%llx size=%i)", fd, first_offset, first_offset, (sci->last_written_entry - sci->first_written_entry) * CJF_SECTION_INDEX_SLOT_SIZE); lseek(fd, first_offset, SEEK_SET); writefully(fd, &sci->buffer[sci->first_written_entry], (sci->last_written_entry - sci->first_written_entry) * CJF_SECTION_INDEX_SLOT_SIZE); // mark the entry as not being used journal_cjf_page_cache_item_undirty(sci); lseek(fd, here, SEEK_SET); } } else { log_warn("cjf: journal_cjf_page_cache_flush_item(NULL)"); } } static void journal_cjf_page_cache_cull() { yassert(group_mutex_islocked(&page_cache_mtx)); /// @todo edf 20150113 -- make a rule that culls a cache entry at the end of the MRU if(list_dl_size(&page_cache_mru) > journal_cfj_page_mru_size) { // get the tail one journal_cjf_page_cache_item *sci = (journal_cjf_page_cache_item*)list_dl_remove_last(&page_cache_mru); // flush it journal_cjf_page_cache_item_flush(sci); // free it } } static journal_cjf_page_cache_item * journal_cjf_page_cache_new(int fd, u32 file_offset) { /// @todo edf 20150113 -- make a rule that culls a cache entry at the end of the MRU /// @todo edf 20150114 -- use a pool journal_cjf_page_cache_item *sci; MALLOC_OR_DIE(journal_cjf_page_cache_item*, sci, sizeof(journal_cjf_page_cache_item), GENERIC_TAG); sci->file_offset = file_offset; MALLOC_OR_DIE(journal_cjf_page_tbl_item*, sci->buffer, CJF_PAGE_SIZE_IN_BYTE , GENERIC_TAG); sci->fd = fd; journal_cjf_page_cache_item_undirty(sci); #ifdef DEBUG memset(sci->buffer, 0xfe, CJF_PAGE_SIZE_IN_BYTE); #endif return sci; } static void journal_cjf_page_cache_delete(int fd, u32 file_offset) { yassert(group_mutex_islocked(&page_cache_mtx)); u32_node *fd_node = u32_set_avl_find(&page_cache_item_by_fd, (u32)fd); if(fd_node != NULL) { // get the PAGE cache at the file_offset u64_node *file_offset_node = u64_set_avl_find((u64_set*)&fd_node->value, file_offset); if(file_offset_node != NULL) { journal_cjf_page_cache_item *sci = (journal_cjf_page_cache_item*)file_offset_node->value; u64_set_avl_delete((u64_set*)&fd_node->value, file_offset); journal_cjf_page_cache_item_flush(sci); if(list_dl_size(&page_cache_mru) > 0) { list_dl_remove(&page_cache_mru, sci); } free(sci->buffer); free(sci); } else { log_warn("cjf: %i:%x page is not cached", fd, file_offset); } } else { log_warn("cjf: %i:%x has no page cache", fd, file_offset); } } static void journal_cjf_page_cache_item_delete(journal_cjf_page_cache_item *sci) { journal_cjf_page_cache_delete(sci->fd, sci->file_offset); } static void journal_cjf_page_cache_write(int fd, u64 file_offset, s16 offset, const void *value, u32 value_len) { log_debug6("journal_cjf_page_cache_write(%i, %lli=%llx, %i, %p, %i)", fd, file_offset, file_offset, offset, value, value_len); group_mutex_lock(&page_cache_mtx, GROUP_MUTEX_WRITE); // get or create a node for the fd u32_node *fd_node = u32_set_avl_insert(&page_cache_item_by_fd, (u32)fd); // make some room, if needed journal_cjf_page_cache_cull(); // get or create an PAGE chache at the file_offset u64_node *file_offset_node = u64_set_avl_insert((u64_set*)&fd_node->value, file_offset); journal_cjf_page_cache_item *sci; if(file_offset_node->value != NULL) { // already got that one sci = (journal_cjf_page_cache_item*)file_offset_node->value; } else { // have to create it sci = journal_cjf_page_cache_new(fd, file_offset); // if the file is big enough: load it struct stat st; if(fstat(fd, &st) == 0) { if(file_offset + CJF_PAGE_SIZE_IN_BYTE <= st.st_size) { off_t here = lseek(fd, 0, SEEK_CUR); lseek(fd, file_offset, SEEK_SET); readfully(fd, sci->buffer, CJF_PAGE_SIZE_IN_BYTE); lseek(fd, here, SEEK_SET); } } file_offset_node->value = sci; } if(offset > sci->last_written_entry) { sci->last_written_entry = offset; } if(offset < sci->first_written_entry) { sci->first_written_entry = offset; } memcpy(&sci->buffer[offset], value, value_len); // move at the head of the MRU if(list_dl_size(&page_cache_mru) > 0) { list_dl_remove(&page_cache_mru, sci); } list_dl_insert(&page_cache_mru, sci); group_mutex_unlock(&page_cache_mtx, GROUP_MUTEX_WRITE); } static void journal_cjf_page_cache_read(int fd, u64 file_offset, s16 offset, void *value, u32 value_len) { // get or create a node for the fd log_debug6("journal_cjf_page_cache_read(%i, %lli=%llx, %i, %p, %i)", fd, file_offset, file_offset, offset, value, value_len); group_mutex_lock(&page_cache_mtx, GROUP_MUTEX_WRITE); u32_node *fd_node = u32_set_avl_insert(&page_cache_item_by_fd, (u32)fd); // make some room, if needed journal_cjf_page_cache_cull(); // get or create an PAGE cache at the file_offset u64_node *file_offset_node = u64_set_avl_insert((u64_set*)&fd_node->value, file_offset); journal_cjf_page_cache_item *sci; if(file_offset_node->value != NULL) { // already got that one sci = (journal_cjf_page_cache_item*)file_offset_node->value; } else { // have to create it sci = journal_cjf_page_cache_new(fd, file_offset); // if the file is big enough: load it struct stat st; if(fstat(fd, &st) == 0) { if(file_offset + CJF_PAGE_SIZE_IN_BYTE <= st.st_size) { off_t here = lseek(fd, 0, SEEK_CUR); lseek(fd, file_offset, SEEK_SET); readfully(fd, sci->buffer, CJF_PAGE_SIZE_IN_BYTE); lseek(fd, here, SEEK_SET); } } file_offset_node->value = sci; } memcpy(value, &sci->buffer[offset], value_len); // move at the head of the MRU if(list_dl_size(&page_cache_mru) > 0) { list_dl_remove(&page_cache_mru, sci); } list_dl_insert(&page_cache_mru, sci); group_mutex_unlock(&page_cache_mtx, GROUP_MUTEX_WRITE); } void journal_cjf_page_cache_write_item(int fd, u64 file_offset, s16 offset, const journal_cjf_page_tbl_item *value) { yassert(file_offset >= CJF_HEADER_SIZE); log_debug5("journal_cjf_page_cache_write_item(%i, %lli=%llx, %i, {%08x,%08x}})", fd, file_offset, file_offset, offset, value->ends_with_serial, value->stream_file_offset); journal_cjf_page_cache_write(fd, file_offset, offset + 2, value, sizeof(journal_cjf_page_tbl_item)); } void journal_cjf_page_cache_read_item(int fd, u64 file_offset, s16 offset, journal_cjf_page_tbl_item *value) { yassert(file_offset >= CJF_HEADER_SIZE); journal_cjf_page_cache_read(fd, file_offset, offset + 2, value, sizeof(journal_cjf_page_tbl_item)); log_debug5("journal_cjf_page_cache_read_item(%i, %lli=%llx, %i, {%08x,%08x}})", fd, file_offset, file_offset, offset, value->ends_with_serial, value->stream_file_offset); } void journal_cjf_page_cache_write_header(int fd, u64 file_offset, const journal_cjf_page_tbl_header *value) { yassert(file_offset >= CJF_HEADER_SIZE); yassert(value->count <= value->size); yassert(((value->count <= value->size) && (value->next_page_offset < file_offset)) || (value->next_page_offset > file_offset) || (value->next_page_offset == 0)); log_debug5("journal_cjf_page_cache_write_header(%i, %lli=%llx, {%08x,%3d,%3d,%08x}})", fd, file_offset, file_offset, value->next_page_offset, value->count, value->size, value->stream_end_offset); journal_cjf_page_cache_write(fd, file_offset, 0, value, CJF_SECTION_INDEX_SLOT_HEAD); } void journal_cjf_page_cache_write_new_header(int fd, u64 file_offset) { journal_cjf_page_tbl_header new_page_header = PAGE_INITIALIZER; const journal_cjf_page_tbl_header *value = &new_page_header; yassert(file_offset >= CJF_HEADER_SIZE); yassert(value->count <= value->size); yassert(((value->count <= value->size) && (value->next_page_offset < file_offset)) || (value->next_page_offset > file_offset) || (value->next_page_offset == 0)); log_debug5("journal_cjf_page_cache_write_new_header(%i, %lli=%llx, {%08x,%3d,%3d,%08x}})", fd, file_offset, file_offset, value->next_page_offset, value->count, value->size, value->stream_end_offset); journal_cjf_page_cache_write(fd, file_offset, 0, value, CJF_SECTION_INDEX_SLOT_HEAD); } void journal_cjf_page_cache_read_header(int fd, u64 file_offset, journal_cjf_page_tbl_header *value) { yassert(file_offset >= CJF_HEADER_SIZE); journal_cjf_page_cache_read(fd, file_offset, 0, value, CJF_SECTION_INDEX_SLOT_HEAD); log_debug5("journal_cjf_page_cache_read_header(%i, %lli=%llx, {%08x,%3d,%3d,%08x}})", fd, file_offset, file_offset, value->next_page_offset, value->count, value->size, value->stream_end_offset); } static void journal_cjf_page_cache_items_flush(u64_set *sci_set) { yassert(group_mutex_islocked(&page_cache_mtx)); off_t here = -1; int fd = -1; u64_set_avl_iterator iter; u64_set_avl_iterator_init(sci_set, &iter); while(u64_set_avl_iterator_hasnext(&iter)) { u64_node *file_offset_node = u64_set_avl_iterator_next_node(&iter); journal_cjf_page_cache_item *sci = (journal_cjf_page_cache_item*)file_offset_node->value; if(sci->first_written_entry <= sci->last_written_entry) { if(here < 0) { fd = sci->fd; here = lseek(fd, 0, SEEK_CUR); } // at file_offset, write from first to last entries off_t first_offset = sci->file_offset + (sci->first_written_entry * CJF_SECTION_INDEX_SLOT_SIZE); //off_t last_offset = sci->file_offset + (sci->last_written_entry * CJF_SECTION_INDEX_SLOT_SIZE); // +1 because it memorises the offsets, the lenght of the last one has to be taken into account int size = (sci->last_written_entry - sci->first_written_entry + 1) * CJF_SECTION_INDEX_SLOT_SIZE; log_debug5("journal_cjf_page_cache_items_flush fd=%i offset=%lli=%llx size=%i)", fd, first_offset, first_offset, size); lseek(fd, first_offset, SEEK_SET); writefully(fd, &sci->buffer[sci->first_written_entry], size); // mark the entry as not being used journal_cjf_page_cache_item_undirty(sci); // do not move in the MRU : it will naturally fall down if not used anymore // (yup, nothing to do) } } if(here >= 0) { lseek(fd, here, SEEK_SET); } } static void journal_cjf_page_cache_items_close(u64_set *sci_set) { yassert(group_mutex_islocked(&page_cache_mtx)); list_sl_s delete_list; list_sl_init(&delete_list); off_t here = -1; int fd = -1; u64_set_avl_iterator iter; u64_set_avl_iterator_init(sci_set, &iter); while(u64_set_avl_iterator_hasnext(&iter)) { u64_node *file_offset_node = u64_set_avl_iterator_next_node(&iter); journal_cjf_page_cache_item *sci = (journal_cjf_page_cache_item*)file_offset_node->value; if(sci->first_written_entry <= sci->last_written_entry) { if(here < 0) { fd = sci->fd; here = lseek(fd, 0, SEEK_CUR); } // at file_offset, write from first to last entries off_t first_offset = sci->file_offset + (sci->first_written_entry * CJF_SECTION_INDEX_SLOT_SIZE); //off_t last_offset = sci->file_offset + (sci->last_written_entry * CJF_SECTION_INDEX_SLOT_SIZE); log_debug5("journal_cjf_page_cache_items_close fd=%i offset=%lli=%llx size=%i)", fd, first_offset, first_offset, (sci->last_written_entry - sci->first_written_entry) * CJF_SECTION_INDEX_SLOT_SIZE); lseek(fd, first_offset, SEEK_SET); writefully(fd, &sci->buffer[sci->first_written_entry], (sci->last_written_entry - sci->first_written_entry) * CJF_SECTION_INDEX_SLOT_SIZE); // mark the entry as not being used journal_cjf_page_cache_item_undirty(sci); // delete the item list_sl_push(&delete_list, sci); file_offset_node->value = NULL; } if(list_dl_size(&page_cache_mru) > 0) { list_dl_remove(&page_cache_mru, sci); } } if(here >= 0) { lseek(fd, here, SEEK_SET); journal_cjf_page_cache_item *sci; while((sci = (journal_cjf_page_cache_item*)list_sl_pop(&delete_list)) != NULL) { journal_cjf_page_cache_item_delete(sci); } } u64_set_avl_destroy(sci_set); } void journal_cjf_page_cache_flush(int fd) { group_mutex_lock(&page_cache_mtx, GROUP_MUTEX_WRITE); u32_node *fd_node = u32_set_avl_find(&page_cache_item_by_fd, (u32)fd); if(fd_node != NULL) { journal_cjf_page_cache_items_flush((u64_set*)&fd_node->value); } group_mutex_unlock(&page_cache_mtx, GROUP_MUTEX_WRITE); } void journal_cjf_page_cache_flush_page(int fd, u64 file_offset) { group_mutex_lock(&page_cache_mtx, GROUP_MUTEX_WRITE); u32_node *fd_node = u32_set_avl_find(&page_cache_item_by_fd, (u32)fd); if(fd_node != NULL) { // get the PAGE cache at the file_offset u64_node *file_offset_node = u64_set_avl_find((u64_set*)&fd_node->value, file_offset); if(file_offset_node != NULL) { journal_cjf_page_cache_item *sci = (journal_cjf_page_cache_item*)file_offset_node->value; journal_cjf_page_cache_item_flush(sci); } else { log_warn("cjf: %i:%x page is not cached", fd, file_offset); } } else { log_warn("cjf: %i:%x has no page cache", fd, file_offset); } group_mutex_unlock(&page_cache_mtx, GROUP_MUTEX_WRITE); } void journal_cjf_page_cache_clear(int fd, u64 file_offset) { group_mutex_lock(&page_cache_mtx, GROUP_MUTEX_WRITE); u32_node *fd_node = u32_set_avl_find(&page_cache_item_by_fd, (u32)fd); if(fd_node != NULL) { // get the PAGE cache at the file_offset u64_node *file_offset_node = u64_set_avl_find((u64_set*)&fd_node->value, file_offset); if(file_offset_node != NULL) { journal_cjf_page_cache_item *sci = (journal_cjf_page_cache_item*)file_offset_node->value; if(sci != NULL) { journal_cjf_page_cache_item_delete(sci); } else { log_warn("cjf: %i:%x page is NULL", fd, file_offset); } } else { log_warn("cjf: %i:%x page is not cached", fd, file_offset); } } else { log_warn("cjf: %i:%x has no page cache", fd, file_offset); } group_mutex_unlock(&page_cache_mtx, GROUP_MUTEX_WRITE); } void journal_cjf_page_cache_close(int fd) { group_mutex_lock(&page_cache_mtx, GROUP_MUTEX_WRITE); u32_node *fd_node = u32_set_avl_find(&page_cache_item_by_fd, (u32)fd); if(fd_node != NULL) { journal_cjf_page_cache_items_close((u64_set*)&fd_node->value); // @todo edf 20150113 -- close the content // destroy the u64_set content // delete the fd_node u32_set_avl_delete(&page_cache_item_by_fd, (u32)fd); } group_mutex_unlock(&page_cache_mtx, GROUP_MUTEX_WRITE); } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/dnssec_process.c0000644000077100007710000000012412650131756022152 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.411344 30 ctime=1454597652.485344534 yadifa-2.1.6-5826/lib/dnsdb/src/dnssec_process.c0000664000077100007710000003552412650131756021770 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbdnssec DNSSEC functions * @ingroup dnsdb * @brief * * @{ */ /** * @todo Test, debug then do the optimizations. (LATER) * */ #define RRSIGN_TASKS_C /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include #include #include #include "dnsdb/zdb_error.h" #include "dnsdb/zdb_record.h" #include "dnsdb/dnssec.h" #define MODULE_MSG_HANDLE g_dnssec_logger /*****************************************************************************/ #define ZDB_THREAD_TAG 0x444145524854 /* THREAD */ #define ZDB_THREAD_CONTEXT_TAG 0x545854435450 /* PTCTXT */ #define THREADED_QUEUE_NODE_TAG 0x444E455545555154 /* TQUEUEND */ #define ZDB_RRSIGUPQ_TAG 0x5150554749535252 /* RRSIGUPQ */ struct thread_pool_s *dnssec_process_default_pool = NULL; /** * Using the parameters in task, * creates a task and an answer MT queues * queues task and answer threads to a thread pool * then calls the callback to work on the task/zone. * * When the callback returns, * waits for the end of the threads, * releases resoures, * exits with the callback return code. * * @param task the task structure * @param zone the zone to process * @param callback the callback to call * @param whatyouwant a pointer passer to the callback * * @return an error code */ ya_result dnssec_process_begin(dnssec_task_s *task) { if(task == NULL || task->vtbl == NULL) { return INVALID_ARGUMENT_ERROR; } // setup the thread pool. // if none was set in the parameters (usual case), use the default dnssec one struct thread_pool_s *pool; s32 processor_threads_count; if(task->pool != NULL) { processor_threads_count = thread_pool_get_size(task->pool); if(processor_threads_count < 2) { return INVALID_ARGUMENT_ERROR; // at least 2 threads are required } pool = task->pool; } else { if(dnssec_process_default_pool == NULL) { return INVALID_STATE_ERROR; } processor_threads_count = thread_pool_get_size(dnssec_process_default_pool); pool = dnssec_process_default_pool; } processor_threads_count--; #if DNSSEC_DEBUGLEVEL>1 log_debug("processor_threads_count = %i", processor_threads_count); #endif /* * Prepare & Start the threads */ #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_process_zone: starting answer processor"); #endif ya_result ret; void *processor_context; if(FAIL(ret = task->vtbl->create_context(task, 0, &processor_context))) { log_err("dnssec_process_zone: create context : %r", ret); return ret; } if(FAIL(ret = thread_pool_enqueue_call(pool, task->vtbl->result, processor_context, NULL, task->vtbl->name))) { DIE(DNSSEC_ERROR_CANTPOOLTHREAD); } /* The array of contextes for each thread */ void** contexts; MALLOC_OR_DIE(void**, contexts, sizeof(void*) * (processor_threads_count + 1), ZDB_THREAD_CONTEXT_TAG); ZEROMEMORY(contexts, sizeof(void*) * (processor_threads_count + 1)); contexts[0] = processor_context; #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_process_zone: starting %d query processors", processor_threads_count); #endif for(int processor = 1; processor <= processor_threads_count; processor++) { if(FAIL(ret = task->vtbl->create_context(task, processor, &processor_context))) { log_err("dnssec_process_zone: create context : %r", ret); break; } contexts[processor] = processor_context; if(FAIL(ret = thread_pool_enqueue_call(pool, task->vtbl->process, processor_context, NULL, task->vtbl->name))) { log_err("dnssec_process_zone: thread_pool_enqueue_call, critical fail: %r", ret); logger_flush(); log_quit("dnssec_process_zone: thread_pool_enqueue_call: %r", ret); break; } } task->contexts = contexts; task->processor_threads_count = processor_threads_count; return ret; } void dnssec_process_end(dnssec_task_s *task) { for(int i = 1; i <= task->processor_threads_count; i++) { threaded_queue_enqueue(&task->dnssec_task_query_queue, NULL); } task->processor_threads_count = 0; /* Wait until the last thread has read its "NULL" query * This also means that the last answer has been posted. */ #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_process_zone: wait for queries"); #endif threaded_queue_wait_empty(&task->dnssec_task_query_queue); #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_process_zone: destroy queries"); #endif /* Wait until the last answer has been processed */ #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_process_zone: post NULL answer"); #endif threaded_queue_enqueue(&task->dnssec_answer_query_queue, NULL); #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_process_zone: wait for answer"); #endif /* Wait until the NULL answer has been processed */ threaded_queue_wait_empty(&task->dnssec_answer_query_queue); #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_process_zone: destroy answer"); #endif } ya_result dnssec_process_task(dnssec_task_s *task, dnssec_process_task_callback *callback, void *whatyouwant) { #if DNSSEC_DEBUGLEVEL > 1 log_debug("dnssec_process_task: begin"); #endif ya_result ret = dnssec_process_begin(task); /* * This is the actual core of the function, everything beside this couple of lines is setup * * @TODO handle possible error code */ if(ISOK(ret)) { #if DNSSEC_DEBUGLEVEL > 1 log_debug("dnssec_process_task: doing the job"); #endif if(FAIL(ret = callback(task, whatyouwant))) { log_err("dnssec_process_zone: task failed with %r", ret, task->vtbl->name); } } else { #if DNSSEC_DEBUGLEVEL > 1 log_debug("dnssec_process_task: cannot work, all stop"); #endif } dnssec_process_end(task); #if DNSSEC_DEBUGLEVEL > 1 log_debug("dnssec_process_task: end"); #endif return ret; } ya_result dnssec_process_set_default_pool(struct thread_pool_s *pool) { if(pool == NULL) { return UNEXPECTED_NULL_ARGUMENT_ERROR; } s32 processor_threads_count = thread_pool_get_size(pool); if(processor_threads_count >= 2) { dnssec_process_default_pool = pool; return SUCCESS; } else { return INVALID_ARGUMENT_ERROR; // at least 2 threads are required } } /** * Initialises a task with two threads (given by the descriptor) * * @param task task to initialise * @param desc structure pointing to the two threads an a friendly name */ void dnssec_process_initialize(dnssec_task_s *task, dnssec_task_vtbl *vtbl, struct thread_pool_s *pool, zdb_zone *zone) { #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_process_initialize(%s)", desc->name); #endif ZEROMEMORY(task, sizeof(dnssec_task_s)); task->vtbl = vtbl; task->zone = zone; task->pool = pool; #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_process_initialize: creating queues"); #endif u32 dnssec_process_queue_size = QUEUE_MAX_SIZE; threaded_queue_init(&task->dnssec_task_query_queue, dnssec_process_queue_size); threaded_queue_init(&task->dnssec_answer_query_queue, dnssec_process_queue_size); } /** * Clears the threads and name of a task. * * @param task the task structure */ void dnssec_process_finalize(dnssec_task_s *task) { #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_process_finalize(%s)", task->descriptor_name); #endif threaded_queue_finalize(&task->dnssec_task_query_queue); #ifdef DEBUG memset(&task->dnssec_task_query_queue, 0xfe, sizeof(threaded_queue)); #endif threaded_queue_finalize(&task->dnssec_answer_query_queue); #ifdef DEBUG memset(&task->dnssec_answer_query_queue, 0xfe, sizeof(threaded_queue)); #endif if(task->contexts != NULL) { for(int processor = 0; processor <= task->processor_threads_count; processor++) { if(task->contexts[processor] != NULL) { task->vtbl->destroy_context(task, processor, task->contexts[processor]); task->contexts[processor] = NULL; } } #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_process_finalize: free contexts"); #endif #ifdef DEBUG memset(task->contexts, 0xfe, sizeof(void*) * (task->processor_threads_count + 1)); #endif free(task->contexts); task->contexts = NULL; } task->vtbl = NULL; } #if ZDB_HAS_NSEC3_SUPPORT != 0 /** * * Applies the defined task to the NSEC3 items of the specified zone, registering changes in the journal. * The task is done multithreaded, one label per processing thread. * NSEC3 are not processed * This function uses dnssec_process_task * * @param task the task structure * @param zone the zone to process * * @return */ static ya_result dnssec_process_zone_nsec3_body(dnssec_task_s *task, void *not_used) { (void)not_used; zdb_zone *zone = task->zone; // from a task, used by zdb_update_signature, its caller acquired the zone #if DNSSEC_DEBUGLEVEL>2 log_debug("dnssec_process_zone_nsec3_body: begin %{dnsname} (%s)", &zone->origin, task->descriptor_name); #endif nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { #if DNSSEC_DEBUGLEVEL>2 u32 nsec3_count = 0; log_debug("dnssec_process_zone_nsec3_body: processing NSEC3 collection"); #endif nsec3_avl_iterator nsec3_items_iter; nsec3_avl_iterator_init(&n3->items, &nsec3_items_iter); if(nsec3_avl_iterator_hasnext(&nsec3_items_iter)) { nsec3_zone_item* first = nsec3_avl_iterator_next_node(&nsec3_items_iter); nsec3_zone_item* item = first; nsec3_zone_item* next; do { if(dnscore_shuttingdown()) { #if DNSSEC_DEBUGLEVEL>2 log_debug("dnssec_process_zone_nsec3_body: STOPPED_BY_APPLICATION_SHUTDOWN"); #endif return STOPPED_BY_APPLICATION_SHUTDOWN; } if(task->stop_task) { return SUCCESS; } if(nsec3_avl_iterator_hasnext(&nsec3_items_iter)) { next = nsec3_avl_iterator_next_node(&nsec3_items_iter); } else { next = first; } if(task->vtbl->filter_nsec3_item(task, item, next) == DNSSEC_THREAD_TASK_FILTER_ACCEPT) { nsec3_rrsig_update_item_s* query; MALLOC_OR_DIE(nsec3_rrsig_update_item_s*, query, sizeof (nsec3_rrsig_update_item_s), ZDB_RRSIGUPQ_TAG); query->zone = zone; query->item = item; query->next = next; query->added_rrsig_sll = NULL; query->removed_rrsig_sll = NULL; yassert(query->item != NULL); threaded_queue_enqueue(&task->dnssec_task_query_queue, query); } else { log_debug7("rrsig: nsec3: ignore %{digest32h}", item->digest); task->vtbl->filter_nsec3_item(task, item, next); } item = next; #if DNSSEC_DEBUGLEVEL>2 nsec3_count++; #endif } while(next != first); } /* If there is a first item*/ #if DNSSEC_DEBUGLEVEL>2 log_debug("dnssec_process_zone_nsec3_body: processed NSEC3 collection (%d items)", nsec3_count); #endif n3 = n3->next; } /* while n3 != NULL */ #if DNSSEC_DEBUGLEVEL>2 log_debug("dnssec_process_zone_nsec3_body: end %{dnsname} (%s)", &zone->origin, task->descriptor_name); #endif return SUCCESS; } /** * * Applies the defined task to NSEC3 part of the specified zone (registering changes in the journal?) * The task is done multithreaded, one label per processing thread. * * @param task * @param zone * @return */ ya_result dnssec_process_zone_nsec3(dnssec_task_s *task) { #if DNSSEC_DEBUGLEVEL>2 log_debug("dnssec_process_zone_nsec3: begin %{dnsname} (%s)", &zone->origin, task->descriptor_name); #endif ya_result return_code = dnssec_process_task(task, &dnssec_process_zone_nsec3_body, NULL); #if DNSSEC_DEBUGLEVEL>2 log_debug("dnssec_process_zone_nsec3: end %{dnsname} (%s): %r", &zone->origin, task->descriptor_name, return_code); #endif return return_code; } #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/rrsig_updater.c0000644000077100007710000000012412650131756022007 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.283344 30 ctime=1454597652.500344534 yadifa-2.1.6-5826/lib/dnsdb/src/rrsig_updater.c0000664000077100007710000005653412650131756021631 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup rrsig RRSIG functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include #include #include #include "dnsdb/zdb_types.h" #include "dnsdb/zdb_record.h" #include "dnsdb/dnssec.h" #include "dnsdb/rrsig.h" #include "dnsdb/zdb_listener.h" #include "dnsdb/rrsig_updater.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_zone_label_iterator.h" #define MODULE_MSG_HANDLE g_dnssec_logger /***************************************************************************** ***************************************************************************** * * UPDATER * ***************************************************************************** *****************************************************************************/ struct rrsig_updater_result_process_item_s { struct rrsig_updater_result_process_item_s *next; zdb_packed_ttlrdata *added_rrsig_sll; zdb_packed_ttlrdata *removed_rrsig_sll; u8 internal_fqdn[1]; }; typedef struct rrsig_updater_result_process_item_s rrsig_updater_result_process_item_s; struct rrsig_answer_context_s { dnssec_task_s *task; struct rrsig_updater_result_process_item_s *items; }; typedef struct rrsig_answer_context_s rrsig_answer_context_s; ya_result nsec3_rrsig_updater_process_zone(rrsig_updater_parms *parms); static ya_result rrsig_updater_thread_init(dnssec_task_s *task) { u32 valid_from = time(NULL); rrsig_context_s dummy_context; ya_result return_code = rrsig_context_initialize(&dummy_context, task->zone, DEFAULT_ENGINE_NAME, valid_from, NULL); /* nsec3 */ rrsig_context_destroy(&dummy_context); return return_code; } static ya_result rrsig_updater_thread_finalise(dnssec_task_s *task) { return SUCCESS; } /** * * @param task * @param processor ==0 = answer, >0 = query * @param ctxp * @return */ static ya_result rrsig_updater_thread_create_context(dnssec_task_s *task, s32 processor, void **ctxp) { yassert((task != NULL) && (task->args != NULL) && (task->zone != NULL)); if(processor > 0) { rrsig_context_s *ctx; MALLOC_OR_DIE(rrsig_context_s*, ctx, sizeof(rrsig_context_s), GENERIC_TAG); u32 valid_from = time(NULL); rrsig_updater_parms *parms = (rrsig_updater_parms*)task->args; ya_result return_code = rrsig_context_initialize(ctx, task->zone, DEFAULT_ENGINE_NAME, valid_from, (parms->quota >0)?&parms->remaining_quota:NULL); if(ISOK(return_code)) { ctx->task = task; *ctxp = ctx; } else { free(ctx); ctx = NULL; } return return_code; } else { rrsig_answer_context_s *ctx; MALLOC_OR_DIE(rrsig_answer_context_s*, ctx, sizeof(rrsig_answer_context_s), GENERIC_TAG); ctx->task = task; ctx->items = NULL; *ctxp = ctx; return SUCCESS; } } static void rrsig_updater_thread_destroy_context(dnssec_task_s *task, s32 processor, void *ctx_) { (void)task; if(processor > 0) { rrsig_updater_parms *parms = (rrsig_updater_parms*)task->args; rrsig_context_s *ctx = (rrsig_context_s*)ctx_; parms->good_signatures += ctx->good_signatures; parms->expired_signatures += ctx->expired_signatures; parms->wrong_signatures += ctx->wrong_signatures; rrsig_context_destroy(ctx); free(ctx); } else { rrsig_answer_context_s *ctx = (rrsig_answer_context_s*)ctx_; ctx->task = NULL; free(ctx); } } /** * Updates the signatures on the label of a zone based on a signature context */ static s32 rrsig_updater_update_label(rrsig_context_s *sig_context, rrsig_update_item_s *query) { rrsig_context_push_label(sig_context, query->label); s32 sig_count = rrsig_update_label(sig_context, query->label); rrsig_context_update_quota(sig_context, sig_count); /* * Retrieve the old signatures (to be deleted) * Retrieve the new signatures (to be added) * * This has to be injected as an answer query. */ query->added_rrsig_sll = sig_context->added_rrsig_sll; query->removed_rrsig_sll = sig_context->removed_rrsig_sll; rrsig_context_pop_label(sig_context); return sig_count; } /** * * This thread takes rrsig_update_query inputs to compute signatures and * sends them back to the result thread. * * MULTIPLE INSTANCES RUNNING * * @param context_ * @return */ static void* rrsig_updater_thread(void *context_) { /* Initialization */ rrsig_context_s *sig_context = (rrsig_context_s*)context_; dnssec_task_s *task = sig_context->task; threaded_queue *dnssec_task_query_queue = &task->dnssec_task_query_queue; threaded_queue *dnssec_task_answer_queue = &task->dnssec_answer_query_queue; int id = (int)pthread_self(); u8 origin[MAX_DOMAIN_LENGTH]; dnsname_copy(origin, sig_context->origin); log_debug("rrsig: updater thread %x start %{dnsname}", id, origin); #if DNSSEC_DEBUGLEVEL>0 log_debug("rrsig_updater_thread(%i): starting an UPDATER thread", id); #endif /* * The caller has already initialized the signature context for us. * The zone & everything are ready. * */ u32 signatures_made = 0; u32 labels_ignored = 0; bool first_job = TRUE; bool first_signature = TRUE; /* Main loop */ for(;;) { #if DNSSEC_DEBUGLEVEL>1 log_debug("rrsig_updater_thread(%i): dequeue (WAIT)", id); #endif rrsig_update_item_s* query = (rrsig_update_item_s*)threaded_queue_dequeue(dnssec_task_query_queue); if(query == NULL) { /* From this point I should not use the context anymore */ #if DNSSEC_DEBUGLEVEL>1 log_debug("rrsig_updater_thread(%i): stop", id); #endif break; } if(first_job) { log_debug("rrsig_updater_thread(%i): first query", id); first_job = FALSE; } if(rrsig_context_get_quota(sig_context) <= 0) { log_debug("quota exceeded, ignoring nsec3 signature query"); free(query); task->stop_task = true; continue; } #if DNSSEC_DEBUGLEVEL>3 { /* DEBUG */ char label[MAX_DOMAIN_LENGTH + 1]; dnsname_stack_to_cstr(&query->path, label); log_debug("rrsig_updater_thread(): processing records for '%s'", label); } #endif /** * The path to the label to sign is in the query. * @todo: use the path from the query : * * rrsig_update_context_add_label * rrsig_update_context_remove_label * */ #ifdef DEBUG yassert(query->added_rrsig_sll != ((zdb_packed_ttlrdata*)0xfefefefefefefefe)); #endif if(rrsig_updater_update_label(sig_context, query) > 0) { if(first_signature) { log_debug("rrsig_updater_thread(%i): first signature", id); first_signature = FALSE; } signatures_made++; } else { labels_ignored++; } /* All the signatures for this set have been computer. Queue the result. */ /******************************************************************* * QUEUE THE ANSWER ******************************************************************/ #if DNSSEC_DEBUGLEVEL>1 log_debug("rrsig_updater_thread(%i): enqueue (RESULT)", id); #endif #ifdef DEBUG if(query != NULL) { yassert(query->added_rrsig_sll != ((zdb_packed_ttlrdata*)0xfefefefefefefefe)); } #endif // if there is work to do, enqueue the result, else free the query #if 1 threaded_queue_enqueue(dnssec_task_answer_queue, query); #else if(query->added_rrsig_sll != NULL || query->removed_rrsig_sll != NULL) { threaded_queue_enqueue(dnssec_task_answer_queue, query); } else { free(query); } #endif #if DNSSEC_DEBUGLEVEL>1 log_debug("rrsig_updater_thread(%i): done", id); #endif } ERR_remove_state(0); log_debug("rrsig: updater thread %x stop %{dnsname} (made=%d,ignored=%d)", id, origin, signatures_made, labels_ignored); /* We don't need this anymore */ #if DNSSEC_DEBUGLEVEL>0 log_debug("rrsig_updater_thread(%i): exit", id); logger_flush(); #endif return NULL; } /* ONE INSTANCE RUNNING */ static void* rrsig_updater_result_process(rrsig_answer_context_s *answer_context) { dnssec_task_s *task = answer_context->task; threaded_queue* dnssec_answer_query_queue = &task->dnssec_answer_query_queue; #if DNSSEC_DEBUGLEVEL>0 log_debug("dnssec_updater_result_thread(): start"); #endif log_debug("rrsig: updater thread result start"); #if DNSSEC_DUMPSIGNCOUNT!=0 u64 sign_start = timems(); #endif u32 count; struct rrsig_updater_result_process_item_s *to_commit = NULL; rrsig_update_item_s *previous_query = NULL; for(count = 1;; count++) { #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_updater_result_thread(): loop #%i", count); #endif rrsig_update_item_s *query = (rrsig_update_item_s*)threaded_queue_dequeue(dnssec_answer_query_queue); if(query == NULL) { /* Terminating ... */ #if DNSSEC_DEBUGLEVEL>1 log_debug("dnssec_updater_result_thread(): stop #%i", count); #endif break; } #if DNSSEC_DEBUGLEVEL>3 { /* DEBUG */ char label[MAX_DOMAIN_LENGTH + 1]; dnsname_stack_to_cstr(&query->path, label); log_debug("dnssec_updater_result_thread() : retrieving results for %s", label); } #endif if(query->added_rrsig_sll != NULL || query->removed_rrsig_sll != NULL) { rrsig_updater_result_process_item_s *item; u32 fqdn_len = dnsname_stack_len(&query->path); ZALLOC_ARRAY_OR_DIE(rrsig_updater_result_process_item_s *, item, sizeof(rrsig_updater_result_process_item_s) - 1 + fqdn_len, GENERIC_TAG); item->next = to_commit; to_commit = item; item->added_rrsig_sll = query->added_rrsig_sll; item->removed_rrsig_sll = query->removed_rrsig_sll; dnsname_stack_to_dnsname(&query->path, &item->internal_fqdn[0]); //rrsig_update_commit(query->removed_rrsig_sll, query->added_rrsig_sll, query->label, query->zone, &query->path); } // this is the last processed point if(previous_query != NULL) { #ifdef DEBUG memset(previous_query, 0xfe, sizeof(rrsig_update_item_s)); #endif free(previous_query); } previous_query = query; #if DNSSEC_DUMPSIGNCOUNT!=0 if((count & 0x3fff) == 0) { u64 elapsed = timems() - sign_start; // count / (elapsed * 0.001) // count float rate = (1000.f * count) / MAX((1.0f*elapsed),1.000f); log_debug("rrsig: updater thread result : %u in %llums (%f/s)", count, elapsed, rate); } #endif } // answer_context->items = to_commit; // if(previous_query != NULL) { // remember the last processed point // the next iteration will start from/after this point u32 path_len = dnsname_stack_len(&previous_query->path); u32 origin_len = dnsname_len(previous_query->zone->origin); // allocate path_len - origin_len // copy the name below the origin // set it as sig_last_processed_node if(previous_query->zone->sig_last_processed_node == NULL) { ZFREE_STRING(previous_query->zone->sig_last_processed_node); previous_query->zone->sig_last_processed_node = NULL; } u8 *sig_last_processed_node; u32 len = path_len - origin_len; ZALLOC_ARRAY_OR_DIE(u8 *,sig_last_processed_node, len + 1, GENERIC_TAG); sig_last_processed_node[0] = len; sig_last_processed_node++; previous_query->zone->sig_last_processed_node = sig_last_processed_node; const u8 *sig_last_processed_node_limit = &sig_last_processed_node[len]; for(s32 size = previous_query->path.size; (sig_last_processed_node < sig_last_processed_node_limit) && (size >= 0); size--) { sig_last_processed_node += dnslabel_copy(sig_last_processed_node, previous_query->path.labels[size]); } // release #ifdef DEBUG memset(previous_query, 0xfe, sizeof(rrsig_update_item_s)); #endif free(previous_query); previous_query = NULL; } #if DNSSEC_DUMPSIGNCOUNT!=0 u64 elapsed = timems() - sign_start; float rate = (1000.f * count) / MAX((1.0f*elapsed),1.000f); log_debug("rrsig: updater thread result : %u in %llums (%f/s)", count, elapsed, rate); #endif ERR_remove_state(0); log_debug("rrsig: updater thread result end"); #if DNSSEC_DEBUGLEVEL>0 log_debug("dnssec_updater_result_thread(): exit"); logger_flush(); #endif return NULL; } static void* rrsig_updater_result_thread(void *context_) { rrsig_answer_context_s *context = (rrsig_answer_context_s*)context_; return rrsig_updater_result_process(context); } static bool rrsig_updater_filter_label_rrsig(dnssec_task_s *task, zdb_rr_label *rr_label) { rrsig_updater_parms *parms = (rrsig_updater_parms*)task->args; if(parms->signatures_are_verified) { zdb_packed_ttlrdata * rrsig = zdb_record_find(&rr_label->resource_record_set, TYPE_RRSIG); if(rrsig != NULL) { u32 now = time(NULL); do { u32 until = RRSIG_VALID_UNTIL(rrsig); if(until < now) { return TRUE; } rrsig = rrsig->next; } while(rrsig != NULL); } else { return TRUE; } } else { return TRUE; } return FALSE; } static ya_result rrsig_updater_filter_label(dnssec_task_s *task, zdb_rr_label *rr_label) { if(LABEL_HAS_RECORDS(rr_label)) { if(ZDB_LABEL_ISAPEX(rr_label)) { if(rrsig_updater_filter_label_rrsig(task, rr_label)) { return DNSSEC_THREAD_TASK_FILTER_ACCEPT; } } if(ZDB_LABEL_ATDELEGATION(rr_label)) { if(zdb_record_find(&rr_label->resource_record_set, TYPE_DS) != NULL) { if(rrsig_updater_filter_label_rrsig(task, rr_label)) { return DNSSEC_THREAD_TASK_FILTER_ACCEPT; } } } else if(!ZDB_LABEL_UNDERDELEGATION(rr_label)) { if(rrsig_updater_filter_label_rrsig(task, rr_label)) { return DNSSEC_THREAD_TASK_FILTER_ACCEPT; } } } return DNSSEC_THREAD_TASK_FILTER_IGNORE; } static ya_result rrsig_updater_filter_nsec3_item(dnssec_task_s *task, nsec3_zone_item *item, nsec3_zone_item *next) { (void)task; (void)item; (void)next; return DNSSEC_THREAD_TASK_FILTER_IGNORE; } static dnssec_task_vtbl rrsig_updater_task_descriptor = { rrsig_updater_thread_init, rrsig_updater_thread_create_context, rrsig_updater_thread_destroy_context, rrsig_updater_filter_label, rrsig_updater_filter_nsec3_item, rrsig_updater_thread, rrsig_updater_result_thread, rrsig_updater_thread_finalise, "RRSIG updater" }; rrsig_updater_parms* rrsig_updater_parms_alloc() { rrsig_updater_parms *parms; ZALLOC_OR_DIE(rrsig_updater_parms*, parms, rrsig_updater_parms, GENERIC_TAG); ZEROMEMORY(parms, sizeof(rrsig_updater_parms)); return parms; } void rrsig_updater_parms_free(rrsig_updater_parms *parms) { if(parms != NULL) { ZFREE(parms, rrsig_updater_parms); } } /** * creates the communication queues * * takes hold of the threads from the pool * 1 for the answers (maybe answers is irrelevant and could be replaced * by a mutex and a ptr to the item list * * the rest for the signatures * * the threads must know the zone and the keys * * should be followed by rrsig_updater_process_zone */ void rrsig_updater_init(rrsig_updater_parms *parms, zdb_zone *zone) { log_debug1("rrsig_updater_init(%p,%{dnsname})", parms, zone->origin); smp_int *quota = NULL; if(parms->quota != 0) { quota = &parms->remaining_quota; smp_int_init_set(quota, parms->quota); } parms->to_commit = NULL; dnssec_process_initialize(&parms->task, &rrsig_updater_task_descriptor, NULL, zone); parms->task.args = parms; } /** * sends the labels to the signature queue * waits for a stop signal (stop signing or program shutdown) * * @param parms * @return */ ya_result rrsig_updater_process_zone(rrsig_updater_parms *parms) { log_debug1("rrsig_updater_process_zone(%p)", parms); dnssec_task_s *task = &parms->task; ya_result return_code; zdb_zone_label_iterator iter; dnsname_stack fqdn_stack; // initialises the queues, puts the processors and the answer threads into // the pool if(FAIL(return_code = dnssec_process_begin(task))) { return return_code; } if(task->zone->sig_last_processed_node == NULL) { zdb_zone_label_iterator_init_from(task->zone, &iter, task->zone->sig_last_processed_node); } else { u8 len = task->zone->sig_last_processed_node[-1]; u8 fqdn[MAX_DOMAIN_LENGTH]; memcpy(fqdn, task->zone->sig_last_processed_node, len); memcpy(&fqdn[len], task->zone->origin, dnsname_len(task->zone->origin)); zdb_zone_label_iterator_init_from(task->zone, &iter, fqdn); } while(zdb_zone_label_iterator_hasnext(&iter)) { memcpy(&fqdn_stack.labels[0], &iter.dnslabels[0], (iter.top + 1) * sizeof(u8*)); fqdn_stack.size = iter.top; zdb_rr_label *rr_label = zdb_zone_label_iterator_next(&iter); if(task->vtbl->filter_label(task, rr_label) == DNSSEC_THREAD_TASK_FILTER_ACCEPT) { rrsig_update_item_s *query; MALLOC_OR_DIE(rrsig_update_item_s*, query, sizeof (rrsig_update_item_s), ZDB_RRSIGUPQ_TAG); query->label = rr_label; memcpy(&query->path.labels[0], &fqdn_stack.labels[0], (fqdn_stack.size + 1) * sizeof(u8*)); query->path.size = fqdn_stack.size; query->added_rrsig_sll = NULL; query->removed_rrsig_sll = NULL; query->zone = task->zone; /* * The label from root TLD and the zone cut have one thing in common: * The label (relative path from the previous node) has got a size of 0 */ threaded_queue_enqueue(&task->dnssec_task_query_queue, query); } if(task->stop_task) { break; } if(dnscore_shuttingdown()) { break; } } dnssec_process_end(task); return_code = parms->quota - smp_int_get(&parms->remaining_quota); return return_code; } /* * commits the results from the answers (or the list already built) */ void rrsig_updater_commit(rrsig_updater_parms *parms) { log_debug1("rrsig_updater_commit(%p)", parms); dnssec_task_s *task = &parms->task; rrsig_answer_context_s *context = (rrsig_answer_context_s*)task->contexts[0]; if(context != NULL && context->items != NULL) { // commit all the signatures changes struct rrsig_updater_result_process_item_s *to_commit = context->items; context->items = NULL; while(to_commit != NULL) { rrsig_updater_result_process_item_s *item = to_commit; dnsname_stack path; dnsname_to_dnsname_stack(item->internal_fqdn, &path); zdb_zone *zone = task->zone; // find label in zone ... zdb_rr_label *label = zdb_rr_label_stack_find(task->zone->apex, path.labels, path.size, zone->origin_vector.size + 1); if(label != NULL) { rrsig_update_commit(item->removed_rrsig_sll, item->added_rrsig_sll, label, zone, &path); } else { log_err("rrsig: label %{dnsname} or zone %{dnsname} disappeared while signing", item->internal_fqdn, zone->origin); } to_commit = to_commit->next; ZFREE_ARRAY(item, sizeof(rrsig_updater_result_process_item_s) - 1 + dnsname_len(item->internal_fqdn)); } } } void rrsig_updater_finalize(rrsig_updater_parms *parms) { log_debug1("rrsig_updater_finalize(%p)", parms); log_debug("rrsig_updater_finalize: good: %u expired: %u wrong: %u", parms->good_signatures, parms->expired_signatures, parms->wrong_signatures); if(parms->quota != 0) { smp_int_destroy(&parms->remaining_quota); } dnssec_process_finalize(&parms->task); } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_listener.c0000644000077100007710000000012412650131756021621 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.393344 30 ctime=1454597652.374344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_listener.c0000664000077100007710000001261612650131756021434 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnsdb * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include "dnsdb/zdb_listener.h" /* * */ static zdb_listener* first = NULL; void zdb_listener_chain(zdb_listener* listener) { listener->next = first; first = listener; } void zdb_listener_unchain(zdb_listener* listener) { if(listener == first) { first = listener->next; } else { zdb_listener* item = first; while(item != NULL) { if(item->next == listener) { item->next = listener->next; break; } item = item->next; } } } void zdb_listener_notify_remove_type(const zdb_zone *zone, const u8* dnsname, zdb_rr_collection* recordssets, u16 type) { zdb_listener* listener = first; while(listener != NULL) { listener->on_remove_record_type(listener, zone, dnsname, recordssets, type); listener = listener->next; } } void zdb_listener_notify_add_record(const zdb_zone *zone, dnslabel_vector_reference labels, s32 top, u16 type, zdb_ttlrdata *record) { zdb_listener* listener = first; while(listener != NULL) { listener->on_add_record(listener, zone, labels, top, type, record); listener = listener->next; } } void zdb_listener_notify_remove_record(const zdb_zone *zone, const u8 *dnsname, u16 type, zdb_ttlrdata *record) { zdb_listener* listener = first; while(listener != NULL) { listener->on_remove_record(listener, zone, dnsname, type, record); listener = listener->next; } } bool zdb_listener_notify_has_changes(const zdb_zone *zone) { zdb_listener* listener = first; while(listener != NULL) { if(listener->has_changes(listener, zone)) { return TRUE; } listener = listener->next; } return FALSE; } #if ZDB_HAS_NSEC3_SUPPORT != 0 void zdb_listener_notify_add_nsec3(const zdb_zone *zone, nsec3_zone_item* nsec3_item, nsec3_zone* n3, u32 ttl) { zdb_listener* listener = first; while(listener != NULL) { listener->on_add_nsec3(listener, zone, nsec3_item, n3, ttl); listener = listener->next; } } void zdb_listener_notify_remove_nsec3(const zdb_zone *zone, nsec3_zone_item* nsec3_item, nsec3_zone* n3, u32 ttl) { zdb_listener* listener = first; while(listener != NULL) { listener->on_remove_nsec3(listener, zone, nsec3_item, n3, ttl); listener = listener->next; } } void zdb_listener_notify_update_nsec3rrsig(const zdb_zone *zone, zdb_packed_ttlrdata *removed_rrsig_sll, zdb_packed_ttlrdata *added_rrsig_sll, nsec3_zone_item* n3item) { zdb_listener* listener = first; while(listener != NULL) { listener->on_update_nsec3rrsig(listener, zone, removed_rrsig_sll, added_rrsig_sll, n3item); listener = listener->next; } } #endif #if ZDB_HAS_DNSSEC_SUPPORT != 0 void zdb_listener_notify_update_rrsig(const zdb_zone *zone, zdb_packed_ttlrdata *removed_rrsig_sll, zdb_packed_ttlrdata *added_rrsig_sll, zdb_rr_label* label, dnsname_stack* name) { zdb_listener* listener = first; while(listener != NULL) { listener->on_update_rrsig(listener, zone, removed_rrsig_sll, added_rrsig_sll, label, name); listener = listener->next; } } bool zdb_listener_notify_enabled() { return first != NULL; } #endif /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_zone_axfr_input_stream.c0000644000077100007710000000012412650131756024561 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.393344 30 ctime=1454597652.436344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_zone_axfr_input_stream.c0000664000077100007710000002006212650131756024366 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "dnsdb/dnsdb-config.h" #include #include "dnscore/file_input_stream.h" #include "dnscore/format.h" #include "dnsdb/zdb_types.h" #include "dnsdb/zdb_zone_axfr_input_stream.h" #include "dnsdb/zdb-zone-path-provider.h" /** @defgroup * @ingroup * @brief * * * * @{ * *----------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------ * GLOBAL VARIABLES */ extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #define AXFRIS_TAG 0x534952465841 /*------------------------------------------------------------------------------ * STATIC PROTOTYPES */ /*------------------------------------------------------------------------------ * FUNCTIONS */ /** @brief Function ... * * ... * * @param ... * * @retval OK * @retval NOK */ typedef struct zdb_zone_axfr_input_stream_data zdb_zone_axfr_input_stream_data; struct zdb_zone_axfr_input_stream_data { input_stream filtered; zdb_zone* zone; u32 serial; }; static ya_result zdb_zone_axfr_input_stream_read(input_stream* stream_, u8* buffer, u32 len) { zdb_zone_axfr_input_stream_data* stream = (zdb_zone_axfr_input_stream_data*)stream_->data; bool first_chance_eof = FALSE; for(;;) { ya_result n = input_stream_read(&stream->filtered, buffer, len); // ERROR or SUCCESS if(n != 0) { /* log_debug("zdb_zone_axfr_input_stream_read: got %d", n); */ return n; } // EOF ... or is it ? if(first_chance_eof) { // already broken once : EOF /* log_debug("zdb_zone_axfr_input_stream_read: final EOF"); */ return 0; } if((stream->zone->axfr_timestamp != 0) || (stream->zone->axfr_serial != stream->serial)) { // file written OR file written and a new one starts to be written => done /* log_debug("zdb_zone_axfr_input_stream_read: first chance EOF"); */ first_chance_eof = TRUE; } else { // just wait /* log_debug("zdb_zone_axfr_input_stream_read: wait"); */ } usleep(100000); // 10ms } } static ya_result zdb_zone_axfr_input_stream_skip(input_stream* stream_, u32 len) { // Yes, this is not the usual pattern : skip will simply read from the stream into // a buffer so the call is simply forwarded to the reader. //zdb_zone_axfr_input_stream_data* stream = (zdb_zone_axfr_input_stream_data*)stream_; ya_result total = 0; u8 tmp[512]; while(len > 0) { // Yes, I meant to use stream_ and not "stream" ya_result n = zdb_zone_axfr_input_stream_read(stream_, tmp, MIN(len, sizeof(tmp))); if(FAIL(n)) { return n; } if(n == 0) { break; } total += n; } return total; } static void zdb_zone_axfr_input_stream_close(input_stream* is) { zdb_zone_axfr_input_stream_data* data = (zdb_zone_axfr_input_stream_data*)is->data; input_stream_close(&data->filtered); free(data); input_stream_set_void(is); } static input_stream_vtbl zdb_zone_axfr_input_stream_vtbl = { zdb_zone_axfr_input_stream_read, zdb_zone_axfr_input_stream_skip, zdb_zone_axfr_input_stream_close, "zdb_zone_axfr_input_stream" }; ya_result zdb_zone_axfr_input_stream_open_with_path(input_stream *is, zdb_zone *zone, const char *filepath) { ya_result ret; u32 serial; //u32 timestamp; serial = zone->axfr_serial; //timestamp = zone->axfr_timestamp; if(ISOK(ret = file_input_stream_open(filepath, is))) { zdb_zone_axfr_input_stream_data* data; MALLOC_OR_DIE(zdb_zone_axfr_input_stream_data*, data, sizeof(zdb_zone_axfr_input_stream_data), AXFRIS_TAG); data->filtered.data = is->data; data->filtered.vtbl = is->vtbl; data->serial = serial; data->zone = zone; is->data = data; is->vtbl = &zdb_zone_axfr_input_stream_vtbl; } return ret; } ya_result zdb_zone_axfr_input_stream_open(input_stream *is, zdb_zone *zone) { ya_result ret; u32 serial; u32 timestamp; char path[PATH_MAX]; serial = zone->axfr_serial; timestamp = zone->axfr_timestamp; while(timestamp == 0) { /* * being written : try to open the axfr.part file * in the event of a success, a stream waiting for the completion of the file will be returned */ if(ISOK(ret = zdb_zone_path_get_provider()( zone->origin, path, sizeof(path) - 6, ZDB_ZONE_PATH_PROVIDER_AXFR_FILE|ZDB_ZONE_PATH_PROVIDER_MKDIR))) { memcpy(&path[ret], ".part", 6); if(ISOK(ret = file_input_stream_open(path, is))) { zdb_zone_axfr_input_stream_data* data; MALLOC_OR_DIE(zdb_zone_axfr_input_stream_data*, data, sizeof(zdb_zone_axfr_input_stream_data), AXFRIS_TAG); data->filtered.data = is->data; data->filtered.vtbl = is->vtbl; data->serial = serial; data->zone = zone; is->data = data; is->vtbl = &zdb_zone_axfr_input_stream_vtbl; return ret; } } if(dnscore_shuttingdown()) { return STOPPED_BY_APPLICATION_SHUTDOWN; } usleep(10000); serial = zone->axfr_serial; timestamp = zone->axfr_timestamp; } /* * already written : try to open the axfr file * in the event of a success, a simple file input stream will be returned */ if(ISOK(ret = zdb_zone_path_get_provider()( zone->origin, path, sizeof(path) - 6, ZDB_ZONE_PATH_PROVIDER_AXFR_FILE|ZDB_ZONE_PATH_PROVIDER_MKDIR))) { ret = file_input_stream_open(path, is); } return ret; } /* ------------------------------------------------------------ */ /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb-zone-journal.c0000644000077100007710000000012412650131756022335 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.399344 30 ctime=1454597652.420344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb-zone-journal.c0000664000077100007710000001137212650131756022146 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup * @ingroup dnsdb * @brief * * Journal API * * * @{ */ #define ZDB_JOURNAL_CODE 1 #include "dnsdb/dnsdb-config.h" #include "dnsdb/zdb-zone-journal.h" #include "dnsdb/journal.h" /** * Returns the first and last serial in the journal of a loaded zone. * If the journal has not been opened yet (and bound to the zone) then it will be. * * @param zone the zone * @param out_serial_from, can be NULL * @param out_serial_to, can be NULL * * @return an error code */ ya_result zdb_zone_journal_get_serial_range(zdb_zone *zone, u32 *out_serial_from, u32 *out_serial_to) { ya_result ret; if(zone->journal == NULL) { journal *please_remove_me; if(FAIL(ret = journal_open(&please_remove_me, zone, FALSE))) { return ret; } #if DEBUG if(zone->journal == NULL) { if(FAIL(ret = journal_open(&please_remove_me, zone, FALSE))) { return ret; } } #endif } ret = journal_get_serial_range(zone->journal, out_serial_from, out_serial_to); return ret; } /** * Opens a stream from the journal for reading an IXFR starting at a given serial. * * @param zone the zone * @param serial the serial to start from * @param out_is the stream to be initialised for reading the IXFR * @param rr the last SOA record, can be NULL * * @return an error code */ ya_result zdb_zone_journal_get_ixfr_stream_at_serial(zdb_zone *zone, u32 serial, input_stream *out_is, dns_resource_record *rr) { ya_result ret; if(zone->journal == NULL) { journal *please_remove_me; if(FAIL(ret = journal_open(&please_remove_me, zone, FALSE))) { return ret; } } ret = journal_get_ixfr_stream_at_serial(zone->journal, serial, out_is, rr); return ret; } /** * Appends an IXFR stream to the journal. * The expected stream lacks the repeated last SOA record at the first and last position. * * @param zone * @param is stream of uncompressed wire records : (SOA DEL DEL DEL ... SOA ADD ADD ADD ...)+ * @return an error code */ ya_result zdb_zone_journal_append_ixfr_stream(zdb_zone *zone, input_stream *is) { ya_result ret; if(zone->journal == NULL) { journal *please_remove_me; if(FAIL(ret = journal_open(&please_remove_me, zone, TRUE))) { return ret; } } ret = journal_append_ixfr_stream(zone->journal, is); return ret; } /** * Deletes the file of the journal of a zone * * @param zone * @return */ ya_result zdb_zone_journal_delete(zdb_zone *zone) { ya_result ret; if(zone->journal == NULL) { journal *please_remove_me; if(FAIL(ret = journal_open(&please_remove_me, zone, FALSE))) { return ret; } } ret = journal_truncate_to_size(zone->journal, 0); journal_close(zone->journal); return ret; } /** * @} */yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/dictionary_btree.c0000644000077100007710000000012412650131756022463 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.396344 30 ctime=1454597652.294344534 yadifa-2.1.6-5826/lib/dnsdb/src/dictionary_btree.c0000664000077100007710000003111412650131756022270 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Dictionary module based on a btree * * Dictionary module based on a btree * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #include #include "dnsdb/zdb_error.h" #include "dnsdb/dictionary.h" #include "dnsdb/dictionary-node.h" /* * */ void dictionary_btree_init(dictionary* dico); void dictionary_btree_destroy(dictionary* dico, dictionary_destroy_record_function destroy); void dictionary_btree_destroy_ex(dictionary* dico, dictionary_destroy_ex_record_function destroyex, void* arg); dictionary_node* dictionary_btree_add(dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare, dictionary_data_record_create_function create); dictionary_node* dictionary_btree_find(const dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare); dictionary_node** dictionary_btree_findp(const dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare); dictionary_node* dictionary_btree_remove(dictionary* dico, hashcode key, void* record_match_data, dictionary_data_record_compare_function compare); ya_result dictionary_btree_process(dictionary* dico, hashcode key, void* record_match_data, dictionary_process_record_function compare); void dictionary_btree_iterator_init(const dictionary* dico, dictionary_iterator* iter); bool dictionary_btree_iterator_hasnext(dictionary_iterator* dico); void** dictionary_btree_iterator_next(dictionary_iterator* dico); void dictionary_btree_iterator_init_from(const dictionary* dico, dictionary_iterator* iter, hashcode key); void dictionary_btree_empties(dictionary* dico, void* bucket, dictionary_bucket_record_function destroy); void dictionary_btree_fills(dictionary* dico, hashcode key, dictionary_node* node); static const struct dictionary_vtbl dictionary_btree_vtbl = { dictionary_btree_destroy, dictionary_btree_add, dictionary_btree_find, dictionary_btree_findp, dictionary_btree_remove, dictionary_btree_process, dictionary_btree_destroy_ex, dictionary_btree_iterator_init, dictionary_btree_iterator_init_from, dictionary_btree_empties, dictionary_btree_fills, "BTREE" }; static const struct dictionary_iterator_vtbl dictionary_iterator_btree_vtbl = { dictionary_btree_iterator_hasnext, dictionary_btree_iterator_next }; void dictionary_btree_init(dictionary* dico) { btree_init(&dico->ct.btree_collection); dico->vtbl = &dictionary_btree_vtbl; dico->count = 0; dico->threshold = ~0; } void dictionary_btree_destroy(dictionary* dico, dictionary_destroy_record_function destroy) { yassert(dico != NULL); if(dico->ct.btree_collection != NULL) { btree_iterator iter; btree_iterator_init(dico->ct.btree_collection, &iter); while(btree_iterator_hasnext(&iter)) { dictionary_node** node_sll_p = (dictionary_node**)btree_iterator_next(&iter); dictionary_node* node = *node_sll_p; *node_sll_p = NULL; while(node != NULL) { dictionary_node* tmp = node; node = node->next; tmp->next = NULL; destroy(tmp); /* free, if any, is made here */ } } btree_destroy(&dico->ct.btree_collection); dico->count = 0; } } void dictionary_btree_destroy_ex(dictionary* dico, dictionary_destroy_ex_record_function destroyex, void* arg) { yassert(dico != NULL); if(dico->ct.btree_collection != NULL) { btree_iterator iter; btree_iterator_init(dico->ct.btree_collection, &iter); while(btree_iterator_hasnext(&iter)) { dictionary_node** node_sll_p = (dictionary_node**)btree_iterator_next(&iter); dictionary_node* node = *node_sll_p; *node_sll_p = NULL; while(node != NULL) { dictionary_node* tmp = node; node = node->next; tmp->next = NULL; destroyex(tmp, arg); /* free, if any, is made here */ } } btree_destroy(&dico->ct.btree_collection); dico->count = 0; } } dictionary_node* dictionary_btree_add(dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare, dictionary_data_record_create_function create) { dictionary_node** node_sll_p = (dictionary_node**)btree_insert(&dico->ct.btree_collection, key); dictionary_node* node = *node_sll_p; while(node != NULL) { if(compare(record_match_data, node)) { return node; } node = node->next; } node = create(record_match_data); node->next = (*node_sll_p); (*node_sll_p) = node; dico->count++; if(dictionary_should_mutate(dico)) { dictionary_mutate(dico); } return node; } dictionary_node* dictionary_btree_find(const dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare) { dictionary_node* node = (dictionary_node*)btree_find(&dico->ct.btree_collection, key); while(node != NULL) { if(compare(record_match_data, node)) { return node; } node = node->next; } return NULL; } dictionary_node** dictionary_btree_findp(const dictionary* dico, hashcode key, const void* record_match_data, dictionary_data_record_compare_function compare) { dictionary_node** node_sll_p = (dictionary_node**)btree_findp(&dico->ct.btree_collection, key); if(node_sll_p != NULL) { while(*node_sll_p != NULL) { if(compare(record_match_data, *node_sll_p)) { return node_sll_p; } node_sll_p = &(*node_sll_p)->next; } } return NULL; } dictionary_node* dictionary_btree_remove(dictionary* dico, hashcode key, void* record_match_data, dictionary_data_record_compare_function compare) { dictionary_node** node_sll_p = (dictionary_node**)btree_findp(&dico->ct.btree_collection, key); dictionary_node* node = *node_sll_p; while(node != NULL) { if(compare(record_match_data, node)) { /* remove sll node * * I could have to remove the tree node too */ dico->count--; /* detach */ if(node->next == NULL) { /* remove tree node for the (now empty) sll */ btree_delete(&dico->ct.btree_collection, key); } else { *node_sll_p = node->next; node->next = NULL; } return node; } node_sll_p = &(node->next); node = node->next; } return NULL; } ya_result dictionary_btree_process(dictionary* dico, hashcode key, void* record_match_data, dictionary_process_record_function process) { dictionary_node** node_sll_p = (dictionary_node**)btree_findp(&dico->ct.btree_collection, key); if(node_sll_p == NULL) { return ZDB_ERROR_KEY_NOTFOUND; /* NOT FOUND */ } const dictionary_node** node_sll_head_p = (const dictionary_node**)node_sll_p; dictionary_node* node = *node_sll_p; while(node != NULL) { dictionary_node* node_next = node->next; int op = process(record_match_data, node); switch(op) { case COLLECTION_PROCESS_NEXT: { node_sll_p = &(node->next); node = node_next; continue; } case COLLECTION_PROCESS_DELETENODE: { /* remove sll node * * I could have to remove the tree node too */ dico->count--; *node_sll_p = node_next; /* detach */ if(*node_sll_head_p == NULL) { /* remove tree node for the (now empty) sll */ btree_delete(&dico->ct.btree_collection, key); } /* fall trough ... return op */ } default: { return op; } } } return COLLECTION_PROCESS_NEXT; } void dictionary_btree_iterator_init(const dictionary *dico, dictionary_iterator *iter) { iter->vtbl = &dictionary_iterator_btree_vtbl; iter->sll = NULL; btree_iterator_init(dico->ct.btree_collection, &iter->ct.as_btree); } void dictionary_btree_iterator_init_from(const dictionary *dico, dictionary_iterator *iter, hashcode key) { iter->vtbl = &dictionary_iterator_btree_vtbl; iter->sll = NULL; btree_iterator_init_from(dico->ct.btree_collection, &iter->ct.as_btree, key); } bool dictionary_btree_iterator_hasnext(dictionary_iterator *iter) { /* If the Single Linked List is empty, fallback on the balanced tree, * else there is something next ... */ return (iter->sll != NULL && iter->sll->next != NULL) ? TRUE : btree_iterator_hasnext(&iter->ct.as_btree) ; } void** dictionary_btree_iterator_next(dictionary_iterator *iter) { void* vpp; if(iter->sll != NULL && iter->sll->next != NULL) { /* pointer is into a sll node */ vpp = &iter->sll->next; iter->sll = iter->sll->next; return vpp; } /* pointer is into a tree node */ vpp = btree_iterator_next(&iter->ct.as_btree); iter->sll = ((dictionary_node*)vpp)->next; return vpp; } void dictionary_btree_empties(dictionary* dico, void* bucket_data, dictionary_bucket_record_function bucket) { yassert(dico != NULL); if(dico->ct.btree_collection != NULL) { btree_iterator iter; btree_iterator_init(dico->ct.btree_collection, &iter); while(btree_iterator_hasnext(&iter)) { btree_node* bnode = (btree_node*)btree_iterator_next_node(&iter); hashcode key = bnode->hash; dictionary_node* node = (dictionary_node*)bnode->data; while(node != NULL) { dictionary_node* tmp = node; node = node->next; tmp->next = NULL; bucket(bucket_data, key, tmp); /* free, if any, is made here */ } } btree_destroy(&dico->ct.btree_collection); dico->count = 0; } } void dictionary_btree_fills(dictionary* dico, hashcode key, dictionary_node* node) { dictionary_node** node_sll_p = (dictionary_node**)btree_insert(&dico->ct.btree_collection, key); node->next = (*node_sll_p); *node_sll_p = node; dico->count++; } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/hash.c0000644000077100007710000000012412650131756020060 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.311344 30 ctime=1454597652.313344534 yadifa-2.1.6-5826/lib/dnsdb/src/hash.c0000664000077100007710000001303012650131756017662 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbcollection Collections used by the database * @ingroup dnsdb * @brief Functions used to hash a dns formatted string * * Implements the functions used to hash a dns formatted string. * There functions require the call to an initialization function (hash_init); * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include "dnsdb/hash.h" #define ZDBHTBL_TAG 0x4c42544842445a /* * [-] * [0;9] * [a;z] * * [2D] * [30;38] * [61;7A] * */ /** * * ['0';'9'] + ['A'/'a';'Z'/'z'] + ['-'] = 37 * */ #define ZDB_HASH_TABLE_CHAR_SET_SIZE 37 extern const u32 ZDB_HASH_TABLE[256][ZDB_HASH_TABLE_CHAR_SET_SIZE]; const u32 ZDB_HASH_TABLE_MAP[256]; const u8* WILD_LABEL = (u8*)"\001*"; const hashcode WILD_HASH; static bool hash_init_done = FALSE; /** @brief Initializes the hash functions * * Initializes the hash function */ void hash_init() { u32 i; if(hash_init_done) { return; } hash_init_done = TRUE; /* It's not big deal if it's done more * than once. I will not use a mutex * for this. */ u32* tmp = (u32*)ZDB_HASH_TABLE_MAP; ZEROMEMORY(tmp, sizeof (ZDB_HASH_TABLE_MAP)); tmp['-'] = 0; for(i = '0'; i <= '9'; i++) { tmp[i] = i - (48 - 1); /* one is taken by '-', '0'=48 */ } for(i = 'A'; i <= 'Z'; i++) { tmp[i] = i - (65 - 11); /* eleven are taken by '-' and '0' .. '9', 'A'=65 */ } for(i = 'a'; i <= 'z'; i++) { tmp[i] = i - (97 - 11); /* eleven are taken by '-' and '0' .. '9', 'a'=97 */ } tmp['*'] = 0; tmp['_'] = 0; hashcode* wild_hashp = (hashcode*) & WILD_HASH; *wild_hashp = hash_dnslabel(WILD_LABEL); } /** @brief Compute the hash code of a pascal name * * Compute the hash code of a pascal name. * The function hash_init() MUST be called once first. (This requirement will be lifted later) * An interesting thing about a dnsname label : it's a pascal string. * * @param[in] pascal_name the name in pascal form * * @return the hash code as a 32 bits integer */ hashcode hash_pascalname(const u8* pascal_name) { assert(pascal_name != NULL); u32 idx = 1; /* idx points into the HASH_TABLE */ /* I could initialize it to a hiher value (ie: 255) and * decrease it instead of the current behaviour. * This would allow to put a cpu-cheap limit on the * amount of chars taken in account in the hash computation. */ u32 len = *pascal_name++; u32 hash = ZDB_HASH_TABLE[len][0]; while(len-- > 0) { hash += ZDB_HASH_TABLE[idx++][ZDB_HASH_TABLE_MAP[*pascal_name++]]; } return hash; } /** @brief Compute the hash code of an asciiz name * * Compute the hash code of a pascal name from its asciiz form. * The function hash_init() MUST be called once first. (This requirement will be lifted later) * * @param[in] pascal_name the name in asciiz form * * @return the hash code as a 32 bits integer */ hashcode hash_asciizname(const char* asciiz_name) { assert(asciiz_name != NULL); u32 idx = 1; /* idx points into the HASH_TABLE */ /* I could initialize it to a hiher value (ie: 255) and * decrease it instead of the current behaviour. * This would allow to put a cpu-cheap limit on the * amount of chars taken in account in the hash computation. */ u32 len = (u32)strlen(asciiz_name); u32 hash = ZDB_HASH_TABLE[len][0]; while(len-- > 0) { hash += ZDB_HASH_TABLE[idx++][ZDB_HASH_TABLE_MAP[(u8)(*asciiz_name++)]]; } return hash; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/journal-cjf-idxt.c0000644000077100007710000000012412650131756022315 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.392344 30 ctime=1454597652.344344534 yadifa-2.1.6-5826/lib/dnsdb/src/journal-cjf-idxt.c0000664000077100007710000005674512650131756022143 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /******************************************************************************* * * Indexes table handling functions * * These are the tables containing offsets to a serial * They are linked together * They are often referenced by an unique table of indexes * ******************************************************************************/ #define JOURNAL_CJF_BASE 1 #include "dnsdb/dnsdb-config.h" #include "dnsdb/journal-cjf-page-cache.h" #include "dnsdb/journal-cjf-idxt.h" #include "dnsdb/journal-cjf-common.h" #include #include #include #include #include #include #include extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #define CJF_IDXT_SLOT_SIZE 8 /** * Creates an empty table of indexes (IDXT) for the journal, with a minimum number of entries. * Nothing is written to disk. * * @param jnl * @param entries */ void journal_cjf_idxt_create(journal_cjf *jnl, s16 entries) { yassert(jnl->idxt.size == 0); yassert(entries >= 0); jnl->idxt.count = 1; jnl->idxt.first = 0; jnl->idxt.size = entries + 1; jnl->idxt.dirty = TRUE; jnl->idxt.marked = 0; MALLOC_OR_DIE(journal_cjf_idxt_tbl_item*, jnl->idxt.entries, sizeof(journal_cjf_idxt_tbl_item) * jnl->idxt.size, GENERIC_TAG); ZEROMEMORY(jnl->idxt.entries, sizeof(journal_cjf_idxt_tbl_item) * jnl->idxt.size); jnl->idxt.entries[0].last_serial = jnl->serial_begin; jnl->idxt.entries[0].file_offset = jnl->last_page.file_offset; jnl->first_page_offset = jnl->last_page.file_offset; } /** * Loads (or rebuilds) the table of indexes (IDXT) * * @param jnl */ void journal_cjf_idxt_load(journal_cjf *jnl) { yassert(jnl->idxt.size == 0); // the file is opened if(jnl->page_table_file_offset != 0) { log_debug1("journal_cjf_idxt_load: loading stored IDXT from '%s'", jnl->journal_file_name); // load lseek(jnl->fd, jnl->page_table_file_offset, SEEK_SET); input_stream fis; input_stream is; fd_input_stream_attach(&fis, jnl->fd); buffer_input_stream_init(&fis, &is, 512); u8 magic[4]; input_stream_read(&is, magic, 4); u32 *magic_u32p = (u32*)&magic[0]; if(*magic_u32p == CJF_IDXT_MAGIC) { s16 count; input_stream_read(&is, (u8*)&count , 2); journal_cjf_idxt_create(jnl, count + 1); input_stream_read(&is, (u8*)&jnl->idxt.entries[0], count * CJF_IDXT_SLOT_SIZE); fd_input_stream_detach(buffer_input_stream_get_filtered(&is)); input_stream_close(&is); jnl->idxt.count = count; return; } // ERROR, need to rebuild } log_debug1("journal_cjf_idxt_load: rebuilding IDXT from '%s', following the PAGE", jnl->journal_file_name); // rebuild journal_cjf_page_tbl_item *tbl; u32 size = 512; journal_cjf_page_tbl_item tmp_tbl[512]; tbl = tmp_tbl; if(jnl->first_page_offset < JOURNAL_CJF_PAGE_HEADER_SIZE) { // the PAGE chain has been lost : start from HEAD and follow the chain // then after the 0, scan from the furthest known byte for PAGE+offset // and follow until the chain points back to offset sizeof(head) } // read the PAGE chain from the file (no caching) u32 index_offset = jnl->first_page_offset; journal_cjf_page_tbl_header page_header; journal_cjf_page_tbl_item page_last_item; s16 idx = 0; do { // move to the page offset and read the header log_debug2("journal_cjf_idxt_load: reading '%s' PAGE header at %x", jnl->journal_file_name, index_offset); lseek(jnl->fd, index_offset, SEEK_SET); if(readfully(jnl->fd, &page_header, JOURNAL_CJF_PAGE_HEADER_SIZE) != JOURNAL_CJF_PAGE_HEADER_SIZE) // next offset { log_err("journal_cjf_idxt_load: '%s' is too corrupt to go on further reading PAGE header at %x", jnl->journal_file_name, index_offset); break; } /* if(page_header.magic != CJF_PAGE_MAGIC) { // corrupt } */ if(page_header.count > 0) { u32 tail_offset = (page_header.count - 1) * CJF_SECTION_INDEX_SLOT_SIZE; log_debug2("journal_cjf_idxt_load: reading '%s' PAGE tail at %x", jnl->journal_file_name, index_offset + tail_offset); // the last serial is on the last slot lseek(jnl->fd, tail_offset, SEEK_CUR); if(readfully(jnl->fd, &page_last_item, JOURNAL_CJF_PAGE_ITEM_SIZE) != JOURNAL_CJF_PAGE_ITEM_SIZE) { log_err("journal_cjf_idxt_load: '%s' is too corrupt to go on further reading PAGE tail at %x", jnl->journal_file_name, index_offset + CJF_SECTION_INDEX_SIZE - CJF_SECTION_INDEX_SLOT_HEAD - CJF_SECTION_INDEX_SLOT_SIZE); break; } } else { // corrupt ? } // if there is a next page ... if(idx == size) { log_debug2("journal_cjf_idxt_load: growing IDXT table from %i to %i", size, size * 2); journal_cjf_page_tbl_item *tmp; MALLOC_OR_DIE(journal_cjf_page_tbl_item*, tmp, JOURNAL_CJF_PAGE_ITEM_SIZE * size * 2, GENERIC_TAG); memcpy(tmp, tbl, JOURNAL_CJF_PAGE_ITEM_SIZE * size); if(tbl != tmp_tbl) { free(tbl); } tbl = tmp; size *= 2; } tbl[idx].stream_file_offset = index_offset; tbl[idx].ends_with_serial = page_last_item.ends_with_serial; log_debug2("journal_cjf_idxt_load: IDXT[%3i] = {%8x, %u}", idx, index_offset, page_last_item.ends_with_serial); ++idx; index_offset = page_header.next_page_offset; } while(index_offset != 0); log_debug1("journal_cjf_idxt_load: IDXT table has size %i", idx + 1); journal_cjf_idxt_create(jnl, idx + 1); memcpy(jnl->idxt.entries, tbl, JOURNAL_CJF_PAGE_ITEM_SIZE * idx); jnl->idxt.count = idx; } /** * * Writes the indexes table (IDXT) to the disk, if needed. * Updates the header on disk accordingly. * Clears the "dirty" and "makred" flags. * * @param jnl */ void journal_cjf_idxt_flush(journal_cjf *jnl) { // write the table on disk if not done already if(!jnl->idxt.dirty) { return; } if(jnl->fd < 0) { log_err("cjf: no file descriptor but index table is dirty", jnl->journal_file_name, jnl->fd); return; } // write the table at the end off_t end = lseek(jnl->fd, jnl->last_page.records_limit, SEEK_SET); if(end < 0) { log_err("cjf: forward to end of PAGE chain failed: %r", ERRNO_ERROR); logger_flush(); abort(); } yassert(end == jnl->last_page.records_limit); output_stream fos; output_stream os; jnl->page_table_file_offset = jnl->last_page.records_limit; journal_cjf_set_dirty(jnl); log_debug3("cjf: flushing IDXT %u indexes at %08x", jnl->idxt.count, jnl->page_table_file_offset); fd_output_stream_attach(&fos, jnl->fd); buffer_output_stream_init(&fos, &os, 512); output_stream_write(&os, (const u8*)"IDXT", 4); output_stream_write(&os, (const u8*)&jnl->idxt.count , 2); for(s16 idx = 0; idx < jnl->idxt.count; idx++) { output_stream_write(&os, (const u8*)&jnl->idxt.entries[(jnl->idxt.first + idx) % jnl->idxt.size], CJF_IDXT_SLOT_SIZE); } output_stream_write(&os, (const u8*)"END", 4); // yes, with the '\0' at the end output_stream_flush(&os); fd_output_stream_detach(buffer_output_stream_get_filtered(&os)); output_stream_close(&os); // write the table offset jnl_header_flush(jnl); #if DO_SYNC log_debug3("cjf: syncing to disk"); fsync(jnl->fd); #endif jnl->idxt.dirty = FALSE; jnl->idxt.marked = FALSE; #if _BSD_SOURCE || _XOPEN_SOURCE >= 500 || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED || /* Since glibc 2.3.5: */ _POSIX_C_SOURCE >= 200112L u32 file_size = jnl->last_page.records_limit + 4 + 2 + 4 + jnl->idxt.count * CJF_IDXT_SLOT_SIZE; ftruncate(jnl->fd, file_size); #endif } /** * * Flushes the IDXT to disk if needed, then destroys the structure content. * * @param jnl */ void journal_cjf_idxt_destroy(journal_cjf *jnl) { journal_cjf_idxt_flush(jnl); free(jnl->idxt.entries); jnl->idxt.entries = NULL; jnl->idxt.size = 0; jnl->idxt.first = 0; jnl->idxt.count = 0; } /** * * Returns the file offset value at index in the current IDXT * * @param jnl * @param index * @return */ u32 journal_cjf_idxt_get_file_offset(journal_cjf *jnl, s16 index) { yassert(index >= 0);yassert(jnl->idxt.first >= 0); journal_cjf_idxt_tbl_item *entry; entry = &jnl->idxt.entries[(jnl->idxt.first + index) % jnl->idxt.size]; return entry->file_offset; } u32 journal_cjf_idxt_get_last_file_offset(journal_cjf *jnl) { if(jnl->idxt.count > 0) { u32 n = journal_cjf_idxt_get_file_offset(jnl, jnl->idxt.count - 1); return n; } else { return 0; } } /** * * Returns the last serial number value at index in the IDXT * * @param jnl * @param index * @return */ u32 journal_cjf_idxt_get_last_serial(journal_cjf *jnl, s16 index) { journal_cjf_idxt_tbl_item *entry; entry = &jnl->idxt.entries[(jnl->idxt.first + index) % jnl->idxt.size]; return entry->last_serial; } /** * Updates the value of the last serial at current position in the PAGE * * @param jnl * @param last_serial */ void journal_cjf_idxt_update_last_serial(journal_cjf *jnl, u32 last_serial) { yassert(jnl->idxt.size > 0); journal_cjf_idxt_tbl_item *entry; entry = &jnl->idxt.entries[(jnl->idxt.first + jnl->idxt.count - 1) % jnl->idxt.size]; log_debug2("cjf: IDXT current (%i) PAGE serial from %08x to %08x", jnl->idxt.count - 1, entry->last_serial, last_serial); entry->last_serial = last_serial; jnl->idxt.dirty = TRUE; } /** * Appends an PAGE table after the current one * @todo edf update the current PAGE next pointer * * @param jcs * @param size_hint */ static void journal_cjf_idxt_append_page_nogrow(journal_cjf *jnl) { yassert(jnl->idxt.size > 0); journal_cjf_idxt_tbl_item *entry; jnl_page *page = &jnl->last_page; u32 page_offset = page->file_offset; log_debug_jnl(jnl, "cjf: journal_cjf_idxt_append_page_nogrow: BEFORE"); yassert(page->count <= page->size); page->size = page->count; if(jnl->idxt.count < jnl->idxt.size) { // there is still room left in the file log_debug2("cjf: append PAGE at [%i] offset %u (%08x)", jnl->idxt.count, page->records_limit, page->records_limit); entry = &jnl->idxt.entries[(jnl->idxt.first + jnl->idxt.count) % jnl->idxt.size]; jnl->idxt.count++; entry->last_serial = page->serial_end; entry->file_offset = page->records_limit; } else { // there is no room left thus we will replace the first page (increasing the first slot position) // overwrite of the start of the cyclic data, update the journal /* * No grow happens when the file is too big and we are about to loop */ u32 first_page_offset = journal_cjf_idxt_get_file_offset(jnl, 0); log_debug2("cjf: append PAGE at [%i] offset %u (%08x), losing first PAGE", jnl->idxt.count, first_page_offset, first_page_offset); entry = &jnl->idxt.entries[(jnl->idxt.first) % jnl->idxt.size]; yassert(jnl->first_page_offset == entry->file_offset); // removes first page, adjusts current PAGE offset_limit journal_cjf_remove_first_page(jnl); // will decrease the count and move the first jnl->idxt.count++; entry->last_serial = page->serial_end; entry->file_offset = first_page_offset; // update the section with the values for the next one } // update the section with the values for the next one page->file_offset = entry->file_offset; page->count = 0; page->size = CJF_SECTION_INDEX_SLOT_COUNT; page->records_limit = page->file_offset + CJF_SECTION_INDEX_SIZE; if(page->file_offset >= jnl->first_page_offset) { page->file_offset_limit = jnl->file_maximum_size; } else { page->file_offset_limit = jnl->first_page_offset; } page->serial_start = entry->last_serial; page->serial_end = entry->last_serial; // update the next pointer of the previous PAGE // CFJ_PAGE_CACHE -> log_debug3("cjf: updating PAGE chain (@%08x = %08x)", page_offset, page->file_offset); journal_cjf_page_tbl_header current_page_header; journal_cjf_page_cache_read_header(jnl->fd, page_offset, ¤t_page_header); current_page_header.next_page_offset = page->file_offset; journal_cjf_page_cache_write_header(jnl->fd, page_offset, ¤t_page_header); // writes an empty PAGE table for the current (new) PAGE log_debug3("cjf: writing new empty PAGE"); journal_cjf_page_cache_write_new_header(jnl->fd, page->file_offset); // CFJ_PAGE_CACHE <- // the IDXT had some changes that need flushing jnl->idxt.dirty = TRUE; // only mark the file about its changes once if(!jnl->idxt.marked) { jnl->page_table_file_offset = 0; jnl->idxt.marked = TRUE; } journal_cjf_page_cache_flush(jnl->fd); jnl_header_flush(jnl); #if DO_SYNC log_debug3("cjf: syncing to disk"); fsync(jnl->fd); #endif log_debug_jnl(jnl, "cjf: journal_cjf_idxt_append_page_nogrow: AFTER"); } /** * * Grows the IDTX table by one slot * * @param jnl */ static void journal_cjf_idxt_grow(journal_cjf *jnl) { yassert(jnl->idxt.size > 0); log_debug2("cjf: growing IDXT table to %u slots", jnl->idxt.size + 1); journal_cjf_idxt_tbl_item *tmp; MALLOC_OR_DIE(journal_cjf_idxt_tbl_item*, tmp, sizeof(journal_cjf_idxt_tbl_item) * (jnl->idxt.size + 1), GENERIC_TAG); for(s16 idx = 0; idx < jnl->idxt.count; idx++) { tmp[idx] = jnl->idxt.entries[(jnl->idxt.first + idx) % jnl->idxt.size]; } ++jnl->idxt.size; for(s16 idx = jnl->idxt.count; idx < jnl->idxt.size; idx++) { tmp[idx].last_serial = 0; tmp[idx].file_offset = 0; } log_debug_jnl(jnl, "cjf: journal_cjf_idxt_grow: BEFORE"); free(jnl->idxt.entries); jnl->idxt.entries = tmp; jnl->idxt.first = 0; log_debug_jnl(jnl, "cjf: journal_cjf_idxt_grow: AFTER"); } /** * Ensures there is at least one empty available PAGE slot in the IDTX * * @param jnl */ static void journal_cjf_idxt_ensure_growth(journal_cjf *jnl) { log_debug2("cjf: ensuring IDXT growth"); if(jnl->idxt.count == jnl->idxt.size) { journal_cjf_idxt_grow(jnl); } } /** * * Prevent the IDXT table from growing further * * @param jnl */ static void journal_cjf_idxt_fix_size(journal_cjf *jnl) { yassert(jnl->idxt.size > 0); yassert(jnl->idxt.size >= jnl->idxt.count); if(jnl->idxt.size != jnl->idxt.count) { log_debug2("cjf: fixing IDXT size from %u to %u", jnl->idxt.size, jnl->idxt.count); journal_cjf_idxt_tbl_item *tmp; MALLOC_OR_DIE(journal_cjf_idxt_tbl_item*, tmp, sizeof(journal_cjf_idxt_tbl_item) * (jnl->idxt.count), GENERIC_TAG); for(s16 i = 0; i < jnl->idxt.count; ++i) { tmp[i] = jnl->idxt.entries[(jnl->idxt.first + i) % jnl->idxt.size]; } #if DEBUG memset(jnl->idxt.entries, 0xfe, sizeof(journal_cjf_idxt_tbl_item) * jnl->idxt.size); #endif free(jnl->idxt.entries); jnl->idxt.entries = tmp; jnl->idxt.first = 0; jnl->idxt.size = jnl->idxt.count; } else { log_debug2("cjf: fixing IDXT size to %u (nothing to do)", jnl->idxt.count); } } /** * Appends an PAGE after this one * * @param jnl */ void journal_cjf_idxt_append_page(journal_cjf *jnl) { // where are we in the file ? log_debug2("cjf: PAGE: @%08x -> %08x ... %08x [%08x; %08x]", jnl->last_page.file_offset, jnl->last_page.records_limit, jnl->last_page.file_offset_limit, jnl->last_page.serial_start, jnl->last_page.serial_end); // if the PAGE (offset) is before the first PAGE (offset) if(jnl->last_page.file_offset < jnl->first_page_offset) { log_debug2("cjf: IDXT adding PAGE (middle of the file)"); // we are in the middle of the physical file (meaning, physically before the first PAGE in the logical order) yassert(jnl->last_page.records_limit <= jnl->first_page_offset); // ensure there is enough room after us // while there is not enough room, remove one page while(jnl->first_page_offset - jnl->last_page.records_limit < CJF_SECTION_INDEX_SIZE + CJF_PAGE_ARBITRARY_UPDATE_SIZE) { journal_cjf_remove_first_page(jnl); if(jnl->last_page.file_offset >= jnl->first_page_offset) { break; } } // we made room or we reached a limit before we got enough yassert(jnl->first_page_offset - jnl->last_page.records_limit >= CJF_SECTION_INDEX_SIZE + CJF_PAGE_ARBITRARY_UPDATE_SIZE); // make the IDXT grow if it full already journal_cjf_idxt_ensure_growth(jnl); // create a new page at jnl->page.offset_next } else { // we are at the end of the physical file log_debug2("cjf: IDXT adding PAGE (end of the file)"); /// @note edf 20150210 -- A journal cannot loop with only one PAGE // if it is expected to go beyond the maximum size with the next update, prevent the growth of the idtx table // if we don't have at least two PAGE, then continue to grow the IDXT const bool has_at_least_two_pages = (jnl->idxt.count > 1); const bool too_close_to_the_file_size_limit = (jnl->last_page.records_limit + CJF_SECTION_INDEX_SIZE + CJF_PAGE_ARBITRARY_UPDATE_SIZE > jnl->file_maximum_size); if(has_at_least_two_pages && too_close_to_the_file_size_limit) { journal_cjf_idxt_fix_size(jnl); } else { journal_cjf_idxt_ensure_growth(jnl); } // create a new page in the idxt } journal_cjf_idxt_append_page_nogrow(jnl); } /* scans all the PAGE entries from the IDXT and get the one that contains the serial */ ya_result journal_cjf_idxt_get_page_index_from_serial(journal_cjf *jnl, u32 serial) { u32 prev = jnl->serial_begin; if(serial_lt(serial, prev)) { return ZDB_JOURNAL_SERIAL_OUT_OF_KNOWN_RANGE; } u32 prev_serial = jnl->serial_begin; /// @todo edf 20150115 -- do a dichotomy instead s16 n = jnl->idxt.count; for(s16 i = 0; i < n; i++) { journal_cjf_idxt_tbl_item *entry; entry = &jnl->idxt.entries[(jnl->idxt.first + i) % jnl->idxt.size]; // the last serial of an entry is the one of the last SOA added on it // we want to start after that one if(serial_lt(serial, entry->last_serial)) { log_debug1("journal_cjf_idxt_get_page_index_from_serial(%s, %d) returning %i (%i -> %i)", jnl->journal_file_name, serial, i, prev_serial, entry->last_serial); return i; } prev_serial = entry->last_serial; } return ZDB_JOURNAL_SERIAL_OUT_OF_KNOWN_RANGE; } ya_result journal_cjf_idxt_get_page_serial_from_index(journal_cjf *jnl, int idx) { if(idx > 0) { journal_cjf_idxt_tbl_item *prev_entry; prev_entry = &jnl->idxt.entries[(jnl->idxt.first + idx - 1) % jnl->idxt.size]; return prev_entry->last_serial; } else { return jnl->serial_begin; } } ya_result journal_cjf_idxt_get_page_offset_from_serial(journal_cjf *jnl, u32 serial, u32 *file_offset) { u32 prev = jnl->serial_begin; if(serial_lt(serial, prev)) { return ZDB_JOURNAL_SERIAL_OUT_OF_KNOWN_RANGE; } u32 prev_serial = jnl->serial_begin; /// @todo edf 20150115 -- do a dichotomy instead s16 n = jnl->idxt.count; for(s16 i = 0; i < n; i++) { journal_cjf_idxt_tbl_item *entry; entry = &jnl->idxt.entries[(jnl->idxt.first + i) % jnl->idxt.size]; if(serial_le(serial, entry->last_serial)) { log_debug1("journal_cjf_idxt_get_page_index_from_serial(%s, %d) returning %i (%i -> %i)", jnl->journal_file_name, serial, i, prev_serial, entry->last_serial); if(file_offset != NULL) { *file_offset = entry->file_offset; } return i; } prev_serial = entry->last_serial; } return ZDB_JOURNAL_SERIAL_OUT_OF_KNOWN_RANGE; } ya_result journal_cjf_idxt_get_page_serial_to(journal_cjf *jnl, int idx) { journal_cjf_idxt_tbl_item *entry; entry = &jnl->idxt.entries[(jnl->idxt.first + idx) % jnl->idxt.size]; return entry->last_serial; } u32 journal_cjf_idxt_get_page_offset(journal_cjf *jnl, int idx) { journal_cjf_idxt_tbl_item *entry; entry = &jnl->idxt.entries[(jnl->idxt.first + idx) % jnl->idxt.size]; return entry->file_offset; } yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec3_update.c0000644000077100007710000000012412650131756021512 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.454344 30 ctime=1454597652.546344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec3_update.c0000664000077100007710000007227212650131756021331 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include #include "dnsdb/zdb_types.h" #include "dnsdb/zdb_zone_label_iterator.h" #include "dnsdb/zdb_record.h" #include "dnsdb/nsec3_update.h" #include "dnsdb/nsec_common.h" #include "dnsdb/nsec3_owner.h" #include "dnsdb/rrsig.h" #include "dnsdb/zdb_listener.h" #include "dnsdb/zdb_zone.h" #define MODULE_MSG_HANDLE g_dnssec_logger extern logger_handle *g_dnssec_logger; #ifndef DEBUG #undef NSEC3_UPDATE_ZONE_DEBUG #define NSEC3_UPDATE_ZONE_DEBUG 0 #endif /* * Takes the result of an update and commits it to the label */ void nsec3_update_rrsig_commit(zdb_packed_ttlrdata *removed_rrsig_sll, zdb_packed_ttlrdata *added_rrsig_sll, nsec3_zone_item *item, zdb_zone *zone) { /* * NOTE: NSEC3 records have no associated label. (Not really, not in the zone-contained-label sense from the DB ) * * * I have all the information available in the zone item. */ zdb_listener_notify_update_nsec3rrsig(zone, removed_rrsig_sll, added_rrsig_sll, item); zdb_packed_ttlrdata *sig; zdb_packed_ttlrdata **rrsig_sllp = &item->rrsig; /* * For each removed signature: * * Find it in the label's RRSIG list, then remove it: * ZFREE + MFREE * */ sig = removed_rrsig_sll; while(sig != NULL) { /* * Look for the RRSIG * */ zdb_packed_ttlrdata **rrsig_recordp = rrsig_sllp; zdb_packed_ttlrdata *rrsig_record = *rrsig_recordp; /* This is why my "next" pointer is ALWAYS the first field */ #ifdef DEBUG rdata_desc rdatadesc = {TYPE_RRSIG, ZDB_PACKEDRECORD_PTR_RDATASIZE(sig), ZDB_PACKEDRECORD_PTR_RDATAPTR(sig)}; log_debug("rrsig: deleting: %{digest32h} %{typerdatadesc}", item->digest, &rdatadesc); #endif while(rrsig_record != NULL) { /* * Check if the COVERED TYPE + TAG are matching */ if(ZDB_PACKEDRECORD_PTR_RDATASIZE(sig) == ZDB_PACKEDRECORD_PTR_RDATASIZE(sig)) { if(memcmp(ZDB_PACKEDRECORD_PTR_RDATAPTR(rrsig_record), ZDB_PACKEDRECORD_PTR_RDATAPTR(sig), RRSIG_RDATA_HEADER_LEN) == 0) { /* u16 type = RRSIG_TYPE_COVERED(*sig); log_debug("rrsig_update_commit : '%{dnsname}' removing RRSIG %{dnstype}",label->name,&type); */ *rrsig_recordp = rrsig_record->next; #ifdef DEBUG rrsig_record->next = (zdb_packed_ttlrdata*)~0; #endif ZDB_RECORD_ZFREE(rrsig_record); /* * I can stop here. */ break; } } rrsig_recordp = &rrsig_record->next; rrsig_record = *rrsig_recordp; } zdb_packed_ttlrdata* tmp = sig; sig = sig->next; free(tmp); } /* * For each added signature: * * Add it: * * ZFREE + MFREE * */ sig = added_rrsig_sll; while(sig != NULL) { zdb_packed_ttlrdata* rrsig_record; /* u16 type = RRSIG_TYPE_COVERED(*sig); log_debug("rrsig_update_commit : '%{dnsname}' adding RRSIG %{dnstype}",label->name,&type); */ #ifdef DEBUG rdata_desc rdatadesc={TYPE_RRSIG, ZDB_PACKEDRECORD_PTR_RDATASIZE(sig), ZDB_PACKEDRECORD_PTR_RDATAPTR(sig)}; log_debug("rrsig: adding: %{digest32h} %{typerdatadesc}", item->digest, &rdatadesc); #endif ZDB_RECORD_ZALLOC(rrsig_record, sig->ttl, ZDB_PACKEDRECORD_PTR_RDATASIZE(sig), ZDB_PACKEDRECORD_PTR_RDATAPTR(sig)); rrsig_record->next = *rrsig_sllp; *rrsig_sllp = rrsig_record; zdb_packed_ttlrdata* tmp = sig; sig = sig->next; free(tmp); } } bool nsec3_is_label_covered(zdb_rr_label *label, bool opt_out) { bool opt_in = !opt_out; bool skip_children = FALSE; bool nsec3_covered = FALSE; //bool force_rrsig = FALSE; if(!ZDB_LABEL_ISAPEX(label)) /* Not the origin (The apex of a zone has got a '.' label */ { if(ZDB_LABEL_ATDELEGATION(label)) { skip_children = TRUE; bool has_ds = zdb_record_find(&label->resource_record_set, TYPE_DS) != NULL; nsec3_covered = opt_in|has_ds; //force_rrsig = has_ds; /* * After processing this node, the brother will be processed. */ } else if(ZDB_LABEL_UNDERDELEGATION(label)) { /* An empty non-terminal must only be signed if it does not end on a non-secure delegation */ nsec3_covered = false; skip_children = true; //force_rrsig = false; } else { /* An empty non-terminal must only be signed if it does not end on a non-secure delegation */ bool notempty = !zdb_record_isempty(&label->resource_record_set); nsec3_covered = notempty; //force_rrsig = notempty; } } else { /* * We are at the origin: * * Records => RRSIG */ nsec3_covered = TRUE; } if(!skip_children) { /* for all children */ dictionary_iterator iter; dictionary_iterator_init(&label->sub, &iter); while(dictionary_iterator_hasnext(&iter)) { zdb_rr_label *sub_label = *(zdb_rr_label**)dictionary_iterator_next(&iter); /* if a child has been signed, then this one will be too */ nsec3_covered |= nsec3_is_label_covered(sub_label, opt_out); } } /* * If it's opt-out and we are not forced to sign, then skip to the next one */ if(opt_out && !nsec3_covered) { // n3 = n3->next; return FALSE; } return nsec3_covered; } typedef struct nsec3_update_zone_nsec3_nodes_recursive_args nsec3_update_zone_nsec3_nodes_recursive_args; struct nsec3_update_zone_nsec3_nodes_recursive_args { zdb_zone* zone; s32 label_stack_level; u32 origin_len; u32 min_ttl; u8 nsec3_flags; bool opt_out; zdb_rr_label *label_stack[128]; u8 name[2 + MAX_DOMAIN_LENGTH]; u8 digest[1 + MAX_DIGEST_LENGTH]; u32 internal_statistics_label_count; u32 internal_statistics_delegation_count; u32 internal_statistics_nsec3_count; type_bit_maps_context type_context; }; static bool nsec3_update_label_nsec3_nodes_recursive(nsec3_update_zone_nsec3_nodes_recursive_args *commonargs) { /* retrieve context */ zdb_zone* zone = commonargs->zone; s32 label_stack_level = commonargs->label_stack_level; u32 origin_len = commonargs->origin_len; bool opt_out = commonargs->opt_out; bool opt_in = !opt_out; zdb_rr_label **label_stack = &commonargs->label_stack[0]; u8 *name = &commonargs->name[0]; u8 *digest = &commonargs->digest[0]; type_bit_maps_context *type_context = &commonargs->type_context; u8 nsec3_flags = commonargs->nsec3_flags; u32 min_ttl = commonargs->min_ttl; /* build the current name */ #if NSEC3_UPDATE_ZONE_DEBUG u8 debug_name[MAX_DOMAIN_LENGTH]; { u8 *p = debug_name; for(s32 sp = label_stack_level; sp > 0; sp--) { u8 *q = label_stack[sp]->name; u8 len = *q + 1; memcpy(p, q, len); p += len; } memcpy(p, zone->origin, origin_len); log_debug("nsec3_update_label_nsec3_nodes_recursive(%3d, %{dnsname}) : enter", label_stack_level, debug_name); } #endif bool skip_children = FALSE; bool nsec3_covered = FALSE; bool force_rrsig = TRUE; zdb_rr_label *label = label_stack[label_stack_level]; commonargs->internal_statistics_label_count++; yassert((label->flags & ZDB_RR_LABEL_NSEC) == 0); /* Bad, this should not be called on an NSEC zone */ /* * First check the delegation */ if(!ZDB_LABEL_ISAPEX(label)) /* Not the origin (The apex of a zone has got a '.' label */ { if(ZDB_LABEL_ATDELEGATION(label)) { /** * Delegation. */ #if NSEC3_UPDATE_ZONE_DEBUG log_debug("nsec3_update_label_nsec3_nodes_recursive(%3d, %{dnsname}) : delegation", label_stack_level, debug_name); #endif commonargs->internal_statistics_delegation_count++; skip_children = TRUE; bool has_ds = zdb_record_find(&label->resource_record_set, TYPE_DS) != NULL; nsec3_covered = opt_in|has_ds; force_rrsig = has_ds; /* * After processing this node, the brother will be processed. */ } else if(ZDB_LABEL_UNDERDELEGATION(label)) { nsec3_covered = FALSE; force_rrsig = FALSE; skip_children = TRUE; } else { /* An empty non-terminal must only be signed if it does not end on a non-secure delegation */ bool notempty = !zdb_record_isempty(&label->resource_record_set); #if NSEC3_UPDATE_ZONE_DEBUG log_debug("nsec3_update_label_nsec3_nodes_recursive(%3d, %{dnsname}) : %s", label_stack_level, debug_name, (notempty)?"not empty":"empty"); #endif nsec3_covered = notempty; force_rrsig = notempty; } } else { /* * We are at the origin: * * Records => RRSIG */ nsec3_covered = TRUE; #if NSEC3_UPDATE_ZONE_DEBUG log_debug("nsec3_update_label_nsec3_nodes_recursive(%3d, %{dnsname}) : apex", label_stack_level, debug_name); #endif } if(!skip_children) { /* for all children */ commonargs->label_stack_level++; dictionary_iterator iter; dictionary_iterator_init(&label->sub, &iter); while(dictionary_iterator_hasnext(&iter)) { zdb_rr_label *sub_label = *(zdb_rr_label**)dictionary_iterator_next(&iter); /* if a child has been signed, then this one will be too */ commonargs->label_stack[commonargs->label_stack_level] = sub_label; nsec3_covered |= nsec3_update_label_nsec3_nodes_recursive(commonargs); } commonargs->label_stack_level--; } /* * If it's opt-out and we are not forced to sign, then skip to the next one */ if(opt_out && !nsec3_covered) { // n3 = n3->next; #if NSEC3_UPDATE_ZONE_DEBUG log_debug("nsec3_update_label_nsec3_nodes_recursive(%3d, %{dnsname}) : exit", label_stack_level, debug_name); #endif return FALSE; } #if NSEC3_UPDATE_ZONE_DEBUG log_debug("nsec3_update_label_nsec3_nodes_recursive(%3d, %{dnsname}) : add", label_stack_level, debug_name); #endif u32 name_len; { u8 *p = name; for(s32 sp = label_stack_level; sp > 0; sp--) { u8 *q = label_stack[sp]->name; u8 len = *q + 1; memcpy(p, q, len); p += len; } memcpy(p, zone->origin, origin_len); name_len = (p - name) + origin_len; } /* * This label can now be processed for NSEC3 */ u16 type_bit_maps_size = type_bit_maps_initialize(type_context, label, FALSE, force_rrsig); nsec3_zone* n3 = zone->nsec.nsec3; nsec3_label_extension* n3ext = label->nsec.nsec3; /* * n3ext will be NULL if the zone is marked as loading and labels are * added after the NSEC3PARAM * * (loading is an optimisation that I'm setting up) */ /* * Create all missing NSEC3 extensions for the label * Each NSEC3PARAM is the head of an NSEC3 chain * They are stored in a linked list in the zone * Each label that is nsec3 covered has a non-null nsec3 label extension that is a linked list to reference nsec3 items * The position in the NSEC3PARAM list must match the position in the nsec3 label extension list * * New nodes are append at the end of the list * The internal resolver will only ever use the first item of the list */ if(n3ext == NULL) { nsec3_label_extension* n3ext_first = NULL; do { ZALLOC_OR_DIE(nsec3_label_extension*, n3ext, nsec3_label_extension, NSEC3_LABELEXT_TAG); // in nsec3_update_label_nsec3_nodes_recursive n3ext->self = NULL; n3ext->star = NULL; n3ext->next = n3ext_first; // add this (potentially empty) node in the nsec3 chain n3ext_first = n3ext; n3 = n3->next; } while(n3 != NULL); label->nsec.nsec3 = n3ext_first; label->flags |= ZDB_RR_LABEL_NSEC3; n3ext = n3ext_first; n3 = zone->nsec.nsec3; } /* For each NSEC3PARAM */ do { yassert(n3ext != NULL); /* The label is supposed to be ready */ /* * If the NSEC3 extension has not been set up yet */ if(n3ext->self == NULL) { /* * Retrieve the NSEC3 hash algorithm size */ digest[0] = nsec3_hash_len(NSEC3_ZONE_ALGORITHM(n3)); /* * Retrieve the NSEC3 hash algorithm function and compute the digest for this fqdn */ nsec3_hash_get_function(NSEC3_ZONE_ALGORITHM(n3))( name, name_len, NSEC3_ZONE_SALT(n3), NSEC3_ZONE_SALT_LEN(n3), nsec3_zone_get_iterations(n3), &digest[1], FALSE); commonargs->internal_statistics_nsec3_count++; #if NSEC3_UPDATE_ZONE_DEBUG!=0 log_debug("nsec3: made '%{dnsname}' %{digest32h} ", name, digest); #endif /* * DYNUPDATE: * * Seek for digest * * If the digest does not exists: * Get the predecessor. * If the predecessor is not marked: * Mark the predecessor for future add and output it right now * */ /* * Find the node with the computed digest */ nsec3_zone_item* node; node = nsec3_avl_find(&n3->items, digest); if(node != NULL) { /* * If the node exists, get the previous node and mark it for incremental delete * ( I don't remember why I do this ) */ nsec3_zone_item* node_prev = nsec3_avl_node_mod_prev(node); if((node_prev->flags & NSEC3_FLAGS_MARKED_FOR_ICMTL_ADD) == 0) { zdb_listener_notify_remove_nsec3(zone, node_prev, n3, min_ttl); node_prev->flags |= NSEC3_FLAGS_MARKED_FOR_ICMTL_ADD; } } else { /* * Insert the node for that digest and mark it for incremental add */ node = nsec3_avl_insert(&n3->items, digest); node->flags |= NSEC3_FLAGS_MARKED_FOR_ICMTL_ADD; } /* * Sets the nsec3 -> owner label link */ nsec3_add_owner(node, label); /* * The self is edited later */ node->flags |= nsec3_flags; /* * Update (or create) the bitmap of the types */ if(node->type_bit_maps_size == 0) { /* * Create the bitmap */ node->type_bit_maps_size = type_bit_maps_size; if(type_bit_maps_size > 0) { /* LOCK */ ZALLOC_ARRAY_OR_DIE(u8*, node->type_bit_maps, type_bit_maps_size, NSEC3_TYPEBITMAPS_TAG); /* UNLOCK */ type_bit_maps_write(node->type_bit_maps, type_context); } } else { /* Merge the existing bitmap with the new one */ u8* tmp_type_bit_maps; #if DNSCORE_HAS_ZALLOC_SUPPORT /* LOCK */ ZALLOC_ARRAY_OR_DIE(u8*, tmp_type_bit_maps, type_bit_maps_size, NSEC3_TYPEBITMAPS_TAG); /* UNLOCK */ #else // zalloc can allocate 0 bytes (8 are allocated) // malloc cannot (undefined) ZALLOC_ARRAY_OR_DIE(u8*, tmp_type_bit_maps, MAX(type_bit_maps_size,1), NSEC3_TYPEBITMAPS_TAG); #endif type_bit_maps_write(tmp_type_bit_maps, type_context); if(type_bit_maps_merge(type_context, node->type_bit_maps, node->type_bit_maps_size, tmp_type_bit_maps, type_bit_maps_size)) { /** * TRUE : a merge occurred * NOTE : this case never occurred while testing. It has * to be triggered with a dynupdate or a wrong zone file. * @todo : factorize with "nsec3_add_label" (if possible ?) */ /* * The node existed already but has now been changed. */ /* * DYNUPDATE: * * The node will change. * * If the node is not marked * Mark the node for future add and output it now * */ if((node->flags & NSEC3_FLAGS_MARKED_FOR_ICMTL_ADD) == 0) { zdb_listener_notify_remove_nsec3(zone, node, n3, min_ttl); node->flags |= NSEC3_FLAGS_MARKED_FOR_ICMTL_ADD; } type_bit_maps_size = type_context->type_bit_maps_size; /* LOCK */ ZFREE_ARRAY(node->type_bit_maps, node->type_bit_maps_size); /* UNLOCK */ if(type_bit_maps_size > 0) { /* LOCK */ ZALLOC_ARRAY_OR_DIE(u8*, node->type_bit_maps, type_bit_maps_size, NSEC3_TYPEBITMAPS_TAG); /* UNLOCK */ node->type_bit_maps_size = type_bit_maps_size; type_bit_maps_write(node->type_bit_maps, type_context); } /* * This case does not exist: A merge of something of size > 0 * with anything will always give a size > 0 * * else * { * node->type_bit_maps_size = 0; * } * */ } /* LOCK */ ZFREE_ARRAY(tmp_type_bit_maps, type_bit_maps_size); /* UNLOCK */ } /* nsec3_set_label_extension */ yassert(node != NULL); n3ext->self = node; n3ext = n3ext->next; } #if NSEC3_UPDATE_ZONE_DEBUG!=0 else { MEMCOPY(&digest[1], &n3ext->self->digest[1], n3ext->self->digest[0]); log_debug("nsec3: done '%{dnsname}' %{digest32h} ", name, digest); } #endif n3 = n3->next; } while(n3 != NULL); #if NSEC3_UPDATE_ZONE_DEBUG log_debug("nsec3_update_label_nsec3_nodes_recursive(%3d, %{dnsname}) : NSEC3", label_stack_level, debug_name); #endif return TRUE; } static void nsec3_update_zone_nsec3_nodes_recursive(zdb_zone *zone, bool opt_out) { nsec3_update_zone_nsec3_nodes_recursive_args commonargs; ZEROMEMORY(&commonargs, sizeof(commonargs)); commonargs.zone = zone; commonargs.label_stack[0] = zone->apex; commonargs.label_stack_level = 0; commonargs.origin_len = dnsname_len(zone->origin); zdb_zone_getminttl(zone, &commonargs.min_ttl); commonargs.opt_out = opt_out; commonargs.nsec3_flags = (opt_out)?1:0; nsec3_update_label_nsec3_nodes_recursive(&commonargs); log_debug("nsec3: parsed %u labels, seen %u delegations, made %u NSEC3 records", commonargs.internal_statistics_label_count, commonargs.internal_statistics_delegation_count, commonargs.internal_statistics_nsec3_count); } /** * Updates ALL the NSEC3 records for ALL the labels, and this for ALL the NSEC3PARAM of the zone. * After this call, a signature update must be called/scheduled on the zone. * */ ya_result nsec3_update_zone(zdb_zone* zone) { /** * @todo : check if the zone is NSEC or NSEC3 * * * If it is NSEC: prepare to remove all NSEC information * If it is NSEC3: just do a normal update * * For now, I'm assuming that there is nothing yet. * */ if(zone->nsec.nsec3 == NULL) { return SUCCESS; /* Nothing to do */ } if((zone->apex->flags & ZDB_RR_LABEL_NSEC) != 0) { return DNSSEC_ERROR_NSEC3_INVALIDZONESTATE; /* NSEC3 update of an NSEC zone is not supported */ } bool opt_out = ((zone->apex->flags & ZDB_RR_LABEL_NSEC3_OPTOUT) != 0); u32 min_ttl = 900; zdb_zone_getminttl(zone, &min_ttl); u8 name[2 + MAX_DOMAIN_LENGTH]; #if NSEC3_UPDATE_ZONE_DEBUG!=0 log_debug("nsec3: zone '%{dnsname}'", zone->origin); #endif /* * All the labels from (included) the root to the zone have to be added * These ones must be handled differently than the ones in the zone. */ u8 digest[1 + MAX_DIGEST_LENGTH]; #if NSEC3_INCLUDE_ZONE_PATH != 0 u8* zone_path = zone->origin; zone_path += (*zone_path) + 1; for(;;) { /* * There are NO types here */ #if NSEC3_UPDATE_ZONE_DEBUG!=0 log_debug("nsec3: path '%{dnsname}'", zone_path); #endif nsec3_zone* n3 = zone->nsec.nsec3; do { digest[0] = nsec3_hash_len(NSEC3_ZONE_ALGORITHM(n3)); nsec3_hash_get_function(NSEC3_ZONE_ALGORITHM(n3))( zone_path, dnsname_len(zone_path), NSEC3_ZONE_SALT(n3), NSEC3_ZONE_SALT_LEN(n3), nsec3_zone_get_iterations(n3), &digest[1], FALSE); //log_debug("nsec3_update_zone: creating node: %{digest32h} NSEC3 ; %{dnsname} (zone)", digest, zone_path); nsec3_zone_item* node = nsec3_avl_insert(&n3->items, digest); node->flags = (opt_out)?1:0; node->flags |= NSEC3_FLAGS_MARKED_FOR_ICMTL_ADD; if(!nsec3_owned_by(node, NSEC3_ZONE_FAKE_OWNER)) { nsec3_add_owner(node, NSEC3_ZONE_FAKE_OWNER); /* Zone proprietary */ } n3 = n3->next; } while(n3 != NULL); if(*zone_path == 0) { break; } zone_path += (*zone_path) + 1; } #else #endif zdb_zone_label_iterator label_iterator; nsec3_update_zone_nsec3_nodes_recursive(zone, opt_out); /** * NSEC3 nodes have been removed (ixfr) as soon as it was required * Now all the added nodes (edited(remove+add) nodes and new nodes * are marked with NSEC3_FLAGS_MARKED_FOR_ICMTL_ADD. * * This flag MUST be removed (it's not a valid flag) and the node * must be send as added for ixfr. * * NOTE: When I speak about IXFR I speak about the mechanism, not * the network transfer. * * @todo; This should be improved for the TLD: * NOTE: This should be improved for the TLD: * * When doing a small update (and not the first init) I should * use a list of nodes that have their flag set. (ptr_vector) * * But on the first pass (initialization) this is the best way. */ { nsec3_zone* n3 = zone->nsec.nsec3; do { nsec3_avl_iterator iter; nsec3_avl_iterator_init(&n3->items, &iter); while(nsec3_avl_iterator_hasnext(&iter)) { nsec3_zone_item* node = nsec3_avl_iterator_next_node(&iter); if((node->flags & NSEC3_FLAGS_MARKED_FOR_ICMTL_ADD) != 0) { node->flags &= ~NSEC3_FLAGS_MARKED_FOR_ICMTL_ADD; zdb_listener_notify_add_nsec3(zone, node, n3, min_ttl); } } n3 = n3->next; } while(n3 != NULL); } /* * In order to avoid computing the *.fqdn digest when needed, we do it here and store it for later */ name[0] = 1; name[1] = '*'; //zdb_zone_label_iterator label_iterator; zdb_zone_label_iterator_init(zone, &label_iterator); while(zdb_zone_label_iterator_hasnext(&label_iterator)) { u32 name_len = zdb_zone_label_iterator_nextname(&label_iterator, &name[2]) + 2; #if NSEC3_UPDATE_ZONE_DEBUG!=0 log_debug("nsec3: wild '%{dnsname}'", name); #endif zdb_rr_label* label = zdb_zone_label_iterator_next(&label_iterator); if(label->nsec.nsec3 == NULL || label->nsec.nsec3->star != NULL) { /* * Already done. */ #if NSEC3_UPDATE_ZONE_DEBUG!=0 log_debug("nsec3: wild '%{dnsname}' already set", name); #endif continue; } nsec3_zone* n3 = zone->nsec.nsec3; nsec3_label_extension* n3ext = label->nsec.nsec3; do { yassert(n3ext != NULL); /* Compute the digest */ digest[0] = nsec3_hash_len(NSEC3_ZONE_ALGORITHM(n3)); nsec3_hash_get_function(NSEC3_ZONE_ALGORITHM(n3))( name, name_len, NSEC3_ZONE_SALT(n3), NSEC3_ZONE_SALT_LEN(n3), nsec3_zone_get_iterations(n3), &digest[1], FALSE); //log_debug("nsec3_update_zone: \"precalc\" node: %{digest32h} NSEC3 ; %{dnsname}", digest, name); #if NSEC3_UPDATE_ZONE_DEBUG!=0 log_debug("nsec3: wild '%{dnsname}' %{digest32h} ", name, digest); #endif nsec3_zone_item* node = nsec3_avl_find_interval_start(&n3->items, digest); #if NSEC3_UPDATE_ZONE_DEBUG!=0 log_debug("nsec3: *. => %{digest32h} ", node->digest); #endif nsec3_add_star(node, label); yassert(n3ext->star == NULL); n3ext->star = node; n3ext = n3ext->next; n3 = n3->next; } while(n3 != NULL); yassert(n3ext == NULL); } /** @todo: SCHEDULE a signature for all NSEC3 of the zone */ return SUCCESS; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/nsec3_zone.c0000644000077100007710000000012412650131756021203 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.258344 30 ctime=1454597652.550344534 yadifa-2.1.6-5826/lib/dnsdb/src/nsec3_zone.c0000664000077100007710000002722412650131756021017 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup nsec3 NSEC3 functions * @ingroup dnsdbdnssec * @brief * * * * @{ */ /*------------------------------------------------------------------------------ * * USE INCLUDES */ #include "dnsdb/dnsdb-config.h" #include #include #include #include "dnsdb/nsec3_item.h" #include "dnsdb/nsec3_owner.h" #include "dnsdb/nsec3_zone.h" #include "dnsdb/zdb_zone_label_iterator.h" #define MODULE_MSG_HANDLE g_dnssec_logger extern logger_handle *g_dnssec_logger; /****************************************************************************** * * NSEC3 - tools : nsec3_zone (nsec3param's alter ego) * *****************************************************************************/ /* * Compares two nsec3_zone (binary compare <0 / = / >0 : less/equal/bigger) */ int nsec3_zone_rdata_compare(const u8* a_rdata, const u8* b_rdata) { int c; c = a_rdata[0]; c -= b_rdata[0]; if(c == 0) { c = a_rdata[2]; c -= b_rdata[2]; if(c == 0) { c = a_rdata[3]; c -= b_rdata[3]; if(c == 0) { c = a_rdata[4]; // size of the hash c -= b_rdata[4]; if(c == 0) // if both sizes are equal { c = memcmp(&a_rdata[5], &b_rdata[5], a_rdata[4]); } } } } return c; } /* * Compares two nsec3_zone (binary compare <0 / = / >0 : less/equal/bigger) */ int nsec3_zone_compare(nsec3_zone* a, nsec3_zone* b) { return nsec3_zone_rdata_compare(a->rdata, b->rdata); } /* * Retrieves the nsec3_zone* (NSEC3PARAM alter-ego) from an item. * * This is done by looking for the NSEC3 root then looking for which nsec3_zone * contains the ptr. It requires up to 30 moves. (slow) * * I could also mark the nsec3 records and store the mark on every record but * it would be expensive (memory). * */ nsec3_zone* nsec3_zone_from_item(zdb_zone* zone, nsec3_zone_item* item) { nsec3_zone_item* root = item; while(root->parent != NULL) { root = root->parent; } nsec3_zone* n3 = zone->nsec.nsec3; while(n3 != NULL) { if(n3->items == root) { break; } n3 = n3->next; } return n3; } /* * Recursively empties nsec3_zone_item * * Does not destroys the nodes, only the payload : owners, stars, bitmap, rrsig * * This should be followed by the destruction of the items */ static void nsec3_zone_item_empties_recursively(nsec3_zone_item* item) { if(item != NULL) { nsec3_zone_item_empties(item); nsec3_zone_item_empties_recursively(item->children.lr.left); nsec3_zone_item_empties_recursively(item->children.lr.right); } } /* * Destroys the nsec3param alter-ego from the database. * * The zdb_rr_label are also affected by the call. * * The NSEC3PARAM record is not changed. * */ void nsec3_zone_destroy(zdb_zone* zone, nsec3_zone* n3) { int n3_index = 0; /* * * Check for existence of n3 into zone * * For every nsec3 record found in zone: * * Get the self(s), unlink * Get the star(s), unlink * Destroy nsec3 record signature * Destroy nsec3 record */ nsec3_zone_item_empties_recursively(n3->items); nsec3_avl_destroy(&n3->items); nsec3_zone* first = zone->nsec.nsec3; if(first == n3) { zone->nsec.nsec3 = n3->next; } else { while(first->next != n3) { ++n3_index; first = first->next; } first->next = n3->next; } ZFREE_ARRAY(n3, sizeof (nsec3_zone) - 1 + NSEC3PARAM_MINIMUM_LENGTH + n3->rdata[4]); // Every single label must have its chain updated zdb_zone_label_iterator label_iterator; zdb_zone_label_iterator_init(zone, &label_iterator); if(n3_index == 0) { while(zdb_zone_label_iterator_hasnext(&label_iterator)) { zdb_rr_label* label = zdb_zone_label_iterator_next(&label_iterator); if(label->flags & ZDB_RR_LABEL_NSEC3) { yassert(!ZDB_LABEL_UNDERDELEGATION(label)); struct nsec3_label_extension *n3_ext = label->nsec.nsec3; label->nsec.nsec3 = n3_ext->next; yassert(n3_ext->self == NULL && n3_ext->star == NULL); ZFREE(n3_ext, nsec3_label_extension); } } } else { while(zdb_zone_label_iterator_hasnext(&label_iterator)) { zdb_rr_label* label = zdb_zone_label_iterator_next(&label_iterator); if(label->flags & ZDB_RR_LABEL_NSEC3) { yassert(!ZDB_LABEL_UNDERDELEGATION(label)); struct nsec3_label_extension **n3_extp = &label->nsec.nsec3->next; struct nsec3_label_extension *n3_ext = *n3_extp; for(int i = 1; i < n3_index; ++i) { n3_extp = &n3_ext->next; n3_ext = *n3_extp; } *n3_extp = n3_ext->next; yassert(n3_ext->self == NULL && n3_ext->star == NULL); ZFREE(n3_ext, nsec3_label_extension); } } } } /* * Adds the NSEC3 item reference chain (one node for each NSEC3PARAM) * to EACH label of the zone * * Exclusively used by nsec3_zone_add_from_rdata */ static void nsec3_insert_empty_nsec3(zdb_zone* zone, u32 index) { zdb_zone_label_iterator label_iterator; zdb_zone_label_iterator_init(zone, &label_iterator); while(zdb_zone_label_iterator_hasnext(&label_iterator)) { zdb_rr_label* label = zdb_zone_label_iterator_next(&label_iterator); yassert((label->flags & ZDB_RR_LABEL_NSEC) == 0); //label->flags |= ZDB_RR_LABEL_NSEC3; if(!(label->flags & ZDB_RR_LABEL_NSEC3)) { continue; } /* * if label->nsec.nsec3 is NULL and index > 0 => oops */ nsec3_label_extension** current = &label->nsec.nsec3; u32 count = index; while(count > 0) { /* * If the label lacks previous elements in the chain, they must be added. */ if(*current == NULL) { nsec3_label_extension* n3ext; ZALLOC_OR_DIE(nsec3_label_extension*, n3ext, nsec3_label_extension, NSEC3_LABELEXT_TAG); // in nsec3_insert_empty_nsec3 n3ext->self = NULL; n3ext->star = NULL; n3ext->next = NULL; *current = n3ext; } current = &(*current)->next; count--; } nsec3_label_extension* n3ext; ZALLOC_OR_DIE(nsec3_label_extension*, n3ext, nsec3_label_extension, NSEC3_LABELEXT_TAG); // in nsec3_insert_empty_nsec3 n3ext->self = NULL; n3ext->star = NULL; n3ext->next = *current; *current = n3ext; } } /* * Adds the nsec3_zone (NSEC3PARAM "alter-ego") to the zone. * * Updates labels flags + nsec3 item references placeholders * using nsec3_insert_empty_nsec3 * * Uses nsec3zone_compare * * Used by nsec3_add_nsec3param and nsec3_load_add_nsec3param * */ nsec3_zone* nsec3_zone_add_from_rdata(zdb_zone* zone, u16 nsec3param_rdata_size, const u8* nsec3param_rdata) { /* Check that the rdata is big enough */ yassert(nsec3param_rdata_size >= NSEC3PARAM_MINIMUM_LENGTH); nsec3_zone* n3 = nsec3_zone_get_from_rdata(zone, nsec3param_rdata_size, nsec3param_rdata); if(n3 == NULL) { u32 nsec3param_rdata_realsize = NSEC3_ZONE_RDATA_SIZE_FROM_SALT(NSEC3PARAM_RDATA_SALT_LEN(nsec3param_rdata)); ZALLOC_ARRAY_OR_DIE(nsec3_zone*, n3, sizeof (nsec3_zone) + nsec3param_rdata_realsize - 1, NSEC3_ZONE_TAG); n3->items = NULL; MEMCOPY(n3->rdata, nsec3param_rdata, nsec3param_rdata_realsize); /* * Insertion has to be sorted on the Algorithm + Iterations + Salt_len + Salt */ nsec3_zone** current = &zone->nsec.nsec3; nsec3_zone* next_n3 = zone->nsec.nsec3; u32 n3_pos = 0; for(;;) { /* if((next_n3 == NULL) || (nsec3_zone_compare(n3, next_n3) < 0)) */ if(next_n3 == NULL) { n3->next = next_n3; *current = n3; /* * For every existing label in the database: add a nsec3 node for * the current n3 record (same position in the list). */ nsec3_insert_empty_nsec3(zone, n3_pos); break; } current = &next_n3->next; next_n3 = next_n3->next; n3_pos++; } } return n3; } /* * Returns the zone's matching nsec3_zone* or NULL * * The rdata can be of an NSEC3PARAM or of an NSEC3 * */ nsec3_zone* nsec3_zone_get_from_rdata(zdb_zone* zone, u16 nsec3param_rdata_size, const u8* nsec3param_rdata) { /* Check that the rdata is big enough */ yassert(nsec3param_rdata_size >= NSEC3PARAM_MINIMUM_LENGTH); nsec3_zone* n3; for(n3 = zone->nsec.nsec3; n3 != NULL; n3 = n3->next) { /* test the first 32 bits in one go */ u32 a = GET_U32_AT(n3->rdata[0]); u32 b = GET_U32_AT(nsec3param_rdata[0]); a &= NU32(0xff00ffff); b &= NU32(0xff00ffff); if(a == b) { u8 len = NSEC3_ZONE_SALT_LEN(n3); if(NSEC3PARAM_RDATA_SALT_LEN(nsec3param_rdata) == len) { if(memcmp(NSEC3_ZONE_SALT(n3), NSEC3PARAM_RDATA_SALT(nsec3param_rdata), len) == 0) { break; } } } } return n3; } /** @} */ /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_query_ex_wire.c0000644000077100007710000000012412650131756022663 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.464344 30 ctime=1454597652.382344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_query_ex_wire.c0000664000077100007710000002270412650131756022475 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup query_ex Database top-level query function * @ingroup dnsdb * @brief Database top-level query function * * Database top-level query function * * @{ */ #include "dnsdb/dnsdb-config.h" #include #include #include #include "dnsdb/dnsdb-config.h" #include "dnsdb/zdb_types.h" #include #include #include #include #include "dnsdb/htable.h" #include "dnsdb/hash.h" #include "dnsdb/dnsdb-config.h" #if HAS_NSID_SUPPORT #include #endif extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #define ANSWER_DO_COMPRESSION 1 #if BYTE_ORDER==BIG_ENDIAN #define ENCODE_OFFSET(offset) (offset|0xc000) #else #define ENCODE_OFFSET(offset) ((offset>>8)|(offset<<8)|0x00c0) #endif /** * @note I could also have tables by label depth. * But I'll need more time to experiment this. */ static bool zdb_query_message_update_write_label(zdb_resourcerecord* rr, u32* countp, packet_writer* pc) { u32 count = 0; bool fully_written = TRUE; while(rr != NULL) { /* Store the name */ const u8* name = rr->name; u16 rdata_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(rr->ttl_rdata); u32 offset_backup = pc->packet_offset; /* copy the name */ #if ANSWER_DO_COMPRESSION == 0 packet_writer_add_fqdn_uncompressed(pc, name); #else packet_writer_add_fqdn(pc, name); #endif /* copy the TYPE + CLASS + RDATA SIZE */ packet_writer_add_u16(pc, (rr->rtype)); /** @note: NATIVETYPE */ packet_writer_add_u16(pc, (rr->zclass)); /** @note: NATIVECLASS */ packet_writer_add_u32(pc, htonl(rr->ttl)); /* Here we do compression (or not) */ #if ANSWER_DO_COMPRESSION == 0 /* Store the RDATA len (16 bits) */ u8* rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(rr->ttl_rdata); packet_writer_add_u16(pc, htons(rdata_size)); /* copy the RDATA */ packet_writer_add_bytes(pc, rdata, rdata_size); #else u32 offset = pc->packet_offset; u8* rdata = ZDB_PACKEDRECORD_PTR_RDATAPTR(rr->ttl_rdata); pc->packet_offset += 2; switch(rr->rtype) { case TYPE_MX: packet_writer_add_bytes(pc, rdata, 2); rdata += 2; /* Fallthrough */ case TYPE_NS: case TYPE_CNAME: case TYPE_DNAME: case TYPE_PTR: case TYPE_MB: case TYPE_MD: case TYPE_MF: case TYPE_MG: case TYPE_MR: /* ONE NAME record */ { packet_writer_add_fqdn(pc, rdata); packet_writer_set_u16(pc, htons(pc->packet_offset - offset - 2), offset); break; } case TYPE_SOA: { u32 len1 = dnsname_len(rdata); packet_writer_add_fqdn(pc, rdata); rdata += len1; u32 len2 = dnsname_len(rdata); packet_writer_add_fqdn(pc, rdata); rdata += len2; packet_writer_add_bytes(pc, rdata, 20); packet_writer_set_u16(pc, htons(pc->packet_offset - offset - 2), offset); break; } default: { packet_writer_set_u16(pc, htons(rdata_size), offset); packet_writer_add_bytes(pc, rdata, rdata_size); break; } } /* switch(type) */ #endif /* * If we are beyond the limit, we restore the offset and stop here. */ if(pc->packet_offset > pc->packet_limit) { pc->packet_offset = offset_backup; fully_written = FALSE; break; } count++; rr = rr->next; } *countp = count; /* stores the count */ return fully_written; /* returns the offset of the next writable byte */ } extern u16 edns0_maxsize; ya_result zdb_query_message_update(message_data* message, zdb_query_ex_answer* answer_set) { /* * * OPCODE (16 bits) * QUERY " * ANSWER " * AUTHORITY " * ADDITIONAL " * */ /* Insert the query */ message_header* header = (message_header*)message->buffer; u32 count; bool fully_written; /* Initialize the compression dictionnary with the query */ packet_writer pc; #ifdef DEBUG count = ~0; memset(&pc, 0xff, sizeof (pc)); #endif if(message->edns) { #if HAS_NSID_SUPPORT message->size_limit -= edns0_record_size; /* edns0 opt record */ #else message->size_limit -= EDNS0_RECORD_SIZE; /* edns0 opt record */ #endif } packet_writer_init(&pc, message->buffer, message->received, message->size_limit); // write_label handles truncation fully_written = zdb_query_message_update_write_label(answer_set->answer, &count, &pc); header->ancount = htons(count); header->nscount = 0; header->arcount = 0; if(fully_written) { if((message->process_flags & PROCESS_FL_AUTHORITY_AUTH) != 0) { fully_written = zdb_query_message_update_write_label(answer_set->authority, &count, &pc); header->nscount = htons(count); } if(fully_written && ((message->process_flags & PROCESS_FL_ADDITIONAL_AUTH) != 0)) { /* fully_written = */ zdb_query_message_update_write_label(answer_set->additional, &count, &pc); header->arcount = htons(count); } } if(message->edns) { /* 00 00 29 SS SS rr vv 80 00 00 00 */ /* 00 00 29 SS SS rr vv 80 00 |opt| 00 03 |nsid| nsid */ #if HAS_NSID_SUPPORT if(!message->nsid) { message->size_limit += EDNS0_RECORD_SIZE; /* edns0 opt record */ pc.packet_limit += EDNS0_RECORD_SIZE; memset(&pc.packet[pc.packet_offset], 0, EDNS0_RECORD_SIZE); pc.packet_offset += 2; pc.packet[pc.packet_offset++] = 0x29; packet_writer_add_u16(&pc, htons(edns0_maxsize)); packet_writer_add_u32(&pc, message->rcode_ext); pc.packet_offset += 2; // rdata size already set to 0, skip it } else { message->size_limit += edns0_record_size; /* edns0 opt record */ pc.packet_limit += edns0_record_size; packet_writer_add_u16(&pc, 0); // fqdn + 1st half of type pc.packet[pc.packet_offset++] = 0x29; // 2nd half of type packet_writer_add_u16(&pc, htons(edns0_maxsize)); packet_writer_add_u32(&pc, message->rcode_ext); memcpy(&pc.packet[pc.packet_offset], edns0_rdatasize_nsid_option_wire, edns0_rdatasize_nsid_option_wire_size); pc.packet_offset += edns0_rdatasize_nsid_option_wire_size; } #else message->size_limit += EDNS0_RECORD_SIZE; /* edns0 opt record */ pc.packet_limit += EDNS0_RECORD_SIZE; memset(&pc.packet[pc.packet_offset], 0, EDNS0_RECORD_SIZE); pc.packet_offset += 2; pc.packet[pc.packet_offset++] = 0x29; packet_writer_add_u16(&pc, htons(edns0_maxsize)); packet_writer_add_u32(&pc, message->rcode_ext); pc.packet_offset += 2; // rdata size already set to 0, skip it #endif header->arcount = htons(ntohs(header->arcount) + 1); } u16 hi; if(fully_written) { hi = QR_BITS; } else { /* TC ! */ hi = QR_BITS|TC_BITS; } MESSAGE_FLAGS_OR(message->buffer, hi, message->status); return pc.packet_offset; } /** @} */ yadifa-2.1.6-5826/lib/dnsdb/src/PaxHeaders.8028/zdb_zone.c0000644000077100007710000000012412650131756020747 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.388344 30 ctime=1454597652.405344534 yadifa-2.1.6-5826/lib/dnsdb/src/zdb_zone.c0000664000077100007710000004676612650131756020577 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup dnsdbzone Zone related functions * @ingroup dnsdb * @brief Functions used to manipulate a zone * * Functions used to manipulate a zone * * @{ */ #define ZDB_JOURNAL_CODE 1 #include "dnsdb/dnsdb-config.h" #include #include #ifdef DEBUG #include #endif #include #include #include #include "dnsdb/dnsdb-config.h" #include "dnsdb/zdb.h" #include "dnsdb/zdb_zone.h" #include "dnsdb/zdb_zone_label.h" #include "dnsdb/zdb_rr_label.h" #include "dnsdb/zdb_record.h" #include "dnsdb/zdb_utils.h" #include "dnsdb/zdb_error.h" #include "dnsdb/dnsrdata.h" #include "dnsdb/zdb_listener.h" #include "dnsdb/journal.h" #if ZDB_HAS_NSEC_SUPPORT != 0 #include "dnsdb/nsec.h" #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 #include "dnsdb/nsec3.h" #endif #ifdef DEBUG #define ZONE_MUTEX_LOG 0 // set this to 0 to disable in DEBUG #else #define ZONE_MUTEX_LOG 0 #endif extern logger_handle* g_database_logger; #define MODULE_MSG_HANDLE g_database_logger #if HAS_TRACK_ZONES_DEBUG_SUPPORT smp_int g_zone_instanciated_count = SMP_INT_INITIALIZER; ptr_set g_zone_instanciated_set = PTR_SET_PTR_EMPTY; #endif /** * @brief Adds a record to a zone * * Adds a record to a zone. * * @param[in] zone the zone * @param[in] labels the stack of labels of the dns name * @param[in] labels_top the index of the top of the stack (the level) * @param[in] type the type of the record * @param[in] ttlrdata the ttl and rdata of the record. NOTE: the zone becomes its new owner !!! */ void zdb_zone_record_add(zdb_zone *zone, dnslabel_vector_reference labels, s32 labels_top, u16 type, zdb_packed_ttlrdata* ttlrdata) { zdb_rr_label* rr_label = zdb_rr_label_add(zone, labels, labels_top); /* This record will be put as it is in the DB */ #if ZDB_HAS_NSEC_SUPPORT != 0 /* * At this point I could add empty nsec3 records, or schedule the nsec3 signature */ #endif u16 flag_mask = 0; switch(type) { case TYPE_CNAME: { if((rr_label->flags & ZDB_RR_LABEL_DROPCNAME) != 0) { log_err("zone %{dnsname}: ignoring CNAME add on non-CNAME", zone->origin); ZDB_RECORD_ZFREE(ttlrdata); return; } flag_mask = ZDB_RR_LABEL_HASCNAME; break; } case TYPE_RRSIG: case TYPE_NSEC: break; case TYPE_NS: { if( (rr_label->flags & ZDB_RR_LABEL_HASCNAME) != 0) { log_err("zone %{dnsname}: ignoring NS add on CNAME", zone->origin); ZDB_RECORD_ZFREE(ttlrdata); return; } if( (rr_label->flags & ZDB_RR_LABEL_APEX) == 0) { flag_mask = ZDB_RR_LABEL_DELEGATION; /* all labels under are "under delegation" */ dictionary_iterator iter; dictionary_iterator_init(&rr_label->sub, &iter); while(dictionary_iterator_hasnext(&iter)) { zdb_rr_label** sub_labelp = (zdb_rr_label**)dictionary_iterator_next(&iter); (*sub_labelp)->flags |= ZDB_RR_LABEL_UNDERDELEGATION; } } flag_mask |= ZDB_RR_LABEL_DROPCNAME; break; } default: { if( (rr_label->flags & ZDB_RR_LABEL_HASCNAME) != 0) { log_err("zone %{dnsname}: ignoring non-CNAME add on CNAME", zone->origin); ZDB_RECORD_ZFREE(ttlrdata); return; } flag_mask = ZDB_RR_LABEL_DROPCNAME; break; } } if(!zdb_record_insert_checked(&rr_label->resource_record_set, type, ttlrdata)) /* FB done */ { ZDB_RECORD_ZFREE(ttlrdata); return; } rr_label->flags |= flag_mask; #if ZDB_CHANGE_FEEDBACK_SUPPORT != 0 /* * Update ICMTL. * * NOTE: the zdb_rr_label set of functions are zdb_listener-aware but the zdb_record ones are not. * That's why this one needs a call to the listener. * */ zdb_ttlrdata unpacked_ttlrdata; unpacked_ttlrdata.rdata_pointer = &ttlrdata->rdata_start[0]; unpacked_ttlrdata.rdata_size = ttlrdata->rdata_size; unpacked_ttlrdata.ttl = ttlrdata->ttl; zdb_listener_notify_add_record(zone, labels, labels_top, type, &unpacked_ttlrdata); #endif } /** * @brief Removes a record from a zone * * Removes a record from a zone * * @param[in] zone the zone * @param[in] labels the stack of labels of the dns name * @param[in] labels_top the index of the top of the stack (the level) * @param[in] type the type of the record * @param[in] ttlrdata the ttl and rdata of the record. NOTE: the caller stays the owner */ ya_result zdb_zone_record_delete(zdb_zone *zone, dnslabel_vector_reference labels, s32 labels_top, u16 type, zdb_packed_ttlrdata* packed_ttlrdata) { zdb_ttlrdata ttlrdata; ttlrdata.next = NULL; ttlrdata.rdata_size = ZDB_PACKEDRECORD_PTR_RDATASIZE(packed_ttlrdata); ttlrdata.rdata_pointer = ZDB_PACKEDRECORD_PTR_RDATAPTR(packed_ttlrdata); ttlrdata.ttl = packed_ttlrdata->ttl; return zdb_rr_label_delete_record_exact(zone, labels, labels_top, type, &ttlrdata); } /** * @brief Search for a record in a zone * * Search for a record in a zone * * @param[in] zone the zone * @param[in] labels the stack of labels of the dns name * @param[in] labels_top the index of the top of the stack (the level) * @param[in] type the type of the record */ zdb_packed_ttlrdata* zdb_zone_record_find(zdb_zone *zone, dnslabel_vector_reference labels, s32 labels_top, u16 type) { zdb_rr_label* rr_label = zdb_rr_label_find_exact(zone->apex, labels, labels_top); if(rr_label != NULL) { return zdb_record_find(&rr_label->resource_record_set, type); } return NULL; } static ya_result zdb_default_query_access_filter(const message_data *mesg, const void *extension) { return SUCCESS; } static u32 zdb_zone_get_struct_size(const u8 *origin) { u32 zone_footprint = sizeof(zdb_zone) - sizeof(dnsname_vector) + sizeof(u8*) * (dnsname_getdepth(origin) + 1); return zone_footprint; } zdb_zone* zdb_zone_create(const u8* origin) { zdb_zone *zone; u32 zone_footprint = zdb_zone_get_struct_size(origin); ZALLOC_ARRAY_OR_DIE(zdb_zone*, zone, zone_footprint, ZDB_ZONETAG); #if HAS_TRACK_ZONES_DEBUG_SUPPORT smp_int_inc(&g_zone_instanciated_count); pthread_mutex_lock(&g_zone_instanciated_count.mutex); ptr_node *node = ptr_set_avl_insert(&g_zone_instanciated_set, zone); pthread_mutex_unlock(&g_zone_instanciated_count.mutex); node->value = NULL; #endif log_debug7("zdb_zone_create %{dnsname}@%p", origin, zone); zone->origin = dnsname_zdup(origin); dnsname_to_dnsname_vector(zone->origin, &zone->origin_vector); #if ZDB_RECORDS_MAX_CLASS != 1 zone->zclass = CLASS_IN; #endif zone->axfr_timestamp = 1; /* zone->axfr_serial = 0; implicit */ #if ZDB_HAS_DNSSEC_SUPPORT != 0 ZEROMEMORY(&zone->nsec, sizeof (nsec_zone_union)); zone->sig_validity_interval_seconds = 30*24*3600; /* 1 month */ zone->sig_validity_regeneration_seconds = 7*24*3600; /* 1 week */ zone->sig_validity_jitter_seconds = 86400; /* 1 day */ zone->sig_quota = 100; #endif zone->alarm_handle = alarm_open(zone->origin); zone->apex = zdb_rr_label_new_instance(ROOT_LABEL); zone->apex->flags = ZDB_RR_LABEL_APEX; zone->query_access_filter = zdb_default_query_access_filter; zone->extension = NULL; mutex_init(&zone->lock_mutex); cond_init(&zone->lock_cond); zone->rc = 1; zone->lock_owner = ZDB_ZONE_MUTEX_NOBODY; zone->lock_count = 0; zone->lock_reserved_owner = ZDB_ZONE_MUTEX_NOBODY; #if DNSCORE_HAS_MUTEX_DEBUG_SUPPORT zone->lock_trace = NULL; zone->lock_id = 0; zone->lock_timestamp = 0; #endif zone->journal = NULL; zone->sig_last_processed_node = NULL; return zone; } void zdb_zone_invalidate(zdb_zone *zone) { yassert(zone != NULL && zone->apex != NULL); zone->apex->flags |= ZDB_RR_LABEL_INVALID_ZONE; } /** * @brief Destroys a zone and all its content * * Destroys a zone and all its content * * @param[in] zone a pointer to the zone */ void zdb_zone_truncate_invalidate(zdb_zone *zone) { if(zone != NULL) { // remove all alarms linked to the zone alarm_close(zone->alarm_handle); zone->alarm_handle = ALARM_HANDLE_INVALID; // empty the zone records if(zone->apex != NULL) { #if ZDB_HAS_NSEC_SUPPORT != 0 if(zdb_zone_is_nsec(zone)) { nsec_destroy_zone(zone); } #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 if(zdb_zone_is_nsec3(zone)) { nsec3_destroy_zone(zone); } #endif // zdb_rr_label_destroy(zone, &zone->apex); /* * Destroy ALL the content of the apex but not the apex itself. */ zdb_rr_label_truncate(zone, zone->apex); zone->apex->flags |= ZDB_RR_LABEL_INVALID_ZONE; } } } /** * @brief Destroys a zone and all its content * * Destroys a zone and all its content * * @param[in] zone a pointer to the zone */ void zdb_zone_destroy(zdb_zone *zone) { if(zone != NULL) { zdb_zone_lock(zone, ZDB_ZONE_MUTEX_DESTROY); int rc = zone->rc; zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_DESTROY); if(rc != 0) { logger_flush(); abort(); } log_debug5("zdb_zone_destroy zone@%p", zone); #if HAS_TRACK_ZONES_DEBUG_SUPPORT pthread_mutex_lock(&g_zone_instanciated_count.mutex); bool known_zone = (ptr_set_avl_find(&g_zone_instanciated_set, zone) != NULL); yassert(known_zone); ptr_set_avl_delete(&g_zone_instanciated_set, zone); pthread_mutex_unlock(&g_zone_instanciated_count.mutex); smp_int_dec(&g_zone_instanciated_count); yassert(smp_int_get(&g_zone_instanciated_count) >= 0); #endif zdb_zone_lock(zone, ZDB_ZONE_MUTEX_DESTROY); if(zone->alarm_handle != ALARM_HANDLE_INVALID) { alarm_close(zone->alarm_handle); zone->alarm_handle = ALARM_HANDLE_INVALID; } if(zone->journal != NULL) { journal *jh = zone->journal; zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_DESTROY); journal_close(jh); // only authorised usage of this call zone->journal = NULL; } else { zdb_zone_unlock(zone, ZDB_ZONE_MUTEX_DESTROY); } #ifndef DEBUG // do not bother clearing the memory if it's for a shutdown (faster) if(!dnscore_shuttingdown()) #endif { if(zone->apex != NULL) { #if ZDB_HAS_NSEC_SUPPORT != 0 if(zdb_zone_is_nsec(zone)) { nsec_destroy_zone(zone); } #endif #if ZDB_HAS_NSEC3_SUPPORT != 0 if(zdb_zone_is_nsec3(zone)) { nsec3_destroy_zone(zone); } #endif zdb_rr_label_destroy(zone, &zone->apex); zone->apex = NULL; } } u32 zone_footprint = zdb_zone_get_struct_size(zone->origin); dnsname_zfree(zone->origin); #ifdef DEBUG zone->origin = NULL; zone->min_ttl= 0xbadbad01; zone->extension = NULL; zone->axfr_serial = 0xbadbad00; #endif cond_finalize(&zone->lock_cond); mutex_destroy(&zone->lock_mutex); ZFREE_ARRAY(zone, zone_footprint); } } /** * @brief Copies the soa of a zone to an soa_rdata structure. * * Copies the soa of a zone to an soa_rdata structure. * No memory is allocated for the soa_rdata. If the zone is destroyed, * the soa_rdata becomes invalid. * * @param[in] zone a pointer to the zone * @param[out] soa_out a pointer to an soa_rdata structure */ ya_result zdb_zone_getsoa(const zdb_zone *zone, soa_rdata* soa_out) { #ifdef DEBUG if(zone->lock_owner == ZDB_ZONE_MUTEX_NOBODY) { log_err("zdb_zone_getsoa called on an unlocked zone: %{dnsname}", zone->origin); debug_log_stacktrace(MODULE_MSG_HANDLE, LOG_ERR, "zdb_zone_getsoa"); logger_flush(); } else { log_debug("zdb_zone_getsoa called on a zone locked by %02hhx (%{dnsname})", zone->lock_owner, zone->origin); } #endif const zdb_rr_label *apex = zone->apex; const zdb_packed_ttlrdata *soa = zdb_record_find(&apex->resource_record_set, TYPE_SOA); ya_result return_code; if(soa != NULL) { return_code = zdb_record_getsoa(soa, soa_out); } else { return_code = ZDB_ERROR_NOSOAATAPEX; } return return_code; } ya_result zdb_zone_getsoa_ttl_rdata(const zdb_zone *zone, u32 *ttl, u16 *rdata_size, const u8 **rdata) { #ifdef DEBUG if(zone->lock_owner == ZDB_ZONE_MUTEX_NOBODY) { log_err("zdb_zone_getsoa_ttl_rdata called on an unlocked zone: %{dnsname}", zone->origin); debug_log_stacktrace(MODULE_MSG_HANDLE, LOG_ERR, "zdb_zone_getsoa_ttl_rdata"); logger_flush(); } else { log_debug("zdb_zone_getsoa_ttl_rdata called on a zone locked by %02hhx (%{dnsname})", zone->lock_owner, zone->origin); } #endif const zdb_rr_label *apex = zone->apex; const zdb_packed_ttlrdata *soa = zdb_record_find(&apex->resource_record_set, TYPE_SOA); if(soa == NULL) { return ZDB_ERROR_NOSOAATAPEX; } if(ttl != NULL) { *ttl = soa->ttl; } if(rdata_size != NULL && rdata != NULL) { *rdata_size = soa->rdata_size; *rdata = &soa->rdata_start[0]; } return SUCCESS; } /** * @brief Retrieve the serial of a zone * * Retrieve the serial of a zone * * @param[in] zone a pointer to the zone * @param[out] soa_out a pointer to an soa_rdata structure */ ya_result zdb_zone_getserial(const zdb_zone *zone, u32 *serial) { #ifdef DEBUG if(zone->lock_owner == ZDB_ZONE_MUTEX_NOBODY) { log_err("zdb_zone_getserial called on an unlocked zone (%{dnsname})", zone->origin); debug_log_stacktrace(MODULE_MSG_HANDLE, LOG_ERR, "zdb_zone_getserial"); logger_flush(); } else { log_debug("zdb_zone_getserial called on a zone locked by %02hhx (%{dnsname})", zone->lock_owner, zone->origin); } #endif yassert(serial != NULL); zdb_rr_label *apex = zone->apex; zdb_packed_ttlrdata *soa = zdb_record_find(&apex->resource_record_set, TYPE_SOA); if(soa != NULL) { return rr_soa_get_serial(soa->rdata_start, soa->rdata_size, serial); } return ZDB_ERROR_NOSOAATAPEX; } const zdb_packed_ttlrdata* zdb_zone_get_dnskey_rrset(zdb_zone *zone) { return zdb_record_find(&zone->apex->resource_record_set, TYPE_DNSKEY); } #if OBSOLETE zdb_zone* zdb_zone_xchg_with_invalid(zdb *db, const u8 *origin, u16 or_flags) // lock checked { dnsname_vector name; dnsname_to_dnsname_vector(origin, &name); zdb_lock(db, ZDB_MUTEX_WRITER); zdb_zone_label *zone_label = zdb_zone_label_add_nolock(db, &name); // xchg with invalid (obsolete) zdb_zone *old_zone = zone_label->zone; /* * If the zone exists and is invalid already : skip */ if(old_zone != NULL) { zdb_zone_lock(old_zone, ZDB_ZONE_MUTEX_INVALIDATE); alarm_close(old_zone->alarm_handle); old_zone->alarm_handle = ALARM_HANDLE_INVALID; if((old_zone->apex->flags & ZDB_RR_LABEL_INVALID_ZONE) == 0) { // create a dummy invalid zone zdb_zone *zone = zdb_zone_create(origin); // obsolete if(zone != NULL) { // mark the dummy zone as invalid zone->apex->flags |= ZDB_RR_LABEL_INVALID_ZONE; // locks so that only readers can access it zdb_zone_lock(zone, ZDB_ZONE_MUTEX_SIMPLEREADER); // see scheduler_database_replace_zone_init // so here is a rule : an invalid zone is always locked, and is only unlocked to be destroyed } log_debug("zdb_zone_xchg_with_invalid: replacing %p with %p", zone_label->zone, zone); zone_label->zone = zone; } zdb_zone_unlock(old_zone, ZDB_ZONE_MUTEX_INVALIDATE); } else { if(old_zone == NULL) { log_err("zdb_zone_xchg_with_invalid: no zone %{dnsname} found", origin); } else { log_err("zdb_zone_xchg_with_invalid: zone %{dnsname}@%p is invalid already", old_zone->origin, old_zone); old_zone = NULL; } } return old_zone; } #endif bool zdb_zone_isinvalid(zdb_zone *zone) { bool invalid = TRUE; if((zone != NULL) && (zone->apex != NULL)) { invalid = (zone->apex->flags & ZDB_RR_LABEL_INVALID_ZONE) != 0; } return invalid; } #ifdef DEBUG /** * DEBUG */ void zdb_zone_print_indented(zdb_zone *zone, output_stream *os, int indent) { if(zone == NULL) { osformatln(os, "%tz: NULL", indent); return; } u16 zclass = zdb_zone_getclass(zone); osformatln(os, "%tzone@%p(CLASS=%{dnsclass},ORIGIN='%{dnsname}'", indent, (void*)zone, &zclass, zone->origin); zdb_rr_label_print_indented(zone->apex, os, indent + 1); osformatln(os, "%t+:", indent); } void zdb_zone_print(zdb_zone *zone, output_stream *os) { zdb_zone_print_indented(zone, os, 0); } #endif /** @} */ yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/config.guess0000644000077100007710000000013212473710127020514 xustar000000000000000030 mtime=1424986199.147058409 30 atime=1424986199.146058409 30 ctime=1454597652.263344534 yadifa-2.1.6-5826/lib/dnsdb/config.guess0000755000077100007710000012367212473710127020336 0ustar00yadifayadifa00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-11-04' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/lib/dnsdb/PaxHeaders.8028/depcomp0000644000077100007710000000013212473710127017551 xustar000000000000000030 mtime=1424986199.161058409 30 atime=1424986199.161058409 30 ctime=1454597652.270344534 yadifa-2.1.6-5826/lib/dnsdb/depcomp0000755000077100007710000005601612473710127017370 0ustar00yadifayadifa00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # 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, 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, see . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/PaxHeaders.8028/config.guess0000644000077100007710000000013212473710127016654 xustar000000000000000030 mtime=1424986199.147058409 30 atime=1424986199.146058409 30 ctime=1454597650.518344534 yadifa-2.1.6-5826/config.guess0000755000077100007710000012367212473710127016476 0ustar00yadifayadifa00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-11-04' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/PaxHeaders.8028/etc0000644000077100007710000000013212654663025015042 xustar000000000000000030 mtime=1454597653.482344534 30 atime=1454597653.350344534 30 ctime=1454597653.482344534 yadifa-2.1.6-5826/etc/0000775000077100007710000000000012654663025014725 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad.init.rhel0000644000077100007710000000012212654647763020350 xustar000000000000000025 mtime=1454591987.1499 27 atime=1454597464.835344 30 ctime=1454597653.453344534 yadifa-2.1.6-5826/etc/yadifad.init.rhel0000775000077100007710000000510112654647763020157 0ustar00yadifayadifa00000000000000#!/bin/bash # # yadifad This shell script takes care of starting and stopping # yadifad on RedHat or other chkconfig-based system. # # chkconfig: - 13 87 # processname: yadifad # config: /etc/yadifad.conf # pidfile: /var/run/yadifad.pid # # description: YADIFA is a name server implementation developed from \ # scratch by .eu. It is portable across multiple operating \ # systems and supports DNSSEC, TSIG, DNS notify, DNS update, IPv6. ### BEGIN INIT INFO # Provides: yadifad # Required-Start: $network # Required-Stop: $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start and stop yadifad # Description: YADIFA is a name server implementation developed from \ # scratch by .eu. It is portable across multiple operating \ # systems and supports DNSSEC, TSIG, DNS notify, DNS update, IPv6. ### END INIT INFO # Written by Denis Fateyev (denis@fateyev.com) # 2014.07.05 # Source function library . /etc/init.d/functions # Source networking configuration [ -r /etc/sysconfig/network ] && . /etc/sysconfig/network start() { [ "$EUID" != "0" ] && exit 4 [ "${NETWORKING}" = "no" ] && exit 1 [ -f /usr/sbin/yadifad ] || exit 5 # Start daemon echo -n $"Starting yadifad: " daemon /usr/sbin/yadifad >/dev/null 2>&1 && success || failure RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/lock/subsys/yadifad } stop() { [ "$EUID" != "0" ] && exit 4 # Stop daemon echo -n $"Shutting down yadifad: " if [ -n "`pidfileofproc yadifad`" ] ; then killproc /usr/sbin/yadifad else failure $"Shutting down yadifad" fi RETVAL=$? echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/yadifad } restart() { stop start } reload() { [ "$EUID" != "0" ] && exit 4 # Reload daemon echo -n $"Reloading yadifad: " if [ -n "`pidfileofproc yadifad`" ] ; then killproc /usr/sbin/yadifad -HUP else failure $"Reloading yadifad" fi RETVAL=$? echo } # See how we were called case "$1" in start) start ;; stop) stop ;; restart) restart ;; reload) reload ;; condrestart|try-restart) status yadifad > /dev/null || exit 0 restart ;; status) status yadifad ;; *) echo $"Usage: $0 {start|stop|restart|reload|status|condrestart|try-restart}" exit 2 esac exit $RETVAL yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad.service.arch0000644000077100007710000000012412441775462021022 xustar000000000000000027 mtime=1418197810.874105 27 atime=1454597464.840344 30 ctime=1454597653.464344534 yadifa-2.1.6-5826/etc/yadifad.service.arch0000664000077100007710000000024512441775462020630 0ustar00yadifayadifa00000000000000[Unit] Description=yadifa nameserver [Service] ExecStart=/usr/bin/yadifad ExecReload=/bin/kill -HUP $MAINPID KillMode=process [Install] WantedBy=multi-user.target yadifa-2.1.6-5826/etc/PaxHeaders.8028/Makefile.am0000644000077100007710000000012412650131756017151 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.839344 30 ctime=1454597653.430344534 yadifa-2.1.6-5826/etc/Makefile.am0000664000077100007710000000613412650131756016762 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # YADIFA config Makefile.am script # # Makefile.am script # # $URL: https://svn.int.eurid.eu/svn/sysdevel/projects/yadifa/tags/release-2.1.6-public/etc/Makefile.am $ # # $Date: 2016-01-21 11:33:18 +0100 (Thu, 21 Jan 2016) $ # # $Revision: 5792 $ # ############################################################################## ACLOCAL_AMFLAGS = -I m4 OC=yadifad.conf OCE=$(OC).example YI=yadifad.init YIE=$(YI).example doc_DATA = $(OCE) $(YIE) yadifad-master.conf.example yadifad-slave.conf.example \ yadifad.init.debian yadifad.init.rhel \ yadifad.logrotate \ yadifad.service yadifad.service.arch yadifad.service.debian yadifad.service.rhel noinst_HEADERS = yadifad.conf.example yadifad-master.conf.example yadifad-slave.conf.example \ yadifad.init.example yadifad.init.debian yadifad.init.rhel \ yadifad.logrotate \ yadifad.service yadifad.service.arch yadifad.service.debian yadifad.service.rhel \ $(OC) $(YI) $(OC): $(OCE) cat $(OCE) | sed "s@\"\(.*\)/var/\(.*\)\"@\"$(localstatedir)/\2\"@" > $(OC) $(YI): $(YIE) cat $(YIE) | sed "s@^PREFIX=.*@PREFIX=\"$(prefix)\"@" > $(YI) all: $(YI) $(OC) install-data-hook: $(OC) mkdir -p $(DESTDIR)$(sysconfdir) touch $(DESTDIR)$(sysconfdir)/$(OC) clean-local: rm -f $(YI) $(OC) release: $(YI) $(OC) profile: $(YI) $(OC) debug: $(YI) $(OC) yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad-master.conf.example0000644000077100007710000000012411731654534022313 xustar000000000000000027 mtime=1332173148.838952 27 atime=1454597464.838344 30 ctime=1454597653.438344534 yadifa-2.1.6-5826/etc/yadifad-master.conf.example0000664000077100007710000000012711731654534022120 0ustar00yadifayadifa00000000000000 domain somedomain.eu file masters/somedomain.eu.zone type master yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad.conf.example0000644000077100007710000000012412654654373021030 xustar000000000000000027 mtime=1454594299.817879 27 atime=1454597464.831344 30 ctime=1454597653.434344534 yadifa-2.1.6-5826/etc/yadifad.conf.example0000664000077100007710000002034612654654373020642 0ustar00yadifayadifa00000000000000# # Example yadifa configuration file. #
# Detach from the console daemon off # Jail the application chroot off # The path where all the log files will be written logpath "/var/log/yadifad" # The location of the pid file pidfile "/var/run/yadifad.pid" # The path where all zone files will be written datapath "/var/lib/yadifad" # The path where the DNSSEC keys are found keyspath "/var/lib/yadifa/keys" # The path where the transfer and journaling files will be written (AXFR & IXFR) xfrpath "/var/cache/yadifa/xfr" # A string returned by a query of hostname. CH TXT (note if you leave this out, the real hostname will be given back) hostname "server-yadifad" # An ID returned by a query to id.server. CH TXT serverid "yadifad-01" # The version returned by a query to version.yadifa. CH TXT version "2.1.6" # Set the maximum UDP packet size. Cannot be less than 512. Cannot be more than 65535. Typical choice is 4096. edns0-max-size 4096 # The maximum number of parallel TCP queries. max-tcp-queries 100 # The user id to use (an integer can be used) user root # The group id to use (an integer can be used) group root # The DNS port. Any DNS query will be made using that port unless a specific value is used. port 53 # The interfaces to listen to. listen 0.0.0.0 # Enable the collection and logging of statistics statistics on # Choose the query log format (0 for none, 1 for YADIFA, 2 for BIND compatible, 3 for YADIFA and BIND) queries-log-type 1 # Drop queries with erroneous content # answer-formerr-packets on # Maximum number of records in an AXFR packet. Set to one for compatibility # with very old name servers # axfr-maxrecordbypacket 0 # Global Access Control List rules. # # Rules can be defined on network ranges, TSIG signatures, and ACL rules # simple queries: allow-query any # dynamic update of a zone allow-update none # transfer of a zone (AXFR or IXFR) allow-transfer none # notify of a change in the master allow-notify none # If YADIFA has the controller enabled, allow control only for these clients (none by default) allow-control controller
# If YADIFA has NSID support (default) ascii "yadifad example NSID" # alternatively, an hexadecimal format can be used # hex 79616469666164206578616d706c65204e5349440a # If YADIFA has the controller enabled (needs to have been configured at build using --enable-ctrl) # enable the controller enabled true # If YADIFA has been compiled with the Response Rate Limiter (default) # enable the RRL enabled true # don't actually limit the response rate, only log what the filter would do log_only false # how many responses per second are allowed for a (masked with the prefix) client responses_per_second 5 # how many errors per second are allowed for a (masked with the prefix) client errors_per_second 5 # window of time in which the rates are measured, expressed in seconds window 15 # every "slip" dropped answers, a truncated answer may randomly be given so the client can ask again using TCP slip 2 # the minimum size of the table storing (masked with the prefix) clients min_table_size 1024 # the maximum size of the table storing (masked with the prefix) clients max_table_size 16384 # IPv4 clients are masked with this prefix ipv4_prefix_length 24 # IPv6 clients are masked with this prefix ipv6_prefix_length 56 # the list of IP/networks (Access Control List) not impacted by the RRL exempted none # # Logging output channels configurations # # name stream-name arguments # # name is arbitrary # stream-name defines the output type (ie: a file name or syslog) # arguments is specific to the output type (ie: unix file access rights or syslog options and facilities # name stream-name arguments database database.log 0644 dnssec dnssec.log 0644 server server.log 0644 statistics statistics.log 0644 system system.log 0644 zone zone.log 0644 queries queries.log 0644 all all.log 0644 syslog syslog USER,CRON,PID # although possible, these two do not do make much sense if daemon is enabled stderr STDERR stdout STDOUT # Logging input configurations # # name debug-level channels # # name is predefined # debuglevel uses the same names as syslog or * or all to filter the input # channels is a comma-separated list of channels # In production, use EMERG,ALERT,CRIT,ERR,WARNING,NOTICE,INFO instead of * # bundle debuglevel channels database * database,all dnssec * dnssec,all server * server,all stats * statistics system * system,all zone * zone,all queries * queries # # TSIG Key configuration # name abroad-admin-key algorithm hmac-md5 secret WorthlessKeyForExample== name master-slave algorithm hmac-md5 secret MasterAndSlavesTSIGKey== # # Access Control List definitions # # Meant to be used in access lists parameters (allow-*) # arbitrary-name comma-separated-list # transferer key master-slave admins 192.0.2.0/24, 2001:db8::74 master 192.0.2.53 controller key abroad-admin-key # # Master domain zone config # type master domain localhost file masters/localhost.zone allow-transfer none allow-update none allow-update-forwarding none type master domain localhost6 file masters/localhost6.zone allow-transfer none allow-update none allow-update-forwarding none type master domain 0.0.127.in-addr.arpa file masters/0.0.127.in-addr.arpa.zone allow-transfer none allow-update none allow-update-forwarding none type master domain 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.0.0.0.ip6.arpa file masters/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.0.0.0.ip6.arpa.zone allow-transfer none allow-update none allow-update-forwarding none # This server is master for that zone (mandatory) type master # The domain name (mandatory) domain somedomain.eu. # The zone file, relative to 'datapath'. (mandatory for a master) file masters/somedomain.eu.zone yadifa-2.1.6-5826/etc/PaxHeaders.8028/Makefile.in0000644000077100007710000000013212654662556017174 xustar000000000000000030 mtime=1454597486.068344534 30 atime=1454597486.067344534 30 ctime=1454597653.482344534 yadifa-2.1.6-5826/etc/Makefile.in0000664000077100007710000005235012654662556017007 0ustar00yadifayadifa00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # YADIFA config Makefile.am script # # Makefile.am script # # $URL: https://svn.int.eurid.eu/svn/sysdevel/projects/yadifa/tags/release-2.1.6-public/etc/Makefile.am $ # # $Date: 2016-01-21 11:33:18 +0100 (Thu, 21 Jan 2016) $ # # $Revision: 5792 $ # ############################################################################## VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@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@ subdir = etc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/m4/eurid.m4 $(top_srcdir)/m4/yadifa.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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 = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(doc_DATA) HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCOPTIMISATIONFLAGS = @CCOPTIMISATIONFLAGS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAS_ACL_SUPPORT = @HAS_ACL_SUPPORT@ HAS_BFD_DEBUG_SUPPORT = @HAS_BFD_DEBUG_SUPPORT@ HAS_BIG_ENDIAN = @HAS_BIG_ENDIAN@ HAS_CC_ADDRESS_SANITIZER_CHECK = @HAS_CC_ADDRESS_SANITIZER_CHECK@ HAS_CC_ANSI = @HAS_CC_ANSI@ HAS_CC_ANSI_ALIAS = @HAS_CC_ANSI_ALIAS@ HAS_CC_CATCH_UNDEFINED_BEHAVIOR = @HAS_CC_CATCH_UNDEFINED_BEHAVIOR@ HAS_CC_DWARF2 = @HAS_CC_DWARF2@ HAS_CC_DWARF3 = @HAS_CC_DWARF3@ HAS_CC_DWARF4 = @HAS_CC_DWARF4@ HAS_CC_EXCEPTIONS = @HAS_CC_EXCEPTIONS@ HAS_CC_G = @HAS_CC_G@ HAS_CC_G3 = @HAS_CC_G3@ HAS_CC_M32 = @HAS_CC_M32@ HAS_CC_M64 = @HAS_CC_M64@ HAS_CC_MISSING_FIELD_INITIALIZERS = @HAS_CC_MISSING_FIELD_INITIALIZERS@ HAS_CC_NO_IDENT = @HAS_CC_NO_IDENT@ HAS_CC_NO_OMIT_FRAME_POINTER = @HAS_CC_NO_OMIT_FRAME_POINTER@ HAS_CC_PEDANTIC = @HAS_CC_PEDANTIC@ HAS_CC_RDYNAMIC = @HAS_CC_RDYNAMIC@ HAS_CC_SANITIZE_ADDRESS = @HAS_CC_SANITIZE_ADDRESS@ HAS_CC_STACK_PROTECTOR = @HAS_CC_STACK_PROTECTOR@ HAS_CC_STD_C99 = @HAS_CC_STD_C99@ HAS_CC_STD_GNU99 = @HAS_CC_STD_GNU99@ HAS_CC_TUNE_NATIVE = @HAS_CC_TUNE_NATIVE@ HAS_CC_WALL = @HAS_CC_WALL@ HAS_CC_XC99 = @HAS_CC_XC99@ HAS_CTRL = @HAS_CTRL@ HAS_CTRL_DYNAMIC_PROVISIONING = @HAS_CTRL_DYNAMIC_PROVISIONING@ HAS_DYNUPDATE_SUPPORT = @HAS_DYNUPDATE_SUPPORT@ HAS_FULL_ASCII7 = @HAS_FULL_ASCII7@ HAS_LITTLE_ENDIAN = @HAS_LITTLE_ENDIAN@ HAS_LOGDIR = @HAS_LOGDIR@ HAS_LOG_PID_ALWAYS_ON = @HAS_LOG_PID_ALWAYS_ON@ HAS_LOG_THREAD_ID_ALWAYS_ON = @HAS_LOG_THREAD_ID_ALWAYS_ON@ HAS_MALLOC_DEBUG_SUPPORT = @HAS_MALLOC_DEBUG_SUPPORT@ HAS_MASTER_SUPPORT = @HAS_MASTER_SUPPORT@ HAS_MESSAGES_SUPPORT = @HAS_MESSAGES_SUPPORT@ HAS_MUTEX_DEBUG_SUPPORT = @HAS_MUTEX_DEBUG_SUPPORT@ HAS_NON_AA_AXFR_SUPPORT = @HAS_NON_AA_AXFR_SUPPORT@ HAS_NSID_SUPPORT = @HAS_NSID_SUPPORT@ HAS_RRL_SUPPORT = @HAS_RRL_SUPPORT@ HAS_RRSIG_MANAGEMENT_SUPPORT = @HAS_RRSIG_MANAGEMENT_SUPPORT@ HAS_TOOLS = @HAS_TOOLS@ HAS_TSIG_SUPPORT = @HAS_TSIG_SUPPORT@ HAS_ZALLOC_DEBUG_SUPPORT = @HAS_ZALLOC_DEBUG_SUPPORT@ HAS_ZALLOC_STATISTICS_SUPPORT = @HAS_ZALLOC_STATISTICS_SUPPORT@ HAS_ZALLOC_SUPPORT = @HAS_ZALLOC_SUPPORT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IS_BSD_FAMILY = @IS_BSD_FAMILY@ IS_DARWIN_OS = @IS_DARWIN_OS@ IS_LINUX_FAMILY = @IS_LINUX_FAMILY@ IS_SOLARIS_FAMILY = @IS_SOLARIS_FAMILY@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ 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@ logdir = @logdir@ 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@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 OC = yadifad.conf OCE = $(OC).example YI = yadifad.init YIE = $(YI).example doc_DATA = $(OCE) $(YIE) yadifad-master.conf.example yadifad-slave.conf.example \ yadifad.init.debian yadifad.init.rhel \ yadifad.logrotate \ yadifad.service yadifad.service.arch yadifad.service.debian yadifad.service.rhel noinst_HEADERS = yadifad.conf.example yadifad-master.conf.example yadifad-slave.conf.example \ yadifad.init.example yadifad.init.debian yadifad.init.rhel \ yadifad.logrotate \ yadifad.service yadifad.service.arch yadifad.service.debian yadifad.service.rhel \ $(OC) $(YI) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu etc/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: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files 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 "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$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 $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(docdir)"; 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-docDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am 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-docDATA .MAKE: install-am install-data-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-local cscopelist-am ctags ctags-am \ 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-hook \ install-docDATA 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 tags-am uninstall \ uninstall-am uninstall-docDATA .PRECIOUS: Makefile $(OC): $(OCE) cat $(OCE) | sed "s@\"\(.*\)/var/\(.*\)\"@\"$(localstatedir)/\2\"@" > $(OC) $(YI): $(YIE) cat $(YIE) | sed "s@^PREFIX=.*@PREFIX=\"$(prefix)\"@" > $(YI) all: $(YI) $(OC) install-data-hook: $(OC) mkdir -p $(DESTDIR)$(sysconfdir) touch $(DESTDIR)$(sysconfdir)/$(OC) clean-local: rm -f $(YI) $(OC) release: $(YI) $(OC) profile: $(YI) $(OC) debug: $(YI) $(OC) # 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: yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad-slave.conf.example0000644000077100007710000000012412441775462022135 xustar000000000000000027 mtime=1418197810.874105 27 atime=1454597464.832344 30 ctime=1454597653.442344534 yadifa-2.1.6-5826/etc/yadifad-slave.conf.example0000664000077100007710000000015012441775462021736 0ustar00yadifayadifa00000000000000 domain somedomain.eu file slaves/somedomain.eu.zone type slave master 192.0.2.1 yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad.conf0000644000077100007710000000013212654663025017367 xustar000000000000000030 mtime=1454597653.400344534 30 atime=1454597653.397344534 30 ctime=1454597653.475344534 yadifa-2.1.6-5826/etc/yadifad.conf0000664000077100007710000002043012654663025017174 0ustar00yadifayadifa00000000000000# # Example yadifa configuration file. #
# Detach from the console daemon off # Jail the application chroot off # The path where all the log files will be written logpath "/usr/local/var/log/yadifad" # The location of the pid file pidfile "/usr/local/var/run/yadifad.pid" # The path where all zone files will be written datapath "/usr/local/var/lib/yadifad" # The path where the DNSSEC keys are found keyspath "/usr/local/var/lib/yadifa/keys" # The path where the transfer and journaling files will be written (AXFR & IXFR) xfrpath "/usr/local/var/cache/yadifa/xfr" # A string returned by a query of hostname. CH TXT (note if you leave this out, the real hostname will be given back) hostname "server-yadifad" # An ID returned by a query to id.server. CH TXT serverid "yadifad-01" # The version returned by a query to version.yadifa. CH TXT version "2.1.6" # Set the maximum UDP packet size. Cannot be less than 512. Cannot be more than 65535. Typical choice is 4096. edns0-max-size 4096 # The maximum number of parallel TCP queries. max-tcp-queries 100 # The user id to use (an integer can be used) user root # The group id to use (an integer can be used) group root # The DNS port. Any DNS query will be made using that port unless a specific value is used. port 53 # The interfaces to listen to. listen 0.0.0.0 # Enable the collection and logging of statistics statistics on # Choose the query log format (0 for none, 1 for YADIFA, 2 for BIND compatible, 3 for YADIFA and BIND) queries-log-type 1 # Drop queries with erroneous content # answer-formerr-packets on # Maximum number of records in an AXFR packet. Set to one for compatibility # with very old name servers # axfr-maxrecordbypacket 0 # Global Access Control List rules. # # Rules can be defined on network ranges, TSIG signatures, and ACL rules # simple queries: allow-query any # dynamic update of a zone allow-update none # transfer of a zone (AXFR or IXFR) allow-transfer none # notify of a change in the master allow-notify none # If YADIFA has the controller enabled, allow control only for these clients (none by default) allow-control controller
# If YADIFA has NSID support (default) ascii "yadifad example NSID" # alternatively, an hexadecimal format can be used # hex 79616469666164206578616d706c65204e5349440a # If YADIFA has the controller enabled (needs to have been configured at build using --enable-ctrl) # enable the controller enabled true # If YADIFA has been compiled with the Response Rate Limiter (default) # enable the RRL enabled true # don't actually limit the response rate, only log what the filter would do log_only false # how many responses per second are allowed for a (masked with the prefix) client responses_per_second 5 # how many errors per second are allowed for a (masked with the prefix) client errors_per_second 5 # window of time in which the rates are measured, expressed in seconds window 15 # every "slip" dropped answers, a truncated answer may randomly be given so the client can ask again using TCP slip 2 # the minimum size of the table storing (masked with the prefix) clients min_table_size 1024 # the maximum size of the table storing (masked with the prefix) clients max_table_size 16384 # IPv4 clients are masked with this prefix ipv4_prefix_length 24 # IPv6 clients are masked with this prefix ipv6_prefix_length 56 # the list of IP/networks (Access Control List) not impacted by the RRL exempted none # # Logging output channels configurations # # name stream-name arguments # # name is arbitrary # stream-name defines the output type (ie: a file name or syslog) # arguments is specific to the output type (ie: unix file access rights or syslog options and facilities # name stream-name arguments database database.log 0644 dnssec dnssec.log 0644 server server.log 0644 statistics statistics.log 0644 system system.log 0644 zone zone.log 0644 queries queries.log 0644 all all.log 0644 syslog syslog USER,CRON,PID # although possible, these two do not do make much sense if daemon is enabled stderr STDERR stdout STDOUT # Logging input configurations # # name debug-level channels # # name is predefined # debuglevel uses the same names as syslog or * or all to filter the input # channels is a comma-separated list of channels # In production, use EMERG,ALERT,CRIT,ERR,WARNING,NOTICE,INFO instead of * # bundle debuglevel channels database * database,all dnssec * dnssec,all server * server,all stats * statistics system * system,all zone * zone,all queries * queries # # TSIG Key configuration # name abroad-admin-key algorithm hmac-md5 secret WorthlessKeyForExample== name master-slave algorithm hmac-md5 secret MasterAndSlavesTSIGKey== # # Access Control List definitions # # Meant to be used in access lists parameters (allow-*) # arbitrary-name comma-separated-list # transferer key master-slave admins 192.0.2.0/24, 2001:db8::74 master 192.0.2.53 controller key abroad-admin-key # # Master domain zone config # type master domain localhost file masters/localhost.zone allow-transfer none allow-update none allow-update-forwarding none type master domain localhost6 file masters/localhost6.zone allow-transfer none allow-update none allow-update-forwarding none type master domain 0.0.127.in-addr.arpa file masters/0.0.127.in-addr.arpa.zone allow-transfer none allow-update none allow-update-forwarding none type master domain 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.0.0.0.ip6.arpa file masters/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.0.0.0.ip6.arpa.zone allow-transfer none allow-update none allow-update-forwarding none # This server is master for that zone (mandatory) type master # The domain name (mandatory) domain somedomain.eu. # The zone file, relative to 'datapath'. (mandatory for a master) file masters/somedomain.eu.zone yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad.init0000644000077100007710000000013212654663025017405 xustar000000000000000030 mtime=1454597653.407344534 30 atime=1454597653.405344534 30 ctime=1454597653.479344534 yadifa-2.1.6-5826/etc/yadifad.init0000664000077100007710000001144312654663025017216 0ustar00yadifayadifa00000000000000#! /bin/sh #------------------------------------------------------------------------------ ## ## #------------------------------------------------------------------------------ ### BEGIN INIT INFO # Provides: yadifad # Required-Start: $local_fs $network # Required-Stop: # Should-Start: udev module-init-tools # Should-Stop: $named # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Starts the YADIFAD name server # Description: Starts the YADIFAD name server ### END INIT INFO PATH=/sbin:/usr/sbin:/bin:/usr/bin PREFIX="/usr/local" NAME="yadifad" NAMED_USERNAME="nobody" DAEMON="/sbin/${NAME}" SCRIPTNAME="/etc/init.d/${NAME}" PIDFILE="$PREFIX/var/run/yadifa.pid" CHROOTS=0 CHROOTDIR=$PREFIX YADIFA_CHROOT=/var if [ "$DEBUG" = "" ] then DEBUG=0 fi log() { echo $* logger -t $NAME-init-script -- $* } debug() { if [ $DEBUG -ne 0 ] then echo $* logger -t $NAME-init-script -- $* fi } if [ $CHROOTS -ne 0 ] then PREFIX= fi VAR="$PREFIX/var" CONF="$PREFIX/etc/yadifad.conf" if [ "$MAX_STOP_WAIT" = "" ] then MAX_STOP_WAIT=5 fi # Inside the internal chroot if [ "$CORE_PREFIX" = "" ] then CORE_PREFIX=/log fi if [ "$DUMPS_CORE" = "" ] then DUMPS_CORE=1 fi if [ $DUMPS_CORE -ne 0 ] then if [ ! -d $CHROOTDIR/$YADIFA_CHROOT/$CORE_PREFIX ] then log "Core dump enabled but '$CHROOTDIR/$YADIFA_CHROOT/$CORE_PREFIX' directory does not exists" exit 1 fi fi # not yet: # # CHECK="/sbin/yadifa-checkconf" # $? : supposed to be set # 1 : message # 2 : optional override code # 3 : what to do in case of error (command) die_on_error() { ERR="$?" if [ ! "" = "$2" ] then ERR="$2" fi if [ 0 -ne ${ERR} ] then if [ ! "" = "$3" ] then $3 fi log "error: '$1' ($ERR)" exit $err fi } # # Function that checks if yadifa is running # do_status_internal() { debug "checking for valid PIDFILE ${PIDFILE}" running=0 if [ -f ${PIDFILE} ] then PID=$(cat ${PIDFILE}) if [ "${PID}" != "" ] then PROC=$(ps -p ${PID} | tail -1| awk '{print $4}') if [ "$PROC" = "$NAME" ] then running=1 else log "error : process with pid ${PID} is '$PROC' and not '$NAME' : deleting pid file" rm -f ${PIDFILE} fi else log "error: empty '${PIDFILE}' : deleting pid file" rm -f ${PIDFILE} fi fi return $running } do_status() { do_status_internal running=$? if [ $running -eq 1 ] then log "${NAME} seems to be already running." exit 0 else log "${NAME} does not seem to be running." exit 1 fi } # # Function that starts the daemon/service # do_start() { log "Starting $NAME" debug "starting if no valid PIDFILE ${PIDFILE}" do_status_internal running=$? if [ $running -eq 1 ] then log "${NAME} seems to be already running." exit 1 fi debug cd $CHROOTDIR cd $CHROOTDIR debug prefix = ${PREFIX} debug daemon = ${DAEMON} if [ $DUMPS_CORE -ne 0 ] then COREPATH="$CHROOTDIR/$YADIFA_CHROOT/$CORE_PREFIX/cores" log "enabling core dump in $COREPATH" ulimit -c unlimited mkdir -p $COREPATH chmod 0777 $COREPATH chmod +t $COREPATH log "core dump will be stored in '$COREPATH' ($CORE_PREFIX/cores)" echo "$CORE_PREFIX/cores/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern echo 0x7 > /proc/self/coredump_filter echo -n 1 > /proc/sys/kernel/core_uses_pid echo -n 1 > /proc/sys/fs/suid_dumpable fi CMD="${PREFIX}${DAEMON} -c ${CONF}" if [ $CHROOTS -ne 0 ] then CMD="chroot $CHROOTDIR $CMD" fi debug $CMD $CMD die_on_error "${DAEMON} returned $?" exit 0 } # # Function that stops the daemon/service # do_stop() { log "Stopping $NAME" debug "stopping if valid PIDFILE ${PIDFILE}" if [ -f ${PIDFILE} ] then while [ -f ${PIDFILE} ] do PID=$(cat ${PIDFILE}) if [ "${PID}" = "" ] then log "error: empty '${PIDFILE}' : deleting pid file" rm -f ${PIDFILE} break fi PROC=$(ps -p ${PID} | tail -1| awk '{print $4}') if [ "$PROC" != "$NAME" ] then log "error : process with pid ${PID} is '$PROC' and not '$NAME' : deleting pid file" rm -f ${PIDFILE} break fi kill ${PID} > /dev/null 2>&1 for count in $(seq 0 $MAX_STOP_WAIT) do if [ ! -f ${PIDFILE} ] then break fi kill -0 ${PID} > /dev/null 2>&1 if [ $? -ne 0 ] then rm -f ${PIDFILE} break fi log "waiting for the process to stop (waited $count seconds)" sleep 1 done done else log "${NAME} does not seem to be running ..." debug "reason: ${PIDFILE} not found" fi } debug called with $1 case "$1" in start) do_start ;; stop) do_stop ;; restart) do_stop do_start ;; status) do_status ;; *) log "Usage: $SCRIPTNAME {start|stop|restart|status}" >&2 exit 3 ;; esac : yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad.logrotate0000644000077100007710000000012212654647763020454 xustar000000000000000025 mtime=1454591987.1499 27 atime=1454597464.835344 30 ctime=1454597653.456344534 yadifa-2.1.6-5826/etc/yadifad.logrotate0000664000077100007710000000054412654647763020266 0ustar00yadifayadifa00000000000000/var/log/yadifa/*log { daily rotate 10 compress missingok notifempty sharedscripts postrotate if [ -f "/usr/sbin/service" ]; then /usr/sbin/service yadifad reload > /dev/null 2>/dev/null || true else /sbin/service yadifad reload > /dev/null 2>/dev/null || true fi endscript } yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad.service.rhel0000644000077100007710000000012412441775462021037 xustar000000000000000027 mtime=1418197810.874105 27 atime=1454597464.835344 30 ctime=1454597653.471344534 yadifa-2.1.6-5826/etc/yadifad.service.rhel0000664000077100007710000000031712441775462020645 0ustar00yadifayadifa00000000000000[Unit] Description=Yadifa DNS server After=network.target [Service] Type=simple PIDFile=/run/yadifad.pid ExecStart=/usr/sbin/yadifad ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad.service0000644000077100007710000000012412441775462020106 xustar000000000000000027 mtime=1418197810.874105 27 atime=1454597464.835344 30 ctime=1454597653.460344534 yadifa-2.1.6-5826/etc/yadifad.service0000664000077100007710000000044412441775462017715 0ustar00yadifayadifa00000000000000[Unit] Description=YADIFA Domain Name Server Documentation=man:yadifa(8) After=network.target [Service] Type=simple PIDFile=/var/run/yadifad.pid ExecStart=/usr/sbin/yadifad -c /etc/yadifa/yadifad.conf ExecReload=/bin/kill -HUP $MAINPID KillMode=process [Install] WantedBy=multi-user.target yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad.service.debian0000644000077100007710000000012412441775462021327 xustar000000000000000027 mtime=1418197810.874105 27 atime=1454597464.831344 30 ctime=1454597653.468344534 yadifa-2.1.6-5826/etc/yadifad.service.debian0000664000077100007710000000030712441775462021134 0ustar00yadifayadifa00000000000000[Unit] Description=YADIFA Domain Name Server Documentation=man:yadifa(8) After=network.target [Service] ExecStart=/usr/sbin/yadifad -c /etc/yadifa/yadifad.conf [Install] WantedBy=multi-user.target yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad.init.example0000644000077100007710000000012312355246262021035 xustar000000000000000026 mtime=1404390578.33145 27 atime=1454597464.835344 30 ctime=1454597653.445344534 yadifa-2.1.6-5826/etc/yadifad.init.example0000664000077100007710000001145112355246262020645 0ustar00yadifayadifa00000000000000#! /bin/sh #------------------------------------------------------------------------------ ## ## #------------------------------------------------------------------------------ ### BEGIN INIT INFO # Provides: yadifad # Required-Start: $local_fs $network # Required-Stop: # Should-Start: udev module-init-tools # Should-Stop: $named # Default-Start: 2 3 4 5 # Default-Stop: # Short-Description: Starts the YADIFAD name server # Description: Starts the YADIFAD name server ### END INIT INFO PATH=/sbin:/usr/sbin:/bin:/usr/bin PREFIX="/registry/yadifa" NAME="yadifad" NAMED_USERNAME="nobody" DAEMON="/sbin/${NAME}" SCRIPTNAME="/etc/init.d/${NAME}" PIDFILE="$PREFIX/var/run/yadifa.pid" CHROOTS=0 CHROOTDIR=$PREFIX YADIFA_CHROOT=/var if [ "$DEBUG" = "" ] then DEBUG=0 fi log() { echo $* logger -t $NAME-init-script -- $* } debug() { if [ $DEBUG -ne 0 ] then echo $* logger -t $NAME-init-script -- $* fi } if [ $CHROOTS -ne 0 ] then PREFIX= fi VAR="$PREFIX/var" CONF="$PREFIX/etc/yadifad.conf" if [ "$MAX_STOP_WAIT" = "" ] then MAX_STOP_WAIT=5 fi # Inside the internal chroot if [ "$CORE_PREFIX" = "" ] then CORE_PREFIX=/log fi if [ "$DUMPS_CORE" = "" ] then DUMPS_CORE=1 fi if [ $DUMPS_CORE -ne 0 ] then if [ ! -d $CHROOTDIR/$YADIFA_CHROOT/$CORE_PREFIX ] then log "Core dump enabled but '$CHROOTDIR/$YADIFA_CHROOT/$CORE_PREFIX' directory does not exists" exit 1 fi fi # not yet: # # CHECK="/sbin/yadifa-checkconf" # $? : supposed to be set # 1 : message # 2 : optional override code # 3 : what to do in case of error (command) die_on_error() { ERR="$?" if [ ! "" = "$2" ] then ERR="$2" fi if [ 0 -ne ${ERR} ] then if [ ! "" = "$3" ] then $3 fi log "error: '$1' ($ERR)" exit $err fi } # # Function that checks if yadifa is running # do_status_internal() { debug "checking for valid PIDFILE ${PIDFILE}" running=0 if [ -f ${PIDFILE} ] then PID=$(cat ${PIDFILE}) if [ "${PID}" != "" ] then PROC=$(ps -p ${PID} | tail -1| awk '{print $4}') if [ "$PROC" = "$NAME" ] then running=1 else log "error : process with pid ${PID} is '$PROC' and not '$NAME' : deleting pid file" rm -f ${PIDFILE} fi else log "error: empty '${PIDFILE}' : deleting pid file" rm -f ${PIDFILE} fi fi return $running } do_status() { do_status_internal running=$? if [ $running -eq 1 ] then log "${NAME} seems to be already running." exit 0 else log "${NAME} does not seem to be running." exit 1 fi } # # Function that starts the daemon/service # do_start() { log "Starting $NAME" debug "starting if no valid PIDFILE ${PIDFILE}" do_status_internal running=$? if [ $running -eq 1 ] then log "${NAME} seems to be already running." exit 1 fi debug cd $CHROOTDIR cd $CHROOTDIR debug prefix = ${PREFIX} debug daemon = ${DAEMON} if [ $DUMPS_CORE -ne 0 ] then COREPATH="$CHROOTDIR/$YADIFA_CHROOT/$CORE_PREFIX/cores" log "enabling core dump in $COREPATH" ulimit -c unlimited mkdir -p $COREPATH chmod 0777 $COREPATH chmod +t $COREPATH log "core dump will be stored in '$COREPATH' ($CORE_PREFIX/cores)" echo "$CORE_PREFIX/cores/core.%e.%p.%h.%t" > /proc/sys/kernel/core_pattern echo 0x7 > /proc/self/coredump_filter echo -n 1 > /proc/sys/kernel/core_uses_pid echo -n 1 > /proc/sys/fs/suid_dumpable fi CMD="${PREFIX}${DAEMON} -c ${CONF}" if [ $CHROOTS -ne 0 ] then CMD="chroot $CHROOTDIR $CMD" fi debug $CMD $CMD die_on_error "${DAEMON} returned $?" exit 0 } # # Function that stops the daemon/service # do_stop() { log "Stopping $NAME" debug "stopping if valid PIDFILE ${PIDFILE}" if [ -f ${PIDFILE} ] then while [ -f ${PIDFILE} ] do PID=$(cat ${PIDFILE}) if [ "${PID}" = "" ] then log "error: empty '${PIDFILE}' : deleting pid file" rm -f ${PIDFILE} break fi PROC=$(ps -p ${PID} | tail -1| awk '{print $4}') if [ "$PROC" != "$NAME" ] then log "error : process with pid ${PID} is '$PROC' and not '$NAME' : deleting pid file" rm -f ${PIDFILE} break fi kill ${PID} > /dev/null 2>&1 for count in $(seq 0 $MAX_STOP_WAIT) do if [ ! -f ${PIDFILE} ] then break fi kill -0 ${PID} > /dev/null 2>&1 if [ $? -ne 0 ] then rm -f ${PIDFILE} break fi log "waiting for the process to stop (waited $count seconds)" sleep 1 done done else log "${NAME} does not seem to be running ..." debug "reason: ${PIDFILE} not found" fi } debug called with $1 case "$1" in start) do_start ;; stop) do_stop ;; restart) do_stop do_start ;; status) do_status ;; *) log "Usage: $SCRIPTNAME {start|stop|restart|status}" >&2 exit 3 ;; esac : yadifa-2.1.6-5826/etc/PaxHeaders.8028/yadifad.init.debian0000644000077100007710000000012412441775462020632 xustar000000000000000027 mtime=1418197810.874105 27 atime=1454597464.831344 30 ctime=1454597653.449344534 yadifa-2.1.6-5826/etc/yadifad.init.debian0000775000077100007710000001100612441775462020440 0ustar00yadifayadifa00000000000000N INIT INFO # Provides: yadifa # Required-Start: $remote_fs # Required-Stop: $remote_fs # Should-Start: $network $syslog # Should-Stop: $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Starts and stops the YADIFA name server # Description: YADIFA is a lightweight authoritative domain name server ### END INIT INFO # Author: Markus Schade PATH=/sbin:/usr/sbin:/bin:/usr/bin DESC="domain name service" NAME=yadifa DAEMON=/usr/sbin/yadifad DAEMON_ARGS="" # Arguments to run the daemon with PIDFILE=/var/run/$NAME/$NAME.pid SCRIPTNAME=/etc/init.d/$NAME # Exit if the package is not installed [ -x $DAEMON ] || exit 0 # Read configuration variable file if it is present [ -r /etc/default/$NAME ] && . /etc/default/$NAME # Load the VERBOSE setting and other rcS variables . /lib/init/vars.sh # Define LSB log_* functions. # Depend on lsb-base (>= 3.0-6) to ensure that this file is present. . /lib/lsb/init-functions # # Function that starts the daemon/service # do_start() { # dirs under /var/run can go away on reboots. mkdir -p /var/run/yadifa chmod 775 /var/run/yadifa chown root:yadifa /var/run/yadifa >/dev/null 2>&1 || true # Return # 0 if daemon has been started # 1 if daemon was already running # 2 if daemon could not be started start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ || return 1 start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ $DAEMON_ARGS \ || return 2 # Add code here, if necessary, that waits for the process to be ready # to handle requests from services started subsequently which depend # on this one. As a last resort, sleep for some time. } # # Function that stops the daemon/service # do_stop() { # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME RETVAL="$?" [ "$RETVAL" = 2 ] && return 2 # Wait for children to finish too if this is a daemon that forks # and if the daemon is only ever run from this initscript. # If the above conditions are not satisfied then add some other code # that waits for the process to drop all resources that could be # needed by services started subsequently. A last resort is to # sleep for some time. start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON [ "$?" = 2 ] && return 2 # Many daemons don't delete their pidfiles when they exit. rm -f $PIDFILE return "$RETVAL" } # # Function that sends a SIGHUP to the daemon/service # do_reload() { # # If the daemon can reload its configuration without # restarting (for example, when it is sent a SIGHUP), # then implement that here. # start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME return 0 } case "$1" in start) [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME" do_start case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; stop) [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" do_stop case "$?" in 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; esac ;; status) status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? ;; #reload|force-reload) # # If do_reload() is not implemented then leave this commented out # and leave 'force-reload' as an alias for 'restart'. # #log_daemon_msg "Reloading $DESC" "$NAME" #do_reload #log_end_msg $? #;; restart|force-reload) # # If the "reload" option is implemented then remove the # 'force-reload' alias # log_daemon_msg "Restarting $DESC" "$NAME" do_stop case "$?" in 0|1) do_start case "$?" in 0) log_end_msg 0 ;; 1) log_end_msg 1 ;; # Old process is still running *) log_end_msg 1 ;; # Failed to start esac ;; *) # Failed to stop log_end_msg 1 ;; esac ;; *) #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 exit 3 ;; esac : yadifa-2.1.6-5826/PaxHeaders.8028/bin0000644000077100007710000000013212654663026015040 xustar000000000000000030 mtime=1454597654.002344534 30 atime=1454597654.002344534 30 ctime=1454597654.002344534 yadifa-2.1.6-5826/bin/0000775000077100007710000000000012654663026014723 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/bin/PaxHeaders.8028/yadifa0000644000077100007710000000013212654663026016275 xustar000000000000000030 mtime=1454597654.233344534 30 atime=1454597654.002344534 30 ctime=1454597654.233344534 yadifa-2.1.6-5826/bin/yadifa/0000775000077100007710000000000012654663026016160 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/Makefile.am0000644000077100007710000000012412650131756020403 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.823344 30 ctime=1454597654.115344534 yadifa-2.1.6-5826/bin/yadifa/Makefile.am0000664000077100007710000000450512650131756020214 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ #CPU_FLAGS= ACLOCAL_AMFLAGS = -I m4 dist_noinst_DATA = VERSION bin_PROGRAMS = yadifa yadifa_SOURCES = main.c query-result.c yadifa_SOURCES += yadifa.c yadifa-config.c noinst_HEADERS = common-config.h query-result.h noinst_HEADERS += yadifa.h yadifa-config.h # this will probably be removed afterwards #yadifa_SOURCES += dnssec-test.c # this will probably be removed afterwards noinst_HEADERS += dnssec-test.h include ../../mk/common-settings.mk include ../../mk/common-labels.mk yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/query-result.c0000644000077100007710000000012412650131756021174 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.817344 30 ctime=1454597654.226344534 yadifa-2.1.6-5826/bin/yadifa/query-result.c0000664000077100007710000001257212650131756021010 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #include "common-config.h" #include #include #include #include #include "query-result.h" /*----------------------------------------------------------------------------*/ extern logger_handle *g_client_logger; #define MODULE_MSG_HANDLE g_client_logger extern resolv_s config_resolver_settings; /*----------------------------------------------------------------------------*/ /** @brief check_query_result * * @param id_sent u16 * @param protocol u16 * @param question_mode u16 * @param mesg message_data * @param go_tcp u8 * * @return ya_result */ ya_result check_query_result(u16 id_sent, u16 protocol, u16 question_mode, message_data *mesg, u8 *go_tcp) { ya_result ret; u16 id_returned; u16 flags; /* ------------------------------------------------------------ */ if(message_isanswer(mesg)) { if(FAIL(ret = message_process_lenient(mesg))) { return ret; } } else { return ERROR; } /* initialize flag */ *go_tcp = NOK; /* read first 4 bytes and check some stuff */ packet_unpack_reader_data pr; packet_reader_init(&pr, mesg->buffer, mesg->received); /* 1. check ID */ packet_reader_read_u16(&pr, &id_returned); if(FAIL(id_sent == id_returned)) { return NOK; /** @todo 2014xxxx gve -- still needs to add a nice error code */ } /* 2. check for QR bit */ packet_reader_read_u16(&pr, &flags); if FAIL(((ntohs(flags) >> 8 ) & QR_BITS)) { log_info(" NOANSWER: %x", ntohs(flags)); return NOK; /** @todo 2014xxxx gve -- still needs to add a nice error code */ } /* 3. check if TCP query is needed */ if (!(question_mode & QM_FLAGS_INGORE_TC)) { if (protocol & QM_PROTOCOL_TCP) { if ((ntohs(flags) >> 8 ) & TC_BITS) { log_debug("truncated go tcp"); *go_tcp = OK; } } } return OK; } /** @brief check_query_result * * @param mesg message_data * @param duration long * @param view_mode_with u16 * @return ya_result */ ya_result view_query_result(message_data *mesg, long duration, u16 view_mode_with) { ya_result return_value; if(view_mode_with == 0) { view_mode_with = VM_WITH_ADDITIONAL|VM_WITH_ANSWER|VM_WITH_AUTHORITY|VM_WITH_QUESTION; } //u16 view_mode_with = g_yadig_main_settings.view_mode_with; /* ------------------------------------------------------------ */ // log_debug("VIEW QUERY RESULT: %x", config->view_mode); // formatln("result view_mode: %d", view_mode_with); #undef VM_MULTILINE #define VM_MULTILINE 0 if (view_mode_with & VM_MULTILINE) { formatln("MULTI"); } else { #ifdef DEBUG formatln("DIG"); osprint_dump(termout, mesg->buffer, mesg->received, 16, OSPRINT_DUMP_LAYOUT_GERY | OSPRINT_DUMP_HEXTEXT); formatln(""); flushout(); #endif return_value = message_print_format_dig(termout, mesg->buffer, mesg->received, view_mode_with, duration); } if (return_value < 0) { log_err("answer print: %r", return_value); } flushout(); return return_value; } /* ------------------------------------------------------------ */ yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/ChangeLog0000644000077100007710000000012412610121331020101 xustar000000000000000027 mtime=1444979417.160777 27 atime=1454597464.814344 30 ctime=1454597654.183344534 yadifa-2.1.6-5826/bin/yadifa/ChangeLog0000664000077100007710000000001312610121331017700 0ustar00yadifayadifa00000000000000see README yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/AUTHORS0000644000077100007710000000012412344035553017415 xustar000000000000000027 mtime=1401961323.997372 27 atime=1454597464.811344 30 ctime=1454597654.176344534 yadifa-2.1.6-5826/bin/yadifa/AUTHORS0000664000077100007710000000013512344035553017221 0ustar00yadifayadifa00000000000000Gery Van Emelen Eric Diaz Fernandez yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/Makefile.in0000644000077100007710000000013212654662640020420 xustar000000000000000030 mtime=1454597536.763344535 30 atime=1454597536.763344535 30 ctime=1454597654.169344534 yadifa-2.1.6-5826/bin/yadifa/Makefile.in0000664000077100007710000012024312654662640020230 0ustar00yadifayadifa00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 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@ ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ # # ALL # ################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@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@ bin_PROGRAMS = yadifa$(EXEEXT) @USES_SUNC_TRUE@am__append_1 = @USES_SUNC_FALSE@am__append_2 = -O0 @HAS_CC_NO_IDENT_TRUE@am__append_3 = -fno-ident @HAS_CC_ANSI_TRUE@am__append_4 = -ansi @HAS_CC_PEDANTIC_TRUE@am__append_5 = -pedantic @HAS_CC_WALL_TRUE@am__append_6 = -Wall -Wno-unknown-pragmas @HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE@am__append_7 = -Werror=missing-field-initializers @HAS_CC_STD_GNU99_TRUE@am__append_8 = -std=gnu99 @HAS_CC_STD_C99_TRUE@@HAS_CC_STD_GNU99_FALSE@am__append_9 = -std=c99 @HAS_CC_STD_GNU99_FALSE@@HAS_CC_XC99_TRUE@am__append_10 = -xc99 @HAS_CC_TUNE_NATIVE_TRUE@am__append_11 = -mtune=native @FORCE64BITS_TRUE@@HAS_CC_M64_TRUE@am__append_12 = -m64 @FORCE64BITS_TRUE@@HAS_CC_M64_TRUE@am__append_13 = -m64 @FORCE32BITS_TRUE@@FORCE64BITS_FALSE@@HAS_CC_M32_TRUE@am__append_14 = -m32 @FORCE32BITS_TRUE@@FORCE64BITS_FALSE@@HAS_CC_M32_TRUE@am__append_15 = -m32 # # DEBUG # @HAS_CC_G3_TRUE@am__append_16 = -g3 @HAS_CC_G3_FALSE@@HAS_CC_G_TRUE@am__append_17 = -g @HAS_CC_DWARF4_TRUE@am__append_18 = -gdwarf-4 @HAS_CC_DWARF3_TRUE@@HAS_CC_DWARF4_FALSE@am__append_19 = -gdwarf-3 # # Intel C Compiler # ############################################################################### #ICC #IPO= -ipo (need to use the intel xiar instead of ar) @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@am__append_20 = -DLTO -ipo @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@am__append_21 = -ipo @USES_ICC_TRUE@am__append_22 = -DUSES_ICC @HAS_CC_ANSI_ALIAS_TRUE@@USES_ICC_TRUE@am__append_23 = -ansi-alias -U__STRICT_ANSI__ @USES_ICC_TRUE@am__append_24 = -DMODE_DEBUG_ICC # # LLVM Clang # ############################################################################### # CLANG @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@am__append_25 = -DLTO -flto @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@am__append_26 = -flto @USES_CLANG_TRUE@am__append_27 = -DUSES_LLVM @USES_CLANG_TRUE@am__append_28 = -DMODE_DEBUG_CLANG # Note: add a _d suffix for debug builds ? # # Gnu C # ############################################################################### #GCC @HAS_CPU_NIAGARA_TRUE@@USES_GCC_TRUE@am__append_29 = -mcpu=niagara @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@am__append_30 = -DLTO -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@am__append_31 = -flto -fwhole-program -fno-fat-lto-objects -fuse-linker-plugin @USES_GCC_TRUE@am__append_32 = -DUSES_GCC @USES_GCC_TRUE@am__append_33 = -DMODE_DEBUG_GCC @USES_SUNC_TRUE@am__append_34 = -DUSES_SUNC @USES_SUNC_TRUE@am__append_35 = -DMODE_DEBUG_SUNC # Note: add a _d suffix for debug builds ? # # Unknown compiler # ############################################################################### # if an unknown compiler is used, it should have its own section @USES_UNKNOWN_TRUE@am__append_36 = -DUSES_UNKNOWN_COMPILER @USES_UNKNOWN_TRUE@am__append_37 = -DMODE_DEBUG_UNKNOWN # # Some BSD-based OSes need this # @IS_BSD_FAMILY_TRUE@am__append_38 = -I./include @IS_SOLARIS_FAMILY_TRUE@am__append_39 = -D_POSIX_PTHREAD_SEMANTICS @HAS_CC_RDYNAMIC_TRUE@am__append_40 = -rdynamic @HAS_CC_RDYNAMIC_TRUE@am__append_41 = -rdynamic # workaround a bug where clang does not handle properly profiling and optimizations @USES_CLANG_TRUE@am__append_42 = -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ $(top_srcdir)/../../m4/eurid.m4 \ $(top_srcdir)/../../m4/yadifa.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(dist_noinst_DATA) $(noinst_HEADERS) \ $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = client-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_yadifa_OBJECTS = main.$(OBJEXT) query-result.$(OBJEXT) \ yadifa.$(OBJEXT) yadifa-config.$(OBJEXT) yadifa_OBJECTS = $(am_yadifa_OBJECTS) yadifa_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(yadifa_SOURCES) DIST_SOURCES = $(yadifa_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(dist_noinst_DATA) HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)client-config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope am__DIST_COMMON = $(srcdir)/../../mk/common-labels.mk \ $(srcdir)/../../mk/common-settings.mk $(srcdir)/Makefile.in \ $(srcdir)/client-config.h.in AUTHORS COPYING ChangeLog INSTALL \ NEWS README compile config.guess config.sub depcomp install-sh \ ltmain.sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCOPTIMISATIONFLAGS = @CCOPTIMISATIONFLAGS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DNSCORE = @DNSCORE@ DNSDB = @DNSDB@ DNSLG = @DNSLG@ DNSZONE = @DNSZONE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ HAS_ACL_SUPPORT = @HAS_ACL_SUPPORT@ HAS_BFD_DEBUG_SUPPORT = @HAS_BFD_DEBUG_SUPPORT@ HAS_BIG_ENDIAN = @HAS_BIG_ENDIAN@ HAS_CC_ADDRESS_SANITIZER_CHECK = @HAS_CC_ADDRESS_SANITIZER_CHECK@ HAS_CC_ANSI = @HAS_CC_ANSI@ HAS_CC_ANSI_ALIAS = @HAS_CC_ANSI_ALIAS@ HAS_CC_CATCH_UNDEFINED_BEHAVIOR = @HAS_CC_CATCH_UNDEFINED_BEHAVIOR@ HAS_CC_DWARF2 = @HAS_CC_DWARF2@ HAS_CC_DWARF3 = @HAS_CC_DWARF3@ HAS_CC_DWARF4 = @HAS_CC_DWARF4@ HAS_CC_EXCEPTIONS = @HAS_CC_EXCEPTIONS@ HAS_CC_G = @HAS_CC_G@ HAS_CC_G3 = @HAS_CC_G3@ HAS_CC_M32 = @HAS_CC_M32@ HAS_CC_M64 = @HAS_CC_M64@ HAS_CC_MISSING_FIELD_INITIALIZERS = @HAS_CC_MISSING_FIELD_INITIALIZERS@ HAS_CC_NO_IDENT = @HAS_CC_NO_IDENT@ HAS_CC_NO_OMIT_FRAME_POINTER = @HAS_CC_NO_OMIT_FRAME_POINTER@ HAS_CC_PEDANTIC = @HAS_CC_PEDANTIC@ HAS_CC_RDYNAMIC = @HAS_CC_RDYNAMIC@ HAS_CC_SANITIZE_ADDRESS = @HAS_CC_SANITIZE_ADDRESS@ HAS_CC_STACK_PROTECTOR = @HAS_CC_STACK_PROTECTOR@ HAS_CC_STD_C99 = @HAS_CC_STD_C99@ HAS_CC_STD_GNU99 = @HAS_CC_STD_GNU99@ HAS_CC_TUNE_NATIVE = @HAS_CC_TUNE_NATIVE@ HAS_CC_WALL = @HAS_CC_WALL@ HAS_CC_XC99 = @HAS_CC_XC99@ HAS_CTRL = @HAS_CTRL@ HAS_CTRL_DYNAMIC_PROVISIONING = @HAS_CTRL_DYNAMIC_PROVISIONING@ HAS_DYNUPDATE_SUPPORT = @HAS_DYNUPDATE_SUPPORT@ HAS_FULL_ASCII7 = @HAS_FULL_ASCII7@ HAS_LITTLE_ENDIAN = @HAS_LITTLE_ENDIAN@ HAS_LOGDIR = @HAS_LOGDIR@ HAS_LOG_PID_ALWAYS_ON = @HAS_LOG_PID_ALWAYS_ON@ HAS_LOG_THREAD_ID_ALWAYS_ON = @HAS_LOG_THREAD_ID_ALWAYS_ON@ HAS_MALLOC_DEBUG_SUPPORT = @HAS_MALLOC_DEBUG_SUPPORT@ HAS_MASTER_SUPPORT = @HAS_MASTER_SUPPORT@ HAS_MESSAGES_SUPPORT = @HAS_MESSAGES_SUPPORT@ HAS_MUTEX_DEBUG_SUPPORT = @HAS_MUTEX_DEBUG_SUPPORT@ HAS_NON_AA_AXFR_SUPPORT = @HAS_NON_AA_AXFR_SUPPORT@ HAS_NSID_SUPPORT = @HAS_NSID_SUPPORT@ HAS_RRL_SUPPORT = @HAS_RRL_SUPPORT@ HAS_RRSIG_MANAGEMENT_SUPPORT = @HAS_RRSIG_MANAGEMENT_SUPPORT@ HAS_TSIG_SUPPORT = @HAS_TSIG_SUPPORT@ HAS_ZALLOC_DEBUG_SUPPORT = @HAS_ZALLOC_DEBUG_SUPPORT@ HAS_ZALLOC_STATISTICS_SUPPORT = @HAS_ZALLOC_STATISTICS_SUPPORT@ HAS_ZALLOC_SUPPORT = @HAS_ZALLOC_SUPPORT@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ IS_BSD_FAMILY = @IS_BSD_FAMILY@ IS_DARWIN_OS = @IS_DARWIN_OS@ IS_LINUX_FAMILY = @IS_LINUX_FAMILY@ IS_SOLARIS_FAMILY = @IS_SOLARIS_FAMILY@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENSSL = @OPENSSL@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ 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@ 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@ logdir = @logdir@ 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_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ #CPU_FLAGS= ACLOCAL_AMFLAGS = -I m4 dist_noinst_DATA = VERSION yadifa_SOURCES = main.c query-result.c yadifa.c yadifa-config.c # this will probably be removed afterwards #yadifa_SOURCES += dnssec-test.c # this will probably be removed afterwards noinst_HEADERS = common-config.h query-result.h yadifa.h \ yadifa-config.h dnssec-test.h # # # AM_CFLAGS = -D_THREAD_SAFE -D_REENTRANT -D_FILE_OFFSET_BITS=64 \ -I$(abs_builddir) -I$(abs_srcdir)/include $(am__append_3) \ $(am__append_4) $(am__append_5) $(am__append_6) \ $(am__append_7) $(am__append_8) $(am__append_9) \ $(am__append_10) $(am__append_11) $(am__append_12) \ $(am__append_14) $(am__append_20) $(am__append_22) \ $(am__append_23) $(am__append_25) $(am__append_27) \ $(am__append_29) $(am__append_30) $(am__append_32) \ $(am__append_34) $(am__append_36) $(am__append_38) \ $(am__append_39) $(LOCALFLAGS) $(YCFLAGS) AM_LDFLAGS = $(am__append_13) $(am__append_15) $(am__append_21) \ $(am__append_26) $(am__append_31) $(YLDFLAGS) DEBUGFLAGS = $(am__append_1) $(am__append_2) $(am__append_16) \ $(am__append_17) $(am__append_18) $(am__append_19) \ $(am__append_24) $(am__append_28) $(am__append_33) \ $(am__append_35) $(am__append_37) LOCALFLAGS = -DPREFIX='"$(prefix)"' -DSYSCONFDIR='"$(sysconfdir)"' -DLOCALSTATEDIR='"$(localstatedir)"' -DDATAROOTDIR='"$(datarootdir)"' -DDATADIR='"$(datadir)"' -DLOCALEDIR='"$(localedir)"' -DLOGDIR='"$(logdir)"' @HAS_LTO_SUPPORT_FALSE@@USES_CLANG_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_FALSE@@USES_GCC_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@AM_AR = llvm-ar @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@AM_AR = gcc-ar @HAS_LTO_SUPPORT_TRUE@@USES_ICC_TRUE@AM_AR = xiar # # Sun C # ############################################################################### # SUNC @USES_SUNC_TRUE@AM_AR = ar @HAS_LTO_SUPPORT_FALSE@@USES_CLANG_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_FALSE@@USES_GCC_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_TRUE@@USES_CLANG_TRUE@AM_LD = ld.gold @USES_ICC_TRUE@AM_LD = ld @USES_SUNC_TRUE@AM_LD = ld @HAS_LTO_SUPPORT_TRUE@@USES_GCC_TRUE@AM_RANLIB = gcc-ranlib YRCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -DCMR YPCFLAGS = -DNDEBUG $(CCOPTIMISATIONFLAGS) -pg -DCMP $(am__append_42) YDCFLAGS = -DDEBUG $(DEBUGFLAGS) -DCMD YSCFLAGS = $(YRCFLAGS) YRLDFLAGS = YPLDFLAGS = -pg $(am__append_40) YDLDFLAGS = -g $(am__append_41) YSLDFLAGS = $(YRLDFLAGS) AM_MAKEFLAGS = MODE_CFLAGS="$(AM_CFLAGS)" CC=$(CC) AR=$(AM_AR) LD=$(AM_LD) YCFLAGS = $(YSCFLAGS) YLDFLAGS = $(YNLDFLAGS) all: client-config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/../../mk/common-settings.mk $(srcdir)/../../mk/common-labels.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu 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; $(srcdir)/../../mk/common-settings.mk $(srcdir)/../../mk/common-labels.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): client-config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/client-config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status client-config.h $(srcdir)/client-config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f client-config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list yadifa$(EXEEXT): $(yadifa_OBJECTS) $(yadifa_DEPENDENCIES) $(EXTRA_yadifa_DEPENDENCIES) @rm -f yadifa$(EXEEXT) $(AM_V_CCLD)$(LINK) $(yadifa_OBJECTS) $(yadifa_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/query-result.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yadifa-config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/yadifa.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files 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 "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -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__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_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) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(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 \ && cd "$$am__cwd" \ || exit 1 $(am__post_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: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { 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-am all-am: Makefile $(PROGRAMS) $(DATA) $(HEADERS) client-config.h 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: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_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 -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -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: all install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ clean-binPROGRAMS clean-cscope clean-generic clean-libtool \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck 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 tags-am uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile release: echo YCFLAGS=$(YRCFLAGS) echo YLDFLAGS=$(YRLDFLAGS) $(MAKE) all "YCFLAGS=$(YRCFLAGS)" "YLDFLAGS=$(YRLDFLAGS)" profile: echo YCFLAGS=$(YPCFLAGS) echo YLDFLAGS=$(YPLDFLAGS) $(MAKE) all "YCFLAGS=$(YPCFLAGS)" "YLDFLAGS=$(YPLDFLAGS)" debug: echo YCFLAGS=$(YDCFLAGS) echo YLDFLAGS=$(YDLDFLAGS) $(MAKE) all "YCFLAGS=$(YDCFLAGS)" "YLDFLAGS=$(YDLDFLAGS)" rebuild: clean release release-install: release install profile-install: profile install debug-install: debug install buildinfo.h: config.log echo \#pragma once > buildinfo.h 2> /dev/null echo // generated file, do not modify >> buildinfo.h 2> /dev/null echo \#define BUILD_OPTIONS \"$$(grep "./configure" config.log | head -1 | sed 's/.*\.\/configure *//')\" >> buildinfo.h 2> /dev/null # 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: yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/INSTALL0000644000077100007710000000013212473710127017375 xustar000000000000000030 mtime=1424986199.129058409 30 atime=1424986199.129058409 30 ctime=1454597654.187344534 yadifa-2.1.6-5826/bin/yadifa/INSTALL0000644000077100007710000003661012473710127017207 0ustar00yadifayadifa00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command `./configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/common-config.h0000644000077100007710000000012412654654373021264 xustar000000000000000027 mtime=1454594299.817879 27 atime=1454597464.805344 30 ctime=1454597654.152344534 yadifa-2.1.6-5826/bin/yadifa/common-config.h0000664000077100007710000000736712654654373021106 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once // general defines #define PROGRAM_NAME PACKAGE #define PROGRAM_VERSION PACKAGE_VERSION #define RELEASEDATE "2016-02-04" #define COMPILEDATE __DATE__ #define ROUND_ROBIN 0x00 // yadig #define QM_FLAGS_NONE 0x00 #define QM_FLAGS_AAONLY 0x01 #define QM_FLAGS_AD 0x02 #define QM_FLAGS_CD 0x04 #define QM_FLAGS_ROUND_ROBIN 0x08 #define QM_FLAGS_DNSSEC 0x10 #define QM_FLAGS_INGORE_TC 0x20 #define QM_FLAGS_RECURSIVE 0x40 #define QM_FLAGS_TRACE 0x80 #define QM_PROTOCOL_IPV4 0x01 #define QM_PROTOCOL_IPV6 0x02 #define QM_PROTOCOL_TCP 0x04 #define QM_PROTOCOL_UDP 0x08 #define VM_DEFAULT 0x00 #define VM_JSON 0x01 #define VM_MULTILINE 0x02 #define VM_PARSE_FRIENDLY 0x04 #define VM_SHORT 0x05 #define VM_XML 0x06 #define VM_WIRE 0x07 #define VM_WITH_ADDITIONAL 0x01 #define VM_WITH_ANSWER 0x02 #define VM_WITH_AUTHORITY 0x04 #define VM_WITH_QUESTION 0x08 #define DEF_VAL_CONF_OPTION_QM "0x00" /* FLAGS_NONE */ #define DEF_VAL_SERVER_PORT 53 #define DEF_VAL_SERVERPORT "53" #define DEF_VAL_SERVER "127.0.0.1 port 53" yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/compile0000644000077100007710000000013212473710127017717 xustar000000000000000030 mtime=1424986199.162058409 30 atime=1424986199.162058409 30 ctime=1454597654.197344534 yadifa-2.1.6-5826/bin/yadifa/compile0000755000077100007710000001624512473710127017536 0ustar00yadifayadifa00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # 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, 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, see . # 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. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/yadifa.h0000644000077100007710000000012412650131756017755 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.811344 30 ctime=1454597654.159344534 yadifa-2.1.6-5826/bin/yadifa/yadifa.h0000664000077100007710000000405712650131756017570 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once /** @defgroup yadifa * @ingroup ### * @brief yadifa */ /*----------------------------------------------------------------------------*/ ya_result yadifa_run(); /* ------------------------------------------------------------ */ yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/configure0000644000077100007710000000013212654662641020260 xustar000000000000000030 mtime=1454597537.727344534 30 atime=1454597537.230344534 30 ctime=1454597654.120344534 yadifa-2.1.6-5826/bin/yadifa/configure0000775000077100007710000233062012654662641020077 0ustar00yadifayadifa00000000000000#! /bin/sh # From configure.ac Revision: 5826 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for yadifa 2.1.6-5826. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: bugreport@yadifa.eu about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='yadifa' PACKAGE_TARNAME='yadifa' PACKAGE_VERSION='2.1.6-5826' PACKAGE_STRING='yadifa 2.1.6-5826' PACKAGE_BUGREPORT='bugreport@yadifa.eu' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS HAS_LTO_SUPPORT_FALSE HAS_LTO_SUPPORT_TRUE DNSLG DNSZONE DNSDB DNSCORE OPENSSL HAS_RRCACHE_ENABLED_FALSE HAS_RRCACHE_ENABLED_TRUE HAS_RDTSC_FALSE HAS_RDTSC_TRUE HAS_TCL_FALSE HAS_TCL_TRUE HAS_DROPALL_SUPPORT_FALSE HAS_DROPALL_SUPPORT_TRUE HAS_MIRROR_SUPPORT_FALSE HAS_MIRROR_SUPPORT_TRUE HAS_NSEC_SUPPORT_FALSE HAS_NSEC_SUPPORT_TRUE HAS_NSEC3_SUPPORT_FALSE HAS_NSEC3_SUPPORT_TRUE HAS_DNSSEC_SUPPORT_FALSE HAS_DNSSEC_SUPPORT_TRUE HAS_SOCKADDR_IN6_SIN6_LEN_FALSE HAS_SOCKADDR_IN6_SIN6_LEN_TRUE HAS_SOCKADDR_IN_SIN_LEN_FALSE HAS_SOCKADDR_IN_SIN_LEN_TRUE HAS_SOCKADDR_SA_LEN_FALSE HAS_SOCKADDR_SA_LEN_TRUE logdir HAS_LOGDIR HAS_LOGDIR_FALSE HAS_LOGDIR_TRUE HAS_NON_AA_AXFR_SUPPORT HAS_NON_AA_AXFR_SUPPORT_FALSE HAS_NON_AA_AXFR_SUPPORT_TRUE HAS_FULL_ASCII7 HAS_FULL_ASCII7_FALSE HAS_FULL_ASCII7_TRUE HAS_LOG_PID_ALWAYS_ON HAS_LOG_PID_ALWAYS_ON_FALSE HAS_LOG_PID_ALWAYS_ON_TRUE HAS_LOG_THREAD_ID_ALWAYS_ON HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE HAS_MUTEX_DEBUG_SUPPORT HAS_MUTEX_DEBUG_SUPPORT_FALSE HAS_MUTEX_DEBUG_SUPPORT_TRUE HAS_BFD_DEBUG_SUPPORT HAS_BFD_DEBUG_SUPPORT_FALSE HAS_BFD_DEBUG_SUPPORT_TRUE HAS_MALLOC_DEBUG_SUPPORT HAS_MALLOC_DEBUG_SUPPORT_FALSE HAS_MALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_DEBUG_SUPPORT HAS_ZALLOC_DEBUG_SUPPORT_FALSE HAS_ZALLOC_DEBUG_SUPPORT_TRUE HAS_ZALLOC_STATISTICS_SUPPORT HAS_ZALLOC_STATISTICS_SUPPORT_FALSE HAS_ZALLOC_STATISTICS_SUPPORT_TRUE HAS_ZALLOC_SUPPORT HAS_ZALLOC_SUPPORT_FALSE HAS_ZALLOC_SUPPORT_TRUE HAS_RRSIG_MANAGEMENT_SUPPORT HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE HAS_DYNUPDATE_SUPPORT HAS_DYNUPDATE_SUPPORT_FALSE HAS_DYNUPDATE_SUPPORT_TRUE HAS_TSIG_SUPPORT HAS_TSIG_SUPPORT_FALSE HAS_TSIG_SUPPORT_TRUE HAS_ACL_SUPPORT HAS_ACL_SUPPORT_FALSE HAS_ACL_SUPPORT_TRUE HAS_NSID_SUPPORT HAS_NSID_SUPPORT_FALSE HAS_NSID_SUPPORT_TRUE HAS_CTRL HAS_MASTER_SUPPORT HAS_MASTER_SUPPORT_FALSE HAS_MASTER_SUPPORT_TRUE HAS_MESSAGES_SUPPORT HAS_MESSAGES_SUPPORT_FALSE HAS_MESSAGES_SUPPORT_TRUE HAS_RRL_SUPPORT HAS_RRL_SUPPORT_FALSE HAS_RRL_SUPPORT_TRUE HAS_CTRL_DYNAMIC_PROVISIONING HAS_CTRL_DYNAMIC_PROVISIONING_FALSE HAS_CTRL_DYNAMIC_PROVISIONING_TRUE HAS_CTRL_FALSE HAS_CTRL_TRUE HAS_BIG_ENDIAN HAS_LITTLE_ENDIAN HAS_BIG_ENDIAN_FALSE HAS_BIG_ENDIAN_TRUE HAS_LITTLE_ENDIAN_FALSE HAS_LITTLE_ENDIAN_TRUE HAS_MEMALIGN_ISSUES_FALSE HAS_MEMALIGN_ISSUES_TRUE HAS_CC_RDYNAMIC HAS_CC_RDYNAMIC_FALSE HAS_CC_RDYNAMIC_TRUE HAS_CC_CATCH_UNDEFINED_BEHAVIOR HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE HAS_CC_ADDRESS_SANITIZER_CHECK HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE HAS_CC_NO_OMIT_FRAME_POINTER HAS_CC_NO_OMIT_FRAME_POINTER_FALSE HAS_CC_NO_OMIT_FRAME_POINTER_TRUE HAS_CC_SANITIZE_ADDRESS HAS_CC_SANITIZE_ADDRESS_FALSE HAS_CC_SANITIZE_ADDRESS_TRUE HAS_CC_MISSING_FIELD_INITIALIZERS HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE HAS_CC_EXCEPTIONS HAS_CC_EXCEPTIONS_FALSE HAS_CC_EXCEPTIONS_TRUE HAS_CC_STACK_PROTECTOR HAS_CC_STACK_PROTECTOR_FALSE HAS_CC_STACK_PROTECTOR_TRUE HAS_CC_DWARF4 HAS_CC_DWARF4_FALSE HAS_CC_DWARF4_TRUE HAS_CC_DWARF3 HAS_CC_DWARF3_FALSE HAS_CC_DWARF3_TRUE HAS_CC_DWARF2 HAS_CC_DWARF2_FALSE HAS_CC_DWARF2_TRUE HAS_CC_G3 HAS_CC_G3_FALSE HAS_CC_G3_TRUE HAS_CC_G HAS_CC_G_FALSE HAS_CC_G_TRUE HAS_CC_WALL HAS_CC_WALL_FALSE HAS_CC_WALL_TRUE HAS_CC_M64 HAS_CC_M64_FALSE HAS_CC_M64_TRUE HAS_CC_M32 HAS_CC_M32_FALSE HAS_CC_M32_TRUE HAS_CC_XC99 HAS_CC_XC99_FALSE HAS_CC_XC99_TRUE HAS_CC_STD_C99 HAS_CC_STD_C99_FALSE HAS_CC_STD_C99_TRUE HAS_CC_STD_GNU99 HAS_CC_STD_GNU99_FALSE HAS_CC_STD_GNU99_TRUE HAS_CC_PEDANTIC HAS_CC_PEDANTIC_FALSE HAS_CC_PEDANTIC_TRUE HAS_CC_ANSI_ALIAS HAS_CC_ANSI_ALIAS_FALSE HAS_CC_ANSI_ALIAS_TRUE HAS_CC_ANSI HAS_CC_ANSI_FALSE HAS_CC_ANSI_TRUE HAS_CC_NO_IDENT HAS_CC_NO_IDENT_FALSE HAS_CC_NO_IDENT_TRUE HAS_CC_TUNE_NATIVE HAS_CC_TUNE_NATIVE_FALSE HAS_CC_TUNE_NATIVE_TRUE CCOPTIMISATIONFLAGS USES_UNKNOWN_FALSE USES_UNKNOWN_TRUE USES_SUNC_FALSE USES_SUNC_TRUE USES_CLANG_FALSE USES_CLANG_TRUE USES_GCC_FALSE USES_GCC_TRUE USES_ICC_FALSE USES_ICC_TRUE FORCE64BITS_FALSE FORCE64BITS_TRUE FORCE32BITS_FALSE FORCE32BITS_TRUE HAS_CPU_AMDINTEL_FALSE HAS_CPU_AMDINTEL_TRUE HAS_CPU_NIAGARA_FALSE HAS_CPU_NIAGARA_TRUE IS_SOLARIS_FAMILY IS_SOLARIS_FAMILY_FALSE IS_SOLARIS_FAMILY_TRUE IS_LINUX_FAMILY IS_LINUX_FAMILY_FALSE IS_LINUX_FAMILY_TRUE IS_BSD_FAMILY IS_BSD_FAMILY_FALSE IS_BSD_FAMILY_TRUE IS_DARWIN_OS IS_DARWIN_OS_FALSE IS_DARWIN_OS_TRUE CPP LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED host_os host_vendor host_cpu host LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC build_os build_vendor build_cpu build AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock enable_largefile enable_force32bits enable_force64bits enable_ctrl_dynamic_provisioning enable_rrl enable_messages enable_master enable_ctrl enable_nsid enable_acl enable_tsig enable_dynupdate enable_rrsig_management enable_zalloc enable_zalloc_statistics enable_zalloc_debug enable_malloc_debug enable_bfd_debug enable_mutex_debug enable_log_thread_id enable_log_pid enable_full_ascii7 enable_non_aa_axfr_support with_logdir with_openssl_lib with_openssl_include with_openssl with_dnscore with_dnsdb with_dnszone with_dnslg enable_lto ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS LT_SYS_LIBRARY_PATH CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures yadifa 2.1.6-5826 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/yadifa] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of yadifa 2.1.6-5826:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=no] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-largefile omit support for large files --enable-force32bits Forces a 32 bits binary compilation --enable-force64bits Forces a 64 bits binary compilation --enable-ctrl-dynamic-provisioning Enable dynamic provisioning --disable-rrl Disable DNS Response Rate Limiter --enable-messages Enable use messages instead of send (needed if you use more than one IP aliased on the same network interface) --disable-master Disable DNS master --enable-ctrl Enable remote control --disable-nsid Disable NSID support --disable-acl Disable ACL support --disable-tsig Disable TSIG support --disable-dynupdate Disable dynamic update support --disable-rrsig-management Disable RRSIG verification and generation for zones --disable-zalloc Disable zalloc memory system --enable-zalloc-statistics Enable zalloc statistics support --enable-zalloc-debug Enable zalloc debug support --enable-malloc-debug Enable malloc debug support --enable-bfd-debug Enable bfd debug support --enable-mutex-debug Enable mutex debug support --enable-log-thread-id Enable write the thread id in each line of log --enable-log-pid Enable write the pid in each line of log --enable-full-ascii7 Enable YADIFA will now accept ASCII7 characters in DNS names (not recommended) --enable-non-aa-axfr-support Enable Allows AXFR answer from master without AA bit set (Microsoft DNS) --enable-lto Enable LTO support, requires gold linker Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-logdir build sets the directory where to put the log files --with-openssl-lib=DIR Use the openssl library from directory DIR --with-openssl-include=DIR Use the openssl headers from directory DIR --with-openssl=DIR Use the openssl from directory DIR --with-dnscore=DIR Use the dnscore from directory DIR/lib (devs only) --with-dnsdb=DIR Use the dnsdb from directory DIR/lib (devs only) --with-dnszone=DIR Use the dnszone from directory DIR/lib (devs only) --with-dnslg=DIR Use the dnslg from directory DIR/lib (devs only) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory LT_SYS_LIBRARY_PATH User-defined run-time library search path. CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF yadifa configure 2.1.6-5826 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------------- ## ## Report this to bugreport@yadifa.eu ## ## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by yadifa $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo echo echo "YADIFA START" echo "------------" echo echo cpu_intel_compatible=1 icc_enabled=0 ac_os_workaround_done=0 # requires_tcl=0 requires_ssl=0 requires_dnscore=0 requires_dnsdb=0 requires_dnszone=0 requires_dnslg=0 requires_dnstcl=0 ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='yadifa' VERSION='2.1.6-5826' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5 $as_echo_n "checking how to create a pax tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_pax-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=posix -chf - "'"$$tardir"' am__tar_="$_am_tar --format=posix -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x pax -w "$$tardir"' am__tar_='pax -L -x pax -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H pax -L' am__tar_='find "$tardir" -print | cpio -o -H pax -L' am__untar='cpio -i -H pax -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_pax}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_pax+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_pax=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5 $as_echo "$am_cv_prog_tar_pax" >&6; } # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers client-config.h" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=no fi enable_dlopen=no enable_win32_dll=no # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC ac_config_commands="$ac_config_commands libtool" # Only expand once: case "$(uname -s)" in Darwin) alias libtoolize="glibtoolize" which libtool > /dev/null 2>&1 if [ $? -ne 0 ] then which glibtool > /dev/null 2>&1 if [ $? -eq 0 ] then alias libtool="glibtool" fi fi echo 'brol' | sed 's/brol/truc/' > /dev/null 2>&1 if [ $? -ne 0 ] then alias sed="gsed" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin workaround" >&5 $as_echo "Darwin workaround" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: nothing to do" >&5 $as_echo "nothing to do" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for printf in -lc" >&5 $as_echo_n "checking for printf in -lc... " >&6; } if ${ac_cv_lib_c_printf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char printf (); int main () { return printf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_printf=yes else ac_cv_lib_c_printf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_printf" >&5 $as_echo "$ac_cv_lib_c_printf" >&6; } if test "x$ac_cv_lib_c_printf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBC 1 _ACEOF LIBS="-lc $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi for ac_header in arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check for Darwin or Linux for ac_header in linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check for Darwin or Linux for ac_header in sys/types.h i386/types.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done for ac_header in pcap/pcap.h do : ac_fn_c_check_header_mongrel "$LINENO" "pcap/pcap.h" "ac_cv_header_pcap_pcap_h" "$ac_includes_default" if test "x$ac_cv_header_pcap_pcap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PCAP_PCAP_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_create in -lpcap" >&5 $as_echo_n "checking for pcap_create in -lpcap... " >&6; } if ${ac_cv_lib_pcap_pcap_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_create (); int main () { return pcap_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcap_pcap_create=yes else ac_cv_lib_pcap_pcap_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_pcap_create" >&5 $as_echo "$ac_cv_lib_pcap_pcap_create" >&6; } if test "x$ac_cv_lib_pcap_pcap_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPCAP 1 _ACEOF LIBS="-lpcap $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default" if test "x$ac_cv_type_uint64_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UINT64_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default" if test "x$ac_cv_type_int64_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INT64_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" if test "x$ac_cv_type_long_long" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LONG_LONG 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "u_char" "ac_cv_type_u_char" "$ac_includes_default" if test "x$ac_cv_type_u_char" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_U_CHAR 1 _ACEOF fi #AC_TYPE_PATH_MAX #AC_TYPE_POSIX_PATH_MAX cat >>confdefs.h <<_ACEOF #define TCP_LISTENQ 1024 _ACEOF cat >>confdefs.h <<_ACEOF #define MAX_INTERFACES 5 _ACEOF # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi if [ $ac_os_workaround_done -eq 0 ] then ac_os_workaround_done=1 { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of OS this is" >&5 $as_echo_n "checking what kind of OS this is... " >&6; } is_darwin_os=0 is_bsd_family=0 is_solaris_family=0 is_linux_family=0 case "$(uname -s)" in Darwin) is_darwin_os=1 is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: OSX" >&5 $as_echo "OSX" >&6; } ;; FreeBSD) is_bsd_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: BSD" >&5 $as_echo "BSD" >&6; } ;; Linux) is_linux_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Linux" >&5 $as_echo "Linux" >&6; } ;; SunOS) is_solaris_family=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: SunOS" >&5 $as_echo "SunOS" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: not specifically supported" >&5 $as_echo "not specifically supported" >&6; } ;; esac if [ "$is_darwin_os" = "" ] then echo "OS detection failed to give relevant results" exit 1; fi if [ $is_darwin_os -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 1 _ACEOF if true; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_DARWIN_OS 0 _ACEOF if false; then IS_DARWIN_OS_TRUE= IS_DARWIN_OS_FALSE='#' else IS_DARWIN_OS_TRUE='#' IS_DARWIN_OS_FALSE= fi fi if [ $is_bsd_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 1 _ACEOF if true; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_BSD_FAMILY 0 _ACEOF if false; then IS_BSD_FAMILY_TRUE= IS_BSD_FAMILY_FALSE='#' else IS_BSD_FAMILY_TRUE='#' IS_BSD_FAMILY_FALSE= fi fi if [ $is_linux_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 1 _ACEOF if true; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_LINUX_FAMILY 0 _ACEOF if false; then IS_LINUX_FAMILY_TRUE= IS_LINUX_FAMILY_FALSE='#' else IS_LINUX_FAMILY_TRUE='#' IS_LINUX_FAMILY_FALSE= fi fi if [ $is_solaris_family -ne 0 ] then cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 1 _ACEOF if true; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi else cat >>confdefs.h <<_ACEOF #define IS_SOLARIS_FAMILY 0 _ACEOF if false; then IS_SOLARIS_FAMILY_TRUE= IS_SOLARIS_FAMILY_FALSE='#' else IS_SOLARIS_FAMILY_TRUE='#' IS_SOLARIS_FAMILY_FALSE= fi fi fi cat >>confdefs.h <<_ACEOF #define DEFAULT_ASSUMED_CPU_COUNT 2 _ACEOF cpu_intel_compatible=1 if false; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi if false; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for the CPU options" >&5 $as_echo_n "checking checking for the CPU options... " >&6; } CPU_UNKNOWN=1 CFLAGS3264= case "$(uname -i 2>/dev/null)" in SUNW,SPARC-Enterprise-T1000) cat >>confdefs.h <<_ACEOF #define HAS_CPU_NIAGARA 1 _ACEOF if true; then HAS_CPU_NIAGARA_TRUE= HAS_CPU_NIAGARA_FALSE='#' else HAS_CPU_NIAGARA_TRUE='#' HAS_CPU_NIAGARA_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: UtrasparcT1" >&5 $as_echo "UtrasparcT1" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=0 ;; *) ;; esac case "$(uname -m)" in x86_64) cat >>confdefs.h <<_ACEOF #define HAS_CPU_AMDINTEL 1 _ACEOF if true; then HAS_CPU_AMDINTEL_TRUE= HAS_CPU_AMDINTEL_FALSE='#' else HAS_CPU_AMDINTEL_TRUE='#' HAS_CPU_AMDINTEL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: AMD/Intel" >&5 $as_echo "AMD/Intel" >&6; } CFLAGS3264=-m64 CPU_UNKNOWN=0 cpu_intel_compatible=1 ;; *) ;; esac case "${CPU_UNKNOWN}" in 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: generic" >&5 $as_echo "generic" >&6; } ;; 0) ;; esac if [ "$is_solaris_family" = "" ] then echo "OS must be detected first" exit 1 fi if [ $is_solaris_family -eq 1 ] then echo "Solaris ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if either force 32 or 64 bits is enabled" >&5 $as_echo_n "checking if either force 32 or 64 bits is enabled... " >&6; } if [ ! "$enable_force32bits" = "yes" ] then if [ ! "$enable_force64bits" = "yes" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forcing 64 bits" >&5 $as_echo "no, forcing 64 bits" >&6; } enable_force64bits="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi else echo "Not Solaris ..." fi echo "Force ..." { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 32 bits is enabled" >&5 $as_echo_n "checking if force 32 bits is enabled... " >&6; } if false; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi # Check whether --enable-force32bits was given. if test "${enable_force32bits+set}" = set; then : enableval=$enable_force32bits; enable_force32bits=yes else enable_force32bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force32bits" >&5 $as_echo "$enable_force32bits" >&6; } case "$enable_force32bits" in yes) CFLAGS3264=-m32 if test $enable_force32bits = yes; then FORCE32BITS_TRUE= FORCE32BITS_FALSE='#' else FORCE32BITS_TRUE='#' FORCE32BITS_FALSE= fi ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if force 64 bits is enabled" >&5 $as_echo_n "checking if force 64 bits is enabled... " >&6; } if false; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi # Check whether --enable-force64bits was given. if test "${enable_force64bits+set}" = set; then : enableval=$enable_force64bits; enable_force64bits=yes else enable_force64bits=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_force64bits" >&5 $as_echo "$enable_force64bits" >&6; } case "$enable_force64bits" in yes) CFLAGS3264=-m64 if test $enable_force64bits = yes; then FORCE64BITS_TRUE= FORCE64BITS_FALSE='#' else FORCE64BITS_TRUE='#' FORCE64BITS_FALSE= fi if [ "$enable_force32" = "yes" ] then echo "cannot do both --enable-force32bits and --enable-force64bits at the same time" exit 1 fi ;; *) ;; esac cat /etc/redhat-version > /dev/null 2>&1 if [ $? -eq 0 ] then is_redhat_family=1 else is_redhat_family=0 fi CFLAGS= VERSION_OPT=--version $CC --version > /dev/null 2>&1 if [ $? -ne 0 ] then $CC -V > /dev/null 2>&1 if [ $? -ne 0 ] then CCVER='0.0' CCNAME='unknown' VERSION_OPT='' else VERSION_OPT='-V' fi fi if [ ! "$VERSION_OPT" = "" ] then CCVER=$($CC $VERSION_OPT 2>&1|head -1|sed 's/[^0-9.]*\([0-9.]*\).*/\1/') if [ "$CCVER" = "" ] then CCVER='0.0' fi CCNAME=$($CC $VERSION_OPT 2>&1|head -1|sed -e 's/.*clang.*/clang/' -e 's/.*gcc.*/gcc/' -e 's/.*icc.*/icc/' -e 's/.*Sun C.*/Sun C/'|tr A-Z a-z) if [ "$CCNAME" = "" ] then CCNAME='unknown' fi else CCVER='0.0' CCNAME='unknown' fi # version opt CCMAJOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $1}') CCMINOR=$(echo $CCVER | sed 's/\./ /g' | awk '{ print $2}') if [ "$CCMAJOR" = "" ] then CCMAJOR=0 fi if [ "$CCMINOR" = "" ] then CCMINOR=0 fi if [ "$CCNAME" = "gcc" ] then CCOPTIMISATIONFLAGS=-O3 if [ $CCMAJOR -lt 4 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC < 4.0 has optimisations issues with YADIFA." sleep 1 elif [ $CCMAJOR -eq 4 ] then if [ $CCMINOR -lt 6 ] then CCOPTIMISATIONFLAGS=-O0 echo "WARNING: GCC before 4.6 have optimisation issues with YADIFA." sleep 1 elif [ $CCMINOR -eq 6 ] then CCOPTIMISATIONFLAGS=-O2 else # hopefully after 4.6 the issue is fixed ... CCOPTIMISATIONFLAGS=-O3 fi fi if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if true; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "icc" ] then echo "ICC" CCOPTIMISATIONFLAGS=-O3 if true; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi AR=xiar elif [ "$CCNAME" = "clang" ] then echo "CLANG" CCOPTIMISATIONFLAGS=-O3 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if true; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi elif [ "$CCNAME" = "Sun C" ] then echo "Sun C" CCOPTIMISATIONFLAGS=-xO5 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if true; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if false; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi else echo "unsupported compiler" CCNAME=$CC CCOPTIMISATIONFLAGS=-O2 if false; then USES_ICC_TRUE= USES_ICC_FALSE='#' else USES_ICC_TRUE='#' USES_ICC_FALSE= fi if false; then USES_GCC_TRUE= USES_GCC_FALSE='#' else USES_GCC_TRUE='#' USES_GCC_FALSE= fi if false; then USES_CLANG_TRUE= USES_CLANG_FALSE='#' else USES_CLANG_TRUE='#' USES_CLANG_FALSE= fi if false; then USES_SUNC_TRUE= USES_SUNC_FALSE='#' else USES_SUNC_TRUE='#' USES_SUNC_FALSE= fi if true; then USES_UNKNOWN_TRUE= USES_UNKNOWN_FALSE='#' else USES_UNKNOWN_TRUE='#' USES_UNKNOWN_FALSE= fi fi # # We've been told RedHat does not like -O3 at all, so ... # if [ $is_redhat_family -ne 0 ] then if [ "$CCOPTIMISATIONFLAGS " eq "-O3" ] then CCOPTIMISATIONFLAGS=-O2 fi fi echo "detected compiler is $CCNAME $CCMAJOR $CCMINOR" CCOPTIMISATIONFLAGS=$CCOPTIMISATIONFLAGS if [ $cpu_intel_compatible -eq 0 ] then if [ $icc_enabled -ne 0 ] then echo "ERROR: cannot enable ICC with CPU other than x86 or amd64" exit 1 fi fi # # AC_COMPILER_SUPPORTS -mtune=native # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -mtune=native" >&5 $as_echo_n "checking if compiler supports -mtune=native... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-TUNE_NATIVE.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -mtune=native test-gcc-TUNE_NATIVE.c -o test-gcc-TUNE_NATIVE > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_TUNE_NATIVE_TRUE= HAS_CC_TUNE_NATIVE_FALSE='#' else HAS_CC_TUNE_NATIVE_TRUE='#' HAS_CC_TUNE_NATIVE_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-TUNE_NATIVE* # # AC_COMPILER_SUPPORTS -fno-ident # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-ident" >&5 $as_echo_n "checking if compiler supports -fno-ident... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_IDENT.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-ident test-gcc-NO_IDENT.c -o test-gcc-NO_IDENT > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_IDENT_TRUE= HAS_CC_NO_IDENT_FALSE='#' else HAS_CC_NO_IDENT_TRUE='#' HAS_CC_NO_IDENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_IDENT* # # AC_COMPILER_SUPPORTS -ansi # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi" >&5 $as_echo_n "checking if compiler supports -ansi... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi test-gcc-ANSI.c -o test-gcc-ANSI > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_TRUE= HAS_CC_ANSI_FALSE='#' else HAS_CC_ANSI_TRUE='#' HAS_CC_ANSI_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI* # # AC_COMPILER_SUPPORTS -ansi-alias # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -ansi-alias" >&5 $as_echo_n "checking if compiler supports -ansi-alias... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ANSI_ALIAS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -ansi-alias test-gcc-ANSI_ALIAS.c -o test-gcc-ANSI_ALIAS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ANSI_ALIAS_TRUE= HAS_CC_ANSI_ALIAS_FALSE='#' else HAS_CC_ANSI_ALIAS_TRUE='#' HAS_CC_ANSI_ALIAS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ANSI_ALIAS* # # AC_COMPILER_SUPPORTS -pedantic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -pedantic" >&5 $as_echo_n "checking if compiler supports -pedantic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-PEDANTIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -pedantic test-gcc-PEDANTIC.c -o test-gcc-PEDANTIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_PEDANTIC_TRUE= HAS_CC_PEDANTIC_FALSE='#' else HAS_CC_PEDANTIC_TRUE='#' HAS_CC_PEDANTIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-PEDANTIC* # # AC_COMPILER_SUPPORTS -std=gnu99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=gnu99" >&5 $as_echo_n "checking if compiler supports -std=gnu99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_GNU99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=gnu99 test-gcc-STD_GNU99.c -o test-gcc-STD_GNU99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_GNU99_TRUE= HAS_CC_STD_GNU99_FALSE='#' else HAS_CC_STD_GNU99_TRUE='#' HAS_CC_STD_GNU99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_GNU99* # # AC_COMPILER_SUPPORTS -std=c99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -std=c99" >&5 $as_echo_n "checking if compiler supports -std=c99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STD_C99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -std=c99 test-gcc-STD_C99.c -o test-gcc-STD_C99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STD_C99_TRUE= HAS_CC_STD_C99_FALSE='#' else HAS_CC_STD_C99_TRUE='#' HAS_CC_STD_C99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STD_C99* # # AC_COMPILER_SUPPORTS -xc99 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -xc99" >&5 $as_echo_n "checking if compiler supports -xc99... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-XC99.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -xc99 test-gcc-XC99.c -o test-gcc-XC99 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_XC99_TRUE= HAS_CC_XC99_FALSE='#' else HAS_CC_XC99_TRUE='#' HAS_CC_XC99_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-XC99* # # AC_COMPILER_SUPPORTS -m32 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m32" >&5 $as_echo_n "checking if compiler supports -m32... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M32.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m32 test-gcc-M32.c -o test-gcc-M32 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M32_TRUE= HAS_CC_M32_FALSE='#' else HAS_CC_M32_TRUE='#' HAS_CC_M32_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M32* # # AC_COMPILER_SUPPORTS -m64 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -m64" >&5 $as_echo_n "checking if compiler supports -m64... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-M64.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -m64 test-gcc-M64.c -o test-gcc-M64 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_M64_TRUE= HAS_CC_M64_FALSE='#' else HAS_CC_M64_TRUE='#' HAS_CC_M64_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-M64* # # AC_COMPILER_SUPPORTS -Wall # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Wall" >&5 $as_echo_n "checking if compiler supports -Wall... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-WALL.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Wall test-gcc-WALL.c -o test-gcc-WALL > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_WALL_TRUE= HAS_CC_WALL_FALSE='#' else HAS_CC_WALL_TRUE='#' HAS_CC_WALL_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-WALL* # # AC_COMPILER_SUPPORTS -g # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g" >&5 $as_echo_n "checking if compiler supports -g... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g test-gcc-G.c -o test-gcc-G > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G_TRUE= HAS_CC_G_FALSE='#' else HAS_CC_G_TRUE='#' HAS_CC_G_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G* # # AC_COMPILER_SUPPORTS -g3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -g3" >&5 $as_echo_n "checking if compiler supports -g3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-G3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -g3 test-gcc-G3.c -o test-gcc-G3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_G3_TRUE= HAS_CC_G3_FALSE='#' else HAS_CC_G3_TRUE='#' HAS_CC_G3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-G3* # # AC_COMPILER_SUPPORTS -gdwarf-2 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-2" >&5 $as_echo_n "checking if compiler supports -gdwarf-2... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF2.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-2 test-gcc-DWARF2.c -o test-gcc-DWARF2 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF2_TRUE= HAS_CC_DWARF2_FALSE='#' else HAS_CC_DWARF2_TRUE='#' HAS_CC_DWARF2_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF2* # # AC_COMPILER_SUPPORTS -gdwarf-3 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-3" >&5 $as_echo_n "checking if compiler supports -gdwarf-3... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF3.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-3 test-gcc-DWARF3.c -o test-gcc-DWARF3 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF3_TRUE= HAS_CC_DWARF3_FALSE='#' else HAS_CC_DWARF3_TRUE='#' HAS_CC_DWARF3_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF3* # # AC_COMPILER_SUPPORTS -gdwarf-4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -gdwarf-4" >&5 $as_echo_n "checking if compiler supports -gdwarf-4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-DWARF4.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -gdwarf-4 test-gcc-DWARF4.c -o test-gcc-DWARF4 > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_DWARF4_TRUE= HAS_CC_DWARF4_FALSE='#' else HAS_CC_DWARF4_TRUE='#' HAS_CC_DWARF4_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-DWARF4* # # AC_COMPILER_SUPPORTS -fstack-protector --param=ssp-buffer-size=4 # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fstack-protector --param=ssp-buffer-size=4" >&5 $as_echo_n "checking if compiler supports -fstack-protector --param=ssp-buffer-size=4... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-STACK_PROTECTOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fstack-protector --param=ssp-buffer-size=4 test-gcc-STACK_PROTECTOR.c -o test-gcc-STACK_PROTECTOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_STACK_PROTECTOR_TRUE= HAS_CC_STACK_PROTECTOR_FALSE='#' else HAS_CC_STACK_PROTECTOR_TRUE='#' HAS_CC_STACK_PROTECTOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-STACK_PROTECTOR* # # AC_COMPILER_SUPPORTS -fexceptions # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fexceptions" >&5 $as_echo_n "checking if compiler supports -fexceptions... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-EXCEPTIONS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fexceptions test-gcc-EXCEPTIONS.c -o test-gcc-EXCEPTIONS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_EXCEPTIONS_TRUE= HAS_CC_EXCEPTIONS_FALSE='#' else HAS_CC_EXCEPTIONS_TRUE='#' HAS_CC_EXCEPTIONS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-EXCEPTIONS* # # AC_COMPILER_SUPPORTS -Werror=missing-field-initializers # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -Werror=missing-field-initializers" >&5 $as_echo_n "checking if compiler supports -Werror=missing-field-initializers... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-MISSING_FIELD_INITIALIZERS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -Werror=missing-field-initializers test-gcc-MISSING_FIELD_INITIALIZERS.c -o test-gcc-MISSING_FIELD_INITIALIZERS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE= HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE='#' else HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE='#' HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-MISSING_FIELD_INITIALIZERS* # # AC_COMPILER_SUPPORTS -fsanitize=address # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fsanitize=address" >&5 $as_echo_n "checking if compiler supports -fsanitize=address... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-SANITIZE_ADDRESS.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fsanitize=address test-gcc-SANITIZE_ADDRESS.c -o test-gcc-SANITIZE_ADDRESS > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_SANITIZE_ADDRESS_TRUE= HAS_CC_SANITIZE_ADDRESS_FALSE='#' else HAS_CC_SANITIZE_ADDRESS_TRUE='#' HAS_CC_SANITIZE_ADDRESS_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-SANITIZE_ADDRESS* # # AC_COMPILER_SUPPORTS -fno-omit-frame-pointer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fno-omit-frame-pointer" >&5 $as_echo_n "checking if compiler supports -fno-omit-frame-pointer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-NO_OMIT_FRAME_POINTER.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fno-omit-frame-pointer test-gcc-NO_OMIT_FRAME_POINTER.c -o test-gcc-NO_OMIT_FRAME_POINTER > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_NO_OMIT_FRAME_POINTER_TRUE= HAS_CC_NO_OMIT_FRAME_POINTER_FALSE='#' else HAS_CC_NO_OMIT_FRAME_POINTER_TRUE='#' HAS_CC_NO_OMIT_FRAME_POINTER_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-NO_OMIT_FRAME_POINTER* # # AC_COMPILER_SUPPORTS -faddress-sanitizer # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -faddress-sanitizer" >&5 $as_echo_n "checking if compiler supports -faddress-sanitizer... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-ADDRESS_SANITIZER_CHECK.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -faddress-sanitizer test-gcc-ADDRESS_SANITIZER_CHECK.c -o test-gcc-ADDRESS_SANITIZER_CHECK > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE= HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE='#' else HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE='#' HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-ADDRESS_SANITIZER_CHECK* # # AC_COMPILER_SUPPORTS -fcatch_undefined_behavior # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fcatch_undefined_behavior" >&5 $as_echo_n "checking if compiler supports -fcatch_undefined_behavior... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-CATCH_UNDEFINED_BEHAVIOR.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -fcatch_undefined_behavior test-gcc-CATCH_UNDEFINED_BEHAVIOR.c -o test-gcc-CATCH_UNDEFINED_BEHAVIOR > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE= HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE='#' else HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE='#' HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-CATCH_UNDEFINED_BEHAVIOR* # # AC_COMPILER_SUPPORTS -rdynamic # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -rdynamic" >&5 $as_echo_n "checking if compiler supports -rdynamic... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-RDYNAMIC.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc,char** argv) { (void)argc; (void)argv; puts("Hello World!"); return 0; } _ACEOF $CC -rdynamic test-gcc-RDYNAMIC.c -o test-gcc-RDYNAMIC > /dev/null 2>&1 if [ $? -ne 0 ] then if false; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else if true; then HAS_CC_RDYNAMIC_TRUE= HAS_CC_RDYNAMIC_FALSE='#' else HAS_CC_RDYNAMIC_TRUE='#' HAS_CC_RDYNAMIC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi rm -rf test-gcc-RDYNAMIC* { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking if memory accesses must be size-aligned" >&5 $as_echo_n "checking checking if memory accesses must be size-aligned... " >&6; } if false; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat > memalign_issues_test.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif int main(int argc, char** argv) { char* p = (char*)malloc(8); p++; int* intp= (int*)p; *intp=1; return 0; } _ACEOF ${CC} ${CFLAGS} memalign_issues_test.c -o memalign_issues_test > /dev/null 2>&1 has_memalign_issues=0 ./memalign_issues_test > /dev/null 2>&1 if [ $? -ne 0 ]; then has_memalign_issues=1 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f memalign_issues_test memalign_issues_test.c if test $has_memalign_issues; then HAS_MEMALIGN_ISSUES_TRUE= HAS_MEMALIGN_ISSUES_FALSE='#' else HAS_MEMALIGN_ISSUES_TRUE='#' HAS_MEMALIGN_ISSUES_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MEMALIGN_ISSUES $has_memalign_issues _ACEOF # # AC_ENDIANNESS # # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking endianness: " >&5 $as_echo_n "checking endianness: ... " >&6; } if [ "$CC" = "" ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"compiler not set yet, fix this\"" >&5 $as_echo "\"compiler not set yet, fix this\"" >&6; } exit 1 fi cat > test-gcc-endian.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_STDIO_H #include #endif #if defined __FreeBSD__ #if HAVE_SYS_ENDIAN_H #include #endif #elif defined __APPLE__ #if HAVE_MACHINE_ENDIAN_H #include #endif #elif defined __sun #if HAVE_SYS_BYTEORDER_H #include #endif #else #if HAVE_ENDIAN_H #include #endif #if HAVE_BYTESWAP_H #include #endif #endif static int magic = 0x00525545; int main(int argc,char** argv) { (void)argc; (void)argv; int pp = -1; int c = -1; #if defined _BIG_ENDIAN pp = 2; #elif defined _LITTLE_ENDIAN pp = 1; #endif #ifdef __BYTE_ORDER #if __BYTE_ORDER == __LITTLE_ENDIAN pp = 1; #elif __BYTE_ORDER == __BIG_ENDIAN pp = 2; #endif // printf("__BYTE_ORDER=%x\n", __BYTE_ORDER); #endif #ifdef _BYTE_ORDER #if _BYTE_ORDER == _LITTLE_ENDIAN pp = 1; #elif _BYTE_ORDER == _BIG_ENDIAN pp = 2; #endif printf("_BYTE_ORDER=%x\n", _BYTE_ORDER); #endif #ifdef BYTE_ORDER #if BYTE_ORDER == LITTLE_ENDIAN pp = 1; #elif BYTE_ORDER == BIG_ENDIAN pp = 2; #endif // printf("BYTE_ORDER=%x\n", BYTE_ORDER); #endif # #ifdef WORDS_BIGENDIAN // printf("WORDS_BIGENDIAN=%x\n", WORDS_BIGENDIAN); if(pp == 1) // could be -1 or 2 { pp = -2; } else { pp = 2; } #endif char *p = (char*)&magic; if(*p == '\0') { c = 2; } else if(*p == 'E') { c = 1; } if((pp < 0) || (c < 0)) { printf("*** WARNING *** preprocessor says %i, real test says %i *** WARNING ***\n", pp, c); } if(c == pp) { return c; } else { return -1; } } _ACEOF $CC test-gcc-endian.c -o test-gcc-endian > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"failed to compile test\"" >&5 $as_echo "\"failed to compile test\"" >&6; } exit 1 fi ./test-gcc-endian if [ $? -eq 1 ] then if true; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if false; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: little" >&5 $as_echo "little" >&6; } else if false; then HAS_LITTLE_ENDIAN_TRUE= HAS_LITTLE_ENDIAN_FALSE='#' else HAS_LITTLE_ENDIAN_TRUE='#' HAS_LITTLE_ENDIAN_FALSE= fi if true; then HAS_BIG_ENDIAN_TRUE= HAS_BIG_ENDIAN_FALSE='#' else HAS_BIG_ENDIAN_TRUE='#' HAS_BIG_ENDIAN_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: big" >&5 $as_echo "big" >&6; } fi rm -f test-gcc-endian.c* test-gcc-endian for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done for ac_header in stdio.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDIO_H 1 _ACEOF fi done for ac_header in unistd.h do : ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UNISTD_H 1 _ACEOF fi done for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRING_H 1 _ACEOF fi done for ac_header in endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "endian.h" "ac_cv_header_endian_h" "$ac_includes_default" if test "x$ac_cv_header_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ENDIAN_H 1 _ACEOF fi done for ac_header in syslog.h do : ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYSLOG_H 1 _ACEOF fi done for ac_header in fcntl.h do : ac_fn_c_check_header_mongrel "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FCNTL_H 1 _ACEOF fi done for ac_header in pthread.h do : ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_H 1 _ACEOF fi done for ac_header in linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in byteswap.h do : ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" if test "x$ac_cv_header_byteswap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BYTESWAP_H 1 _ACEOF fi done for ac_header in machine/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "machine/endian.h" "ac_cv_header_machine_endian_h" "$ac_includes_default" if test "x$ac_cv_header_machine_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACHINE_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/time.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIME_H 1 _ACEOF fi done for ac_header in sys/stat.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_stat_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_STAT_H 1 _ACEOF fi done for ac_header in sys/endian.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" if test "x$ac_cv_header_sys_endian_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_ENDIAN_H 1 _ACEOF fi done for ac_header in sys/byteorder.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/byteorder.h" "ac_cv_header_sys_byteorder_h" "$ac_includes_default" if test "x$ac_cv_header_sys_byteorder_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_BYTEORDER_H 1 _ACEOF fi done for ac_header in sys/socket.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SOCKET_H 1 _ACEOF fi done for ac_header in netinet/in.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_in_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET_IN_H 1 _ACEOF fi done for ac_header in netinet6/in6.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet6/in6.h" "ac_cv_header_netinet6_in6_h" "$ac_includes_default" if test "x$ac_cv_header_netinet6_in6_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET6_IN6_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_spin_init" >&5 $as_echo_n "checking checking for pthread_spin_init... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_spinlock_t lock; pthread_spin_init(&lock, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SPINLOCK 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; { $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for pthread_setname_np" >&5 $as_echo_n "checking checking for pthread_setname_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __USE_GNU #include int main () { pthread_setname_np(pthread_self(), "myname"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAS_PTHREAD_SETNAME_NP 1 _ACEOF echo yes else echo no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext; # # AC_HAS_ENABLE ctrl_dynamic_provisioning # if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL_DYNAMIC_PROVISIONING has been enabled" >&5 $as_echo_n "checking if CTRL_DYNAMIC_PROVISIONING has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl_dynamic_provisioning was given. if test "${enable_ctrl_dynamic_provisioning+set}" = set; then : enableval=$enable_ctrl_dynamic_provisioning; fi # CASE case "y$enable_ctrl_dynamic_provisioning" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL_DYNAMIC_PROVISIONING 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_DYNAMIC_PROVISIONING_TRUE= HAS_CTRL_DYNAMIC_PROVISIONING_FALSE='#' else HAS_CTRL_DYNAMIC_PROVISIONING_TRUE='#' HAS_CTRL_DYNAMIC_PROVISIONING_FALSE= fi enable_ctrl_dynamic_provisioning="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl_dynamic_provisioning DONE # # AC_HAS_DISABLE rrl # if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRL_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrl was given. if test "${enable_rrl+set}" = set; then : enableval=$enable_rrl; fi # MSG RESULT # CASE case "y$enable_rrl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRL_SUPPORT_TRUE= HAS_RRL_SUPPORT_FALSE='#' else HAS_RRL_SUPPORT_TRUE='#' HAS_RRL_SUPPORT_FALSE= fi enable_rrl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrl DONE # # AC_HAS_ENABLE messages # if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MESSAGES_SUPPORT has been enabled" >&5 $as_echo_n "checking if MESSAGES_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-messages was given. if test "${enable_messages+set}" = set; then : enableval=$enable_messages; fi # CASE case "y$enable_messages" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MESSAGES_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MESSAGES_SUPPORT_TRUE= HAS_MESSAGES_SUPPORT_FALSE='#' else HAS_MESSAGES_SUPPORT_TRUE='#' HAS_MESSAGES_SUPPORT_FALSE= fi enable_messages="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE messages DONE # # AC_HAS_DISABLE master # if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MASTER_SUPPORT has been disabled" >&5 $as_echo_n "checking if MASTER_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-master was given. if test "${enable_master+set}" = set; then : enableval=$enable_master; fi # MSG RESULT # CASE case "y$enable_master" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MASTER_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MASTER_SUPPORT_TRUE= HAS_MASTER_SUPPORT_FALSE='#' else HAS_MASTER_SUPPORT_TRUE='#' HAS_MASTER_SUPPORT_FALSE= fi enable_master=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_dynupdate='no' enable_rrsig_management='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE master DONE # # AC_HAS_ENABLE ctrl # if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CTRL has been enabled" >&5 $as_echo_n "checking if CTRL has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-ctrl was given. if test "${enable_ctrl+set}" = set; then : enableval=$enable_ctrl; fi # CASE case "y$enable_ctrl" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_CTRL 1 _ACEOF # CONDITIONAL Y if true; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_CTRL 0 _ACEOF # CONDITIONAL N if false; then HAS_CTRL_TRUE= HAS_CTRL_FALSE='#' else HAS_CTRL_TRUE='#' HAS_CTRL_FALSE= fi enable_ctrl="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE ctrl DONE # # AC_HAS_DISABLE nsid # if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NSID_SUPPORT has been disabled" >&5 $as_echo_n "checking if NSID_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-nsid was given. if test "${enable_nsid+set}" = set; then : enableval=$enable_nsid; fi # MSG RESULT # CASE case "y$enable_nsid" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NSID_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NSID_SUPPORT_TRUE= HAS_NSID_SUPPORT_FALSE='#' else HAS_NSID_SUPPORT_TRUE='#' HAS_NSID_SUPPORT_FALSE= fi enable_nsid=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE nsid DONE # # AC_HAS_DISABLE acl # if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ACL_SUPPORT has been disabled" >&5 $as_echo_n "checking if ACL_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-acl was given. if test "${enable_acl+set}" = set; then : enableval=$enable_acl; fi # MSG RESULT # CASE case "y$enable_acl" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi enable_acl=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO enable_tsig='no' # ENDIF ;; esac # SUBST # AC_HAS_DISABLE acl DONE # # AC_HAS_DISABLE tsig # if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if TSIG_SUPPORT has been disabled" >&5 $as_echo_n "checking if TSIG_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-tsig was given. if test "${enable_tsig+set}" = set; then : enableval=$enable_tsig; fi # MSG RESULT # CASE case "y$enable_tsig" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi enable_tsig=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE tsig DONE # # AC_HAS_DISABLE dynupdate # if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if DYNUPDATE_SUPPORT has been disabled" >&5 $as_echo_n "checking if DYNUPDATE_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-dynupdate was given. if test "${enable_dynupdate+set}" = set; then : enableval=$enable_dynupdate; fi # MSG RESULT # CASE case "y$enable_dynupdate" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_DYNUPDATE_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_DYNUPDATE_SUPPORT_TRUE= HAS_DYNUPDATE_SUPPORT_FALSE='#' else HAS_DYNUPDATE_SUPPORT_TRUE='#' HAS_DYNUPDATE_SUPPORT_FALSE= fi enable_dynupdate=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE dynupdate DONE # # AC_HAS_DISABLE rrsig_management # if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RRSIG_MANAGEMENT_SUPPORT has been disabled" >&5 $as_echo_n "checking if RRSIG_MANAGEMENT_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-rrsig_management was given. if test "${enable_rrsig_management+set}" = set; then : enableval=$enable_rrsig_management; fi # MSG RESULT # CASE case "y$enable_rrsig_management" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES requires_ssl=1 # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_RRSIG_MANAGEMENT_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE= HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE='#' else HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE='#' HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE= fi enable_rrsig_management=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE rrsig_management DONE # # AC_HAS_DISABLE zalloc # if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_SUPPORT has been disabled" >&5 $as_echo_n "checking if ZALLOC_SUPPORT has been disabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc was given. if test "${enable_zalloc+set}" = set; then : enableval=$enable_zalloc; fi # MSG RESULT # CASE case "y$enable_zalloc" in yyes|y) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF YES # ENDIF ;; yno|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_SUPPORT_TRUE= HAS_ZALLOC_SUPPORT_FALSE='#' else HAS_ZALLOC_SUPPORT_TRUE='#' HAS_ZALLOC_SUPPORT_FALSE= fi enable_zalloc=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_DISABLE zalloc DONE # # AC_HAS_ENABLE zalloc_statistics # if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_STATISTICS_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_STATISTICS_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_statistics was given. if test "${enable_zalloc_statistics+set}" = set; then : enableval=$enable_zalloc_statistics; fi # CASE case "y$enable_zalloc_statistics" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_STATISTICS_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_STATISTICS_SUPPORT_TRUE= HAS_ZALLOC_STATISTICS_SUPPORT_FALSE='#' else HAS_ZALLOC_STATISTICS_SUPPORT_TRUE='#' HAS_ZALLOC_STATISTICS_SUPPORT_FALSE= fi enable_zalloc_statistics="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_statistics DONE # # AC_HAS_ENABLE zalloc_debug # if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ZALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if ZALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-zalloc_debug was given. if test "${enable_zalloc_debug+set}" = set; then : enableval=$enable_zalloc_debug; fi # CASE case "y$enable_zalloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_ZALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_ZALLOC_DEBUG_SUPPORT_TRUE= HAS_ZALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_ZALLOC_DEBUG_SUPPORT_TRUE='#' HAS_ZALLOC_DEBUG_SUPPORT_FALSE= fi enable_zalloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE zalloc_debug DONE # # AC_HAS_ENABLE malloc_debug # if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MALLOC_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MALLOC_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-malloc_debug was given. if test "${enable_malloc_debug+set}" = set; then : enableval=$enable_malloc_debug; fi # CASE case "y$enable_malloc_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MALLOC_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MALLOC_DEBUG_SUPPORT_TRUE= HAS_MALLOC_DEBUG_SUPPORT_FALSE='#' else HAS_MALLOC_DEBUG_SUPPORT_TRUE='#' HAS_MALLOC_DEBUG_SUPPORT_FALSE= fi enable_malloc_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE malloc_debug DONE # # AC_HAS_ENABLE bfd_debug # if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if BFD_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if BFD_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-bfd_debug was given. if test "${enable_bfd_debug+set}" = set; then : enableval=$enable_bfd_debug; fi # CASE case "y$enable_bfd_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_BFD_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_BFD_DEBUG_SUPPORT_TRUE= HAS_BFD_DEBUG_SUPPORT_FALSE='#' else HAS_BFD_DEBUG_SUPPORT_TRUE='#' HAS_BFD_DEBUG_SUPPORT_FALSE= fi enable_bfd_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE bfd_debug DONE case "$enable_bfd_debug" in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlinfo" >&5 $as_echo_n "checking for library containing dlinfo... " >&6; } if ${ac_cv_search_dlinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlinfo (); int main () { return dlinfo (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlinfo+:} false; then : break fi done if ${ac_cv_search_dlinfo+:} false; then : else ac_cv_search_dlinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlinfo" >&5 $as_echo "$ac_cv_search_dlinfo" >&6; } ac_res=$ac_cv_search_dlinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no dl fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sha1_init_ctx" >&5 $as_echo_n "checking for library containing sha1_init_ctx... " >&6; } if ${ac_cv_search_sha1_init_ctx+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sha1_init_ctx (); int main () { return sha1_init_ctx (); ; return 0; } _ACEOF for ac_lib in '' iberty; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sha1_init_ctx=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sha1_init_ctx+:} false; then : break fi done if ${ac_cv_search_sha1_init_ctx+:} false; then : else ac_cv_search_sha1_init_ctx=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sha1_init_ctx" >&5 $as_echo "$ac_cv_search_sha1_init_ctx" >&6; } ac_res=$ac_cv_search_sha1_init_ctx if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo iberty fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bfd_init" >&5 $as_echo_n "checking for library containing bfd_init... " >&6; } if ${ac_cv_search_bfd_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bfd_init (); int main () { return bfd_init (); ; return 0; } _ACEOF for ac_lib in '' bfd; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bfd_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bfd_init+:} false; then : break fi done if ${ac_cv_search_bfd_init+:} false; then : else ac_cv_search_bfd_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bfd_init" >&5 $as_echo "$ac_cv_search_bfd_init" >&6; } ac_res=$ac_cv_search_bfd_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo no bfd;exit 1 fi ;; no|*) ;; esac # # AC_HAS_ENABLE mutex_debug # if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if MUTEX_DEBUG_SUPPORT has been enabled" >&5 $as_echo_n "checking if MUTEX_DEBUG_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-mutex_debug was given. if test "${enable_mutex_debug+set}" = set; then : enableval=$enable_mutex_debug; fi # CASE case "y$enable_mutex_debug" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_MUTEX_DEBUG_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_MUTEX_DEBUG_SUPPORT_TRUE= HAS_MUTEX_DEBUG_SUPPORT_FALSE='#' else HAS_MUTEX_DEBUG_SUPPORT_TRUE='#' HAS_MUTEX_DEBUG_SUPPORT_FALSE= fi enable_mutex_debug="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE mutex_debug DONE # # AC_HAS_ENABLE log_thread_id # if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_THREAD_ID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_THREAD_ID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_thread_id was given. if test "${enable_log_thread_id+set}" = set; then : enableval=$enable_log_thread_id; fi # CASE case "y$enable_log_thread_id" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_THREAD_ID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE= HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE='#' else HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE='#' HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE= fi enable_log_thread_id="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_thread_id DONE # # AC_HAS_ENABLE log_pid # if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LOG_PID_ALWAYS_ON has been enabled" >&5 $as_echo_n "checking if LOG_PID_ALWAYS_ON has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-log_pid was given. if test "${enable_log_pid+set}" = set; then : enableval=$enable_log_pid; fi # CASE case "y$enable_log_pid" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOG_PID_ALWAYS_ON 0 _ACEOF # CONDITIONAL N if false; then HAS_LOG_PID_ALWAYS_ON_TRUE= HAS_LOG_PID_ALWAYS_ON_FALSE='#' else HAS_LOG_PID_ALWAYS_ON_TRUE='#' HAS_LOG_PID_ALWAYS_ON_FALSE= fi enable_log_pid="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE log_pid DONE # # AC_HAS_ENABLE full_ascii7 # if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if FULL_ASCII7 has been enabled" >&5 $as_echo_n "checking if FULL_ASCII7 has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-full_ascii7 was given. if test "${enable_full_ascii7+set}" = set; then : enableval=$enable_full_ascii7; fi # CASE case "y$enable_full_ascii7" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 1 _ACEOF # CONDITIONAL Y if true; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_FULL_ASCII7 0 _ACEOF # CONDITIONAL N if false; then HAS_FULL_ASCII7_TRUE= HAS_FULL_ASCII7_FALSE='#' else HAS_FULL_ASCII7_TRUE='#' HAS_FULL_ASCII7_FALSE= fi enable_full_ascii7="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE full_ascii7 DONE # # AC_HAS_ENABLE non_aa_axfr_support # if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if NON_AA_AXFR_SUPPORT has been enabled" >&5 $as_echo_n "checking if NON_AA_AXFR_SUPPORT has been enabled... " >&6; } # ARG ENABLE # Check whether --enable-non_aa_axfr_support was given. if test "${enable_non_aa_axfr_support+set}" = set; then : enableval=$enable_non_aa_axfr_support; fi # CASE case "y$enable_non_aa_axfr_support" in yyes) # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 1 _ACEOF # CONDITIONAL Y if true; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES # ENDIF ;; yno|y|*) # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_NON_AA_AXFR_SUPPORT 0 _ACEOF # CONDITIONAL N if false; then HAS_NON_AA_AXFR_SUPPORT_TRUE= HAS_NON_AA_AXFR_SUPPORT_FALSE='#' else HAS_NON_AA_AXFR_SUPPORT_TRUE='#' HAS_NON_AA_AXFR_SUPPORT_FALSE= fi enable_non_aa_axfr_support="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO # ENDIF ;; esac # SUBST # AC_HAS_ENABLE non_aa_axfr_support DONE # # AC_HAS_WITH logdir # if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi # CHECKING { $as_echo "$as_me:${as_lineno-$LINENO}: checking if logdir has been given" >&5 $as_echo_n "checking if logdir has been given... " >&6; } # ARG WITH # Check whether --with-logdir was given. if test "${with_logdir+set}" = set; then : withval=$with_logdir; # DEFINE Y cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 1 _ACEOF # CONDITIONAL Y if true; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_WITH_LOGDIR "$with_logdir" // $withval _ACEOF with_logdir="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # IF YES logdir="$withval" # ENDIF else # DEFINE N cat >>confdefs.h <<_ACEOF #define HAS_LOGDIR 0 _ACEOF # CONDITIONAL N if false; then HAS_LOGDIR_TRUE= HAS_LOGDIR_FALSE='#' else HAS_LOGDIR_TRUE='#' HAS_LOGDIR_FALSE= fi with_logdir="no" { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # IF NO logdir=${localstatedir}/log/yadifa # ENDIF fi # SUBST # AC_HAS_WITH logdir DONE { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has a sa_len field" >&5 $as_echo_n "checking if sockaddr has a sa_len field... " >&6; } cat > sockaddr_sa_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr sa; sa.sa_len = 4; } _ACEOF has_sockaddr_sa_len=0 ${CC} ${CFLAGS} sockaddr_sa_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_sa_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_sa_len.c sockaddr_sa_len if test $has_sockaddr_sa_len = yes; then HAS_SOCKADDR_SA_LEN_TRUE= HAS_SOCKADDR_SA_LEN_FALSE='#' else HAS_SOCKADDR_SA_LEN_TRUE='#' HAS_SOCKADDR_SA_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_SA_LEN $has_sockaddr_sa_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in has a sin_len field" >&5 $as_echo_n "checking if sockaddr_in has a sin_len field... " >&6; } cat > sockaddr_in_sin_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in sa; sa.sin_len = sizeof(struct sockaddr_in); } _ACEOF has_sockaddr_in_sin_len=0 ${CC} ${CFLAGS} sockaddr_in_sin_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in_sin_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in_sin_len.c sockaddr_in_sin_len if test $has_sockaddr_in_sin_len = yes; then HAS_SOCKADDR_IN_SIN_LEN_TRUE= HAS_SOCKADDR_IN_SIN_LEN_FALSE='#' else HAS_SOCKADDR_IN_SIN_LEN_TRUE='#' HAS_SOCKADDR_IN_SIN_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN_SIN_LEN $has_sockaddr_in_sin_len _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_in6 has a sin6_len field" >&5 $as_echo_n "checking if sockaddr_in6 has a sin6_len field... " >&6; } cat > sockaddr_in6_sin6_len.c <<_ACEOF #include "confdefs.h" #if HAVE_STDLIB_H #include #endif #if HAVE_SYS_TYPES_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET6_IN6_H #include #endif int main(int argc, char** argv) { struct sockaddr_in6 sa; sa.sin6_len = sizeof(struct sockaddr_in6); } _ACEOF has_sockaddr_in6_sin6_len=0 ${CC} ${CFLAGS} sockaddr_in6_sin6_len.c > /dev/null 2>&1 if [ $? -eq 0 ]; then has_sockaddr_in6_sin6_len=1; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f sockaddr_in6_sin6_len.c sockaddr_in6_sin6_len if test $has_sockaddr_in6_sin6_len = yes; then HAS_SOCKADDR_IN6_SIN6_LEN_TRUE= HAS_SOCKADDR_IN6_SIN6_LEN_FALSE='#' else HAS_SOCKADDR_IN6_SIN6_LEN_TRUE='#' HAS_SOCKADDR_IN6_SIN6_LEN_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_SOCKADDR_IN6_SIN6_LEN $has_sockaddr_in6_sin6_len _ACEOF if true; then HAS_ACL_SUPPORT_TRUE= HAS_ACL_SUPPORT_FALSE='#' else HAS_ACL_SUPPORT_TRUE='#' HAS_ACL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_ACL_SUPPORT 1 _ACEOF if true; then HAS_TSIG_SUPPORT_TRUE= HAS_TSIG_SUPPORT_FALSE='#' else HAS_TSIG_SUPPORT_TRUE='#' HAS_TSIG_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TSIG_SUPPORT 1 _ACEOF if true; then HAS_DNSSEC_SUPPORT_TRUE= HAS_DNSSEC_SUPPORT_FALSE='#' else HAS_DNSSEC_SUPPORT_TRUE='#' HAS_DNSSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DNSSEC_SUPPORT 1 _ACEOF if true; then HAS_NSEC3_SUPPORT_TRUE= HAS_NSEC3_SUPPORT_FALSE='#' else HAS_NSEC3_SUPPORT_TRUE='#' HAS_NSEC3_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC3_SUPPORT 1 _ACEOF if true; then HAS_NSEC_SUPPORT_TRUE= HAS_NSEC_SUPPORT_FALSE='#' else HAS_NSEC_SUPPORT_TRUE='#' HAS_NSEC_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_NSEC_SUPPORT 1 _ACEOF if false; then HAS_MIRROR_SUPPORT_TRUE= HAS_MIRROR_SUPPORT_FALSE='#' else HAS_MIRROR_SUPPORT_TRUE='#' HAS_MIRROR_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_MIRROR_SUPPORT 0 _ACEOF if false; then HAS_DROPALL_SUPPORT_TRUE= HAS_DROPALL_SUPPORT_FALSE='#' else HAS_DROPALL_SUPPORT_TRUE='#' HAS_DROPALL_SUPPORT_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_DROPALL_SUPPORT 0 _ACEOF if false; then HAS_TCL_TRUE= HAS_TCL_FALSE='#' else HAS_TCL_TRUE='#' HAS_TCL_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_TCL 0 _ACEOF if false; then HAS_RDTSC_TRUE= HAS_RDTSC_FALSE='#' else HAS_RDTSC_TRUE='#' HAS_RDTSC_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RDTSC 0 _ACEOF if false; then HAS_RRCACHE_ENABLED_TRUE= HAS_RRCACHE_ENABLED_FALSE='#' else HAS_RRCACHE_ENABLED_TRUE='#' HAS_RRCACHE_ENABLED_FALSE= fi cat >>confdefs.h <<_ACEOF #define HAS_RRCACHE_ENABLED 0 _ACEOF requires_dnscore=1 requires_dnsdb=1 requires_dnscore=1 requires_dnszone=1 requires_dnsdb=1 requires_dnscore=1 requires_dnslg=1 requires_dnscore=1 LDDYN="-Wl,-Bdynamic" LDSTAT="-Wl,-Bstatic" echo -n "checking if -Bstatic & -Bdynamic are supported ... " $CC -Wl,-Bstatic 2>&1|grep Bstatic > /dev/null if [ $? -eq 0 ] then echo "not supported"; LDDYN="" LDSTAT="" else echo "supported"; fi LIBS="$LDDYN $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 $as_echo_n "checking for library containing gethostbyname... " >&6; } if ${ac_cv_search_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_gethostbyname=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_gethostbyname+:} false; then : break fi done if ${ac_cv_search_gethostbyname+:} false; then : else ac_cv_search_gethostbyname=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 $as_echo "$ac_cv_search_gethostbyname" >&6; } ac_res=$ac_cv_search_gethostbyname if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 $as_echo_n "checking for library containing socket... " >&6; } if ${ac_cv_search_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_socket=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_socket+:} false; then : break fi done if ${ac_cv_search_socket+:} false; then : else ac_cv_search_socket=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 $as_echo "$ac_cv_search_socket" >&6; } ac_res=$ac_cv_search_socket if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi if [ $requires_tcl -eq 1 ] then echo "TCL is required by this setup ..." CFLAGS="$CFLAGS -DWITHTCLINCLUDED -I${tcl_includedir}" LDFLAGS="-L${tcl_libdir} $LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing Tcl_Main" >&5 $as_echo_n "checking for library containing Tcl_Main... " >&6; } if ${ac_cv_search_Tcl_Main+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char Tcl_Main (); int main () { return Tcl_Main (); ; return 0; } _ACEOF for ac_lib in '' ${tcl_version}; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_Tcl_Main=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_Tcl_Main+:} false; then : break fi done if ${ac_cv_search_Tcl_Main+:} false; then : else ac_cv_search_Tcl_Main=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_Tcl_Main" >&5 $as_echo "$ac_cv_search_Tcl_Main" >&6; } ac_res=$ac_cv_search_Tcl_Main if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else echo "could not find ${tcl_version} :: tcl_includedir=${tcl_includedir} :: tcl_libdir=${tcl_libdir}"; exit 1 fi fi if [ $requires_ssl -eq 1 ] then echo "SSL is required by this setup ..." SSLDEPS="" echo "Finding the SSL dependencies" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing deflate" >&5 $as_echo_n "checking for library containing deflate... " >&6; } if ${ac_cv_search_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char deflate (); int main () { return deflate (); ; return 0; } _ACEOF for ac_lib in '' z; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_deflate=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_deflate+:} false; then : break fi done if ${ac_cv_search_deflate+:} false; then : else ac_cv_search_deflate=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_deflate" >&5 $as_echo "$ac_cv_search_deflate" >&6; } ac_res=$ac_cv_search_deflate if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi echo "SSLDEPS=${SSLDEPS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SSL is available" >&5 $as_echo_n "checking if SSL is available... " >&6; } ac_check_lib_ssl=0 # Check whether --with-openssl_lib was given. if test "${with_openssl_lib+set}" = set; then : withval=$with_openssl_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LDFLAGS="-L$with_openssl_lib $SSLDEPS $LDFLAGS" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi # Check whether --with-openssl_include was given. if test "${with_openssl_include+set}" = set; then : withval=$with_openssl_include; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CFLAGS="-I$with_openssl_include $CFLAGS $CFLAGS3264" echo "CFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi # Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; echo "yes" OPENSSL="${withval}" CFLAGS="-I$with_openssl/include $CFLAGS $CFLAGS3264" LDFLAGS="-L$with_openssl/lib $SSLDEPS $LDFLAGS" echo "CFLAGS=$CFLAGS" echo "LDFLAGS=$LDFLAGS" ac_check_lib_ssl=1 else echo "no" CFLAGS="$CFLAGS $CFLAGS3264" LDFLAGS="$SSLDEPS $LDFLAGS" echo "CFLAGS=${CFLAGS}" echo "LDFLAGS=${LDFLAGS}" ac_check_lib_ssl=1 fi if [ $ac_check_lib_ssl -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing RSA_new" >&5 $as_echo_n "checking for library containing RSA_new... " >&6; } if ${ac_cv_search_RSA_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char RSA_new (); int main () { return RSA_new (); ; return 0; } _ACEOF for ac_lib in '' crypto; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_RSA_new=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_RSA_new+:} false; then : break fi done if ${ac_cv_search_RSA_new+:} false; then : else ac_cv_search_RSA_new=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_RSA_new" >&5 $as_echo "$ac_cv_search_RSA_new" >&6; } ac_res=$ac_cv_search_RSA_new if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing SSL_library_init" >&5 $as_echo_n "checking for library containing SSL_library_init... " >&6; } if ${ac_cv_search_SSL_library_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char SSL_library_init (); int main () { return SSL_library_init (); ; return 0; } _ACEOF for ac_lib in '' ssl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_SSL_library_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_SSL_library_init+:} false; then : break fi done if ${ac_cv_search_SSL_library_init+:} false; then : else ac_cv_search_SSL_library_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_SSL_library_init" >&5 $as_echo "$ac_cv_search_SSL_library_init" >&6; } ac_res=$ac_cv_search_SSL_library_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else exit 1 fi fi else echo "SSL is not required by this setup" fi if [ $requires_dnscore -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Core library" >&5 $as_echo_n "checking for the DNS Core library... " >&6; } # Check whether --with-dnscore was given. if test "${with_dnscore+set}" = set; then : withval=$with_dnscore; CFLAGS="-I$with_dnscore/include $CFLAGS" LDFLAGS="-L$with_dnscore/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnscore_init in -ldnscore" >&5 $as_echo_n "checking for dnscore_init in -ldnscore... " >&6; } if ${ac_cv_lib_dnscore_dnscore_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnscore $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnscore_init (); int main () { return dnscore_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnscore_dnscore_init=yes else ac_cv_lib_dnscore_dnscore_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnscore_dnscore_init" >&5 $as_echo "$ac_cv_lib_dnscore_dnscore_init" >&6; } if test "x$ac_cv_lib_dnscore_dnscore_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSCORE 1 _ACEOF LIBS="-ldnscore $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnscore ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnscore_init in -ldnscore" >&5 $as_echo_n "checking for dnscore_init in -ldnscore... " >&6; } if ${ac_cv_lib_dnscore_dnscore_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnscore $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnscore_init (); int main () { return dnscore_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnscore_dnscore_init=yes else ac_cv_lib_dnscore_dnscore_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnscore_dnscore_init" >&5 $as_echo "$ac_cv_lib_dnscore_dnscore_init" >&6; } if test "x$ac_cv_lib_dnscore_dnscore_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSCORE 1 _ACEOF LIBS="-ldnscore $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnscore/include $CFLAGS" LDFLAGS="-L../../lib/dnscore/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnscore $LDDYN" fi fi fi if [ $requires_dnsdb -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Database library" >&5 $as_echo_n "checking for the DNS Database library... " >&6; } # Check whether --with-dnsdb was given. if test "${with_dnsdb+set}" = set; then : withval=$with_dnsdb; CFLAGS="-I$with_dnsdb/include $CFLAGS" LDFLAGS="-L$with_dnsdb/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zdb_init in -ldnsdb" >&5 $as_echo_n "checking for zdb_init in -ldnsdb... " >&6; } if ${ac_cv_lib_dnsdb_zdb_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnsdb $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zdb_init (); int main () { return zdb_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnsdb_zdb_init=yes else ac_cv_lib_dnsdb_zdb_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnsdb_zdb_init" >&5 $as_echo "$ac_cv_lib_dnsdb_zdb_init" >&6; } if test "x$ac_cv_lib_dnsdb_zdb_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSDB 1 _ACEOF LIBS="-ldnsdb $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnsdb ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zdb_init in -ldnsdb" >&5 $as_echo_n "checking for zdb_init in -ldnsdb... " >&6; } if ${ac_cv_lib_dnsdb_zdb_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnsdb $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char zdb_init (); int main () { return zdb_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnsdb_zdb_init=yes else ac_cv_lib_dnsdb_zdb_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnsdb_zdb_init" >&5 $as_echo "$ac_cv_lib_dnsdb_zdb_init" >&6; } if test "x$ac_cv_lib_dnsdb_zdb_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSDB 1 _ACEOF LIBS="-ldnsdb $LIBS" else exit fi else echo "embedded" CFLAGS="-I${srcdir}/../../lib/dnsdb/include $CFLAGS" LDFLAGS="-L../../lib/dnsdb/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnsdb $LDDYN" fi fi fi if [ $requires_dnszone -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Zone library" >&5 $as_echo_n "checking for the DNS Zone library... " >&6; } # Check whether --with-dnszone was given. if test "${with_dnszone+set}" = set; then : withval=$with_dnszone; CFLAGS="-I$with_dnszone/include $CFLAGS" LDFLAGS="-L$with_dnszone/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnszone_init in -ldnszone" >&5 $as_echo_n "checking for dnszone_init in -ldnszone... " >&6; } if ${ac_cv_lib_dnszone_dnszone_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnszone $LDSTAT -ldnsdb -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnszone_init (); int main () { return dnszone_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnszone_dnszone_init=yes else ac_cv_lib_dnszone_dnszone_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnszone_dnszone_init" >&5 $as_echo "$ac_cv_lib_dnszone_dnszone_init" >&6; } if test "x$ac_cv_lib_dnszone_dnszone_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSZONE 1 _ACEOF LIBS="-ldnszone $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnszone ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnszone_init in -ldnszone" >&5 $as_echo_n "checking for dnszone_init in -ldnszone... " >&6; } if ${ac_cv_lib_dnszone_dnszone_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnszone $LDSTAT -ldnsdb -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnszone_init (); int main () { return dnszone_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnszone_dnszone_init=yes else ac_cv_lib_dnszone_dnszone_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnszone_dnszone_init" >&5 $as_echo "$ac_cv_lib_dnszone_dnszone_init" >&6; } if test "x$ac_cv_lib_dnszone_dnszone_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSZONE 1 _ACEOF LIBS="-ldnszone $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnszone/include $CFLAGS" LDFLAGS="-L../../lib/dnszone/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnszone $LDDYN" fi fi fi if [ $requires_dnslg -eq 1 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the DNS Looking Glass library" >&5 $as_echo_n "checking for the DNS Looking Glass library... " >&6; } # Check whether --with-dnslg was given. if test "${with_dnslg+set}" = set; then : withval=$with_dnslg; CFLAGS="-I$with_dnslg/include $CFLAGS" LDFLAGS="-L$with_dnslg/lib $LDFLAGS"; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnslg_init in -ldnslg" >&5 $as_echo_n "checking for dnslg_init in -ldnslg... " >&6; } if ${ac_cv_lib_dnslg_dnslg_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnslg $LDSTAT -ldnscore $LDDYN -lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnslg_init (); int main () { return dnslg_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnslg_dnslg_init=yes else ac_cv_lib_dnslg_dnslg_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnslg_dnslg_init" >&5 $as_echo "$ac_cv_lib_dnslg_dnslg_init" >&6; } if test "x$ac_cv_lib_dnslg_dnslg_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSLG 1 _ACEOF LIBS="-ldnslg $LIBS" else exit fi else if [ ! -d ${srcdir}/../../lib/dnslg ] then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnslg_init in -ldnslg" >&5 $as_echo_n "checking for dnslg_init in -ldnslg... " >&6; } if ${ac_cv_lib_dnslg_dnslg_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnslg $LDSTAT -ldnscore $LDDYN $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnslg_init (); int main () { return dnslg_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnslg_dnslg_init=yes else ac_cv_lib_dnslg_dnslg_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnslg_dnslg_init" >&5 $as_echo "$ac_cv_lib_dnslg_dnslg_init" >&6; } if test "x$ac_cv_lib_dnslg_dnslg_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDNSLG 1 _ACEOF LIBS="-ldnslg $LIBS" else exit fi else CFLAGS="-I${srcdir}/../../lib/dnslg/include $CFLAGS" LDFLAGS="-L../../lib/dnslg/.libs $LDFLAGS" LDFLAGS="$LDFLAGS $LDSTAT -ldnslg $LDDYN" fi fi fi LDFLAGS="$LDFLAGS $LDDYN" LIBS="$LDDYN $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if LTO has been enabled" >&5 $as_echo_n "checking if LTO has been enabled... " >&6; } # Check whether --enable-lto was given. if test "${enable_lto+set}" = set; then : enableval=$enable_lto; enable_lto=yes else enable_lto=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lto" >&5 $as_echo "$enable_lto" >&6; } case "$enable_lto" in yes) type -p gold if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: 'gold' not found" >&5 $as_echo "WARNING: 'gold' not found" >&6; } sleep 1 fi if [ ! "$LD" = "" ] then $LD -v |grep -i gold > /dev/null 2>&1 if [ $? -ne 0 ] then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: LTO enabled but LD ($LD) is not gold" >&5 $as_echo "WARNING: LTO enabled but LD ($LD) is not gold" >&6; } sleep 1 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: LD not defined" >&5 $as_echo "LD not defined" >&6; } fi if true; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; no|*) if false; then HAS_LTO_SUPPORT_TRUE= HAS_LTO_SUPPORT_FALSE='#' else HAS_LTO_SUPPORT_TRUE='#' HAS_LTO_SUPPORT_FALSE= fi ;; esac for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done done # Provide a safe default value. : "${ac_cv_func_select_args=int,int *,struct timeval *}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG1 $1 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in bzero memset select socket do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_DARWIN_OS_TRUE}" && test -z "${IS_DARWIN_OS_FALSE}"; then as_fn_error $? "conditional \"IS_DARWIN_OS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_BSD_FAMILY_TRUE}" && test -z "${IS_BSD_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_BSD_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_LINUX_FAMILY_TRUE}" && test -z "${IS_LINUX_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_LINUX_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${IS_SOLARIS_FAMILY_TRUE}" && test -z "${IS_SOLARIS_FAMILY_FALSE}"; then as_fn_error $? "conditional \"IS_SOLARIS_FAMILY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_NIAGARA_TRUE}" && test -z "${HAS_CPU_NIAGARA_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_NIAGARA\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CPU_AMDINTEL_TRUE}" && test -z "${HAS_CPU_AMDINTEL_FALSE}"; then as_fn_error $? "conditional \"HAS_CPU_AMDINTEL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE32BITS_TRUE}" && test -z "${FORCE32BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE32BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FORCE64BITS_TRUE}" && test -z "${FORCE64BITS_FALSE}"; then as_fn_error $? "conditional \"FORCE64BITS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_ICC_TRUE}" && test -z "${USES_ICC_FALSE}"; then as_fn_error $? "conditional \"USES_ICC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_GCC_TRUE}" && test -z "${USES_GCC_FALSE}"; then as_fn_error $? "conditional \"USES_GCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_CLANG_TRUE}" && test -z "${USES_CLANG_FALSE}"; then as_fn_error $? "conditional \"USES_CLANG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_SUNC_TRUE}" && test -z "${USES_SUNC_FALSE}"; then as_fn_error $? "conditional \"USES_SUNC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USES_UNKNOWN_TRUE}" && test -z "${USES_UNKNOWN_FALSE}"; then as_fn_error $? "conditional \"USES_UNKNOWN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_TUNE_NATIVE_TRUE}" && test -z "${HAS_CC_TUNE_NATIVE_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_TUNE_NATIVE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_IDENT_TRUE}" && test -z "${HAS_CC_NO_IDENT_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_IDENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_TRUE}" && test -z "${HAS_CC_ANSI_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ANSI_ALIAS_TRUE}" && test -z "${HAS_CC_ANSI_ALIAS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ANSI_ALIAS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_PEDANTIC_TRUE}" && test -z "${HAS_CC_PEDANTIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_PEDANTIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_GNU99_TRUE}" && test -z "${HAS_CC_STD_GNU99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_GNU99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STD_C99_TRUE}" && test -z "${HAS_CC_STD_C99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STD_C99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_XC99_TRUE}" && test -z "${HAS_CC_XC99_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_XC99\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M32_TRUE}" && test -z "${HAS_CC_M32_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_M64_TRUE}" && test -z "${HAS_CC_M64_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_M64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_WALL_TRUE}" && test -z "${HAS_CC_WALL_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_WALL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G_TRUE}" && test -z "${HAS_CC_G_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_G3_TRUE}" && test -z "${HAS_CC_G3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_G3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF2_TRUE}" && test -z "${HAS_CC_DWARF2_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF3_TRUE}" && test -z "${HAS_CC_DWARF3_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF3\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_DWARF4_TRUE}" && test -z "${HAS_CC_DWARF4_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_DWARF4\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_STACK_PROTECTOR_TRUE}" && test -z "${HAS_CC_STACK_PROTECTOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_STACK_PROTECTOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_EXCEPTIONS_TRUE}" && test -z "${HAS_CC_EXCEPTIONS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_EXCEPTIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_TRUE}" && test -z "${HAS_CC_MISSING_FIELD_INITIALIZERS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_MISSING_FIELD_INITIALIZERS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_SANITIZE_ADDRESS_TRUE}" && test -z "${HAS_CC_SANITIZE_ADDRESS_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_SANITIZE_ADDRESS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_TRUE}" && test -z "${HAS_CC_NO_OMIT_FRAME_POINTER_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_NO_OMIT_FRAME_POINTER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_TRUE}" && test -z "${HAS_CC_ADDRESS_SANITIZER_CHECK_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_ADDRESS_SANITIZER_CHECK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_TRUE}" && test -z "${HAS_CC_CATCH_UNDEFINED_BEHAVIOR_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_CATCH_UNDEFINED_BEHAVIOR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CC_RDYNAMIC_TRUE}" && test -z "${HAS_CC_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"HAS_CC_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MEMALIGN_ISSUES_TRUE}" && test -z "${HAS_MEMALIGN_ISSUES_FALSE}"; then as_fn_error $? "conditional \"HAS_MEMALIGN_ISSUES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LITTLE_ENDIAN_TRUE}" && test -z "${HAS_LITTLE_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_LITTLE_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BIG_ENDIAN_TRUE}" && test -z "${HAS_BIG_ENDIAN_FALSE}"; then as_fn_error $? "conditional \"HAS_BIG_ENDIAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_TRUE}" && test -z "${HAS_CTRL_DYNAMIC_PROVISIONING_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL_DYNAMIC_PROVISIONING\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRL_SUPPORT_TRUE}" && test -z "${HAS_RRL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MESSAGES_SUPPORT_TRUE}" && test -z "${HAS_MESSAGES_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MESSAGES_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MASTER_SUPPORT_TRUE}" && test -z "${HAS_MASTER_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MASTER_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_CTRL_TRUE}" && test -z "${HAS_CTRL_FALSE}"; then as_fn_error $? "conditional \"HAS_CTRL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSID_SUPPORT_TRUE}" && test -z "${HAS_NSID_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSID_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DYNUPDATE_SUPPORT_TRUE}" && test -z "${HAS_DYNUPDATE_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DYNUPDATE_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_TRUE}" && test -z "${HAS_RRSIG_MANAGEMENT_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_RRSIG_MANAGEMENT_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_STATISTICS_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_STATISTICS_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ZALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_ZALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ZALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MALLOC_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MALLOC_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MALLOC_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_BFD_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_BFD_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_BFD_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MUTEX_DEBUG_SUPPORT_TRUE}" && test -z "${HAS_MUTEX_DEBUG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MUTEX_DEBUG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_THREAD_ID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_THREAD_ID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOG_PID_ALWAYS_ON_TRUE}" && test -z "${HAS_LOG_PID_ALWAYS_ON_FALSE}"; then as_fn_error $? "conditional \"HAS_LOG_PID_ALWAYS_ON\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_FULL_ASCII7_TRUE}" && test -z "${HAS_FULL_ASCII7_FALSE}"; then as_fn_error $? "conditional \"HAS_FULL_ASCII7\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NON_AA_AXFR_SUPPORT_TRUE}" && test -z "${HAS_NON_AA_AXFR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NON_AA_AXFR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LOGDIR_TRUE}" && test -z "${HAS_LOGDIR_FALSE}"; then as_fn_error $? "conditional \"HAS_LOGDIR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_SA_LEN_TRUE}" && test -z "${HAS_SOCKADDR_SA_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_SA_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN_SIN_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN_SIN_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN_SIN_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_TRUE}" && test -z "${HAS_SOCKADDR_IN6_SIN6_LEN_FALSE}"; then as_fn_error $? "conditional \"HAS_SOCKADDR_IN6_SIN6_LEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_ACL_SUPPORT_TRUE}" && test -z "${HAS_ACL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_ACL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TSIG_SUPPORT_TRUE}" && test -z "${HAS_TSIG_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_TSIG_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DNSSEC_SUPPORT_TRUE}" && test -z "${HAS_DNSSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DNSSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC3_SUPPORT_TRUE}" && test -z "${HAS_NSEC3_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC3_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_NSEC_SUPPORT_TRUE}" && test -z "${HAS_NSEC_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_NSEC_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_MIRROR_SUPPORT_TRUE}" && test -z "${HAS_MIRROR_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_MIRROR_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_DROPALL_SUPPORT_TRUE}" && test -z "${HAS_DROPALL_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_DROPALL_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_TCL_TRUE}" && test -z "${HAS_TCL_FALSE}"; then as_fn_error $? "conditional \"HAS_TCL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RDTSC_TRUE}" && test -z "${HAS_RDTSC_FALSE}"; then as_fn_error $? "conditional \"HAS_RDTSC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_RRCACHE_ENABLED_TRUE}" && test -z "${HAS_RRCACHE_ENABLED_FALSE}"; then as_fn_error $? "conditional \"HAS_RRCACHE_ENABLED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAS_LTO_SUPPORT_TRUE}" && test -z "${HAS_LTO_SUPPORT_FALSE}"; then as_fn_error $? "conditional \"HAS_LTO_SUPPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by yadifa $as_me 2.1.6-5826, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ yadifa config.status 2.1.6-5826 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "client-config.h") CONFIG_HEADERS="$CONFIG_HEADERS client-config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . # The names of the tagged configurations supported by this script. available_tags='' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi make buildinfo.h echo echo "SUMMARY for YADIFA:" echo "------------------" echo echo "CC .................................. : $CC" echo "LD .................................. : $LD" echo "AR .................................. : $AR" echo "CFLAGS .............................. : $CFLAGS" echo "CPPFLAGS ............................ : $CPPFLAGS" echo "LDFLAGS ............................. : $LDFLAGS" echo "LIBS ................................ : $LIBS" echo echo "ZALLOC .............................. : $enable_zalloc" echo "ZALLOC STATISTICS ................... : $enable_zalloc_statistics" echo "ZALLOC DEBUG ........................ : $enable_zalloc_debug" echo "ACL ................................. : $enable_acl" echo "TSIG ................................ : $enable_tsig" echo "MASTER .............................. : $enable_master" echo "DYNUPDATE ........................... : $enable_dynupdate" echo "RRSIG MANAGEMENT .................... : $enable_rrsig_management" echo "CTRL ................................ : $enable_ctrl" echo "NSEC ................................ : $enable_nsec" echo "NSEC3 ............................... : $enable_nsec3" echo "RRL ................................. : $enable_rrl" if [ ! "${OPENSSL}" = "" ] then echo echo "Using OpenSLL from .................. : ${OPENSSL}" fi if [ "$with_tcl" = "yes" ]; then echo echo TCL used ............................ : $tcl_version echo TCL library ......................... : $tcl_libdir echo "TCL includes ........................ : $tcl_includedir" fi echo echo "Install prefix ...................... : $prefix" echo "Install sysconf ..................... : $sysconfdir" echo echo echo "YADIFA DONE" echo "-----------" echo echo yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/missing0000644000077100007710000000013212473710127017740 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597654.219344534 yadifa-2.1.6-5826/bin/yadifa/missing0000755000077100007710000001533012473710127017551 0ustar00yadifayadifa00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 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, 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, see . # 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. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/COPYING0000644000077100007710000000012412650131756017402 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.820344 30 ctime=1454597654.180344534 yadifa-2.1.6-5826/bin/yadifa/COPYING0000664000077100007710000000312012650131756017203 0ustar00yadifayadifa00000000000000 Copyright (c) 2011-2016, EURid. All rights reserved. The YADIFA TM software product is provided under the BSD 3-clause license: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of EURid nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/README0000644000077100007710000000012412654656702017236 xustar000000000000000027 mtime=1454595522.700671 27 atime=1454597464.816344 30 ctime=1454597654.194344534 yadifa-2.1.6-5826/bin/yadifa/README0000664000077100007710000005773012654656702017057 0ustar00yadifayadifa00000000000000################################################################################ # # Copyright (c) 2011-2016, EURid. All rights reserved. # The YADIFA TM software product is provided under the BSD 3-clause license: # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # * Neither the name of EURid nor the names of its contributors may be # used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # ################################################################################ 20160126: YADIFA 2.1.6 Fixes: - fixed an issue where the referral would not be measured for UDP on a optimised build. 20160108: YADIFA 2.1.5 Dynamic updates do not use temporary files anymore which improves their general performance. The statistics now shows the referrals. Fixes: - fixed an issue where getting a huge incremental transfer would prevent the server from answering queries while applying the changes. - fixed an issue serving IXFR that would occur when a incremental change step was bigger than 64KB - fixed an issue for Solaris with the memory alignment fix not active everywhere - fixed an issue on the Solaris build settings - fixed an issue where sometimes yadifad would not find a configuration file given as a parameter with a relative path - fixed an issue where a wild-card would not be properly returned with an AXFR - fixed an issue where dynamically updating a zone at a speed such that the zone file would need to be written multiple times on disk before finishing the previous write could lead to a deadlock 20151026: YADIFA 2.1.4 The zone reader error reporting has been improved. Stacktrace support added for Solaris. Known issue: - Adding and or removing NSEC3PARAM dynamically is not properly handled. Fixes: - fixed an issue where an NSEC3 answer proving a * query would lead to a crash - fixed an issue where a private key may be not recognised as such - fixed an issue where dynamic update prerequisite check would fail a valid match - fixed an issue where zone signature maintenance would only start if all private keys were available. 20150821: YADIFA 2.1.3 Fixes: - fixed an issue that could lead to a crash at startup - fixed an issue where parsing a TYPE#### record would stop the parser prematurely 20150814: YADIFA 2.1.2 The ./configure script has a new option: --enable-full-ascii7 This changes the behaviour of DNS name validation to accept all the ASCII7 characters instead of only the DNS-space ones. Enabling this option is not recommended. Fixes: - fixes an issue where the hmac-shaX identification string sent with a TSIG had the suffix ".sig-alg.reg.int". 20150714: YADIFA 2.1.1 The yadifa command line has a new option: --config|-c file : read the specific configuration file instead of ~/.yadifa.rc Issues detected on the NSEC3 database have now been upgraded from debug to info/warning Fixes: - fixed an issue where, on some cases; the garbage collector for the zones was not triggering for a long time. - fixed an issue in the Makefile (courtesy of DENIC) - fixed an issue where a few bytes could be leaked in some rare cases when failing to unload a zone - fixed an issue in RRL where some values of IPv6 prefix - fixed an issue accepting some answers on IXFR transfers 20150424: YADIFA 2.1.0 New journal file format: This new format addresses a few issues like having maximum journal file and a relatively constant random access time even for very big sizes. The internal messaging queue has been changed to address huge amount of zones. New CHaos queries supported: hostname id.server Known issues: _ building successfully with LTO may require to append both AR=gcc-ar and RANLIB=gcc-ranlib to the ./configure command 20150403: YADIFA 2.0.6 This release is a public release. This minor update's sole purpose is to fix YADIFA builds on OpenBSD. Fixes: - fixed a crash that could occur while sending a massive amount of notifications - OpenBSD builds are fixed. Tested on: OpenBSD 5.6 amd64, standard installation. Configure: ./configure Tested on: OpenBSD 5.6 amd64, with gcc 4.9 installed. Configure: ./configure CC=egcc 20150226: YADIFA 2.0.5 This release is a public release. Fixes: - fixed an issue with huge IXFR transfers as a master - fixed an issue with notifications on slave-slave-master setup - fixed an issue with a potential infinite loop loading an AXFR from a master - fixed missing hmac-sha* from configuration - fixed an issue with TLSA records parsing - fixed an issue with base 16 encoding - fixed an issue parsing * domains - fixed an issue with some RRL motivated answers - increased the maximum number of network interfaces from 5 to 16 - fixed an error in the configuration examples where "statistics" was used instead of "stats" - minor fixes and improvements 20141216: YADIFA 2.0.4 This release is a public release. By popular demand, the default log file directory is now PREFIX/var/log/yadifa. It can be set using --with-logdir=/my/dir Improved build mechanism. It has been tested to work automatically on Linux, FreeBSD, OSX, SunOS. RedHat family builds will use -O2 as maximum optimisations. Note that some optional features are now enabled by default but can be disabled. Fixes: - fixed an issue with the AXFR transfer where the serial number would not be properly taken into account - fixed an issue with the notify mechanism that could occur if the server was only listening to 127.0.0.1 - fixed an issue with bogus DNSKEY records that may potentially lead to a crash in openssl - fixed a reported potential "tmpfile" vulnerability on DEBUG builds (generated with make debug) - fixed an issue with IPv6 connections on some architectures - typos fixes - minor fixes and improvements 20141104: Architecture portability enhancements. On Solaris, if no --enable-force32bits nor --enable-force64bits is set, then 64 bits will be forced (fixes an issue at link-time) ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC3 Extensions Required, dynamically linked, not stripped, no debugging information available PATH=/opt/csw/bin:/usr/ccs/bin:$PATH ./configure --enable-force32bits PATH=/opt/csw/bin:/usr/ccs/bin:$PATH make 20141030: Architecture portability enhancements. FreeBSD 9 FreeBSD dnode3 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 gcc (GCC) 4.2.1 20070831 patched [FreeBSD] ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked (uses shared libs), for FreeBSD 9.0 (900044), not stripped Ubuntu Linux dnode10 3.2.0-49-generic #75-Ubuntu SMP Tue Jun 18 17:39:32 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xe3b8601b9b5e59f8c9ce519cacbe9b8ff544ff1d, not stripped OSX Darwin RD-Mac-Mini.local 13.3.0 Darwin Kernel Version 13.3.0: Tue Jun 3 21:27:35 PDT 2014; root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Mach-O 64-bit executable x86_64 20141029: Architecture portability enhancements. uname -a gcc --version file yadifad YellowDog Linux Linux 2.6.29-3.ydl61.4 #1 SMP Mon Sep 7 14:50:27 PDT 2009 ppc64 ppc64 ppc64 GNU/Linux gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44) ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available Debian PPC64 Linux 3.2.0-3-powerpc64 #1 SMP Mon Jul 23 08:03:56 UTC 2012 ppc64 GNU/Linux gcc (Debian 4.6.3-8) 4.6.3 ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.26, BuildID[sha1]=0xedc47c984a4af7eb9a7ecbc0f135e4d064ba08f0, with unknown capability 0x41000000 = 0x13676e75, with unknown capability 0x10000 = 0xb0401, not stripped note: using --enable-force64bits failed because of ssl, no simple/quick way to install openssl-devel.ppc64 seemed available 20141016: YADIFA 2.0.2 TCP fallback support on truncation 20140905: YADIFA 2.0.0 This release is a public release Fixes: - fixed a log incorrectly reporting an error when the client didn't close the TCP connection fast enough - fixed an issue with the statistics on TCP queries Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140829: YADIFA 2.0.0-beta3-public This release is a public release - --disable-master feature at configure now builds a slave-only server Fixes: - fixed an issue with TSIG signed queries - fixed an issue with thread pool live resizing - fixed an issue where reading an undeleted obsolete journal ending at the start of a newly transferred zone from the master would incorrectly trigger an error Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. 20140630: YADIFA 2.0.0-beta2-public This release is a public release - basepath disabled - pidpath removed, only pidfile remains - log reopen notification is now timestamped - slave zones no longer complain about missing NSEC/NSEC3 private keys - the error code ZRE_FILE_NOT_FOUND has been replaced by the more accurate code ZRE_NO_VALID_FILE_FOUND - default logging settings no longer output debug Fixes: - fixed issue in flag computation (AD,CD) - fixed an issue with journal truncation sometimes leading to a crash - zone parsing now correctly accepts '#' as a comment marker - zone parsing now rejects wrong fqdn as soon as it reads them, leading to a more accurate error message - removing the last dnskey of a zone no longer crashes the server Known issue: - removing the last key of a signed zone is permitted by YADIFA but triggers some chicken-egg issue with signatures. yadifa remote client commands prototype is now available with the following supported commands: -shutdown shuts down yadifa e.g. ./yadifa -s "192.0.2.1 port 53" -t shutdown -cfgreload reloads the and sections of the yadifad configuration e.g. ./yadifa -s "192.0.2.1 port 53" -t cfgreload -logreopen closes and reopen the log files e.g. ./yadifa -s "192.0.2.1 port 53" -t logreopen -freezeall prevents all zones from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freezeall -freeze prevents a zone from being updated dynamically with nsupdate e.g. ./yadifa -s "192.0.2.1 port 53" -t freeze -q somedomain.eu -unfreezeall enables updates of all zones again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreezeall -unfreeze enables updates of a zone again e.g. ./yadifa -s "192.0.2.1 port 53" -t unfreeze -q somedomain.eu In order to work, the allow-control ACL must be defined either in
for the global commands and may also be defined in for the ones targeting a specific zone. e.g. allow-control 127.0.0.1 Note that tsig is not supported in the client yet. 20140528: YADIFA 2.0.0-beta1-public This release is a public release - NSID implemented (enabled at ./configure time with --enable-nsid - generic parser for: - getops - zone file - resolv.conf - configuration - '@' can now be used in a zone file - new binary for controlling 'yadifad' (yadifa) - framework is rewritten for multi core systems - single core server has been removed Fixes: - fixed several minor issues Know issues: - removing all dnskeys from a zone file crashes the server - yadifa has some issues with nodelay, nocork 20130424: YADIFA 1.1.0 _ added DSA signature _ added SHA-256 SHA-384 SHA-512 digest algorithms _ now supports additional DNSSEC algorithms: DSASHA1 DSASHA1_NSEC3 RSASHA256_NSEC3 RSASHA512_NSEC3 _ Respone Rate Limitation implemented (enabled at ./configure time with --enable-rrl) _ --enable-tiny-footprint now reduces the memory usage further by reducing the standard log queue from 2^20 to 2^12 entries _ the general speed has been slightly improved _ dynamic updates pending for more than 3 seconds are now dropped with an error _ dynamic provisioning Fixes: _ fixed a memory leak that could occur at NSEC3 generation when loading the zone failed in a particular way _ fixed a memory leak at ixfr send _ fixed handling of '_' character that was improperly stored in the database _ fixed bandwidth limit settings (tcp stream in and out) not always being taken from the configuration _ fixed TSIG answer verification for notifies _ fixed error codes not being registered and thus logged as unknown hexadecimal error code. _ other minor fixes 20130612: YADIFA 1.0.3 Fixes only (backports from 1.1.0) Fixes: _ fixed an issue preventing YADIFA from being build from another directory _ fixed an issue with OSX systems where gsed has to be used instead of sed _ fixed an issue with the '_' character not being properly handled _ fixed an issue where reading MX record from a zone file would incorrecly be rejected as invalid _ fixed an issue where the OPT record would not be properly written _ fixed an issue where an undefined ACL reference would be silently ignored _ fixed missing code tags for several error codes. From now on unregistered codes are dumped in hexadicimal. _ fixed portability issues with BSD and OSX _ fixed several minor issues 20120921: YADIFA 1.0.2 Fixes only Fixes: _ fixed an issue where the journal file was sometimes not properly closed at the end of a task _ fixed an issue where the TCP usage slots would sometimes wrongly return that they were all being used _ fixed an issue on IXFR processing (slave side) where the type of answer from the master would not be properly detected _ fixed an issue with TSIG on secrets not exactly 16 bytes long (binary form) _ fixed an issue on 32 bits architectures where the sig-validity-* fields would not be properly handled if not set on each zone section. _ slightly improved the replay time of big journal files _ fixed several minor issues Known issues: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120709: YADIFA 1.0.1 _ logging repeat compression is now by channel instead of global Fixes: _ fixed an issue where glibc whould assert if libgcc_s.so (libgcc_s.so.1) and libc.so (libc.so.6) where not available inside the chrooted directory of YADIFA _ fixed an issue in the syslog module Known issues: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120625: YADIFA 1.0.0 _ LTO support can be enabled with --enable-lto but this is not working with clang. LTO does not increase the performance significally _ parallel processing of listening addresses can now be enabled. It can be set using thread-count-by-address in the
section. By default YADIFA will not use parallel processing as this feature has not been as thoroughly tested as the single-thread processing model _ default parameters tuning _ fixes Known issue: _ on 32 bits architectures, the sig-validity-* fields are not properly copied from
to as a workaround, set the sig-validity fields in each container in 32 bits architectures ie: sig-validity-interval 7 sig-validity-regeneration 168 sig-validity-jitter 3600 20120530: YADIFA 1.0.0RC3 _ the configuration parser now ignores undefined logger names and report them with a warning _ syslog messages are now put in the name of "yadifad" instead of the name used for the "syslog" channel _ syslog messages do not print the time from YADIFA anymore _ improved the steps involved in loading a locally cached slave zone _ zones are now loaded in background _ man page yadifad-conf.man5 renamed into yadifad.conf.man5 Fixes: _ AXFR/IXFR answers with the RA bit set are nolonger rejected as invalid _ YADIFA now answers to SIGINT again (shutdown) _ fixed an issue where obsolete AXFR files were not always being deleted _ fixed an issue occurring when both IPv4 and IPv6 were available to handle a notify _ fixed journal replay issue where some RRSIGs records were not properly removed _ fixed an issue occurring with IPv6 queries _ fixed an issue in the generation of a specific NSEC3 error answer _ fixed named query style layout Known issue: _ if the serial of a zone is changed in a way that it goes beyond a value such as the journal serial start is bigger than the journal serial end, issues are expected for IXFR answers. _ notify is ignored on TCP 20120328: YADIFA 1.0.0RC2 _ fixed logging issue on work file creation error _ fixed an issue where IXFR queries could be rejected as being wrongly formatted _ fixed an issue in the query logging text _ enabled command line options ( -u uid -g gid -d ) 20120319: YADIFA 1.0.0RC1 Is a full functional authoritative name server: - works as primary or secondary name server - AXFR - IXFR - NOTIFY - NSUPDATE - TSIG - CLASSES: - IN - CH (just for version) - TYPES: - AAAA - CNAME - DNSKEY - DS - HINFO - MX - NAPTR - NS - NSEC3 - NSEC3PARAM - NSEC - PTR - RRSIG - SOA - SRV - SSHFP - TXT - Automatic resigning - DNSSEC algorithms: - 5 (RSASHA1) - 7 (RSASHA1-NSEC3 - ACL's KNOWN ISSUES: NSEC3: _ cannot work with multiple NSEC3PARAM chains with mixed OPT-IN/OUT settings _ adding a new NSEC3 chain expects that the master sends the NSEC3PARAM first (it does not seems to be always the case) We have a case where a master starts with 2 thousands NSEC3 opt-out records then adds 6 millions NSEC3 opt-in records but does not give the NSEC3PARAM record first. The slave server rejects them all because it's unable to link them to a chain. (This one has high priority) DNSSEC: _ it is not allowed to change the zone security mode (unsecure, NSEC, or NSEC3). Once the zone is loaded it keeps its security mode. _ dynamic updates of NSEC as well as NSEC3 records are refused QUIT: the server will shutdown on the following conditions: _ detection of an impossible situation or an internal integrity issue (ie: for any reason the SOA has vanished from a zone) _ memory limit reached which prevents any more work _ ipc issue which prevent internal services communication ACL: _ since the access control is set by zone and CHAOS class is not implemented as a configurable zone, it is not possible (yet) to specifically block CHAOS queries. 20111121: YADIFA 0.5.5 - many fixes KNOWN ISSUE: NSEC3 slave zone replay fails. 20110706: YADIFA 0.5.0 - slave mode, AXFR/IXFR (no TSIG yet for the slave-side transfer) - answers to a notify from the master - polls the (first) master on the masters list - maintains the .axfr & .ix files (deletes the obsoletes ones) - TSIG queries are checked - Replays the zone journal on startup after the zone load (journaling) - Answers IXFR queries (journaling) 20110601: YADIFA 0.4.0 Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries with TSIG - nsupdate functionality (journaling) - TSIG on client server side will be transmitted, but not checked - ACL works - The zone has SOA, NS A resource records. 20110524: YADIFA 0.3.0 First release internally of yadifad 20110524115500 GMT+1. Operational: - It works as a no dnssec name server - No notifies to slave name servers - daemon - Answers AXFR queries - The zone has SOA, NS A resource records. 20091224: YADIFA 0.2.0 _ Answers AXFR queries _ ACL based on IP and TSIG (not all query types are ACL'ed yet) 20091104: YADIFA 0.1.0 YADIFA is a work in progress. The main goal is to have an alternative for BIND or NSD. Version 0.1.0 is an authoritative server only. It has no: - AXFR/IXFR functionality - dynupdate - support for NSEC - support for NSEC3 - caching mechanism - additional tools (eg.dig, dnssectools, drill,...) It has: - a very fast way to give authoritative answer - a very fast method for loading the database and checking the zone files This first release is to have a feeling how it works in an operational environment. TODO Everything what is not implemented, has to be implemented. Most of the code is there, but is not activated. No comformity tests has been done. (This of course is on the todo list) Bug Reports and Mailing Lists Bugs reports should be sent to bugreport@yadifa.eu yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/query-result.h0000644000077100007710000000012412650131756021201 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.820344 30 ctime=1454597654.155344534 yadifa-2.1.6-5826/bin/yadifa/query-result.h0000664000077100007710000000436212650131756021013 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once /** @defgroup yadifa * @ingroup ### * @brief yadifa */ #include /*----------------------------------------------------------------------------*/ ya_result check_query_result(u16 id_sent, u16 protocol, u16 question_mode, message_data *mesg, u8 *go_tcp); ya_result view_query_result(message_data *mesg, long duration, u16 view_mode_with); /* ------------------------------------------------------------ */ yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/yadifa-config.h0000644000077100007710000000012412650131756021220 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.813344 30 ctime=1454597654.162344534 yadifa-2.1.6-5826/bin/yadifa/yadifa-config.h0000664000077100007710000000654712650131756021041 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once /** @defgroup yadifa * @ingroup ### * @brief yadifa */ #include typedef struct config_main_settings_s config_main_settings_s; struct config_main_settings_s { host_address *server; u8 *qname; u8 *tsig_key_name; char *config_file; // u8 *file; /* ------------------------------------------------------------ */ int16_t qclass; int16_t qtype; bool clean; /** @todo 20150219 gve -- #if HAS_TCL must be set, before release */ //#if HAS_TCL bool interactive; //#endif // HAS_TCL bool verbose; bool enable; }; /*----------------------------------------------------------------------------*/ ya_result yadifa_config_init(); ya_result yadifa_config_cmdline(int argc, char **argv); ya_result yadifa_config_finalise(); char* yadifa_config_file_get(); bool yadifa_is_interactive(void); /* ------------------------------------------------------------ */ yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/aclocal.m40000644000077100007710000000013212654662635020217 xustar000000000000000030 mtime=1454597533.516344535 30 atime=1454597533.516344535 30 ctime=1454597654.145344534 yadifa-2.1.6-5826/bin/yadifa/aclocal.m40000664000077100007710000012246112654662635020033 0ustar00yadifayadifa00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file 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. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file 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. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file 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. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file 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. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file 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. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file 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. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file 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. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/libtool.m4]) m4_include([m4/ltoptions.m4]) m4_include([m4/ltsugar.m4]) m4_include([m4/ltversion.m4]) m4_include([m4/lt~obsolete.m4]) yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/ltmain.sh0000644000077100007710000000013012473714653020172 xustar000000000000000029 mtime=1424988587.71705841 29 atime=1424988587.71705841 30 ctime=1454597654.215344534 yadifa-2.1.6-5826/bin/yadifa/ltmain.sh0000644000077100007710000117077112473714653020016 0ustar00yadifayadifa00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 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. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.6 package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 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. # 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 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do 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 # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # 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 "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 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. # 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 3 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, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --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 --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message 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. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # 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= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE 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. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # 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 () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` 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 "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # 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. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # 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 func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # 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= pie_flag= 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) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append 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,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append 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. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; 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 no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock 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 yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; 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." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/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." $opt_dry_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 func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [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: $progname [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 -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler 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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [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 -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -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 -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -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 -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -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] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) 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: $progname [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." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" 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 -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # 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 else 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 else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" 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" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; 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. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append 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 -e "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. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_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 test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append 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 func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_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 func_basename "$file" destfile=$func_basename_result 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 func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "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) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # 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/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) 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*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; 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 "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # 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. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd 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 # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac 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_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= 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 func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result 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 func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_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've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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. sed_quote_subst='$sed_quote_subst' # Be 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 variables: generated_by_libtool_version='$macro_version' 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 file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED '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 \"\$file\" | $SED '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 \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ 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 "\ # 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 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # 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 \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} 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 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #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 # define FOPEN_WB "wb" # 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 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ 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]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); 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 = (size_t) (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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); 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 * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } 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 (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" 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 func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" 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 # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir 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 func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework 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*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # 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-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext 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 ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -stdlib=* select c++ std lib with clang -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append 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 dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; 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 func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" 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. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'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\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. 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 $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; 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 $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append 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 notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; 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 .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # 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 yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else 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 use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # 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 func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" 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. func_append dlprefiles " $lib $dependency_libs" else func_append 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 func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && 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 func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; 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 prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || 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 *"$absdir:"*) ;; *) func_append 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && 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 built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; 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 lib = "$linkmode" && test yes = "$hardcode_into_libs"; 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 "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 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* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' 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 prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; 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 (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; 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 elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; 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 yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; 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 [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; 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 prog = "$linkmode"; 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 unsupported != "$hardcode_direct"; 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 yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; 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 cannot 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 yes = "$module"; 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 no = "$build_old_libs"; 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 lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # 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 "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=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 "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # 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 func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; 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 test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # 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=$1 number_minor=$2 number_revision=$3 # # 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 # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; esac ;; no) current=$1 revision=$2 age=$3 ;; 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]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; 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]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" 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 func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result 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 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; 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 no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; 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 | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "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 func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; 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 "*) ;; *) func_append 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 "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-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 yes = "$build_libtool_need_lc"; then func_append 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. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi 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 "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append 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 func_append 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 ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; 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 ;; esac ;; 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 with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; 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 no = "$build_old_libs"; 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 no = "$allow_undefined"; 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 no = "$build_old_libs"; 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 # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append 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 yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append 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 "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append 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 relink = "$opt_mode" || 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 shift realname=$1 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 func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "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" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && 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 : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # 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 func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result 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~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "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 $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } 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\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && 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 fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( 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 relink = "$opt_mode"; then $opt_dry_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 func_show_eval '${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 func_show_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 yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_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= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${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" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; 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 "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append 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 "*) ;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append 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"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append 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 yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } 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 func_append 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 func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; 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 "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result 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 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # 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 func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$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 eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$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= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "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}\" || $lt_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 func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; 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 "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; 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) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # 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' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_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 no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false 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) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; 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 $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where 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 build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/VERSION0000644000077100007710000000012412652141712017412 xustar000000000000000027 mtime=1453900746.981001 27 atime=1454597464.811344 30 ctime=1454597654.148344534 yadifa-2.1.6-5826/bin/yadifa/VERSION0000664000077100007710000000000612652141712017213 0ustar00yadifayadifa000000000000002.1.6 yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/configure.ac0000644000077100007710000000013212654662532020641 xustar000000000000000030 mtime=1454597466.829344534 30 atime=1454597466.827344534 30 ctime=1454597654.141344534 yadifa-2.1.6-5826/bin/yadifa/configure.ac0000664000077100007710000001514012654662532020450 0ustar00yadifayadifa00000000000000dnl ############################################################################ dnl dnl Copyright (c) 2011-2016, EURid. All rights reserved. dnl The YADIFA TM software product is provided under the BSD 3-clause license: dnl dnl Redistribution and use in source and binary forms, with or without dnl modification, are permitted provided that the following conditions dnl are met: dnl dnl * Redistributions of source code must retain the above copyright dnl notice, this list of conditions and the following disclaimer. dnl * Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in dnl the documentation and/or other materials provided with the dnl distribution. dnl * Neither the name of EURid nor the names of its contributors may be dnl used to endorse or promote products derived from this software dnl without specific prior written permission. dnl dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN dnl CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE dnl POSSIBILITY OF SUCH DAMAGE. dnl dnl ############################################################################## AC_PREREQ(2.61) AC_REVISION([$Revision: 5826 $]) # 1 # svn log 2> /dev/null|head -2|grep ^r|sed 's/.\([1-9]*\).*/\1/' # 2 # # grep \$Revision: *|sed -e 's/^.*\$Revision: *//' -e 's/\$.*//' -e 's/ *//'|sort -n|tail -1| tr -d '\n')|tr -d '\n' # 3 # # grep -r \$Revision: ../../* |sed -e 's/^.*\$Revision: *//' -e 's/\$.*//' -e 's/ *//'|sort -n|tail -1| tr -d '\n')|tr -d '\n' AC_INIT([yadifa],m4_esyscmd([svn info 2> /dev/null | grep 'Last Changed Rev: ' | sed -re 's/.*: (.*)/Revision: \1 $/' -e 's/^/$/' >> revision.txt;echo $(cat VERSION)-$(grep \$Revision: * | sed -e 's/^.*\$Revision: *//' -e 's/\$.*//' -e 's/ *//' | sort -n | /usr/bin/tail -1 | tr -d '\n') | tr -d '\n']),[bugreport@yadifa.eu]) echo echo echo "YADIFA START" echo "------------" echo echo m4_include([../../m4/eurid.m4]) m4_include([../../m4/yadifa.m4]) AC_CONFIG_AUX_DIR([.]) AM_INIT_AUTOMAKE([-Wall -Werror tar-pax]) AC_CONFIG_HEADER([client-config.h]) AC_CONFIG_MACRO_DIR([m4]) dnl AC_DEFUN([SYSCONF], [/$prefix/PACKAGE/PACKAGE.conf]) AC_CANONICAL_BUILD # Checks for programs. AC_PROG_CC AM_PROG_CC_C_O LT_INIT([disable-shared]) AC_DARWIN_LIBTOOL AC_PROG_LIBTOOL dnl Checks for libraries. AC_CHECK_LIB([c], [printf]) AC_CHECK_LIB([pthread], [pthread_mutex_init]) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([arpa/inet.h fcntl.h netinet/in.h stdlib.h string.h sys/time.h syslog.h unistd.h]) # Check for Darwin or Linux AC_CHECK_HEADERS([linux/limits.h sys/syslimits.h i386/limits.h ppc/limits.h]) # Check for Darwin or Linux AC_CHECK_HEADERS([sys/types.h i386/types.h]) # AC_CHECK_HEADERS([sys/socket.h]) dnl add PCAP AC_CHECK_HEADERS([pcap/pcap.h]) AC_CHECK_LIB([pcap],[pcap_create]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_BIGENDIAN AC_TYPE_MODE_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_STRUCT_TM dnl AC_PROG_RANLIB AC_CHECK_TYPES(uint64_t) AC_CHECK_TYPES(int64_t) AC_CHECK_TYPES(long long) AC_CHECK_TYPES(u_char) #AC_TYPE_PATH_MAX #AC_TYPE_POSIX_PATH_MAX dnl Add some defines. AC_DEFINE_UNQUOTED([TCP_LISTENQ], [1024],[TCP queue]) AC_DEFINE_UNQUOTED([MAX_INTERFACES], [5],[max nic interfaces]) dnl Add some macros AH_BOTTOM([ #ifdef DEBUG #define DPRINTF(p) printf p #else #define DPRINTF(p) /* nothing */ #endif /* DEBUG */ ]) AC_SYS_LARGEFILE AC_COMPILER_CHECK AC_PTHREAD_SPINLOCK_CHECK AC_PTHREAD_SETNAME_NP_CHECK AC_YADIFA_FEATURES AC_YADIFA_ENABLE_DNSCORE AC_YADIFA_ENABLE_DNSDB AC_YADIFA_ENABLE_DNSZONE AC_YADIFA_ENABLE_DNSLG AC_YADIFA_ADD_LIBS AC_CHECK_LTO dnl Checks for library functions. AC_FUNC_FORK dnl AC_FUNC_MALLOC does weird things: dnl http://sources.redhat.com/ml/automake/2003-05/msg00023.html dnl http://www.mail-archive.com/autoconf@gnu.org/msg08935.html dnl AC_FUNC_MALLOC goals: dnl malloc(0) will not return NULL dnl realloc(NULL,x) will not crash (occurs on rare systems) dnl dnl AC_FUNC_MALLOC AC_FUNC_SELECT_ARGTYPES AC_TYPE_SIGNAL AC_FUNC_STAT AC_CHECK_FUNCS([bzero memset select socket]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT dnl ---------------------------------------------------------------------------- AC_MAKE_BUILDINFO echo echo "SUMMARY for YADIFA:" echo "------------------" echo echo "CC .................................. : $CC" echo "LD .................................. : $LD" echo "AR .................................. : $AR" echo "CFLAGS .............................. : $CFLAGS" echo "CPPFLAGS ............................ : $CPPFLAGS" echo "LDFLAGS ............................. : $LDFLAGS" echo "LIBS ................................ : $LIBS" echo echo "ZALLOC .............................. : $enable_zalloc" echo "ZALLOC STATISTICS ................... : $enable_zalloc_statistics" echo "ZALLOC DEBUG ........................ : $enable_zalloc_debug" echo "ACL ................................. : $enable_acl" echo "TSIG ................................ : $enable_tsig" echo "MASTER .............................. : $enable_master" echo "DYNUPDATE ........................... : $enable_dynupdate" echo "RRSIG MANAGEMENT .................... : $enable_rrsig_management" echo "CTRL ................................ : $enable_ctrl" echo "NSEC ................................ : $enable_nsec" echo "NSEC3 ............................... : $enable_nsec3" echo "RRL ................................. : $enable_rrl" if [[ ! "${OPENSSL}" = "" ]] then echo echo "Using OpenSLL from .................. : ${OPENSSL}" fi if [[ "$with_tcl" = "yes" ]]; then echo echo TCL used ............................ : $tcl_version echo TCL library ......................... : $tcl_libdir echo "TCL includes ........................ : $tcl_includedir" fi echo echo "Install prefix ...................... : $prefix" echo "Install sysconf ..................... : $sysconfdir" echo echo echo "YADIFA DONE" echo "-----------" echo echo yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/yadifa.c0000644000077100007710000000012412650131756017750 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.827344 30 ctime=1454597654.229344534 yadifa-2.1.6-5826/bin/yadifa/yadifa.c0000664000077100007710000002302712650131756017561 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup yadifa * @ingroup ### * @brief */ #define SERVER_C_ #define MODULE_MSG_HANDLE g_client_logger #include "client-config.h" #include #include #include #include #include #include #include #include "yadifa-config.h" #include "yadifa.h" #include "query-result.h" /*----------------------------------------------------------------------------*/ logger_handle *g_client_logger; extern config_main_settings_s g_yadifa_main_settings; /*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/ /** @brief time_diff_in_msec (timeval_1 - timeval_2) * * @param tv1 const struct timeval * @param tv2 const struct timeval * @retval timeval_1 - timeval_2 in msec */ static long time_diff_in_msec(const struct timeval *tv1, const struct timeval *tv2) { // if(tv1 == NULL || tv2 == NULL) // { // error_quit("One or both timeval are NULL"); // } return( (tv1->tv_sec * 1000 + tv1->tv_usec / 1000) - (tv2->tv_sec * 1000 + tv2->tv_usec / 1000)); } /** @brief time_now gives the time of the day now * * @param tv struct timeval * * @retval tv * @retrun OK or NOK */ static int time_now(struct timeval *tv) { if(tv == NULL) { return NOK; } if(-1 == gettimeofday(tv, NULL)) { // error_msg("time now: %s\n", strerror(errno)); return NOK; } return OK; } /** @todo 20140521 gve -- still needs export DNSCORE_TCP_FLAGS=nodelay,nocork */ /** @brief yadifa_run main function for controlling yadifad * * @param none * @retrun ya_result */ ya_result yadifa_run() { // uint16_t i = 0; ya_result return_code = OK; /* ------------------------------------------------------------ */ message_data mesg; struct timeval query_time_send; struct timeval query_time_received; u8 go_tcp = OK; /* ------------------------------------------------------------ */ /* give ID from config or randomized */ u16 id = dns_new_id(); u16 qtype = htons(g_yadifa_main_settings.qtype); u8 *qname = g_yadifa_main_settings.qname; // u16 question_mode = g_yadifa_main_settings.question_mode; u16 question_mode = 0; /* prepare root tld */ char *root = "."; u8 root_fqdn[MAX_DOMAIN_LENGTH]; cstr_to_dnsname(root_fqdn, root); #if DEBUG memset(&mesg, 0xff, sizeof(message_data)); formatln("QTYPE: %{dnstype}", &qtype); flushout(); #endif // DEBUG switch(qtype) { case TYPE_CTRL_ZONEFREEZE: case TYPE_CTRL_ZONEUNFREEZE: case TYPE_CTRL_ZONERELOAD: case TYPE_CTRL_ZONECFGRELOAD: { message_make_query(&mesg, id, root_fqdn, qtype, CLASS_CTRL); packet_writer pw; packet_writer_init(&pw, mesg.buffer, mesg.send_length, sizeof(mesg.buffer)); packet_writer_add_record(&pw, root_fqdn, qtype, CLASS_CTRL, 0, qname, (u16)dnsname_len(qname)); MESSAGE_SET_AN(mesg.buffer, htons(1)); mesg.send_length = pw.packet_offset; break; } /* the same as zone freeze, but without extra information */ case TYPE_CTRL_ZONEFREEZEALL: { message_make_query(&mesg, id, root_fqdn, TYPE_CTRL_ZONEFREEZE, CLASS_CTRL); break; } /* the same as zone freeze, but without extra information */ case TYPE_CTRL_ZONEUNFREEZEALL: { message_make_query(&mesg, id, root_fqdn, TYPE_CTRL_ZONEUNFREEZE, CLASS_CTRL); break; } /* the same as zone unfreeze, but without extra information */ case TYPE_CTRL_ZONECFGRELOADALL: { message_make_query(&mesg, id, root_fqdn, TYPE_CTRL_ZONECFGRELOAD, CLASS_CTRL); break; } /** @todo 20150219 gve -- still needs to check this on yadifad side */ case TYPE_CTRL_ZONESYNC: { /* 1. create rdata part for the 'added record' - 1 byte (0 or 1) from --clean command line parameter - qname */ u8 buffer[256]; // max domain name length + 1 byte for clean value buffer[0] = (u8)g_yadifa_main_settings.clean; u16 buffer_len = 1; dnsname_copy(&buffer[1], qname); buffer_len += (u16)dnsname_len(qname); /* 2. make message */ message_make_query(&mesg, id, root_fqdn, qtype, CLASS_CTRL); /* 3. modify message, add an extra resource record */ packet_writer pw; packet_writer_init(&pw, mesg.buffer, mesg.send_length, sizeof(mesg.buffer)); packet_writer_add_record(&pw, root_fqdn, qtype, CLASS_CTRL, 0, buffer, buffer_len); MESSAGE_SET_AN(mesg.buffer, htons(1)); mesg.send_length = pw.packet_offset; break; } case TYPE_CTRL_SRVQUERYLOG: { /* 1. make message */ message_make_query(&mesg, id, root_fqdn, qtype, CLASS_CTRL); /* 2. modify message, add an extra resource record */ packet_writer pw; packet_writer_init(&pw, mesg.buffer, mesg.send_length, sizeof(mesg.buffer)); if(g_yadifa_main_settings.enable) /* from command line parameter */ { u8 c = '1'; packet_writer_add_record(&pw, root_fqdn, qtype, CLASS_CTRL, 0, &c, 1); } else { u8 c = '0'; packet_writer_add_record(&pw, root_fqdn, qtype, CLASS_CTRL, 0, &c, 1); } MESSAGE_SET_AN(mesg.buffer, htons(1)); mesg.send_length = pw.packet_offset; break; } // case TYPE_CTRL_LOGREOPEN: // case TYPE_CTRL_SHUTDOWN default: { message_make_query(&mesg, id, root_fqdn, qtype, CLASS_CTRL); break; } } MESSAGE_SET_OP(mesg.buffer, OPCODE_CTRL); /* TSIG check and returns if not good * @note TSIG is always needed for the controller */ if(FAIL(return_code = message_sign_query_by_name(&mesg, g_yadifa_main_settings.tsig_key_name))) { return return_code; } /* fix the tcp length */ message_update_tcp_length(&mesg); /* set timer before send */ time_now(&query_time_send); u8 connect_timeout = 3; if(FAIL(return_code = message_query_tcp_with_timeout(&mesg, g_yadifa_main_settings.server, connect_timeout))) { formatln("wrong %{hostaddr} : ret %r", g_yadifa_main_settings.server, return_code); /** @todo 20140630 gve -- better logging */ return return_code; } /* stop timer after received */ time_now(&query_time_received); // u16 protocol = g_yadifa_main_settings.protocol; u16 protocol = 0; if(FAIL(return_code = check_query_result(id, protocol, question_mode, &mesg, &go_tcp))) { return return_code; } /* show the result if verbose */ if(g_yadifa_main_settings.verbose) { if(FAIL(return_code = view_query_result(&mesg, time_diff_in_msec(&query_time_received, &query_time_send), 0))) { return return_code; } } return return_code; } /*----------------------------------------------------------------------------*/ yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/config.sub0000644000077100007710000000013212473710127020324 xustar000000000000000030 mtime=1424986199.159058409 30 atime=1424986199.159058409 30 ctime=1454597654.204344534 yadifa-2.1.6-5826/bin/yadifa/config.sub0000755000077100007710000010622312473710127020137 0ustar00yadifayadifa00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-12-03' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/m40000644000077100007710000000013212654663026016615 xustar000000000000000030 mtime=1454597654.138344534 30 atime=1454597654.111344534 30 ctime=1454597654.138344534 yadifa-2.1.6-5826/bin/yadifa/m4/0000775000077100007710000000000012654663026016500 5ustar00yadifayadifa00000000000000yadifa-2.1.6-5826/bin/yadifa/m4/PaxHeaders.8028/ltsugar.m40000644000077100007710000000013012473714653020615 xustar000000000000000029 mtime=1424988587.49005841 29 atime=1424988587.49005841 30 ctime=1454597654.131344534 yadifa-2.1.6-5826/bin/yadifa/m4/ltsugar.m40000644000077100007710000001044012473714653020422 0ustar00yadifayadifa00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) yadifa-2.1.6-5826/bin/yadifa/m4/PaxHeaders.8028/ltversion.m40000644000077100007710000000013012473714653021161 xustar000000000000000029 mtime=1424988587.51105841 29 atime=1424988587.51105841 30 ctime=1454597654.134344534 yadifa-2.1.6-5826/bin/yadifa/m4/ltversion.m40000644000077100007710000000127312473714653020772 0ustar00yadifayadifa00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file 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. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) yadifa-2.1.6-5826/bin/yadifa/m4/PaxHeaders.8028/libtool.m40000644000077100007710000000013012473714653020600 xustar000000000000000029 mtime=1424988587.40405841 29 atime=1424988587.40305841 30 ctime=1454597654.124344534 yadifa-2.1.6-5826/bin/yadifa/m4/libtool.m40000644000077100007710000112507312473714653020417 0ustar00yadifayadifa00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file 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. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 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. # GNU Libtool 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 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool 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, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # 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 sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS yadifa-2.1.6-5826/bin/yadifa/m4/PaxHeaders.8028/ltoptions.m40000644000077100007710000000013012473714653021167 xustar000000000000000029 mtime=1424988587.46805841 29 atime=1424988587.46805841 30 ctime=1454597654.127344534 yadifa-2.1.6-5826/bin/yadifa/m4/ltoptions.m40000644000077100007710000003426212473714653021004 0ustar00yadifayadifa00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file 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. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) yadifa-2.1.6-5826/bin/yadifa/m4/PaxHeaders.8028/lt~obsolete.m40000644000077100007710000000013012473714653021506 xustar000000000000000029 mtime=1424988587.53205841 29 atime=1424988587.53205841 30 ctime=1454597654.138344534 yadifa-2.1.6-5826/bin/yadifa/m4/lt~obsolete.m40000644000077100007710000001377412473714653021330 0ustar00yadifayadifa00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file 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. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/install-sh0000644000077100007710000000013212473710127020345 xustar000000000000000030 mtime=1424986199.160058409 30 atime=1424986199.160058409 30 ctime=1454597654.211344534 yadifa-2.1.6-5826/bin/yadifa/install-sh0000755000077100007710000003452312473710127020163 0ustar00yadifayadifa00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2013-12-25.23; # UTC # 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. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # 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_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 is_target_a_directory=possibly 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 *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi 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 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac 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 if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 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 problematic for 'test' and other utilities. 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 # 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 "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` 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-writable 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 oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && 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` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && 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-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/client-config.h.in0000644000077100007710000000013212654662636021657 xustar000000000000000030 mtime=1454597534.794344535 30 atime=1454597534.794344535 30 ctime=1454597654.173344534 yadifa-2.1.6-5826/bin/yadifa/client-config.h.in0000664000077100007710000002272212654662636021472 0ustar00yadifayadifa00000000000000/* client-config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* number of harware core if the auto-detect fails */ #undef DEFAULT_ASSUMED_CPU_COUNT /* always on */ #undef HAS_ACL_SUPPORT /* bfd debug support disabled. */ #undef HAS_BFD_DEBUG_SUPPORT /* i386, Athlon, Opteron, Core2, i3, i5, i7, ... */ #undef HAS_CPU_AMDINTEL /* T1000 has a Niagara cpu */ #undef HAS_CPU_NIAGARA /* remote control disabled. */ #undef HAS_CTRL /* dynamic provisioning disabled. */ #undef HAS_CTRL_DYNAMIC_PROVISIONING /* always on */ #undef HAS_DNSSEC_SUPPORT /* always off */ #undef HAS_DROPALL_SUPPORT /* dynamic update support disabled. */ #undef HAS_DYNUPDATE_SUPPORT /* YADIFA will now accept ASCII7 characters in DNS names (not recommended) disabled. */ #undef HAS_FULL_ASCII7 /* where to put the log files */ #undef HAS_LOGDIR /* write the pid in each line of log disabled. */ #undef HAS_LOG_PID_ALWAYS_ON /* write the thread id in each line of log disabled. */ #undef HAS_LOG_THREAD_ID_ALWAYS_ON /* malloc debug support disabled. */ #undef HAS_MALLOC_DEBUG_SUPPORT /* DNS master disabled. */ #undef HAS_MASTER_SUPPORT /* Define this to enable slow but safe unaligned memory accesses */ #undef HAS_MEMALIGN_ISSUES /* use messages instead of send (needed if you use more than one IP aliased on the same network interface) disabled. */ #undef HAS_MESSAGES_SUPPORT /* always off */ #undef HAS_MIRROR_SUPPORT /* mutex debug support disabled. */ #undef HAS_MUTEX_DEBUG_SUPPORT /* Allows AXFR answer from master without AA bit set (Microsoft DNS) disabled. */ #undef HAS_NON_AA_AXFR_SUPPORT /* always on */ #undef HAS_NSEC3_SUPPORT /* always on */ #undef HAS_NSEC_SUPPORT /* NSID support disabled. */ #undef HAS_NSID_SUPPORT /* The system supports thread names */ #undef HAS_PTHREAD_SETNAME_NP /* The system supports spinlocks */ #undef HAS_PTHREAD_SPINLOCK /* always off */ #undef HAS_RDTSC /* always off */ #undef HAS_RRCACHE_ENABLED /* DNS Response Rate Limiter disabled. */ #undef HAS_RRL_SUPPORT /* RRSIG verification and generation for zones disabled. */ #undef HAS_RRSIG_MANAGEMENT_SUPPORT /* The sockaddr_in6 struct has an sin6_len field */ #undef HAS_SOCKADDR_IN6_SIN6_LEN /* The sockaddr_in struct has an sin_len field */ #undef HAS_SOCKADDR_IN_SIN_LEN /* The sockaddr struct has an sa_len field */ #undef HAS_SOCKADDR_SA_LEN /* always off */ #undef HAS_TCL /* always on */ #undef HAS_TSIG_SUPPORT /* where to put the log files */ #undef HAS_WITH_LOGDIR /* zalloc debug support disabled. */ #undef HAS_ZALLOC_DEBUG_SUPPORT /* zalloc statistics support disabled. */ #undef HAS_ZALLOC_STATISTICS_SUPPORT /* zalloc memory system disabled. */ #undef HAS_ZALLOC_SUPPORT /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_BYTESWAP_H /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the header file. */ #undef HAVE_I386_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_I386_TYPES_H /* Define to 1 if the system has the type `int64_t'. */ #undef HAVE_INT64_T /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `c' library (-lc). */ #undef HAVE_LIBC /* Define to 1 if you have the `dnscore' library (-ldnscore). */ #undef HAVE_LIBDNSCORE /* Define to 1 if you have the `dnsdb' library (-ldnsdb). */ #undef HAVE_LIBDNSDB /* Define to 1 if you have the `dnslg' library (-ldnslg). */ #undef HAVE_LIBDNSLG /* Define to 1 if you have the `dnszone' library (-ldnszone). */ #undef HAVE_LIBDNSZONE /* Define to 1 if you have the `pcap' library (-lpcap). */ #undef HAVE_LIBPCAP /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_LIMITS_H /* Define to 1 if the system has the type `long long'. */ #undef HAVE_LONG_LONG /* Define to 1 if you have the header file. */ #undef HAVE_MACHINE_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_NETINET6_IN6_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_PCAP_PCAP_H /* Define to 1 if you have the header file. */ #undef HAVE_PPC_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_BYTEORDER_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_ENDIAN_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSLIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if the system has the type `uint64_t'. */ #undef HAVE_UINT64_T /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if the system has the type `u_char'. */ #undef HAVE_U_CHAR /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* BSD */ #undef IS_BSD_FAMILY /* OSX */ #undef IS_DARWIN_OS /* LINUX */ #undef IS_LINUX_FAMILY /* SOLARIS */ #undef IS_SOLARIS_FAMILY /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* max nic interfaces */ #undef MAX_INTERFACES /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* TCP queue */ #undef TCP_LISTENQ /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Version number of package */ #undef VERSION /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef mode_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ #undef vfork #ifdef DEBUG #define DPRINTF(p) printf p #else #define DPRINTF(p) /* nothing */ #endif /* DEBUG */ yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/NEWS0000644000077100007710000000012412610121331017026 xustar000000000000000027 mtime=1444979417.160777 27 atime=1454597464.823344 30 ctime=1454597654.190344534 yadifa-2.1.6-5826/bin/yadifa/NEWS0000664000077100007710000000001312610121331016625 0ustar00yadifayadifa00000000000000see README yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/main.c0000644000077100007710000000012412650131756017437 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.819344 30 ctime=1454597654.222344534 yadifa-2.1.6-5826/bin/yadifa/main.c0000664000077100007710000001731712650131756017255 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup yadifa * @ingroup ### * @brief */ #include "client-config.h" #include #include #include "client-config.h" #include #include #include #include #include #include "yadifa.h" #include "yadifa-config.h" #undef HAS_TCL /*----------------------------------------------------------------------------*/ logger_handle *g_client_logger; #define MODULE_MSG_HANDLE g_client_logger //extern config_resolver_settings_s yadifa_resolver_settings; //volatile int program_mode = SA_CONT; /** @note must be volatile */ //static bool server_do_clean_exit = FALSE; /*----------------------------------------------------------------------------*/ void config_logger_setdefault(); void config_logger_cleardefault(); /*----------------------------------------------------------------------------*/ ya_result (*generic_config_init)(void); ya_result (*generic_config_cmdline)(int , char **); ya_result (*generic_config_finalise)(void); char * (*generic_config_file_get)(void); int (*generic_run)(void); #define GENERIC_COMMAND_BEGIN(name__,command__) if(! strcmp(program_name, name__)){\ generic_config_init=&command__ ## _config_init;\ generic_config_cmdline=&command__ ## _config_cmdline;\ generic_config_finalise=&command__ ## _config_finalise;\ generic_config_file_get=&command__ ## _config_file_get;\ generic_run=&command__ ## _run;} #define GENERIC_COMMAND(name__,command__) else GENERIC_COMMAND_BEGIN(name__,command__) #define GENERIC_COMMAND_END(command__) else{generic_config_init=&command__ ## _config_init;\ generic_config_cmdline=&command__ ## _config_cmdline;\ generic_config_finalise=&command__ ## _config_finalise;\ generic_config_file_get=&command__ ## _config_file_get;\ generic_run=&command__ ## _run;} /*----------------------------------------------------------------------------*/ /** @brief base_of_path * * @param s char * * @return char * */ static char * base_of_path (char *s) { char *ptr; if (s[0] == '/' && s[1] == 0) { return (s); } ptr = strrchr (s, '/'); return (ptr ? ++ptr : s); } /** @brief get_rc_file * * @param program_name const char * * @return char * */ static char * get_rc_file(const char *program_name) { const char *home_env = getenv ("HOME"); char *rc_file = NULL; if (home_env != NULL) { ssize_t home_env_length = strlen(home_env); ssize_t program_name_length = strlen(program_name); /* allocate memory and create the config */ MALLOC_OR_DIE(char*, rc_file, 1 + home_env_length + 2 + program_name_length + 3, GENERIC_TAG); rc_file[0] = '\0'; strcat(rc_file, home_env); strcat(rc_file, "/."); strcat(rc_file, program_name); strcat(rc_file, ".rc"); log_debug("rc file: '%s'", rc_file); } return rc_file; } typedef struct my_additional_stuff_s my_additional_stuff_s; struct my_additional_stuff_s { struct config_main *next; u16 qtype; u16 qclass; u8 fqdn[256]; }; /* ------------------------------------------------------------ */ /** @brief main function of yadifa * * @param[in] argc number of arguments on the command line * @param[in] argv array of arguments on the command line * * @return EXIT_SUCCESS * @return EXIT_FAILURE * @return exit codes */ int main(int argc, char *argv[]) { ya_result return_code; char *program_name = base_of_path(argv[0]); char *rc_file = get_rc_file(program_name); /* ------------------------------------------------------------ */ /* 1. INIT EVERYTHING */ /* initializes the core library */ dnscore_init(); log_memdump_set_layout(LOG_MEMDUMP_LAYOUT_GERY); parser_init_error_codes(); config_init_error_codes(); logger_start(); GENERIC_COMMAND_BEGIN("yadifa",yadifa) GENERIC_COMMAND_END(yadifa) if(FAIL(return_code = generic_config_init())) { formatln("config_init failed: %r", return_code); flushout(); dnscore_finalize(); return EXIT_FAILURE; } if(FAIL(return_code = generic_config_cmdline(argc, argv))) { formatln("cmdline_parse failed: %r", return_code); flushout(); dnscore_finalize(); return EXIT_FAILURE; } /* if command line option is 'help' or 'version' --> exit */ if (return_code > 0) { return EXIT_SUCCESS; } /* if there's a config file, use that one otherwise use the 'rc' file */ char *config_file; if (NULL == (config_file = generic_config_file_get())) { /* load the config of rc file */ if (FAIL(return_code = config_load_rc(rc_file))) { dnscore_finalize(); return EXIT_FAILURE; } } else { /* load the config of rc file */ if (FAIL(return_code = config_load_rc(config_file))) { dnscore_finalize(); return EXIT_FAILURE; } } if(FAIL(return_code = generic_config_finalise())) { osformatln(termerr, "error: %r", return_code); flusherr(); return EXIT_FAILURE; } /* finally run "the command" */ return_code = generic_run(); return EXIT_SUCCESS; } yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/dnssec-test.h0000644000077100007710000000012412650131756020754 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.810344 30 ctime=1454597654.166344534 yadifa-2.1.6-5826/bin/yadifa/dnssec-test.h0000664000077100007710000000707612650131756020573 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ #pragma once #include "config.h" #include #include #ifdef __cplusplus extern "C" { #endif #define TOSTRING(s) TOSTRING_(s) #define TOSTRING_(s) #s #define PREPROCESSOR_INT2STR(x) #x #define MAIN_CONFIG_LISTEN "0.0.0.0,::0" //#define MAIN_CONFIG_MASTER "10.0.0.11" #define MAIN_CONFIG_MASTER "172.19.67.21" #define MAIN_CONFIG_TSIG_NAME "dynupdate" #define MAIN_CONFIG_TSIG_ALG "hmac-md5" #define MAIN_CONFIG_TSIG_SECRET "MasterAndSlavesTSIGKey==" #define MAIN_CONFIG_CONFIG_FILE PREFIX "/etc/" PACKAGE ".conf" #define MAIN_CONFIG_LOG_PATH PREFIX "/var/log" #define MAIN_CONFIG_PID_FILE PREFIX "/var/run/" PACKAGE ".pid" #define MAIN_CONFIG_XFR_PATH PREFIX "/var/xfr/" #define MAIN_CONFIG_ORIGIN "eu" #define MAIN_CONFIG_XFR_CONNECT_TIMEOUT_S 10 #define MAIN_CONFIG_XFR_CONNECT_TIMEOUT_S_MIN 1 #define MAIN_CONFIG_XFR_CONNECT_TIMEOUT_S_MAX 300 #define MAIN_CONFIG_ACTION_POLL_MIN_TIME_S 10 #define MAIN_CONFIG_SHUTDOWN_POLL_TIME_S 1 #define MAIN_CONFIG_UID "-" // by default, use the current user/group #define MAIN_CONFIG_GID "-" #define MAIN_CONFIG_IGNORE_IPV6 1 #define MAIN_CONFIG_DAEMONIZE 0 /////// /////// struct main_settings_s { //host_address *listen; host_address *master; char *config_file; char *log_path; char *pid_file; char *xfr_path; u8 *origin; u32 xfr_connect_timeout; u32 action_poll_min_time; u32 shutdown_poll_time; uid_t uid; gid_t gid; bool ignore_ipv6; bool daemonize; }; typedef struct main_settings_s main_settings_s; #ifndef MAIN_CONFIG_C extern main_settings_s *main_settings; #endif #ifdef __cplusplus } #endif yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/config.guess0000644000077100007710000000013212473710127020661 xustar000000000000000030 mtime=1424986199.147058409 30 atime=1424986199.146058409 30 ctime=1454597654.201344534 yadifa-2.1.6-5826/bin/yadifa/config.guess0000755000077100007710000012367212473710127020503 0ustar00yadifayadifa00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2014 Free Software Foundation, Inc. timestamp='2014-11-04' # This file 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 3 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, see . # # 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. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2014 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." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/depcomp0000644000077100007710000000013212473710127017716 xustar000000000000000030 mtime=1424986199.161058409 30 atime=1424986199.161058409 30 ctime=1454597654.208344534 yadifa-2.1.6-5826/bin/yadifa/depcomp0000755000077100007710000005601612473710127017535 0ustar00yadifayadifa00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # 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, 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, see . # 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. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: yadifa-2.1.6-5826/bin/yadifa/PaxHeaders.8028/yadifa-config.c0000644000077100007710000000012412650131756021213 xustar000000000000000027 mtime=1453372398.871751 27 atime=1454597464.809344 30 ctime=1454597654.233344534 yadifa-2.1.6-5826/bin/yadifa/yadifa-config.c0000664000077100007710000004350212650131756021024 0ustar00yadifayadifa00000000000000/*------------------------------------------------------------------------------ * * Copyright (c) 2011-2016, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of EURid nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * *------------------------------------------------------------------------------ * */ /** @defgroup yadifa * @ingroup ### * @brief yadifa */ #include "client-config.h" #include #include #include #include #include #include //#include #include #include #include // automatic created include file #include "client-config.h" #include "yadifa-config.h" #include "common-config.h" /*----------------------------------------------------------------------------*/ /* ------------------------------------------------------------ */ #define DEF_VAL_CLASS "CTRL" #define DEF_VAL_TYPE "A" /*----------------------------------------------------------------------------*/ extern logger_handle *g_client_logger; #define MODULE_MSG_HANDLE g_client_logger //extern config_resolver_settings_s g_resolver_settings; struct logger_name_handle_s { const char *name; logger_handle **handlep; }; static const struct logger_name_handle_s logger_name_handles[] = { { "client", &g_client_logger }, { NULL, NULL } }; /*----------------------------------------------------------------------------*/ /// main container #define CONFIG_TYPE config_main_settings_s CONFIG_BEGIN(config_main_desc) CONFIG_HOST_LIST_EX( server, DEF_VAL_SERVER, CONFIG_HOST_LIST_FLAGS_DEFAULT, 1 ) CONFIG_DNS_CLASS( qclass, DEF_VAL_CLASS ) CONFIG_DNS_TYPE( qtype, DEF_VAL_TYPE ) CONFIG_FQDN( qname, "." ) CONFIG_FQDN( tsig_key_name, "ctrl-key" ) CONFIG_BOOL( enable, "on" ) CONFIG_BOOL( clean, "off" ) CONFIG_STRING( config_file, "" ) CONFIG_BOOL( verbose, "off" ) CONFIG_END(config_main_desc) #undef CONFIG_TYPE config_main_settings_s g_yadifa_main_settings; /// use global resolver and general command line settings //extern config_resolver_settings_s g_resolver_settings; /*----------------------------------------------------------------------------*/ // configuration specific to the command line CMDLINE_BEGIN(yadifa_cmdline) // main CMDLINE_SECTION( "yadifa") CMDLINE_OPT( "config", 'c', "config_file" ) CMDLINE_BOOL( "clean", 0, "clean" ) CMDLINE_BOOL_NOT( "noclean", 0, "clean" ) CMDLINE_OPT( "level", 'l', "log_level" ) CMDLINE_OPT( "qname", 'q', "qname" ) CMDLINE_OPT( "server", 's', "server" ) CMDLINE_OPT( "type", 't', "qtype" ) CMDLINE_OPT( "key-name", 'K', "tsig_key_name" ) CMDLINE_BOOL( "enable", 0, "enable" ) CMDLINE_BOOL_NOT( "disable", 0, "enable" ) CMDLINE_BOOL( "verbose", 0, "verbose" ) CMDLINE_BOOL( "json", 0, "json" ) CMDLINE_BOOL( "multiline", 0, "multiline" ) CMDLINE_BOOL( "parse", 0, "parse" ) CMDLINE_BOOL( "short", 0, "short" ) CMDLINE_BOOL( "xml", 0, "xml" ) CMDLINE_BOOL( "wire", 0, "wire" ) // resolver section CMDLINE_RESOLVER(yadifa_cmdline) // command line CMDLINE_VERSION_HELP(yadifa_cmdline) CMDLINE_END(yadifa_cmdline) typedef value_name_table ctrl_type_table; static string_node *ctrl_type_set = NULL; /** @todo 20150219 gve -- check for HAS_CTRL instead of 1 as if statement */ const ctrl_type_table ctrl_type[] = { #if 1 { TYPE_CTRL_SRVCFGRELOAD, TYPE_CTRL_SRVCFGRELOAD_NAME }, { TYPE_CTRL_SRVCFGRELOAD, TYPE_CTRL_SRVCFGRELOAD_NAME }, { TYPE_CTRL_SRVLOGREOPEN, TYPE_CTRL_SRVLOGREOPEN_NAME }, { TYPE_CTRL_SRVSHUTDOWN, TYPE_CTRL_SHUTDOWN_NAME }, { TYPE_CTRL_SRVSHUTDOWN, "HALT" }, { TYPE_CTRL_SRVSHUTDOWN, "STOP" }, { TYPE_CTRL_ZONECFGRELOAD, TYPE_CTRL_ZONECFGRELOAD_NAME }, { TYPE_CTRL_ZONECFGRELOADALL, TYPE_CTRL_ZONECFGRELOADALL_NAME }, { TYPE_CTRL_ZONEFREEZE, TYPE_CTRL_ZONEFREEZE_NAME }, { TYPE_CTRL_ZONEFREEZEALL, TYPE_CTRL_ZONEFREEZEALL_NAME }, { TYPE_CTRL_ZONERELOAD, TYPE_CTRL_ZONERELOAD_NAME }, { TYPE_CTRL_ZONEUNFREEZE, TYPE_CTRL_ZONEUNFREEZE_NAME }, { TYPE_CTRL_ZONEUNFREEZEALL, TYPE_CTRL_ZONEUNFREEZEALL_NAME }, #endif { 0, NULL } }; /*----------------------------------------------------------------------------*/ /** @brief ctrl_rfc_init * * @param -- nothing -- * @return -- nothing -- */ void ctrl_rfc_init() { int i; string_set_avl_init(&ctrl_type_set); for(i = 0; qtype[i].id != 0; i++) { string_node* node = string_set_avl_insert(&ctrl_type_set, ctrl_type[i].data); #if 1 node->value = ctrl_type[i].id; #endif } } /** @brief get_ctrl_type_from_name * * @param src const char * * @param dst u16 * * @retval dst ctrl type * @return ctrl type * @return UNKNOWN_DNS_TYPE */ int get_ctrl_type_from_name(const char *src, u16 *dst) { string_node *node = string_set_avl_find(&ctrl_type_set, (const char *)src); if(node != NULL) { u16 t = node->value; *dst = t; return t; } else { return UNKNOWN_DNS_TYPE; } } /** @brief get_ctrl_type_from_case_name * @discussion this is the same function as get_ctrl_type_from_name * except that the src will be uppercase checked * * @param src const char * * @param dst u16 * * @retval dst ctrl type * @return ctrl type * @return UNKNOWN_DNS_TYPE */ int get_ctrl_type_from_case_name(const char *src, u16 *dst) { char txt[16]; s32 n = strlen(src); if(n > sizeof(txt)) { return UNKNOWN_DNS_TYPE; } for(s32 i = 0; i < n; i++) { txt[i] = toupper(src[i]); } txt[n] = '\0'; return get_ctrl_type_from_name(txt, dst); } /** @brief yadifa_print_usage prints the help page when asked with -h or -V or a incorrect command * line * * @param -- nothing -- * @return -- nothing -- */ static void yadifa_print_usage(void) { puts("\n" "Usage: yadifa [-c config] [-s server] [-v] command\n\n" "\toptions:\n" // "\t\t--config/-c : use as configuration\n" "\t\t--server/-s : can be an ip address or\n" "\t\t : an ip address with portnumber\n" "\t\t : e.g. \"192.0.2.1 port 53\"\n" "\t\t : note: the quotes are needed\n" "\t\t@ : is the same as for [-s ]\n" ); puts("\n" "\t\t--verbose/-v : verbose output\n" "\n" "\t\t--version/-V : view version\n" "\t\t--help/-h : show this help text\n" "\n" "\tcommands:\n" "\t\tfreeze : suspends updates to a zone.\n" "\t\t : note: without all zones are suspended.\n" "\t\tunfreeze : enable updates to a zone.\n" "\t\t : note: without all zones are enabled for updates.\n" "\t\treload : \n" "\t\tcfgreload : \n" "\t\tsync : \n" "\t\tquerylog : \n" "\t\tlogreopen : \n" "\t\tshutdown : shutdowns the server\n" "\n" "\tnote:\n" "\t\twith ambiguity:\n" "\t\t-q : for a zone\n" "\t\t-t : for the command\n" "\t\t-k : for the controller\n" "\t\t--level/-l : with the \"querylog\" command\n" "\n" ); } /** @brief yadifa_print_authors prints the authors who wrote yadifa * * @param -- nothing -- * @return -- nothing -- */ static void yadifa_print_authors() { print("\n" "\t\tYADIFAD authors:\n" "\t\t---------------\n" "\t\t\n" "\t\tGery Van Emelen\n" "\t\tEric Diaz Fernandez\n" "\n" "\t\tContact: " PACKAGE_BUGREPORT "\n" ); flushout(); } /** @brief yadifa_print_version prints the authors who wrote yadifa * * @param level int * @return -- nothing -- */ static void yadifa_print_version(int level) { switch(level) { case 1: osformatln(termout, "%s %s (%s)", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE); break; case 2: osformatln(termout, "%s %s (released %s, compiled %s)", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE, COMPILEDATE); break; case 3: osformatln(termout, "%s %s (released %s, compiled %s)", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE, COMPILEDATE); yadifa_print_authors(); break; default: osformat(termout, "\nYou want to know too much!\n\n"); break; } } /*----------------------------------------------------------------------------*/ /** @brief yadifa_config_finalise * * @param -- nothing -- * @return ya_result */ ya_result yadifa_config_finalise() { config_error_s cfgerr; ya_result return_code; /* ------------------------------------------------------------ */ config_set_source(CONFIG_SOURCE_DEFAULT); if(ISOK(return_code = config_set_default(&cfgerr))) { config_postprocess(); } else { formatln("defaults: internal error: %s:%u : '%s': %r", cfgerr.file, cfgerr.line_number, cfgerr.line, return_code); } /* set all the server ports to the default value if they are 0 */ host_set_default_port_value(g_yadifa_main_settings.server, htons(DEF_VAL_SERVER_PORT)); /** @todo 20140701 gve -- put a nice define */ return return_code; } /** @brief yadifa_config_cmdline_callback * * @param desc const struct cmdline_desc_s * * @param arg_name const char * * @param callback_owned void * * @return ya_result */ static ya_result yadifa_config_cmdline_callback(const struct cmdline_desc_s *desc, const char *arg_name, void *callback_owned) { ya_result return_code = SUCCESS; if(strcmp(arg_name, "--") == 0) { return CMDLINE_ARG_STOP_PROCESSING_FLAG_OPTIONS; } if(arg_name[0] == '@') { formatln("ARG: %s\n", arg_name); flushout(); // config_section_descriptor_s *desc = config_section_get_descriptor("yadifa"); if(desc != NULL) { if(ISOK(return_code = config_value_set(desc, "server", &arg_name[1]))) { /* values >= MUST be 0 or CMDLINE_ARG_STOP_PROCESSING_FLAG_OPTIONS */ return_code = 0; } } else { return_code = ERROR; // bug } } else { } return SUCCESS; } /** @brief yadifa_config_cmdline * * @param argc int * @param argv char ** * @return ya_result */ ya_result yadifa_config_cmdline(int argc, char **argv) { input_stream config_is; config_error_s cfgerr; ya_result return_code; /* ------------------------------------------------------------ */ config_set_source(CONFIG_SOURCE_HIGHEST); if(FAIL(return_code = cmdline_parse(yadifa_cmdline, argc, argv, yadifa_config_cmdline_callback, NULL, &config_is))) { #ifdef DEBUG formatln("cmdline_parse failed: %r", return_code); flushout(); #endif // DEBUG return return_code; } config_set_source(CONFIG_SOURCE_CMDLINE); if(FAIL(return_code = config_read_from_buffer((const char*)bytearray_input_stream_buffer(&config_is), bytearray_input_stream_size(&config_is), "command-line", &cfgerr))) { formatln("%s: parsing error: %s:%u : '%s': %r", "cmdline", cfgerr.file, cfgerr.line_number, cfgerr.line, return_code); flushout(); input_stream_close(&config_is); return return_code; } input_stream_close(&config_is); flushout(); return_code = 0; /* check if cmd '--verion' */ if(cmdline_version_get() > 0) { yadifa_print_version(cmdline_version_get()); return_code++; } /* check if cmd '--help' */ if(cmdline_help_get()) { yadifa_print_usage(); return_code++; } return return_code; } /** @brief yadifa_config_init * * @param -- nothing -- * @return ya_result */ ya_result yadifa_config_init() { ya_result return_code; /* ------------------------------------------------------------ */ /** @todo 20140701 gve -- revisiting maybe this can be removed or put in some kind of option */ /* 1. log handling. Is this really needed? */ for(const struct logger_name_handle_s *name_handle = logger_name_handles; name_handle->name != NULL; name_handle++) { logger_handle_create(name_handle->name, name_handle->handlep); } /** 2. @todo 20140701 gve -- does nothing at the moment, maybe it will be used later */ if(FAIL(return_code = config_init())) { return return_code; } /* 3. register command line options: version and help */ config_set_source(CONFIG_SOURCE_CMDLINE); if(FAIL(return_code = config_register_cmdline(6))) { return return_code; } /* 4. register main options: qname, qclass, qtype, ... * * init and register main settings container */ ZEROMEMORY(&g_yadifa_main_settings, sizeof(g_yadifa_main_settings)); if(FAIL(return_code = config_register_struct("yadifa", config_main_desc, &g_yadifa_main_settings, 5))) { return return_code; } if(FAIL(return_code = config_register_key("key", 7))) { return return_code; } return return_code; } char * yadifa_config_file_get() { struct stat fileinfo; if(g_yadifa_main_settings.config_file != NULL) { if(strlen(g_yadifa_main_settings.config_file) > 0) { if(stat(g_yadifa_main_settings.config_file, &fileinfo) < 0) { formatln("error: %s has error: %lu", g_yadifa_main_settings.config_file, ERRNO_ERROR); exit ERRNO_ERROR; } /* Is it a regular file */ if(!S_ISREG(fileinfo.st_mode)) { formatln("error: %s is not a regular file", g_yadifa_main_settings.config_file); exit CONFIG_NOT_A_REGULAR_FILE; } return g_yadifa_main_settings.config_file; } } return NULL; } /* ------------------------------------------------------------ */